/* ==========================================================================
   Word Search - Classic Puzzle (by Appstick Ltd)
   Main Stylesheet (Vanilla CSS, Responsive, Dark/Light Mode, Modern Aesthetics)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Tokens - Game Inspired */
  --primary-emerald: #10B981;
  --primary-emerald-dark: #059669;
  --primary-emerald-light: #D1FAE5;
  --accent-amber: #F59E0B;
  --accent-amber-dark: #D97706;
  --accent-blue: #3B82F6;
  --accent-blue-dark: #2563EB;
  --accent-purple: #8B5CF6;
  --accent-purple-dark: #7C3AED;

  /* Light Theme (Default) */
  --bg-main: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-tile: #F1F5F9;
  --bg-tile-hover: #E2E8F0;
  --bg-tile-selected: #10B981;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  --border-color: #E2E8F0;
  --border-hover: #CBD5E1;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(226, 232, 240, 0.8);
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 16px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 32px -4px rgba(15, 23, 42, 0.12);
  --shadow-tactile: 0 5px 0 #059669;
  --shadow-tactile-blue: 0 5px 0 #2563EB;
  --shadow-tactile-amber: 0 5px 0 #D97706;
  --shadow-tactile-purple: 0 5px 0 #7C3AED;
  --hero-glow-1: rgba(16, 185, 129, 0.15);
  --hero-glow-2: rgba(59, 130, 246, 0.12);
  --hero-glow-3: rgba(245, 158, 11, 0.12);

  /* Typography */
  --font-heading: 'Fredoka', cursive, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --container-max: 1200px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-main: #0B1120;
  --bg-surface: #131D33;
  --bg-surface-elevated: #1B2845;
  --bg-card: #141E34;
  --bg-tile: #1E293B;
  --bg-tile-hover: #334155;
  --bg-tile-selected: #10B981;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;
  --border-color: #1E293B;
  --border-hover: #334155;
  --glass-bg: rgba(19, 29, 51, 0.85);
  --glass-border: rgba(30, 41, 59, 0.8);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 16px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 32px -4px rgba(0, 0, 0, 0.5);
  --shadow-tactile: 0 5px 0 #064E3B;
  --shadow-tactile-blue: 0 5px 0 #1E3A8A;
  --shadow-tactile-amber: 0 5px 0 #78350F;
  --shadow-tactile-purple: 0 5px 0 #4C1D95;
  --hero-glow-1: rgba(16, 185, 129, 0.22);
  --hero-glow-2: rgba(59, 130, 246, 0.2);
  --hero-glow-3: rgba(245, 158, 11, 0.18);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-main);
}

.brand-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #10B981, #059669);
}

.brand-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  line-height: 1.1;
  font-size: 1.35rem;
  background: linear-gradient(135deg, #10B981 0%, #3B82F6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.7rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  position: relative;
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-emerald);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  transform: rotate(15deg);
  border-color: var(--primary-emerald);
  color: var(--primary-emerald);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  padding: 0.5rem;
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   Buttons & 3D Tactile Elements
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
  user-select: none;
  position: relative;
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 transparent !important;
}

.btn-primary {
  background: var(--primary-emerald);
  color: #FFFFFF;
  box-shadow: var(--shadow-tactile);
}

.btn-primary:hover {
  background: #0ea571;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 0 var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-tile);
}

.btn-secondary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--border-color);
}

.btn-amber {
  background: var(--accent-amber);
  color: #FFFFFF;
  box-shadow: var(--shadow-tactile-amber);
}

.btn-amber:hover {
  background: #ea580c;
}

.btn-blue {
  background: var(--accent-blue);
  color: #FFFFFF;
  box-shadow: var(--shadow-tactile-blue);
}

.btn-blue:hover {
  background: var(--accent-blue-dark);
}

.btn-sm {
  font-size: 0.9rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
}

/* Store Badge Buttons */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #0F172A;
  color: #FFFFFF;
  padding: 0.65rem 1.4rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

[data-theme="dark"] .store-btn {
  background: #1E293B;
  border-color: #334155;
}

.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  border-color: var(--primary-emerald);
}

.store-btn-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.store-btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.store-btn-subtitle {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.75;
  font-weight: 500;
}

.store-btn-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.1;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  position: relative;
  padding: 4.5rem 0 5rem;
  overflow: hidden;
}

.hero-glow-bg {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(circle, var(--hero-glow-1) 0%, var(--hero-glow-2) 40%, transparent 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-emerald);
  width: fit-content;
  box-shadow: var(--shadow-sm);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-emerald);
  border-radius: 50%;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.6rem;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-title-highlight {
  background: linear-gradient(135deg, #10B981 0%, #3B82F6 70%, #8B5CF6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.18rem;
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.65;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: 0.5rem;
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
}

.hero-stat-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.hero-stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Hero Visual / Mockup */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-mockup {
  position: relative;
  width: 310px;
  height: 590px;
  background: #0F172A;
  border-radius: 46px;
  padding: 12px;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.4),
              0 0 0 1px rgba(255, 255, 255, 0.1),
              inset 0 0 0 2px #334155;
  transition: transform var(--transition-normal);
  animation: floatPhone 6s ease-in-out infinite;
}

