body[data-theme="light"] {
  --bg-color: linear-gradient(180deg, #f6f7fb, #eef1f7);
  --text-color: #0f172a;
  --text-light: rgba(15, 23, 42, 0.85); /* Dark text for light mode */
  --muted: rgba(15, 23, 42, 0.72);
  --card-bg: rgba(255, 255, 255, 0.92);
  --panel: rgba(255, 255, 255, 0.92);
  --stroke: rgba(15, 23, 42, 0.12);
  --shadow: 0 18px 46px rgba(2, 6, 23, 0.10);

  --accent-color: #4f46e5; /* indigo */
  --accent-glow: rgba(79, 70, 229, 0.35);
  --accent-glow-soft: rgba(79, 70, 229, 0.14);
  --button-bg: #4f46e5;
  --button-text: #ffffff;
  --focus-ring: 0 0 0 3px rgba(79, 70, 229, 0.45);

  --cyan: #2563eb;
  --pink: #db2777;
  --lime: #16a34a;
  --purple: #6d28d9;
  
  /* Override neon colors for light mode */
  --neon-cyan: #0369a1; /* Darker cyan for visibility */
  --neon-pink: #be185d; /* Darker pink for visibility */
  --neon-lime: #15803d; /* Darker lime for visibility */
  --neon-purple: #581c87; /* Darker purple for visibility */
}

body[data-theme="light"] .nav {
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
}

body[data-theme="light"] .nav-link:hover {
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

/* Fix hero headers in light mode */
body[data-theme="light"] .hero h1 {
  color: #0f172a; /* Dark text for readability */
  text-shadow: none;
}

body[data-theme="light"] .hero p {
  color: rgba(15, 23, 42, 0.7);
}

/* Fix game title in light mode */
body[data-theme="light"] .game-title {
  color: #0369a1; /* Dark cyan */
  text-shadow: none;
}

body[data-theme="light"] .gz-title {
  color: #0369a1; /* Dark cyan for visibility */
  text-shadow: none;
}

body[data-theme="light"] .gz-sub {
  color: rgba(15, 23, 42, 0.7);
}

body[data-theme="light"] .gz-stats {
  color: #0369a1; /* Dark cyan */
  text-shadow: none;
}

/* Fix tutorial text in light mode */
body[data-theme="light"] .tutorial-h1 {
  color: #0369a1;
  text-shadow: none;
}

body[data-theme="light"] .tutorial-h2 {
  color: #be185d; /* Dark pink */
  text-shadow: none;
}

body[data-theme="light"] .tutorial-text {
  color: rgba(15, 23, 42, 0.85);
}

body[data-theme="light"] .tutorial-step,
body[data-theme="light"] .tutorial-rule,
body[data-theme="light"] .tutorial-control,
body[data-theme="light"] .tutorial-tip {
  color: rgba(15, 23, 42, 0.85);
}

body[data-theme="light"] .tutorial-cta-title {
  color: #be185d;
  text-shadow: none;
}

body[data-theme="light"] .tutorial-cta-text {
  color: rgba(15, 23, 42, 0.8);
}

/* Fix card titles in light mode */
body[data-theme="light"] .card-title {
  color: #0f172a;
}

body[data-theme="light"] .card-desc {
  color: rgba(15, 23, 42, 0.65);
}

/* Fix Pass It On modal in light mode */
body[data-theme="light"] .pass-it-on-modal {
  background: rgba(255, 255, 255, 0.9);
}

body[data-theme="light"] .pass-it-on-content {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border-color: rgba(79, 70, 229, 0.3);
}

body[data-theme="light"] .pass-it-on-title {
  color: #be185d;
  text-shadow: none;
}

body[data-theme="light"] .pass-it-on-subtitle {
  color: #0369a1;
  text-shadow: none;
}

body[data-theme="light"] .pass-it-on-message {
  color: rgba(15, 23, 42, 0.85);
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(15, 23, 42, 0.15);
}

/* Fix logo and all headers in light mode */
body[data-theme="light"] .logo {
  color: #0f172a;
  font-size: 1.75rem; /* Increased from 1.5rem */
}

body[data-theme="light"] .hero h1 {
  color: #0f172a;
  text-shadow: none;
}

body[data-theme="light"] .hero p {
  color: rgba(15, 23, 42, 0.7);
}

body[data-theme="light"] .game-title {
  color: #0369a1;
  text-shadow: none;
}

body[data-theme="light"] .gz-title {
  color: #0369a1;
  text-shadow: none;
}

body[data-theme="light"] .gz-sub {
  color: rgba(15, 23, 42, 0.7);
}

body[data-theme="light"] .gz-stats {
  color: #0369a1;
  text-shadow: none;
}

body[data-theme="light"] .gz-message {
  color: rgba(15, 23, 42, 0.7);
}

body[data-theme="light"] .card-title {
  color: #0f172a;
}

body[data-theme="light"] .card-desc {
  color: rgba(15, 23, 42, 0.65);
}

/* Fix ALL buttons in light mode - CRITICAL */
body[data-theme="light"] .btn {
  background: #4f46e5; /* Solid indigo background */
  color: #ffffff; /* White text for high contrast */
  border: 1px solid #4f46e5;
}

body[data-theme="light"] .btn:hover {
  background: #4338ca; /* Darker on hover */
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
}

body[data-theme="light"] .btn.ghost {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #4f46e5;
  color: #4f46e5; /* Indigo text */
}

body[data-theme="light"] .btn.ghost:hover {
  background: rgba(79, 70, 229, 0.1);
  border-color: #4338ca;
}

body[data-theme="light"] .game-shell {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(79, 70, 229, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 0 24px rgba(79, 70, 229, 0.08);
}

/* Fix dungeon roguelike overlay visibility */
body[data-theme="light"] .gz-dungeon-overlay {
  background: rgba(255, 255, 255, 0.95);
  border: 3px solid #4f46e5;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

body[data-theme="light"] .gz-dungeon-overlay h2 {
  color: #0369a1;
  text-shadow: none;
}

body[data-theme="light"] .gz-dungeon-overlay p {
  color: rgba(15, 23, 42, 0.85);
}

body[data-theme="light"] .gz-dungeon-grid {
  border: 2px solid rgba(79, 70, 229, 0.3);
}

/* Fix tutorial text in light mode */
body[data-theme="light"] .tutorial-h1 {
  color: #0369a1;
  text-shadow: none;
}

body[data-theme="light"] .tutorial-h2 {
  color: #be185d;
  text-shadow: none;
}

body[data-theme="light"] .tutorial-text {
  color: rgba(15, 23, 42, 0.85);
}

body[data-theme="light"] .tutorial-step,
body[data-theme="light"] .tutorial-rule,
body[data-theme="light"] .tutorial-control,
body[data-theme="light"] .tutorial-tip {
  color: rgba(15, 23, 42, 0.85);
}

body[data-theme="light"] .tutorial-cta-title {
  color: #be185d;
  text-shadow: none;
}

body[data-theme="light"] .tutorial-cta-text {
  color: rgba(15, 23, 42, 0.8);
}

body[data-theme="light"] .tutorial-intro {
  color: rgba(15, 23, 42, 0.85);
  background: rgba(255, 255, 255, 0.95);
}

body[data-theme="light"] .tutorial-footer-text {
  color: rgba(15, 23, 42, 0.65);
}

body[data-theme="light"] .tutorial-step::before {
  background: linear-gradient(135deg, #0369a1, #581c87);
  color: #ffffff;
}

body[data-theme="light"] .tutorial-rule::before {
  color: #15803d;
}

body[data-theme="light"] .pass-it-on-modal {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

body[data-theme="light"] .pass-it-on-content {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border-color: rgba(79, 70, 229, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15), 0 0 32px rgba(79, 70, 229, 0.1);
}

body[data-theme="light"] .pass-it-on-title {
  color: #be185d;
  text-shadow: none;
}

body[data-theme="light"] .pass-it-on-subtitle {
  color: #0369a1;
  text-shadow: none;
}

body[data-theme="light"] .pass-it-on-message {
  color: rgba(15, 23, 42, 0.85);
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(15, 23, 42, 0.15);
}

/* Fix all game-specific text elements */
body[data-theme="light"] .gz-word-cell,
body[data-theme="light"] .gz-2048-cell,
body[data-theme="light"] .gz-sudoku-cell,
body[data-theme="light"] .gz-mem-card,
body[data-theme="light"] .gz-slide-cell,
body[data-theme="light"] .gz-lights-cell {
  color: #0f172a;
  border-color: rgba(79, 70, 229, 0.3);
}

body[data-theme="light"] .gz-stat-label,
body[data-theme="light"] .gz-stat-value {
  color: #0f172a;
}

body[data-theme="light"] .gz-hp,
body[data-theme="light"] .gz-level,
body[data-theme="light"] .gz-kills {
  color: #0369a1;
  text-shadow: none;
}

/* Fix input fields */
body[data-theme="light"] input[type="text"],
body[data-theme="light"] input[type="number"],
body[data-theme="light"] textarea {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(79, 70, 229, 0.3);
  color: #0f172a;
}

body[data-theme="light"] input:focus,
body[data-theme="light"] textarea:focus {
  border-color: #4f46e5;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Fix nav links */
body[data-theme="light"] .nav-link {
  color: #0f172a;
}

body[data-theme="light"] .nav-link:hover,
body[data-theme="light"] .nav-link.active {
  color: #4f46e5;
}

/* Fix play pill button on cards */
body[data-theme="light"] .play-pill {
  background: #4f46e5;
  color: #ffffff;
  border: none;
}

body[data-theme="light"] .play-pill:hover {
  background: #4338ca;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
}

/* Fix score displays */
body[data-theme="light"] .score .label {
  color: rgba(15, 23, 42, 0.7);
}

body[data-theme="light"] .score .value {
  color: #0369a1;
  text-shadow: none;
}

/* Fix status panels */
body[data-theme="light"] .status-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(79, 70, 229, 0.2);
}

body[data-theme="light"] .status-panel .turn,
body[data-theme="light"] .status-panel .status {
  color: #0f172a;
}
