:root {
      --bg-primary: #1A252F;
      --bg-secondary: #2C3E50;
      --bg-card: #243442;
      --accent: #FF6B6B;
      --accent-dark: #E85A5A;
      --accent-glow: rgba(255, 107, 107, 0.4);
      --perfect: #FFE66D;
      --combo-glow: #4ECDC4;
      --text-primary: #fff;
      --text-secondary: #8FA3B8;
      --border: #3D5A73;
    }

    body {
      font-family: 'Segoe UI', system-ui, sans-serif;
      background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
      color: var(--text-primary);
      min-height: 100dvh;
      min-height: -webkit-fill-available;
      overflow: hidden;
      touch-action: none;
      -webkit-tap-highlight-color: transparent;
      -webkit-user-select: none;
      user-select: none;
      overscroll-behavior: none;
    }

    /* Stats Bar */
    .stats-bar {
      display: flex;
      justify-content: center;
      gap: 2rem;
      padding: 0.75rem;
      background: var(--bg-secondary);
      border-bottom: 1px solid var(--border);
    }

    .stat {
      text-align: center;
    }

    .stat-value {
      font-size: 1.5rem;
      font-weight: 700;
      color: var(--accent);
    }

    .stat-label {
      font-size: 0.7rem;
      color: var(--text-secondary);
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    /* Combo indicator */
    .combo-indicator {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      font-size: 2rem;
      font-weight: 800;
      color: var(--perfect);
      text-shadow: 0 0 20px var(--accent-glow);
      z-index: 50;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.2s, transform 0.2s;
    }

    .combo-indicator.show {
      opacity: 1;
      animation: comboPop 0.5s ease-out;
    }

    @keyframes comboPop {
      0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
      50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
      100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
    }

    /* Game Container */
    .game-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 0.5rem;
      height: calc(100dvh - 140px);
      width: 100%;
    }

    /* Canvas */
    #gameCanvas {
      box-sizing: content-box;
      border: 2px solid var(--accent);
      border-radius: 8px;
      background: var(--bg-card);
      touch-action: none;
      display: block;
      box-shadow: 0 0 30px var(--accent-glow);
    }

    /* Mobile adjustments */
    @media (max-width: 600px) {
      .stats-bar { padding: 0.5rem; gap: 1rem; }
      .stat-value { font-size: 1.2rem; }
      .game-container {
        padding: 0;
        height: calc(100dvh - 100px);
      }
      #gameCanvas {
        border-radius: 0;
        border-left: none;
        border-right: none;
      }
    }

    /* Landscape mobile */
    @media (max-height: 500px) {
      .stats-bar { padding: 0.3rem; gap: 0.75rem; }
      .stat-value { font-size: 1rem; }
      .stat-label { font-size: 0.6rem; }
      .game-container {
        height: calc(100dvh - 90px);
        padding: 0.25rem;
      }
      .overlay-content { padding: 1rem; }
      .overlay-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
      .overlay-title { font-size: 1.5rem; }
      .overlay-score { font-size: 2rem; }
      .play-btn { padding: 0.75rem 2rem; font-size: 1rem; }
    }

    /* Overlays */
    .game-overlay {
      position: fixed;
      inset: 0;
      background: rgba(26, 37, 47, 0.95);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 100;
    }

    .game-overlay.hidden { display: none; }

    .overlay-content {
      text-align: center;
      padding: 2rem;
      max-width: 400px;
    }

    .overlay-icon {
      font-size: 4rem;
      margin-bottom: 1rem;
    }

    .overlay-title {
      font-size: 2rem;
      font-weight: 700;
      margin-bottom: 0.5rem;
      color: var(--accent);
    }

    .overlay-subtitle {
      color: var(--text-secondary);
      margin-bottom: 1.5rem;
    }

    .overlay-score {
      font-size: 3rem;
      font-weight: 800;
      color: var(--accent);
      margin-bottom: 0.5rem;
    }

    .overlay-high-score {
      color: var(--perfect);
      margin-bottom: 1.5rem;
    }

    .play-btn {
      background: var(--accent);
      color: #000;
      border: none;
      padding: 1rem 3rem;
      border-radius: 30px;
      font-size: 1.2rem;
      font-weight: 700;
      cursor: pointer;
      transition: transform 0.2s, box-shadow 0.2s;
    }

    .play-btn:hover {
      transform: scale(1.05);
      box-shadow: 0 0 30px var(--accent-glow);
    }

    .controls-hint {
      margin-top: 1.5rem;
      color: var(--text-secondary);
      font-size: 0.85rem;
    }

    /* Stats display in game over */
    .game-stats {
      display: flex;
      justify-content: center;
      gap: 2rem;
      margin: 1rem 0;
    }

    .game-stat {
      text-align: center;
    }

    .game-stat-value {
      font-size: 1.5rem;
      font-weight: 700;
      color: var(--combo-glow);
    }

    .game-stat-label {
      font-size: 0.75rem;
      color: var(--text-secondary);
    }

    /* Auth Modal */
    .auth-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.8);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s;
    }

    .auth-modal-overlay.show {
      opacity: 1;
      visibility: visible;
    }

    .auth-modal {
      background: var(--bg-card);
      border-radius: 16px;
      padding: 2rem;
      width: 90%;
      max-width: 400px;
      text-align: center;
      position: relative;
    }

    .auth-modal h2 {
      font-size: 1.5rem;
      margin-bottom: 0.5rem;
    }

    .auth-modal p {
      color: var(--text-secondary);
      margin-bottom: 1.5rem;
    }

    .auth-modal-close {
      position: absolute;
      top: 1rem;
      right: 1rem;
      background: none;
      border: none;
      color: var(--text-secondary);
      font-size: 1.5rem;
      cursor: pointer;
    }

    .google-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.75rem;
      width: 100%;
      padding: 0.875rem 1rem;
      background: white;
      color: #333;
      border: none;
      border-radius: 8px;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
    }

    .google-btn img {
      width: 20px;
      height: 20px;
    }

    /* More Games Section */
    .more-games {
      background: var(--bg-secondary);
      border-top: 1px solid var(--border);
      padding: 1.5rem;
      margin-top: auto;
    }

    .more-games-title {
      font-size: 1rem;
      color: var(--text-secondary);
      margin-bottom: 1rem;
      text-align: center;
    }

    .more-games-grid {
      display: flex;
      gap: 0.75rem;
      justify-content: center;
      flex-wrap: wrap;
    }

    .more-game-link {
      background: var(--bg-primary);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 0.75rem 1rem;
      text-decoration: none;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 0.9rem;
      transition: transform 0.2s, border-color 0.2s;
    }

    .more-game-link:hover {
      transform: translateY(-2px);
      border-color: var(--accent);
    }

    .more-game-link span:first-child {
      font-size: 1.2rem;
    }

    @media (max-width: 768px) {
      .more-games { display: none; }
    }

    /* Accessibility: Respect reduced motion preferences */
