/**
 * GMG Genre Theme Styles
 * Theme-specific backgrounds, colors, and mascot transitions
 */

:root {
  --genre-accent: #6ef0d5;
  --genre-accent-rgb: 110, 240, 213;
  --genre-secondary: #8c4bff;
  --genre-background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* ============================================
   MASCOT TRANSITIONS
   ============================================ */

.hero-mascot img {
  transition: opacity 0.2s ease-out, transform 0.3s ease-out;
}

.hero-mascot img.mascot-fade-out {
  opacity: 0;
  transform: scale(0.95);
}

.hero-mascot img.mascot-fade-in {
  opacity: 1;
  transform: scale(1);
}

/* ============================================
   HERO TWO-COLUMN LAYOUT
   ============================================ */

.hero-section-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 3rem;
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.hero-section-new::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--genre-background);
  opacity: 0.3;
  z-index: -1;
  transition: background 0.5s ease;
}

.hero-content-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 2;
  order: 2;
}

.hero-mascot-new {
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  order: 1;
  margin-bottom: 1.5rem;
  z-index: 3;
}

.hero-mascot-new img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4));
  transition: opacity 0.2s ease-out, transform 0.3s ease-out;
}

.hero-mascot-new img.mascot-fade-out {
  opacity: 0;
  transform: scale(0.95) translateY(10px);
}

