﻿    /* ── Game Page Layout ── */
    .game-page {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      min-height: 100vh;
      padding: 16px;
    }



    .back-link {
      color: #a855f7;
      border: 1px solid rgba(168, 85, 247, 0.25);
    }
    .back-link:hover {
      background: rgba(168, 85, 247, 0.1);
      border-color: #a855f7;
      box-shadow: 0 0 18px rgba(168, 85, 247, 0.15);
    }

    /* ── HUD ── */
    .hud {
      width: 100%;
      max-width: 700px;
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      margin-bottom: 8px;
      padding: 0 4px;
    }

    .hud__score, .hud__high {
      font-family: 'Orbitron', sans-serif;
      font-weight: 700;
      letter-spacing: 0.06em;
    }
    .hud__score {
      font-size: 1.3rem;
      color: #a855f7;
      text-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
    }
    .hud__high {
      font-size: 0.85rem;
      color: #06d6a0;
      text-shadow: 0 0 14px rgba(6, 214, 160, 0.4);
    }

    /* ── Canvas Container ── */
    .canvas-wrap {
      position: relative;
      border-radius: 12px;
      overflow: hidden;
      box-shadow:
        0 0 30px rgba(168, 85, 247, 0.08),
        0 0 80px rgba(6, 214, 160, 0.06),
        inset 0 0 60px rgba(0, 0, 0, 0.4);
      border: 1px solid rgba(255, 255, 255, 0.06);
    }
    .canvas-wrap canvas {
      display: block;
    }

    /* ── Overlays ── */
    .overlay {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 32px;
      z-index: 5;
      transition: opacity 0.3s ease;
    }
    .overlay--hidden { opacity: 0; pointer-events: none; }
    .overlay--visible { opacity: 1; pointer-events: auto; }

    .overlay__bg {
      position: absolute;
      inset: 0;
      background: rgba(8, 12, 24, 0.88);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
    }

    .overlay__content {
      position: relative;
      z-index: 1;
    }

    .overlay__title {
      font-family: 'Orbitron', sans-serif;
      font-size: clamp(1.6rem, 5vw, 2.6rem);
      font-weight: 900;
      margin-bottom: 12px;
      background: linear-gradient(135deg, #a855f7, #06d6a0, #38bdf8);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      animation: gradientShift 4s ease infinite;
      background-size: 200% 200%;
    }
    @keyframes gradientShift {
      0%, 100% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
    }

    .overlay__subtitle {
      font-family: 'Inter', sans-serif;
      font-size: 0.95rem;
      color: #c1cbd8;
      margin-bottom: 8px;
      font-weight: 300;
    }

    .overlay__final-score {
      font-family: 'Orbitron', sans-serif;
      font-size: 2.8rem;
      font-weight: 900;
      color: #a855f7;
      text-shadow: 0 0 40px rgba(168, 85, 247, 0.6);
      margin: 16px 0 4px;
    }
    .overlay__final-label {
      font-family: 'Inter', sans-serif;
      font-size: 0.75rem;
      color: #8892a4;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      margin-bottom: 8px;
    }
    .overlay__high-score {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.9rem;
      color: #06d6a0;
      text-shadow: 0 0 14px rgba(6, 214, 160, 0.35);
      margin-bottom: 24px;
    }
    .overlay__new-best {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.7rem;
      color: #facc15;
      text-shadow: 0 0 14px rgba(250, 204, 21, 0.5);
      letter-spacing: 0.15em;
      margin-bottom: 20px;
      animation: pulse 1.5s ease-in-out infinite;
    }
    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.4; }
    }

    .overlay__prompt {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.75rem;
      color: #c1cbd8;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      animation: pulse 2s ease-in-out infinite;
    }

    .overlay__orb-art {
      display: flex;
      gap: 10px;
      margin: 20px auto 28px;
      justify-content: center;
      align-items: center;
    }
    .overlay__orb-art span {
      border-radius: 50%;
      animation: orbBounce 2s ease-in-out infinite;
    }
    .overlay__orb-art span:nth-child(1) { width: 10px; height: 10px; background: #06d6a0; animation-delay: 0s; }
    .overlay__orb-art span:nth-child(2) { width: 14px; height: 14px; background: #38bdf8; animation-delay: 0.15s; }
    .overlay__orb-art span:nth-child(3) { width: 22px; height: 22px; background: #a855f7; box-shadow: 0 0 20px rgba(168,85,247,0.5); animation-delay: 0.3s; }
    .overlay__orb-art span:nth-child(4) { width: 14px; height: 14px; background: #38bdf8; animation-delay: 0.45s; }
    .overlay__orb-art span:nth-child(5) { width: 10px; height: 10px; background: #06d6a0; animation-delay: 0.6s; }
    @keyframes orbBounce {
      0%, 100% { transform: translateY(0); opacity: 0.6; }
      50% { transform: translateY(-10px); opacity: 1; }
    }

    /* ── Mobile controls ── */
    .mobile-controls {
      display: none;
      margin-top: 16px;
      gap: 8px;
    }
    .mobile-controls__row {
      display: flex;
      justify-content: center;
      gap: 8px;
    }
    .mobile-btn {
      width: 70px;
      height: 60px;
      border-radius: 10px;
      border: 1px solid rgba(168, 85, 247, 0.2);
      background: rgba(168, 85, 247, 0.06);
      color: #a855f7;
      font-size: 1.4rem;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      user-select: none;
      -webkit-user-select: none;
      transition: background 0.15s, border-color 0.15s;
    }
    .mobile-btn:active {
      background: rgba(168, 85, 247, 0.18);
      border-color: #a855f7;
    }

    @media (pointer: coarse) {
      .mobile-controls { display: flex; flex-direction: column; align-items: center; }
    }
    @media (max-width: 500px) {
      .mobile-controls { display: flex; flex-direction: column; align-items: center; }
    }
