  @font-face {
    font-family: 'Old Sport College';
    src: url('../fonts/OldSport01CollegeNcv-aeGm.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
  }

  body {
    background: #030308;
    color: white;
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    overflow: hidden;
    user-select: none;
  }
  #gameCanvas { display: block; background: #0a0a14; }
  .hidden { display: none !important; }
  .btn-primary {
    background: #daa74b;
    color: #000;
    font-weight: 900;
    padding: 14px 32px;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    font-size: 16px;
    letter-spacing: 1px;
    transition: all 0.15s;
    box-shadow: 0 0 24px rgba(218,167,75,0.5);
  }
  .btn-primary:hover { background: #ffc766; transform: translateY(-2px); box-shadow: 0 0 32px rgba(218,167,75,0.8); }

  .answer-card {
    position: absolute;
    transform: translateX(-50%);
    width: 230px;
    background: rgba(10,10,20,0.92);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.3;
    color: #e5e5e5;
    text-align: center;
    transition: all 0.2s;
    pointer-events: none;
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  }
  .answer-card.correct {
    border-color: #22c55e;
    background: rgba(34,197,94,0.35);
    color: #fff;
    box-shadow: 0 0 40px rgba(34,197,94,0.9);
    transform: translateX(-50%) scale(1.08);
  }
  .answer-card.wrong {
    border-color: #ef4444;
    background: rgba(239,68,68,0.25);
    color: #fff;
    box-shadow: 0 0 30px rgba(239,68,68,0.7);
  }
  .answer-card .letter {
    font-weight: 900;
    font-size: 20px;
    margin-right: 6px;
    vertical-align: middle;
  }
  .answer-card .text {
    display: inline;
    vertical-align: middle;
  }
  .answer-card .letter.A { color: #daa74b; text-shadow: 0 0 12px #daa74b; }
  .answer-card .letter.B { color: #4a9eff; text-shadow: 0 0 12px #4a9eff; }
  .answer-card .letter.C { color: #22c55e; text-shadow: 0 0 12px #22c55e; }
  .answer-card .letter.D { color: #ef4444; text-shadow: 0 0 12px #ef4444; }

  .shake { animation: shake 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
  @keyframes shake {
    10%, 90% { transform: translate(-2px, 0); }
    20%, 80% { transform: translate(4px, 0); }
    30%, 50%, 70% { transform: translate(-6px, 0); }
    40%, 60% { transform: translate(6px, 0); }
  }

  .flash-screen {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 100;
  }
  .flash-screen.flash { opacity: 0.35; }

  .arcade-hud {
    position: absolute;
    padding: 14px 22px;
    background: rgba(0,0,0,0.75);
    border: 2px solid rgba(218,167,75,0.4);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 20px rgba(218,167,75,0.2);
  }
  .arcade-hud .label {
    font-size: 10px;
    letter-spacing: 3px;
    color: #888;
  }
  .arcade-hud .value {
    font-family: 'Courier New', monospace;
    font-weight: 900;
    font-size: 30px;
    color: #daa74b;
    text-shadow: 0 0 15px rgba(218,167,75,0.8);
  }

  #questionBanner {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 28px;
    background: rgba(0,0,0,0.9);
    border: 2px solid #daa74b;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(218,167,75,0.4);
    max-width: 800px;
    text-align: center;
  }
  #questionBanner .cat {
    font-size: 10px;
    color: #888;
    letter-spacing: 2px;
    margin-bottom: 4px;
  }
  #questionBanner .q {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
  }
  #questionBanner .timer {
    font-family: monospace;
    font-size: 18px;
    color: #daa74b;
    font-weight: 900;
  }
  #questionBanner.flash { animation: qflash 0.4s infinite; }
  @keyframes qflash {
    0%, 100% { border-color: #daa74b; }
    50% { border-color: #ef4444; box-shadow: 0 0 40px rgba(239,68,68,0.8); }
  }

  .combo-text {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 90px;
    font-weight: 900;
    color: #daa74b;
    text-shadow: 0 0 40px rgba(218,167,75,1), 0 0 80px rgba(218,167,75,0.6);
    pointer-events: none;
    animation: comboPop 0.9s ease-out forwards;
    z-index: 150;
  }
  @keyframes comboPop {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
    30% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    60% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -60%) scale(0.9); }
  }

  /* TIMING BAR */
  .timing-bar {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 480px;
    height: 34px;
    background: rgba(0,0,0,0.9);
    border: 3px solid rgba(218,167,75,0.6);
    border-radius: 17px;
    overflow: hidden;
    display: none;
    box-shadow: 0 0 30px rgba(218,167,75,0.5);
    z-index: 50;
  }
  .timing-bar.active { display: block; }
  .timing-bar-inner {
    position: relative;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg,
      rgba(239,68,68,0.35) 0%,
      rgba(239,68,68,0.35) 30%,
      rgba(34,197,94,0.55) 42%,
      rgba(34,197,94,0.75) 50%,
      rgba(34,197,94,0.55) 58%,
      rgba(239,68,68,0.35) 70%,
      rgba(239,68,68,0.35) 100%);
  }
  .timing-bar .green-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 42%;
    width: 16%;
    background: rgba(34,197,94,0.4);
    border-left: 2px solid #22c55e;
    border-right: 2px solid #22c55e;
    box-shadow: 0 0 25px rgba(34,197,94,0.9);
    animation: greenPulse 0.6s infinite alternate;
  }
  @keyframes greenPulse {
    from { box-shadow: 0 0 15px rgba(34,197,94,0.7); }
    to { box-shadow: 0 0 35px rgba(34,197,94,1); }
  }
  .timing-bar .needle {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 6px;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 0 20px #fff, 0 0 40px #daa74b;
    transition: left 0.016s linear;
    z-index: 3;
  }
  .timing-bar .label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 4px;
    text-shadow: 0 0 10px #000, 0 0 10px #000;
    pointer-events: none;
    z-index: 4;
  }

  .instruction-pill {
    position: absolute;
    bottom: 72px;
    left: 50%;
    transform: translateX(-50%);
    color: #daa74b;
    font-size: 13px;
    letter-spacing: 3px;
    font-weight: 700;
    background: rgba(0,0,0,0.8);
    padding: 8px 24px;
    border-radius: 20px;
    border: 1px solid rgba(218,167,75,0.5);
    display: none;
    text-shadow: 0 0 10px rgba(218,167,75,0.8);
  }
  .instruction-pill.active { display: block; animation: qflash 0.8s infinite; }

  .big-pop {
    position: absolute;
    font-weight: 900;
    font-size: 44px;
    pointer-events: none;
    z-index: 120;
    animation: bigPop 1.1s ease-out forwards;
    text-shadow: 0 0 30px currentColor;
  }
  @keyframes bigPop {
    0% { opacity: 1; transform: translate(-50%, 0) scale(0.6); }
    40% { opacity: 1; transform: translate(-50%, -50px) scale(1.3); }
    100% { opacity: 0; transform: translate(-50%, -140px) scale(1); }
  }

  /* PERFECT flash */
  .perfect-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 120px;
    font-weight: 900;
    color: #22c55e;
    text-shadow: 0 0 60px #22c55e, 0 0 120px #22c55e;
    letter-spacing: 6px;
    pointer-events: none;
    z-index: 200;
    opacity: 0;
  }
  .perfect-banner.go {
    animation: perfectPop 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  }
  @keyframes perfectPop {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
    25% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
    60% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -60%) scale(1.05); }
  }

  #startScreen, #gameOverScreen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 40px 50px;
    text-align: center;
    max-width: 560px;
    background: rgba(5,5,15,0.96);
    border: 2px solid rgba(218,167,75,0.5);
    border-radius: 18px;
    box-shadow: 0 0 60px rgba(218,167,75,0.3);
  }
  @keyframes borderPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(218,167,75,0.3); }
    50% { box-shadow: 0 0 40px rgba(218,167,75,0.7); }
  }
  .glowing { animation: borderPulse 1.5s infinite; }
