:root {
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-cell: #334155;
    --bg-cell-hover: #475569;
    --primary: #3b82f6;
    /* secondaryBlue in Flutter for dark mode */
    --primary-dim: #2563eb;
    --accent: #8b5cf6;
    /* accentPurple */
    --text: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --error: #ef4444;
    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  }

  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    scroll-snap-type: y mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-card);
  }

  /* Custom scrollbar - WebKit (Chrome, Safari, Edge) */
  ::-webkit-scrollbar {
    width: 10px;
  }

  ::-webkit-scrollbar-track {
    background: var(--bg-card);
    border-radius: 5px;
  }

  ::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dim);
  }

  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
  }

  .gl-page {
    display: flex;
    flex-direction: column;
  }

  /* Header / Nav */
  .nav.glass {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.92) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  }

  .nav__brand a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    font-size: 1.25rem;
    text-decoration: none;
    transition: color 0.2s;
  }

  .nav__brand a:hover {
    color: var(--primary);
  }

  .nav__links {
    display: flex;
    gap: 2rem;
    list-style: none;
  }

  .nav__links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-md);
    transition: all 0.2s;
  }

  .nav__links a:hover {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
  }

  .gl-game {
    min-height: 100vh;
    height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
  }

  .game {
    max-width: 440px;
    margin: 0 auto;
    padding: 2rem 1rem;
  }

  .game--fullscreen {
    width: 100%;
    max-width: 440px;
  }

  .game__header {
    text-align: center;
    margin-bottom: 2rem;
  }

  .game__title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
    color: var(--text);
  }

  .game__rules {
    font-size: 0.875rem;
    color: var(--text-secondary);
  }

  .game__main {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid var(--border);
  }

  .game__board {
    display: inline-grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    background: transparent;
    padding: 4px;
  }

  .game__cell {
    width: clamp(44px, 12vw, 56px);
    height: clamp(44px, 12vw, 56px);
    background: var(--bg-cell);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    border: 1px solid var(--border);
  }

  .game__cell:not(.fixed):hover {
    background: var(--bg-cell-hover);
    transform: scale(1.02);
  }

  .game__cell.fixed {
    cursor: default;
    background: rgba(255, 255, 255, 0.03);
    opacity: 0.9;
  }

  .game__cell[data-value="sun"] {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 800;
  }

  .game__cell[data-value="moon"] {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 800;
  }

  .game__cell.fixed[data-value] {
    background: rgba(255, 255, 255, 0.05);
  }

  .game__controls {
    display: flex;
    gap: 0.75rem;
    width: 100%;
  }

  .game__btn {
    flex: 1;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .game__btn#btn-check {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
  }

  .game__btn#btn-check:hover {
    background: var(--primary-dim);
    transform: translateY(-1px);
  }

  .game__btn--secondary {
    background: var(--bg-cell);
    color: var(--text-secondary);
    border: 1px solid var(--border);
  }

  .game__btn--secondary:hover {
    background: var(--bg-cell-hover);
    color: var(--text);
  }

  .game__status {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    min-height: 1.25rem;
  }

  .game__status.win {
    color: var(--success);
    font-weight: 600;
  }

  .footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: auto;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .footer a {
    color: var(--text-secondary);
    text-decoration: none;
  }

  .footer a:hover {
    color: var(--primary);
  }

  .gl-hero {
    min-height: 100vh;
    height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: radial-gradient(circle at top center, rgba(59, 130, 246, 0.12), transparent 65%);
  }

  .gl-hero__content {
    max-width: 640px;
  }

  .gl-hero__label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 20px;
  }

  .gl-hero__title {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--text);
  }

  .gl-hero__tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
  }

  .gl-hero__rules {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 480px;
    margin: 0 auto;
  }

  .gl-hero__legal {
    margin-top: 2rem;
    font-size: 0.85rem;
  }

  .gl-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
  }

  .gl-hero__cta .game__btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }

  .gl-hero__cta .game__btn--play {
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text);
  }

  .gl-hero__cta .game__btn--play:hover {
    background: #252540;
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text);
  }

  .gl-hero__cta .game__btn--play img {
    height: 28px;
    width: 28px;
    object-fit: contain;
  }

  .gl-hero__legal a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.2s;
  }

  .gl-hero__legal a:hover {
    color: var(--primary);
  }