@keyframes floatPhone {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg-main);
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 18px;
  background: #0F172A;
  border-radius: 20px;
  z-index: 10;
}

.screen-app-preview {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 38px 16px 16px;
  background: linear-gradient(180deg, #F0FDF4 0%, #FFFFFF 100%);
}

[data-theme="dark"] .screen-app-preview {
  background: linear-gradient(180deg, #13221C 0%, #0F172A 100%);
}

.mockup-app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.mockup-badge {
  background: var(--primary-emerald);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
}

.mockup-category {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-amber-dark);
}

.mockup-grid-box {
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: 18px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.mockup-tile {
  aspect-ratio: 1;
  background: var(--bg-tile);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.mockup-tile.found {
  background: var(--primary-emerald);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.mockup-tile.selected {
  background: var(--accent-blue);
  color: #FFFFFF;
}

.mockup-wordlist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.mockup-word-pill {
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 4px 9px;
  border-radius: 20px;
  background: var(--bg-tile);
  color: var(--text-muted);
}

.mockup-word-pill.done {
  background: var(--primary-emerald-light);
  color: var(--primary-emerald-dark);
  text-decoration: line-through;
}

[data-theme="dark"] .mockup-word-pill.done {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
}

/* Floating Letters */
.floating-letter {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  z-index: 5;
  animation: floatTile 5s ease-in-out infinite;
}

.floating-letter-1 {
  top: 15%;
  left: -20px;
  background: #ECFDF5;
  color: var(--primary-emerald);
  border-color: #A7F3D0;
  animation-delay: 0s;
}

.floating-letter-2 {
  top: 65%;
  left: -30px;
  background: #EFF6FF;
  color: var(--accent-blue);
  border-color: #BFDBFE;
  animation-delay: 1.5s;
}

.floating-letter-3 {
  top: 25%;
  right: -25px;
  background: #FFFBEB;
  color: var(--accent-amber);
  border-color: #FDE68A;
  animation-delay: 0.8s;
}

.floating-letter-4 {
  top: 75%;
  right: -15px;
  background: #F5F3FF;
  color: var(--accent-purple);
  border-color: #DDD6FE;
  animation-delay: 2.2s;
}

[data-theme="dark"] .floating-letter-1 { background: #064E3B; border-color: #059669; }
[data-theme="dark"] .floating-letter-2 { background: #1E3A8A; border-color: #2563EB; }
[data-theme="dark"] .floating-letter-3 { background: #78350F; border-color: #D97706; }
[data-theme="dark"] .floating-letter-4 { background: #4C1D95; border-color: #7C3AED; }

@keyframes floatTile {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(4deg); }
}

/* ==========================================================================
   Playable Mini Game Section
   ========================================================================== */

.playable-game-section {
  padding: 5rem 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-emerald);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.game-container-card {
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg-main);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 2px dashed var(--border-color);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.game-category-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.game-category-badge {
  background: var(--accent-amber);
  color: white;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
}

.game-level-text {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  font-size: 1.1rem;
}

.game-stats-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.game-stat-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
}

.game-stat-chip svg {
  width: 18px;
  height: 18px;
  color: var(--primary-emerald);
}

.game-controls-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg-tile);
  border-color: var(--border-hover);
  color: var(--primary-emerald);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* Play Grid */
.game-play-area {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 2rem;
  align-items: start;
}

.word-grid-wrapper {
  display: flex;
  justify-content: center;
  user-select: none;
  touch-action: none;
}

.word-search-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  background: var(--bg-surface);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

.grid-cell {
  width: 48px;
  height: 48px;
  background: var(--bg-tile);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.15s ease, color 0.15s ease;
  position: relative;
}

.grid-cell:hover {
  background: var(--bg-tile-hover);
}

.grid-cell.selecting {
  background: var(--accent-blue);
  color: #FFFFFF;
  border-color: var(--accent-blue-dark);
  transform: scale(0.95);
}

.grid-cell.found-word {
  background: var(--primary-emerald);
  color: #FFFFFF;
  border-color: var(--primary-emerald-dark);
}

.grid-cell.hinted {
  animation: pulseHint 1.2s infinite;
  background: var(--accent-amber);
  color: white;
}

@keyframes pulseHint {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); box-shadow: 0 0 12px var(--accent-amber); }
}

/* Sidebar with Words to Find */
.game-words-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-count {
  font-size: 0.85rem;
  font-family: var(--font-body);
  color: var(--primary-emerald);
  font-weight: 700;
}

.words-to-find-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  list-style: none;
}

.word-target-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.95rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.word-target-item.found {
  background: var(--primary-emerald-light);
  border-color: var(--primary-emerald);
  color: var(--primary-emerald-dark);
  text-decoration: line-through;
  opacity: 0.85;
}

[data-theme="dark"] .word-target-item.found {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
}

.word-target-status-icon {
  width: 18px;
  height: 18px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.word-target-item.found .word-target-status-icon {
  opacity: 1;
}

/* Win Overlay */
.win-modal-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.win-modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

.win-card {
  background: var(--bg-surface);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  max-width: 420px;
  width: 90%;
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.win-trophy-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.win-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--primary-emerald);
  margin-bottom: 0.5rem;
}

.win-message {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.win-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.features-section {
  padding: 5.5rem 0;
  background: var(--bg-main);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.feature-icon-box {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.feature-icon-box.emerald {
  background: #ECFDF5;
  color: var(--primary-emerald);
}
.feature-icon-box.amber {
  background: #FFFBEB;
  color: var(--accent-amber);
}
.feature-icon-box.blue {
  background: #EFF6FF;
  color: var(--accent-blue);
}
.feature-icon-box.purple {
  background: #F5F3FF;
  color: var(--accent-purple);
}

[data-theme="dark"] .feature-icon-box.emerald { background: rgba(16, 185, 129, 0.15); }
[data-theme="dark"] .feature-icon-box.amber { background: rgba(245, 158, 11, 0.15); }
[data-theme="dark"] .feature-icon-box.blue { background: rgba(59, 130, 246, 0.15); }
[data-theme="dark"] .feature-icon-box.purple { background: rgba(139, 92, 246, 0.15); }

.feature-card-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
}

.feature-card-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* ==========================================================================
   How To Play Section
   ========================================================================== */

.how-to-play-section {
  padding: 5.5rem 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1rem;
}

.step-card {
  background: var(--bg-main);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-number {
  position: absolute;
  top: -18px;
  background: var(--primary-emerald);
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-family: var(--font-heading);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
}

.step-icon-wrap {
  font-size: 2.75rem;
  margin: 1rem 0 1.25rem;
}

.step-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.step-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Theme Showcase Section
   ========================================================================== */

.themes-preview-section {
  padding: 5.5rem 0;
  background: var(--bg-main);
}

.theme-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.theme-palette-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  transition: transform var(--transition-fast);
}

.theme-palette-card:hover {
  transform: translateY(-4px);
}

.theme-swatch-group {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 1rem;
}

.theme-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.theme-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

/* ==========================================================================
   CTA Banner Section
   ========================================================================== */

.cta-banner-section {
  padding: 5rem 0;
}

.cta-banner-box {
  background: linear-gradient(135deg, #10B981 0%, #059669 50%, #047857 100%);
  border-radius: var(--radius-lg);
  padding: 4rem 3rem;
  color: #FFFFFF;
  text-align: center;
  box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.4);
  position: relative;
  overflow: hidden;
}

.cta-banner-box::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.cta-title {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-subtitle {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2.25rem;
  opacity: 0.92;
}

.cta-buttons-wrap {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 4.5rem 0 2rem;
  color: var(--text-muted);
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.25fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-about {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.footer-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 360px;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.2rem;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--primary-emerald);
}

.contact-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #10B981;
  color: #FFFFFF;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  width: fit-content;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

.contact-pill-btn:hover {
  background: #059669;
  transform: translateY(-2px);
  color: #FFFFFF;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
}

.footer-company-link {
  color: var(--primary-emerald);
  font-weight: 700;
}

.footer-company-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Legal Pages (Privacy Policy & Terms)
   ========================================================================== */

.legal-page-header {
  padding: 3.5rem 0 2.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.legal-header-tag {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-emerald);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.legal-page-title {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.legal-page-date {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.legal-body-container {
  max-width: 860px;
  margin: 3.5rem auto;
  padding: 0 1.5rem;
}

.legal-content-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.legal-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legal-section-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border-color);
}

.legal-text {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.legal-list {
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-muted);
}

.legal-callout {
  background: var(--bg-tile);
  border-left: 4px solid var(--primary-emerald);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.98rem;
  color: var(--text-main);
}

.legal-contact-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  .hero-content {
    align-items: center;
  }
  .hero-description {
    margin: 0 auto;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .game-play-area {
    grid-template-columns: 1fr;
  }
  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.6rem;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 4.5rem;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.mobile-active {
    display: flex;
  }
  .mobile-menu-btn {
    display: block;
  }
  .game-container-card {
    padding: 1.25rem;
  }
  .grid-cell {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }
  .footer-top-grid {
    grid-template-columns: 1fr;
  }
  .cta-title {
    font-size: 2rem;
  }
  .legal-content-card {
    padding: 1.75rem;
  }
}

@media (max-width: 480px) {
  .grid-cell {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }
  .word-search-grid {
    gap: 4px;
    padding: 8px;
  }
}