.hero-mascot-new img.mascot-fade-in {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.hero-title-new {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle-new {
  font-size: 1.125rem;
  color: var(--steel);
  max-width: 500px;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.hero-theme-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.hero-theme-picker label {
  font-size: 0.875rem;
  color: var(--steel);
  font-weight: 500;
}

.hero-theme-picker select {
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  color: var(--text-primary);
  min-width: 200px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.hero-theme-picker select:focus {
  outline: none;
  border-color: var(--genre-accent);
  box-shadow: 0 0 0 3px rgba(var(--genre-accent-rgb), 0.2);
}

.hero-cta-new {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 320px;
}

.hero-btn-primary-new {
  padding: 1rem 1.5rem;
  background: var(--genre-accent);
  border: none;
  border-radius: 0.5rem;
  color: var(--midnight);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 0 20px rgba(var(--genre-accent-rgb), 0.3);
  transition: box-shadow 0.2s, transform 0.2s;
}

.hero-btn-primary-new:hover {
  box-shadow: 0 0 30px rgba(var(--genre-accent-rgb), 0.5);
  transform: translateY(-2px);
}

.hero-btn-secondary-new {
  padding: 0.875rem 1.25rem;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.hero-btn-secondary-new:hover {
  border-color: var(--genre-secondary);
  box-shadow: 0 0 16px rgba(140, 75, 255, 0.2);
  background: rgba(140, 75, 255, 0.05);
}

.hero-btn-tertiary-new {
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--steel);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.hero-btn-tertiary-new:hover {
  color: var(--genre-accent);
}

/* Desktop layout */
@media (min-width: 768px) {
  .hero-section-new {
    flex-direction: row;
    justify-content: center;
    gap: 3rem;
    padding: 3rem 2rem 4rem;
    min-height: 450px;
  }

  .hero-content-new {
    order: 1;
    text-align: left;
    align-items: flex-start;
    max-width: 480px;
  }

  .hero-mascot-new {
    order: 2;
    width: 350px;
    height: 350px;
    margin-bottom: 0;
    position: relative;
    top: -20px;
  }

  .hero-cta-new {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: none;
  }

  .hero-theme-picker {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .hero-section-new {
    gap: 4rem;
    padding: 4rem 3rem 5rem;
  }

  .hero-title-new {
    font-size: 3rem;
  }

  .hero-subtitle-new {
    font-size: 1.25rem;
  }

  .hero-mascot-new {
    width: 420px;
    height: 420px;
  }
}

@media (min-width: 1280px) {
  .hero-mascot-new {
    width: 480px;
    height: 480px;
  }
}

/* ============================================
   THEME-SPECIFIC HERO BACKGROUNDS
   ============================================ */

.genre-fantasy .hero-section-new::before {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1a2a3a 100%);
}

.genre-dark-fantasy .hero-section-new::before {
  background: linear-gradient(135deg, #0d0d0d 0%, #1a0a1a 50%, #200a15 100%);
}

.genre-mythic-ancient .hero-section-new::before {
  background: linear-gradient(135deg, #2c2416 0%, #3d2e1f 50%, #4a3825 100%);
}

.genre-horror-gothic .hero-section-new::before {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0f0f 50%, #200a0a 100%);
}

.genre-horror-cosmic .hero-section-new::before {
  background: linear-gradient(135deg, #0a0f1a 0%, #0d1520 50%, #0a1525 100%);
}

.genre-urban-fantasy .hero-section-new::before {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 50%, #3a1a5a 100%);
}

.genre-modern-urban .hero-section-new::before {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #333333 100%);
}

.genre-cyberpunk .hero-section-new::before {
  background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2a 50%, #200a30 100%);
}

.genre-scifi-space-opera .hero-section-new::before {
  background: linear-gradient(135deg, #0a0a20 0%, #1a1a40 50%, #1a2050 100%);
}

.genre-scifi-frontier .hero-section-new::before {
  background: linear-gradient(135deg, #0d1a0d 0%, #1a2a1a 50%, #1a3020 100%);
}

.genre-scifi-robots-ai .hero-section-new::before {
  background: linear-gradient(135deg, #0d1518 0%, #1a2528 50%, #1a2a30 100%);
}

.genre-post-apoc .hero-section-new::before {
  background: linear-gradient(135deg, #1a1510 0%, #2a2015 50%, #352a1a 100%);
}

.genre-weird-surreal .hero-section-new::before {
  background: linear-gradient(135deg, #1a0a1a 0%, #0a1a2a 50%, #1a1a30 100%);
}

.genre-any .hero-section-new::before {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1a2a3a 100%);
}

/* ============================================
   THEME-SPECIFIC ACCENT OVERRIDES
   ============================================ */

.genre-fantasy {
  --genre-accent: #6ef0d5;
  --genre-accent-rgb: 110, 240, 213;
  --genre-secondary: #8c4bff;
}

.genre-dark-fantasy {
  --genre-accent: #9b59b6;
  --genre-accent-rgb: 155, 89, 182;
  --genre-secondary: #e74c3c;
}

.genre-mythic-ancient {
  --genre-accent: #f1c40f;
  --genre-accent-rgb: 241, 196, 15;
  --genre-secondary: #e67e22;
}

.genre-horror-gothic {
  --genre-accent: #c0392b;
  --genre-accent-rgb: 192, 57, 43;
  --genre-secondary: #8e44ad;
}

.genre-horror-cosmic {
  --genre-accent: #1abc9c;
  --genre-accent-rgb: 26, 188, 156;
  --genre-secondary: #3498db;
}

.genre-urban-fantasy {
  --genre-accent: #e91e63;
  --genre-accent-rgb: 233, 30, 99;
  --genre-secondary: #9c27b0;
}

.genre-modern-urban {
  --genre-accent: #2196f3;
  --genre-accent-rgb: 33, 150, 243;
  --genre-secondary: #ff9800;
}

.genre-cyberpunk {
  --genre-accent: #00ffff;
  --genre-accent-rgb: 0, 255, 255;
  --genre-secondary: #ff00ff;
}

.genre-scifi-space-opera {
  --genre-accent: #3498db;
  --genre-accent-rgb: 52, 152, 219;
  --genre-secondary: #9b59b6;
}

.genre-scifi-frontier {
  --genre-accent: #27ae60;
  --genre-accent-rgb: 39, 174, 96;
  --genre-secondary: #f39c12;
}

.genre-scifi-robots-ai {
  --genre-accent: #00bcd4;
  --genre-accent-rgb: 0, 188, 212;
  --genre-secondary: #ff5722;
}

.genre-post-apoc {
  --genre-accent: #ff9800;
  --genre-accent-rgb: 255, 152, 0;
  --genre-secondary: #795548;
}

.genre-weird-surreal {
  --genre-accent: #e91e63;
  --genre-accent-rgb: 233, 30, 99;
  --genre-secondary: #00bcd4;
}

.genre-any {
  --genre-accent: #6ef0d5;
  --genre-accent-rgb: 110, 240, 213;
  --genre-secondary: #8c4bff;
}

/* ============================================
   QUICK SESSION PREP SECTION
   ============================================ */

.session-prep-rail {
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  padding: 2.5rem 1rem;
}

.session-prep-rail-inner {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.session-prep-rail-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.session-prep-rail-subtitle {
  color: var(--steel);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.session-prep-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.session-prep-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--obsidian);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.session-prep-step:hover {
  border-color: var(--genre-accent);
  box-shadow: 0 4px 20px rgba(var(--genre-accent-rgb), 0.15);
  transform: translateY(-2px);
}

.session-prep-step-number {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: linear-gradient(135deg, var(--genre-accent), var(--genre-secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--midnight);
}

.session-prep-step-content {
  flex: 1;
}

.session-prep-step-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.0625rem;
  margin-bottom: 0.25rem;
}

.session-prep-step-desc {
  color: var(--steel);
  font-size: 0.875rem;
}

.session-prep-step-action {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--genre-accent);
  border-radius: 0.375rem;
  color: var(--genre-accent);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .session-prep-rail {
    padding: 3rem 2rem;
  }

  .session-prep-steps {
    flex-direction: row;
    gap: 1rem;
  }

  .session-prep-step {
    flex: 1;
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }

  .session-prep-step-content {
    text-align: center;
  }

  .session-prep-step-action {
    margin-top: 0.75rem;
  }
}

@media (min-width: 1024px) {
  .session-prep-rail-title {
    font-size: 1.75rem;
  }

  .session-prep-step {
    padding: 2rem;
  }

  .session-prep-step-number {
    width: 48px;
    height: 48px;
    min-width: 48px;
    font-size: 1.25rem;
  }
}

/* ============================================
   HERO GLOW EFFECT (subtle per-theme)
   ============================================ */

.hero-section-new::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 150%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(var(--genre-accent-rgb), 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   PART 1: THEME-AWARE DARK MODE
   ============================================ */

/* Dark mode base styling */
.mode-dark {
  --dm-bg-base: #0a0b0f;
  --dm-bg-elevated: #12141a;
  --dm-text-primary: #f0f2f5;
  --dm-text-secondary: #9ca3af;
}

/* Dark mode mascot treatment - add glow for separation */
.mode-dark .hero-mascot-new img {
  filter: drop-shadow(0 0 30px rgba(var(--genre-accent-rgb), 0.4))
          drop-shadow(0 10px 40px rgba(0, 0, 0, 0.6));
}

.mode-dark .hero-mascot-new {
  position: relative;
}

.mode-dark .hero-mascot-new::before {
  content: '';
  position: absolute;
  inset: -10px;
  background: radial-gradient(circle, rgba(var(--genre-accent-rgb), 0.15) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
}

/* ---- Fantasy + Dark ---- */
.mode-dark.genre-fantasy,
.mode-dark .genre-fantasy {
  --genre-accent: #50d4b8;
  --genre-accent-rgb: 80, 212, 184;
  --genre-secondary: #a855f7;
}

.mode-dark.genre-fantasy .hero-section-new::before,
.mode-dark .genre-fantasy .hero-section-new::before {
  background: linear-gradient(135deg, #0d1a15 0%, #0a1f1a 50%, #081a12 100%);
  opacity: 0.6;
}

/* ---- Dark Fantasy + Dark ---- */
.mode-dark.genre-dark-fantasy,
.mode-dark .genre-dark-fantasy {
  --genre-accent: #a855f7;
  --genre-accent-rgb: 168, 85, 247;
  --genre-secondary: #dc2626;
}

.mode-dark.genre-dark-fantasy .hero-section-new::before,
.mode-dark .genre-dark-fantasy .hero-section-new::before {
  background: linear-gradient(135deg, #050505 0%, #0d050d 50%, #0a0508 100%);
  opacity: 0.7;
}

/* ---- Mythic Ancient + Dark ---- */
.mode-dark.genre-mythic-ancient,
.mode-dark .genre-mythic-ancient {
  --genre-accent: #fbbf24;
  --genre-accent-rgb: 251, 191, 36;
  --genre-secondary: #f97316;
}

.mode-dark.genre-mythic-ancient .hero-section-new::before,
.mode-dark .genre-mythic-ancient .hero-section-new::before {
  background: linear-gradient(135deg, #1a150a 0%, #1f170d 50%, #251d10 100%);
  opacity: 0.6;
}

/* ---- Horror Gothic + Dark ---- */
.mode-dark.genre-horror-gothic,
.mode-dark .genre-horror-gothic {
  --genre-accent: #b91c1c;
  --genre-accent-rgb: 185, 28, 28;
  --genre-secondary: #7c3aed;
}

.mode-dark.genre-horror-gothic .hero-section-new::before,
.mode-dark .genre-horror-gothic .hero-section-new::before {
  background: linear-gradient(135deg, #050303 0%, #0a0505 50%, #0d0606 100%);
  opacity: 0.8;
}

/* ---- Horror Cosmic + Dark ---- */
.mode-dark.genre-horror-cosmic,
.mode-dark .genre-horror-cosmic {
  --genre-accent: #14b8a6;
  --genre-accent-rgb: 20, 184, 166;
  --genre-secondary: #2563eb;
}

.mode-dark.genre-horror-cosmic .hero-section-new::before,
.mode-dark .genre-horror-cosmic .hero-section-new::before {
  background: linear-gradient(135deg, #030508 0%, #05080d 50%, #030a10 100%);
  opacity: 0.7;
}

/* ---- Urban Fantasy + Dark ---- */
.mode-dark.genre-urban-fantasy,
.mode-dark .genre-urban-fantasy {
  --genre-accent: #ec4899;
  --genre-accent-rgb: 236, 72, 153;
  --genre-secondary: #a855f7;
}

.mode-dark.genre-urban-fantasy .hero-section-new::before,
.mode-dark .genre-urban-fantasy .hero-section-new::before {
  background: linear-gradient(135deg, #0a0812 0%, #120a1a 50%, #180a20 100%);
  opacity: 0.6;
}

/* ---- Modern Urban + Dark ---- */
.mode-dark.genre-modern-urban,
.mode-dark .genre-modern-urban {
  --genre-accent: #3b82f6;
  --genre-accent-rgb: 59, 130, 246;
  --genre-secondary: #f97316;
}

.mode-dark.genre-modern-urban .hero-section-new::before,
.mode-dark .genre-modern-urban .hero-section-new::before {
  background: linear-gradient(135deg, #080808 0%, #0d0d0d 50%, #121212 100%);
  opacity: 0.7;
}

/* ---- Cyberpunk + Dark ---- */
.mode-dark.genre-cyberpunk,
.mode-dark .genre-cyberpunk {
  --genre-accent: #00e5ff;
  --genre-accent-rgb: 0, 229, 255;
  --genre-secondary: #f0f;
}

.mode-dark.genre-cyberpunk .hero-section-new::before,
.mode-dark .genre-cyberpunk .hero-section-new::before {
  background: linear-gradient(135deg, #030310 0%, #08051a 50%, #0a0520 100%);
  opacity: 0.7;
}

/* Cyberpunk glitch grid overlay */
.mode-dark.genre-cyberpunk .hero-section-new::after,
.mode-dark .genre-cyberpunk .hero-section-new::after {
  background: 
    radial-gradient(ellipse at center, rgba(0, 229, 255, 0.1) 0%, transparent 60%),
    linear-gradient(90deg, rgba(255, 0, 255, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(0, 229, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
}

/* ---- Sci-Fi Space Opera + Dark ---- */
.mode-dark.genre-scifi-space-opera,
.mode-dark .genre-scifi-space-opera {
  --genre-accent: #60a5fa;
  --genre-accent-rgb: 96, 165, 250;
  --genre-secondary: #a78bfa;
}

.mode-dark.genre-scifi-space-opera .hero-section-new::before,
.mode-dark .genre-scifi-space-opera .hero-section-new::before {
  background: linear-gradient(135deg, #030510 0%, #050820 50%, #08102a 100%);
  opacity: 0.7;
}

/* ---- Sci-Fi Frontier + Dark ---- */
.mode-dark.genre-scifi-frontier,
.mode-dark .genre-scifi-frontier {
  --genre-accent: #22c55e;
  --genre-accent-rgb: 34, 197, 94;
  --genre-secondary: #eab308;
}

.mode-dark.genre-scifi-frontier .hero-section-new::before,
.mode-dark .genre-scifi-frontier .hero-section-new::before {
  background: linear-gradient(135deg, #050a05 0%, #081008 50%, #0a150a 100%);
  opacity: 0.6;
}

/* ---- Sci-Fi Robots AI + Dark ---- */
.mode-dark.genre-scifi-robots-ai,
.mode-dark .genre-scifi-robots-ai {
  --genre-accent: #06b6d4;
  --genre-accent-rgb: 6, 182, 212;
  --genre-secondary: #f97316;
}

.mode-dark.genre-scifi-robots-ai .hero-section-new::before,
.mode-dark .genre-scifi-robots-ai .hero-section-new::before {
  background: linear-gradient(135deg, #050808 0%, #080d0f 50%, #0a1215 100%);
  opacity: 0.7;
}

/* ---- Post-Apocalyptic + Dark ---- */
.mode-dark.genre-post-apoc,
.mode-dark .genre-post-apoc {
  --genre-accent: #f59e0b;
  --genre-accent-rgb: 245, 158, 11;
  --genre-secondary: #78716c;
}

.mode-dark.genre-post-apoc .hero-section-new::before,
.mode-dark .genre-post-apoc .hero-section-new::before {
  background: linear-gradient(135deg, #0a0805 0%, #100c08 50%, #15100a 100%);
  opacity: 0.6;
}

/* ---- Weird Surreal + Dark ---- */
.mode-dark.genre-weird-surreal,
.mode-dark .genre-weird-surreal {
  --genre-accent: #f472b6;
  --genre-accent-rgb: 244, 114, 182;
  --genre-secondary: #22d3ee;
}

.mode-dark.genre-weird-surreal .hero-section-new::before,
.mode-dark .genre-weird-surreal .hero-section-new::before {
  background: linear-gradient(135deg, #08050a 0%, #050810 50%, #0a0a15 100%);
  opacity: 0.6;
}

/* ---- Any/Generic + Dark ---- */
.mode-dark.genre-any,
.mode-dark .genre-any {
  --genre-accent: #5eead4;
  --genre-accent-rgb: 94, 234, 212;
  --genre-secondary: #a78bfa;
}

.mode-dark.genre-any .hero-section-new::before,
.mode-dark .genre-any .hero-section-new::before {
  background: linear-gradient(135deg, #080a0f 0%, #0a0d15 50%, #0d1018 100%);
  opacity: 0.6;
}

/* Dark mode session prep rail */
.mode-dark .session-prep-rail {
  background: var(--dm-bg-elevated, #12141a);
  border-color: rgba(255, 255, 255, 0.08);
}

.mode-dark .session-prep-step {
  background: var(--dm-bg-base, #0a0b0f);
  border-color: rgba(255, 255, 255, 0.1);
}

.mode-dark .session-prep-step:hover {
  border-color: var(--genre-accent);
  box-shadow: 0 4px 25px rgba(var(--genre-accent-rgb), 0.2);
}

/* ============================================
   PART 2: TOOL CATEGORY GRID
   ============================================ */

.tool-category-grid {
  padding: 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.tool-category-grid-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 0.5rem;
}

.tool-category-grid-subtitle {
  text-align: center;
  color: var(--steel);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.tool-categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .tool-categories {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tool-categories {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .tool-category-grid-title {
    font-size: 2rem;
  }
}

.tool-category-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.tool-category-card:hover {
  border-color: var(--genre-accent);
  box-shadow: 0 4px 20px rgba(var(--genre-accent-rgb), 0.12);
  transform: translateY(-3px);
}

.tool-category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tool-category-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.tool-category-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tool-category-desc {
  color: var(--steel);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.tool-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-category-link {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  background: var(--obsidian);
  border: 1px solid var(--card-border);
  border-radius: 0.375rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  cursor: pointer;
}

.tool-category-link:hover {
  background: rgba(var(--genre-accent-rgb), 0.1);
  border-color: var(--genre-accent);
  color: var(--genre-accent);
}

/* Dark mode tool cards */
.mode-dark .tool-category-card {
  background: var(--dm-bg-elevated, #12141a);
  border-color: rgba(255, 255, 255, 0.08);
}

.mode-dark .tool-category-link {
  background: var(--dm-bg-base, #0a0b0f);
  border-color: rgba(255, 255, 255, 0.1);
}

.mode-dark .tool-category-link:hover {
  background: rgba(var(--genre-accent-rgb), 0.15);
}

/* ============================================
   PART 3: MOBILE HERO POLISH
   ============================================ */

/* Mobile-first hero refinements */
@media (max-width: 767px) {
  .hero-section-new {
    padding: 1.5rem 1rem 2rem;
    min-height: auto;
  }

  .hero-mascot-new {
    width: 220px;
    height: 220px;
    margin-bottom: 1rem;
  }

  .hero-title-new {
    font-size: 1.875rem;
    margin-bottom: 0.5rem;
  }

  .hero-subtitle-new {
    font-size: 1rem;
    margin-bottom: 1rem;
    max-width: 100%;
    padding: 0 0.5rem;
  }

  .hero-theme-picker {
    margin-bottom: 1.25rem;
    width: 100%;
  }

  .hero-theme-picker select {
    width: 100%;
    max-width: 280px;
  }

  .hero-cta-new {
    width: 100%;
    max-width: 100%;
    padding: 0 0.5rem;
  }

  .hero-btn-primary-new {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }

  .hero-btn-secondary-new {
    width: 100%;
    min-height: 44px;
    padding: 0.75rem 1.25rem;
  }

  .hero-btn-tertiary-new {
    width: 100%;
    min-height: 44px;
    padding: 0.75rem 1rem;
  }

  /* Mobile session prep rail - compact version */
  .session-prep-rail {
    padding: 1.5rem 1rem;
  }

  .session-prep-rail-title {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
  }

  .session-prep-rail-subtitle {
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
  }

  .session-prep-steps {
    gap: 0.75rem;
  }

  .session-prep-step {
    padding: 1rem;
    gap: 0.75rem;
  }

  .session-prep-step-number {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 1rem;
  }

  .session-prep-step-title {
    font-size: 0.9375rem;
    margin-bottom: 0.125rem;
  }

  .session-prep-step-desc {
    font-size: 0.8125rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .session-prep-step-action {
    display: none;
  }

  /* Mobile tool category grid */
  .tool-category-grid {
    padding: 2rem 1rem;
  }

  .tool-category-grid-title {
    font-size: 1.5rem;
  }

  .tool-category-grid-subtitle {
    margin-bottom: 1.5rem;
  }

  .tool-categories {
    gap: 1rem;
  }

  .tool-category-card {
    padding: 1.25rem;
  }

  .tool-category-header {
    margin-bottom: 0.5rem;
  }

  .tool-category-icon {
    font-size: 1.5rem;
  }

  .tool-category-title {
    font-size: 1rem;
  }

  .tool-category-desc {
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
  }

  .tool-category-links {
    gap: 0.375rem;
  }

  .tool-category-link {
    font-size: 0.75rem;
    padding: 0.3125rem 0.625rem;
  }
}

/* Extra small screens */
@media (max-width: 374px) {
  .hero-mascot-new {
    width: 180px;
    height: 180px;
  }

  .hero-title-new {
    font-size: 1.625rem;
  }

  .hero-subtitle-new {
    font-size: 0.9375rem;
  }

  .session-prep-step-desc {
    -webkit-line-clamp: 1;
  }
}

/* Horizontal scroll strip variant for very small screens */
@media (max-width: 480px) {
  .session-prep-steps-horizontal {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .session-prep-steps-horizontal .session-prep-step {
    flex: 0 0 auto;
    width: 85%;
    max-width: 280px;
    scroll-snap-align: start;
  }
}

/* Ensure hero + prep fits in ~1.5 screens on mobile */
@media (max-height: 700px) and (max-width: 767px) {
  .hero-mascot-new {
    width: 160px;
    height: 160px;
  }

  .hero-section-new {
    padding: 1rem;
  }

  .session-prep-rail {
    padding: 1rem;
  }
}
