  :root {
      --bg: #0a0b0f;
      --panel: #10121a;
      --border: #1e2235;
      --accent: #00f5c8;
      --accent2: #ff3c6e;
      --accent3: #ffd900;
      --text: #e8eaf6;
      --muted: #4a5070;
      --win: #00f5c8;
      --lose: #ff3c6e;
      --draw: #ffd900;
  }

  *,
  *::before,
  *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
  }

  body {
      background: var(--bg);
      font-family: 'Space Mono', monospace;
      color: var(--text);
      min-height: 100vh;
      overflow-x: hidden;
      display: flex;
      flex-direction: column;
      align-items: center;
  }

  /* Scanline overlay */
  body::before {
      content: '';
      position: fixed;
      inset: 0;
      background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.07) 2px, rgba(0, 0, 0, 0.07) 4px);
      pointer-events: none;
      z-index: 9999;
  }

  /* Grid bg */
  body::after {
      content: '';
      position: fixed;
      inset: 0;
      background-image:
          linear-gradient(rgba(0, 245, 200, 0.03) 1px, transparent 1px),
          linear-gradient(90deg, rgba(0, 245, 200, 0.03) 1px, transparent 1px);
      background-size: 40px 40px;
      pointer-events: none;
      z-index: 0;
  }

  /* ============ HEADER ============ */
  header {
      width: 100%;
      padding: 28px 40px 20px;
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
      z-index: 10;
  }

  .logo {
      font-family: 'Orbitron', sans-serif;
      font-weight: 900;
      font-size: clamp(1.5rem, 4vw, 2.4rem);
      letter-spacing: 0.25em;
      color: var(--accent);
      text-shadow: 0 0 30px rgba(0, 245, 200, 0.5), 0 0 60px rgba(0, 245, 200, 0.2);
      position: relative;
  }

  .logo span {
      color: var(--accent2);
      text-shadow: 0 0 30px rgba(255, 60, 110, 0.5);
  }

  .logo::after {
      content: 'ARENA';
      position: absolute;
      left: 0;
      top: 0;
      color: transparent;
      -webkit-text-stroke: 1px rgba(0, 245, 200, 0.15);
      transform: translate(3px, 3px);
  }

  /* ============ DIFFICULTY ============ */
  .difficulty-bar {
      display: flex;
      gap: 8px;
      align-items: center;
      padding: 10px 20px;
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 100px;
      margin-bottom: 28px;
      z-index: 10;
      position: relative;
  }

  .diff-label {
      font-size: 10px;
      letter-spacing: 0.15em;
      color: var(--muted);
      text-transform: uppercase;
      margin-right: 6px;
  }

  .diff-btn {
      padding: 5px 16px;
      border-radius: 100px;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--muted);
      font-family: 'Orbitron', sans-serif;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.1em;
      cursor: pointer;
      transition: all 0.2s;
  }

  .diff-btn:hover {
      color: var(--text);
      border-color: var(--muted);
  }

  .diff-btn.active-easy {
      background: rgba(0, 245, 200, 0.15);
      color: var(--accent);
      border-color: var(--accent);
      box-shadow: 0 0 12px rgba(0, 245, 200, 0.2);
  }

  .diff-btn.active-medium {
      background: rgba(255, 217, 0, 0.15);
      color: var(--accent3);
      border-color: var(--accent3);
      box-shadow: 0 0 12px rgba(255, 217, 0, 0.2);
  }

  .diff-btn.active-hard {
      background: rgba(255, 60, 110, 0.15);
      color: var(--accent2);
      border-color: var(--accent2);
      box-shadow: 0 0 12px rgba(255, 60, 110, 0.2);
  }

  /* ============ SCOREBOARD ============ */
  .scoreboard {
      display: flex;
      align-items: stretch;
      gap: 0;
      width: clamp(320px, 80vw, 560px);
      border: 1px solid var(--border);
      border-radius: 12px;
      overflow: hidden;
      margin-bottom: 30px;
      z-index: 10;
      position: relative;
      background: var(--panel);
  }

  .score-side {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 20px 10px 16px;
      position: relative;
  }

  .score-side.user {
      border-right: 1px solid var(--border);
  }

  .score-tag {
      font-size: 9px;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 6px;
  }

  .score-num {
      font-family: 'Orbitron', sans-serif;
      font-size: clamp(2.5rem, 7vw, 4rem);
      font-weight: 900;
      line-height: 1;
      transition: all 0.3s;
  }

  .score-side.user .score-num {
      color: var(--accent);
      text-shadow: 0 0 20px rgba(0, 245, 200, 0.4);
  }

  .score-side.bot .score-num {
      color: var(--accent2);
      text-shadow: 0 0 20px rgba(255, 60, 110, 0.4);
  }

  .score-divider {
      display: flex;
      align-items: center;
      padding: 0 16px;
      font-family: 'Orbitron', sans-serif;
      font-size: 1.2rem;
      color: var(--muted);
  }

  /* Score pop animation */
  @keyframes scorePop {
      0% {
          transform: scale(1);
      }

      40% {
          transform: scale(1.35);
      }

      100% {
          transform: scale(1);
      }
  }

  .score-num.pop {
      animation: scorePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  /* ============ RESULT MESSAGE ============ */
  .result-msg {
      font-size: clamp(0.75rem, 2vw, 0.9rem);
      letter-spacing: 0.05em;
      text-align: center;
      padding: 14px 30px;
      min-height: 52px;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10;
      position: relative;
      transition: color 0.3s;
  }

  .result-msg.win {
      color: var(--win);
      text-shadow: 0 0 20px rgba(0, 245, 200, 0.4);
  }

  .result-msg.lose {
      color: var(--lose);
      text-shadow: 0 0 20px rgba(255, 60, 110, 0.4);
  }

  .result-msg.draw {
      color: var(--draw);
      text-shadow: 0 0 20px rgba(255, 217, 0, 0.4);
  }

  .result-msg.idle {
      color: var(--muted);
  }

  @keyframes msgSlide {
      0% {
          opacity: 0;
          transform: translateY(-8px);
      }

      100% {
          opacity: 1;
          transform: translateY(0);
      }
  }

  .result-msg.animate {
      animation: msgSlide 0.3s ease forwards;
  }

  /* ============ ARENA / HANDS DISPLAY ============ */
  .arena {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 20px;
      width: clamp(320px, 90vw, 600px);
      margin-bottom: 36px;
      z-index: 10;
      position: relative;
  }

  .arena-side {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
  }

  .arena-label {
      font-size: 9px;
      letter-spacing: 0.2em;
      color: var(--muted);
      text-transform: uppercase;
  }

  .hand-display {
      width: 110px;
      height: 110px;
      border-radius: 50%;
      border: 2px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 3.2rem;
      background: var(--panel);
      position: relative;
      transition: border-color 0.3s, box-shadow 0.3s;
  }

  .hand-display.user-hand {
      border-color: rgba(0, 245, 200, 0.3);
  }

  .hand-display.bot-hand {
      border-color: rgba(255, 60, 110, 0.3);
  }

  .hand-display.win-glow {
      border-color: var(--win);
      box-shadow: 0 0 24px rgba(0, 245, 200, 0.4), inset 0 0 20px rgba(0, 245, 200, 0.05);
  }

  .hand-display.lose-glow {
      border-color: var(--lose);
      box-shadow: 0 0 24px rgba(255, 60, 110, 0.4), inset 0 0 20px rgba(255, 60, 110, 0.05);
  }

  .hand-display.draw-glow {
      border-color: var(--draw);
      box-shadow: 0 0 24px rgba(255, 217, 0, 0.3), inset 0 0 20px rgba(255, 217, 0, 0.05);
  }

  @keyframes handReveal {
      0% {
          transform: scale(0.5) rotate(-10deg);
          opacity: 0;
      }

      60% {
          transform: scale(1.12) rotate(3deg);
          opacity: 1;
      }

      100% {
          transform: scale(1) rotate(0deg);
      }
  }

  .hand-display.reveal {
      animation: handReveal 0.45s cubic-bezier(0.34, 1.3, 0.64, 1) forwards;
  }

  @keyframes shake {

      0%,
      100% {
          transform: translateY(0);
      }

      20% {
          transform: translateY(-8px);
      }

      40% {
          transform: translateY(4px);
      }

      60% {
          transform: translateY(-6px);
      }

      80% {
          transform: translateY(3px);
      }
  }

  .hand-display.shaking {
      animation: shake 0.5s ease;
  }

  .vs-badge {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.75rem;
      font-weight: 900;
      color: var(--muted);
      letter-spacing: 0.1em;
      padding: 8px 0;
      flex-shrink: 0;
  }

  /* ============ CHOICE BUTTONS ============ */
  .choices {
      display: flex;
      gap: 16px;
      margin-bottom: 30px;
      z-index: 10;
      position: relative;
  }

  .choice-btn {
      width: 90px;
      height: 90px;
      border-radius: 50%;
      border: 2px solid var(--border);
      background: var(--panel);
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      font-size: 2rem;
      transition: all 0.2s cubic-bezier(0.34, 1.3, 0.64, 1);
      position: relative;
      overflow: hidden;
  }

  .choice-btn::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 50%;
      background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
  }

  .choice-btn span.label {
      font-size: 8px;
      letter-spacing: 0.15em;
      color: var(--muted);
      font-family: 'Orbitron', sans-serif;
      font-weight: 700;
      transition: color 0.2s;
  }

  .choice-btn:hover {
      transform: scale(1.12) translateY(-3px);
      border-color: var(--accent);
      box-shadow: 0 0 20px rgba(0, 245, 200, 0.25), 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  .choice-btn:hover span.label {
      color: var(--accent);
  }

  .choice-btn:active {
      transform: scale(0.96);
  }

  .choice-btn.selected {
      border-color: var(--accent);
      box-shadow: 0 0 24px rgba(0, 245, 200, 0.35);
      background: rgba(0, 245, 200, 0.07);
  }

  @keyframes btnFlash {
      0% {
          box-shadow: 0 0 0 0 rgba(0, 245, 200, 0.6);
      }

      100% {
          box-shadow: 0 0 0 20px rgba(0, 245, 200, 0);
      }
  }

  .choice-btn.flash {
      animation: btnFlash 0.4s ease forwards;
  }

  /* ============ ACTION ROW ============ */
  .action-row {
      display: flex;
      gap: 10px;
      z-index: 10;
      position: relative;
      margin-bottom: 24px;
  }

  .action-btn {
      padding: 9px 22px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--muted);
      font-family: 'Orbitron', sans-serif;
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.15em;
      cursor: pointer;
      transition: all 0.2s;
  }

  .action-btn:hover {
      color: var(--text);
      border-color: var(--muted);
      background: rgba(255, 255, 255, 0.03);
  }

  .action-btn.danger:hover {
      color: var(--accent2);
      border-color: var(--accent2);
      background: rgba(255, 60, 110, 0.07);
  }

  /* ============ WIN STREAK ============ */
  .streak-display {
      font-family: 'Orbitron', sans-serif;
      font-size: 10px;
      letter-spacing: 0.12em;
      color: var(--muted);
      z-index: 10;
      position: relative;
      transition: all 0.3s;
  }

  .streak-display.hot {
      color: var(--accent3);
      text-shadow: 0 0 12px rgba(255, 217, 0, 0.4);
  }

  /* ============ HISTORY ============ */
  .history {
      display: flex;
      gap: 6px;
      margin-top: 20px;
      z-index: 10;
      position: relative;
      flex-wrap: wrap;
      justify-content: center;
      max-width: 400px;
  }

  .hist-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      transition: all 0.3s;
  }

  .hist-dot.w {
      background: var(--win);
      box-shadow: 0 0 6px rgba(0, 245, 200, 0.5);
  }

  .hist-dot.l {
      background: var(--lose);
      box-shadow: 0 0 6px rgba(255, 60, 110, 0.5);
  }

  .hist-dot.d {
      background: var(--draw);
      box-shadow: 0 0 6px rgba(255, 217, 0, 0.4);
  }

  @keyframes dotPop {
      0% {
          transform: scale(0);
      }

      60% {
          transform: scale(1.3);
      }

      100% {
          transform: scale(1);
      }
  }

  .hist-dot.new {
      animation: dotPop 0.3s cubic-bezier(0.34, 1.5, 0.64, 1) forwards;
  }

  /* ============ PARTICLES ============ */
  .particle {
      position: fixed;
      pointer-events: none;
      border-radius: 50%;
      z-index: 1000;
      animation: particleFly 0.8s ease forwards;
  }

  @keyframes particleFly {
      0% {
          opacity: 1;
          transform: translate(0, 0) scale(1);
      }

      100% {
          opacity: 0;
          transform: translate(var(--tx), var(--ty)) scale(0);
      }
  }

  /* ============ COUNTDOWN ============ */
  .countdown-overlay {
      position: fixed;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 500;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.2s;
  }

  .countdown-overlay.active {
      opacity: 1;
      pointer-events: all;
  }

  .countdown-num {
      font-family: 'Orbitron', sans-serif;
      font-size: 15vw;
      font-weight: 900;
      color: var(--accent);
      text-shadow: 0 0 60px rgba(0, 245, 200, 0.5);
      opacity: 0;
  }

  @keyframes countPulse {
      0% {
          opacity: 0;
          transform: scale(1.6);
      }

      30% {
          opacity: 1;
          transform: scale(1);
      }

      70% {
          opacity: 1;
          transform: scale(1);
      }

      100% {
          opacity: 0;
          transform: scale(0.7);
      }
  }

  .countdown-num.show {
      animation: countPulse 0.6s ease forwards;
  }

  /* ============ AI THINKING ============ */
  .ai-thinking {
      display: flex;
      gap: 5px;
      align-items: center;
      height: 20px;
      opacity: 0;
      transition: opacity 0.2s;
  }

  .ai-thinking.active {
      opacity: 1;
  }

  .think-dot {
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: var(--accent2);
  }

  @keyframes thinkBounce {

      0%,
      100% {
          transform: translateY(0);
          opacity: 0.4;
      }

      50% {
          transform: translateY(-6px);
          opacity: 1;
      }
  }

  .think-dot:nth-child(1) {
      animation: thinkBounce 0.6s ease infinite 0s;
  }

  .think-dot:nth-child(2) {
      animation: thinkBounce 0.6s ease infinite 0.15s;
  }

  .think-dot:nth-child(3) {
      animation: thinkBounce 0.6s ease infinite 0.3s;
  }

  /* ============ DISABLED STATE ============ */
  .choices.locked .choice-btn {
      opacity: 0.4;
      pointer-events: none;
  }
