    /* ═══════════════════════════════════════════════════
       RESET & BASE
       ═══════════════════════════════════════════════════ */
    * { margin: 0; padding: 0; box-sizing: border-box; }

    /* Fonts loaded via link tag in head */

    :root {
      --bg-dark: #0a0a1a;
      --bg-medium: #1a1a2e;
      --bg-light: #16213e;
      --neon-pink: #ff006e;
      --neon-blue: #00b4d8;
      --neon-purple: #9b59b6;
      --neon-green: #00ff88;
      --neon-orange: #ff8c00;
      --neon-yellow: #ffe66d;
      --text-primary: #e0e0e0;
      --text-secondary: #a0a0a0;
      --card-width: 110px;
      --card-height: 215px;
      --board-hero-size: 100px;
    }

    /* Fullscreen backdrop painted on <body>. The per-screen show*() methods
       set --screen-bg on <html> to swap images. Body's bg propagates to the
       canvas so it always covers the viewport reliably. */
    body {
      font-family: 'Rajdhani', sans-serif;
      color: var(--text-primary);
      min-height: 100vh;
      overflow-x: hidden;
      background-color: var(--bg-dark);
      background-image:
        radial-gradient(ellipse at 20% 50%, rgba(155, 89, 182, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(0, 180, 216, 0.08) 0%, transparent 50%),
        var(--screen-bg, none);
      background-size: auto, auto, cover;
      background-position: 20% 50%, 80% 50%, center;
      background-repeat: no-repeat, no-repeat, no-repeat;
      background-attachment: scroll, scroll, fixed;
    }

    #app {
      width: 100%;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    /* ═══════════════════════════════════════════════════
       MAIN MENU
       ═══════════════════════════════════════════════════ */
    .main-menu {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
      width: 100%;
      padding: 2.5rem 1rem;
      gap: 2.2rem;
      background-size: max(112%, 112vh);
      background-position: center 20%;
      background-repeat: no-repeat;
      overflow-x: hidden;
      overflow-y: auto;
    }

    .menu-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(
        to bottom,
        rgba(10, 10, 26, 0.5) 0%,
        rgba(10, 10, 26, 0.35) 35%,
        rgba(10, 10, 26, 0.65) 75%,
        rgba(10, 10, 26, 0.93) 100%
      );
      pointer-events: none;
      z-index: 0;
    }

    .scanlines {
      position: absolute;
      inset: 0;
      background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.07) 2px,
        rgba(0, 0, 0, 0.07) 4px
      );
      pointer-events: none;
      z-index: 1;
    }

    .main-menu > * {
      position: relative;
      z-index: 2;
    }

    /* Header / Title */
    .menu-header {
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.8rem;
    }

    .title-eyebrow {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.65rem;
      letter-spacing: 0.45em;
      color: var(--neon-orange);
      text-transform: uppercase;
      border: 1px solid rgba(255, 140, 0, 0.45);
      padding: 0.3rem 1.1rem;
      border-radius: 20px;
      background: rgba(255, 140, 0, 0.08);
    }

    .title-container {
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .game-title {
      font-family: 'Orbitron', sans-serif;
      font-size: clamp(2rem, 5vw, 3.4rem);
      font-weight: 900;
      color: var(--neon-blue);
      text-shadow:
        0 0 10px var(--neon-blue),
        0 0 20px var(--neon-blue),
        0 0 40px var(--neon-blue),
        0 0 80px rgba(0, 180, 216, 0.3);
      letter-spacing: 0.1em;
      line-height: 1.2;
      animation: titlePulse 3s ease-in-out infinite;
    }

    .title-accent {
      color: var(--neon-pink);
      text-shadow:
        0 0 10px var(--neon-pink),
        0 0 20px var(--neon-pink),
        0 0 40px var(--neon-pink);
    }

    @keyframes titlePulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.85; }
    }

    .game-subtitle {
      font-family: 'Orbitron', sans-serif;
      font-size: 1.1rem;
      color: var(--neon-orange);
      letter-spacing: 0.3em;
      text-transform: uppercase;
      margin-top: 0.5rem;
    }

    .title-icons {
      font-size: 2rem;
      margin-top: 1rem;
      letter-spacing: 0.5em;
      animation: iconFloat 2s ease-in-out infinite;
    }

    @keyframes iconFloat {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-5px); }
    }

    /* Hero Play Zone */
    .menu-play-zone {
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .play-cell {
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    /* ── Hero PLAY button — gilded banner plate ── */
    .menu-btn-hero {
      position: relative;
      font-family: var(--font-fantasy, 'Cinzel', serif);
      font-size: 1.5rem;
      font-weight: 900;
      padding: 1.2rem 5rem;
      border: 3px double var(--fantasy-gold);
      border-radius: 6px;
      cursor: pointer;
      background:
        linear-gradient(180deg,
          rgba(82, 56, 22, 0.95) 0%,
          rgba(52, 34, 14, 0.98) 50%,
          rgba(30, 20, 8, 1) 100%);
      color: var(--fantasy-gold-light);
      letter-spacing: 0.28em;
      text-transform: uppercase;
      text-shadow:
        0 2px 0 #000,
        0 0 12px rgba(217, 179, 92, 0.55),
        0 0 24px rgba(211, 84, 0, 0.35);
      box-shadow:
        inset 0 2px 0 rgba(255, 220, 150, 0.35),
        inset 0 -3px 8px rgba(0, 0, 0, 0.55),
        inset 0 0 30px rgba(211, 84, 0, 0.12),
        0 3px 0 #1a0f06,
        0 6px 18px rgba(0, 0, 0, 0.6);
      transition: all 0.3s ease;
      animation: heroGlow 3s ease-in-out infinite;
      display: flex;
      align-items: center;
      gap: 1rem;
      backdrop-filter: blur(6px);
    }
    /* Corner filigree — small brass rivets at each corner */
    .menu-btn-hero::before,
    .menu-btn-hero::after {
      content: "";
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 22px;
      height: 22px;
      background: radial-gradient(circle at 35% 35%, var(--fantasy-gold-light) 0%, var(--fantasy-gold) 40%, var(--fantasy-gold-dark) 100%);
      border: 1px solid var(--fantasy-ink);
      border-radius: 50%;
      box-shadow: inset 0 0 5px rgba(0,0,0,0.55), 0 0 6px rgba(217,179,92,0.5);
    }
    .menu-btn-hero::before { left: 14px; }
    .menu-btn-hero::after  { right: 14px; }

    .menu-btn-hero:hover {
      color: #fff1c1;
      border-color: var(--fantasy-gold-light);
      box-shadow:
        inset 0 2px 0 rgba(255, 220, 150, 0.5),
        inset 0 -3px 8px rgba(0, 0, 0, 0.5),
        inset 0 0 40px rgba(211, 84, 0, 0.3),
        0 3px 0 #1a0f06,
        0 0 40px rgba(217, 179, 92, 0.65),
        0 0 80px rgba(211, 84, 0, 0.35);
      transform: scale(1.04) translateY(-2px);
    }
    .menu-btn-hero:active { transform: scale(1.01) translateY(1px); }

    .hero-play-icon {
      font-size: 1.1rem;
      color: var(--fantasy-ember);
      text-shadow: 0 0 10px rgba(211,84,0,0.7);
    }

    @keyframes heroGlow {
      0%, 100% { box-shadow:
        inset 0 2px 0 rgba(255, 220, 150, 0.35),
        inset 0 -3px 8px rgba(0, 0, 0, 0.55),
        inset 0 0 30px rgba(211, 84, 0, 0.12),
        0 3px 0 #1a0f06,
        0 0 20px rgba(217, 179, 92, 0.35); }
      50%      { box-shadow:
        inset 0 2px 0 rgba(255, 220, 150, 0.4),
        inset 0 -3px 8px rgba(0, 0, 0, 0.55),
        inset 0 0 30px rgba(211, 84, 0, 0.2),
        0 3px 0 #1a0f06,
        0 0 34px rgba(217, 179, 92, 0.55),
        0 0 60px rgba(211, 84, 0, 0.2); }
    }

    /* Secondary: 3 featured card buttons */
    .menu-secondary {
      display: flex;
      gap: 1.2rem;
      flex-wrap: wrap;
      justify-content: center;
    }

    /* ── Secondary fantasy card buttons (Campaign / Deck / Daily) ── */
    .menu-card-btn {
      position: relative;
      font-family: var(--font-fantasy, 'Cinzel', serif);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.55rem;
      padding: 1.3rem 1.2rem 1rem;
      width: 130px;
      border-radius: 6px;
      border: 2px solid var(--fantasy-brass);
      cursor: pointer;
      transition: all 0.3s ease;
      backdrop-filter: blur(10px);
      color: var(--fantasy-parchment);
      background:
        linear-gradient(180deg,
          rgba(74, 50, 22, 0.92) 0%,
          rgba(40, 28, 14, 0.96) 50%,
          rgba(22, 14, 6, 0.98) 100%);
      box-shadow:
        inset 0 1px 0 rgba(255, 220, 150, 0.22),
        inset 0 -2px 6px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(211, 84, 0, 0.08),
        0 3px 0 #1a0f06,
        0 5px 14px rgba(0, 0, 0, 0.55);
    }
    /* Gilded inner frame */
    .menu-card-btn::before {
      content: "";
      position: absolute;
      inset: 4px;
      border: 1px solid var(--fantasy-gold-dark);
      border-radius: 3px;
      pointer-events: none;
      opacity: 0.7;
    }
    /* Corner rivet */
    .menu-card-btn::after {
      content: "";
      position: absolute;
      top: 6px; left: 6px;
      width: 7px; height: 7px;
      background: radial-gradient(circle at 35% 35%, var(--fantasy-gold-light) 0%, var(--fantasy-gold-dark) 100%);
      border-radius: 50%;
      box-shadow:
        111px 0 0 0 var(--fantasy-gold-dark), /* top-right */
        0 143px 0 0 var(--fantasy-gold-dark), /* bottom-left */
        111px 143px 0 0 var(--fantasy-gold-dark); /* bottom-right */
    }

    .card-btn-icon {
      font-size: 1.9rem;
      filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 6px rgba(217,179,92,0.35));
    }

    .card-btn-label {
      font-family: var(--font-fantasy, 'Cinzel', serif);
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      text-shadow: 0 1px 0 #000;
      color: var(--fantasy-gold-light);
    }

    /* Variant tinting — ember / brass / gold sigil colours */
    .campaign-btn { border-color: #a33a2c; }
    .campaign-btn .card-btn-label { color: #f2a08e; }
    .campaign-btn:hover {
      border-color: #e08070;
      box-shadow:
        inset 0 1px 0 rgba(255, 220, 150, 0.35),
        inset 0 -2px 6px rgba(0, 0, 0, 0.5),
        inset 0 0 25px rgba(231, 76, 60, 0.22),
        0 3px 0 #1a0f06,
        0 0 22px rgba(231, 76, 60, 0.55);
      transform: translateY(-3px);
    }

    .deckbuilder-btn { border-color: #a66b25; }
    .deckbuilder-btn .card-btn-label { color: #f6c87d; }
    .deckbuilder-btn:hover {
      border-color: #e8a860;
      box-shadow:
        inset 0 1px 0 rgba(255, 220, 150, 0.4),
        inset 0 -2px 6px rgba(0, 0, 0, 0.5),
        inset 0 0 25px rgba(255, 140, 0, 0.22),
        0 3px 0 #1a0f06,
        0 0 22px rgba(255, 140, 0, 0.55);
      transform: translateY(-3px);
    }

    .daily-btn { border-color: var(--fantasy-gold); }
    .daily-btn .card-btn-label { color: var(--fantasy-gold-light); }
    .daily-btn:hover {
      border-color: var(--fantasy-gold-light);
      box-shadow:
        inset 0 1px 0 rgba(255, 220, 150, 0.45),
        inset 0 -2px 6px rgba(0, 0, 0, 0.5),
        inset 0 0 25px rgba(255, 230, 109, 0.18),
        0 3px 0 #1a0f06,
        0 0 22px rgba(217, 179, 92, 0.55);
      transform: translateY(-3px);
    }

    /* Tertiary: small pill buttons */
    .menu-tertiary {
      display: flex;
      gap: 0.6rem;
      flex-wrap: wrap;
      justify-content: center;
    }

    /* ── Tertiary rune-token pills ── */
    .menu-pill-btn {
      font-family: var(--font-fantasy, 'Cinzel', serif);
      font-size: 0.7rem;
      font-weight: 600;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      padding: 0.45rem 1.15rem;
      border-radius: 18px;
      border: 1.5px solid var(--pill-color, var(--fantasy-brass));
      color: var(--fantasy-parchment);
      background:
        linear-gradient(180deg,
          rgba(60, 40, 18, 0.72) 0%,
          rgba(30, 20, 8, 0.85) 100%);
      cursor: pointer;
      transition: all 0.25s ease;
      backdrop-filter: blur(4px);
      text-shadow: 0 1px 0 #000;
      box-shadow:
        inset 0 1px 0 rgba(255, 220, 150, 0.18),
        inset 0 -1px 2px rgba(0, 0, 0, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.45);
    }

    .menu-pill-btn:hover {
      color: var(--pill-color, var(--fantasy-gold-light));
      background:
        linear-gradient(180deg,
          rgba(90, 60, 24, 0.85) 0%,
          rgba(40, 26, 10, 0.95) 100%);
      box-shadow:
        inset 0 1px 0 rgba(255, 220, 150, 0.28),
        inset 0 -1px 2px rgba(0, 0, 0, 0.4),
        0 0 12px var(--pill-color, rgba(217, 179, 92, 0.45)),
        0 2px 4px rgba(0, 0, 0, 0.45);
      transform: translateY(-1px);
    }

    /* Shared menu button styles */
    .menu-buttons {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      width: 300px;
    }

    .play-submenu {
      display: none;
      flex-direction: column;
      gap: 0.5rem;
      padding-top: 0.5rem;
      width: 100%;
      z-index: 10;
    }

    .play-submenu.open {
      display: flex;
    }

    .play-submenu .menu-btn {
      font-size: 0.75rem;
      padding: 0.7rem 1rem;
    }

    .menu-btn {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.9rem;
      font-weight: 700;
      padding: 1rem 2rem;
      border: 2px solid;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
      gap: 0.8rem;
      justify-content: center;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      width: 100%;
      box-sizing: border-box;
    }

    .btn-icon {
      font-size: 1.2rem;
    }

    .btn-ai {
      background: rgba(0, 180, 216, 0.15);
      border-color: var(--neon-blue);
      color: var(--neon-blue);
    }
    .btn-ai:hover {
      background: rgba(0, 180, 216, 0.3);
      box-shadow: 0 0 20px rgba(0, 180, 216, 0.4);
    }

    .btn-2p {
      background: rgba(155, 89, 182, 0.15);
      border-color: var(--neon-purple);
      color: var(--neon-purple);
    }
    .btn-2p:hover {
      background: rgba(155, 89, 182, 0.3);
      box-shadow: 0 0 20px rgba(155, 89, 182, 0.4);
    }

    .btn-online {
      background: rgba(0, 255, 136, 0.15);
      border-color: var(--neon-green);
      color: var(--neon-green);
    }
    .btn-online:hover {
      background: rgba(0, 255, 136, 0.3);
      box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    }

    .btn-back {
      background: rgba(160, 160, 160, 0.15);
      border-color: var(--text-secondary);
      color: var(--text-secondary);
    }
    .btn-back:hover {
      background: rgba(160, 160, 160, 0.3);
    }

    .menu-footer {
      color: var(--text-secondary);
      font-size: 0.7rem;
      letter-spacing: 0.25em;
      text-transform: uppercase;
      opacity: 0.55;
    }

    /* Online Menu */
    .join-room-container {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    .room-input {
      font-family: 'Orbitron', sans-serif;
      font-size: 1.2rem;
      padding: 0.8rem 1rem;
      background: rgba(255, 255, 255, 0.05);
      border: 2px solid var(--neon-purple);
      border-radius: 8px;
      color: var(--text-primary);
      text-align: center;
      letter-spacing: 0.2em;
    }
    .room-input:focus {
      outline: none;
      box-shadow: 0 0 15px rgba(155, 89, 182, 0.4);
    }

    .room-code-display {
      text-align: center;
      padding: 2rem;
    }
    .room-code {
      font-family: 'Orbitron', sans-serif;
      font-size: 2.5rem;
      color: var(--neon-yellow);
      text-shadow: 0 0 20px rgba(255, 230, 109, 0.5);
      letter-spacing: 0.3em;
      display: block;
      margin-bottom: 1rem;
    }
    .copy-btn {
      font-family: 'Rajdhani', sans-serif;
      font-size: 1rem;
      padding: 0.5rem 1.5rem;
      background: rgba(255, 230, 109, 0.2);
      border: 1px solid var(--neon-yellow);
      border-radius: 6px;
      color: var(--neon-yellow);
      cursor: pointer;
    }

    .waiting-spinner {
      color: var(--text-secondary);
      font-size: 1.2rem;
      animation: pulse 1.5s ease-in-out infinite;
    }
    @keyframes pulse {
      0%, 100% { opacity: 0.5; }
      50% { opacity: 1; }
    }

    /* ═══════════════════════════════════════════════════
       DECK SELECT
       ═══════════════════════════════════════════════════ */
    .deck-select {
      padding: 2rem 1rem;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2rem;
      width: 100%;
      min-width: 0;
      box-sizing: border-box;
    }

    .section-title {
      font-family: 'Orbitron', sans-serif;
      font-size: 2rem;
      color: var(--neon-blue);
      text-shadow: 0 0 10px rgba(0, 180, 216, 0.5);
    }

    .deck-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
      gap: 1.5rem;
      max-width: 900px;
      width: 100%;
      min-width: 0;
    }

    .deck-option {
      background: var(--bg-medium);
      border: 2px solid #333;
      border-radius: 12px;
      overflow: hidden;
      cursor: pointer;
      transition: all 0.3s ease;
    }
    .deck-option:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    }

    .deck-art {
      position: relative;
      height: 220px;
      display: flex;
      align-items: flex-end;
      justify-content: center;
      overflow: hidden;
    }
    .deck-art-img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center top;
      z-index: 1;
    }
    .deck-art::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 45%,
        rgba(0, 0, 0, 0.55) 85%,
        rgba(0, 0, 0, 0.75) 100%
      );
      z-index: 2;
      pointer-events: none;
    }
    .deck-symbols {
      position: relative;
      z-index: 3;
      font-size: 2rem;
      letter-spacing: 0.3em;
      margin-bottom: 6px;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
    }

    .deck-info {
      padding: 1rem;
    }
    .deck-info h3 {
      font-family: 'Orbitron', sans-serif;
      font-size: 1rem;
      margin-bottom: 0.3rem;
    }
    .deck-info p {
      font-size: 0.85rem;
      color: var(--text-secondary);
    }

    /* ═══════════════════════════════════════════════════
       GAME BOARD
       ═══════════════════════════════════════════════════ */
    .game-board {
      width: 100%;
      max-width: 1100px;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      padding: 0.5rem;
      gap: 0.3rem;
      margin: 0 auto;
    }

    /* Player Bars */
    .player-bar {
      position: relative;
      z-index: 100;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.5rem 1rem;
      border-radius: 8px;
      flex-wrap: wrap;
      gap: 0.5rem;
    }

    .opponent-bar {
      background: linear-gradient(135deg, rgba(231, 76, 60, 0.15), rgba(231, 76, 60, 0.05));
      border: 1px solid rgba(231, 76, 60, 0.3);
    }

    .my-bar {
      background: linear-gradient(135deg, rgba(0, 180, 216, 0.15), rgba(0, 180, 216, 0.05));
      border: 1px solid rgba(0, 180, 216, 0.3);
    }

    .player-info {
      display: flex;
      align-items: center;
      gap: 1rem;
      flex-wrap: wrap;
    }

    .player-name {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.9rem;
      font-weight: 700;
    }

    .life-display {
      font-size: 1.1rem;
      font-weight: 700;
      color: #e74c3c;
    }

    .energy-display {
      font-size: 1rem;
      color: var(--neon-yellow);
    }

    .deck-count {
      font-size: 0.9rem;
      color: var(--text-secondary);
    }

    .gadget-row {
      display: flex;
      gap: 0.5rem;
      flex-wrap: wrap;
    }

    .gadget-tag {
      font-size: 0.75rem;
      padding: 2px 8px;
      background: rgba(243, 156, 18, 0.2);
      border: 1px solid rgba(243, 156, 18, 0.4);
      border-radius: 4px;
      color: var(--neon-orange);
      cursor: help;
    }

    /* Hands */
    .hand {
      display: flex;
      justify-content: center;
      gap: 0.4rem;
      padding: 0.3rem;
      min-height: calc(var(--card-height) + 10px);
      flex-wrap: wrap;
    }

    .opponent-hand {
      min-height: 50px;
    }

    .opponent-hand .card {
      width: 40px;
      height: 55px;
    }

    /* Multi-player layout */
    .multi-player .opponent-section {
      border-bottom: 1px solid rgba(255,255,255,0.05);
      padding-bottom: 0.2rem;
      margin-bottom: 0.1rem;
    }

    .multi-player .opponent-section.eliminated {
      opacity: 0.35;
      pointer-events: none;
    }

    .multi-player .opponent-section.eliminated .player-name {
      text-decoration: line-through;
    }

    .multi-player .opponent-section.attack-target {
      border: 2px solid var(--neon-orange);
      border-radius: 8px;
      padding: 0.2rem;
    }

    .multi-player .opponent-hand {
      min-height: 30px;
    }

    .compact-hand .card {
      width: 28px !important;
      height: 38px !important;
    }

    .card-back-small {
      width: 28px !important;
      height: 38px !important;
    }

    .multi-player .board-row {
      min-height: 60px;
    }

    .multi-player .opponent-bar {
      padding: 0.3rem 0.8rem;
    }

    .multi-player .player-name {
      font-size: 0.8rem;
    }

    .multi-player .life-display,
    .multi-player .energy-display,
    .multi-player .deck-count {
      font-size: 0.85rem;
    }

    /* Player slots in waiting room */
    .player-slots {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      margin: 1rem 0;
      width: 100%;
      max-width: 300px;
    }

    .player-slot {
      padding: 0.6rem 1rem;
      border-radius: 8px;
      font-family: 'Orbitron', sans-serif;
      font-size: 0.85rem;
      text-align: center;
    }

    .player-slot.filled {
      background: rgba(0, 180, 216, 0.15);
      border: 1px solid rgba(0, 180, 216, 0.4);
      color: var(--neon-blue);
    }

    .player-slot.empty {
      background: rgba(255,255,255,0.03);
      border: 1px dashed rgba(255,255,255,0.15);
      color: var(--text-secondary);
    }

    /* Attack target selection overlay */
    .target-select-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.7);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
    }

    .target-select-modal {
      background: var(--bg-dark);
      border: 2px solid var(--neon-orange);
      border-radius: 12px;
      padding: 1.5rem;
      text-align: center;
      max-width: 320px;
    }

    .target-select-modal h3 {
      font-family: 'Orbitron', sans-serif;
      color: var(--neon-orange);
      margin-bottom: 0.5rem;
    }

    .target-player-list {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      margin: 1rem 0;
    }

    .target-player-btn {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.7rem 1rem;
      background: rgba(231, 76, 60, 0.1);
      border: 1px solid rgba(231, 76, 60, 0.4);
      border-radius: 8px;
      color: var(--text-primary);
      cursor: pointer;
      transition: all 0.2s;
    }

    .target-player-btn:hover {
      background: rgba(231, 76, 60, 0.25);
      border-color: var(--neon-orange);
      transform: scale(1.02);
    }

    .target-player-name {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.85rem;
    }

    .target-player-life {
      color: #e74c3c;
      font-weight: bold;
    }

    .target-player-board {
      color: var(--text-secondary);
      font-size: 0.8rem;
    }

    /* Cards */
    .card {
      width: var(--card-width);
      height: var(--card-height);
      border-radius: 8px;
      position: relative;
      transition: all 0.2s ease;
      flex-shrink: 0;
    }

    .card-back {
      background: linear-gradient(135deg, var(--bg-medium), #2c3e50);
      border: 2px solid #444;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .card-back-design {
      font-size: 1.5rem;
      opacity: 0.5;
    }
    .card-back-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 6px;
    }

    .hand-card {
      background: var(--bg-medium);
      border: 2px solid #444;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      cursor: default;
    }

    .hand-card.playable {
      cursor: pointer;
      border-color: var(--neon-green);
      box-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
    }
    .hand-card.playable:hover {
      transform: translateY(-12px) scale(1.05);
      box-shadow: 0 8px 20px rgba(0, 255, 136, 0.4);
      z-index: 10;
    }

    .hand-card.unplayable {
      opacity: 0.6;
    }

    .card-cost {
      position: absolute;
      top: -1px;
      left: -1px;
      width: 24px;
      height: 24px;
      border-radius: 0 0 8px 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Orbitron', sans-serif;
      font-size: 0.75rem;
      font-weight: 900;
      color: white;
      z-index: 2;
      text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    }

    .card-art-container {
      aspect-ratio: 1 / 1;
      overflow: hidden;
      position: relative;
    }
    .card-art-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .hero-art-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .card-art {
      width: 100%;
      height: 100%;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .card-art-overlay {
      position: absolute;
      inset: 0;
    }

    .card-art-icon {
      font-size: 1.8rem;
      position: relative;
      z-index: 1;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    }

    .card-name {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.55rem;
      font-weight: 700;
      padding: 2px 4px;
      text-align: center;
      background: rgba(0, 0, 0, 0.4);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .card-type-label {
      font-size: 0.5rem;
      text-align: center;
      color: var(--text-secondary);
      padding: 0 4px;
      letter-spacing: 0.1em;
    }

    .card-effect {
      font-size: 0.5rem;
      padding: 2px 4px;
      color: var(--neon-yellow);
      text-align: center;
      line-height: 1.2;
      flex: 1;
    }

    .card-stats {
      display: flex;
      justify-content: space-between;
      gap: 6px;
      padding: 3px 4px;
      font-family: 'Orbitron', sans-serif;
      font-weight: 900;
      font-size: 1rem;
      line-height: 1.05;
    }

    .card-attack, .card-defense {
      flex: 1;
      text-align: center;
      padding: 2px 4px;
      border-radius: 4px;
      background: rgba(10, 10, 20, 0.88);
      border: 2px solid currentColor;
      text-shadow: 0 1px 0 #000, 0 0 4px rgba(0, 0, 0, 0.9);
      letter-spacing: 0.03em;
    }
    .card-attack  { color: #ff5a4a; }
    .card-defense { color: #4fa8e0; }

    /* Board Heroes */
    .board-row {
      display: flex;
      justify-content: center;
      gap: 0.6rem;
      padding: 0.5rem;
      min-height: calc(var(--board-hero-size) + 30px);
      align-items: center;
      border-radius: 8px;
      flex-wrap: wrap;
    }

    .opponent-board {
      background: rgba(231, 76, 60, 0.05);
      border: 1px dashed rgba(231, 76, 60, 0.2);
    }

    .my-board {
      background: rgba(0, 180, 216, 0.05);
      border: 1px dashed rgba(0, 180, 216, 0.2);
    }

    .empty-board {
      color: var(--text-secondary);
      font-style: italic;
      font-size: 0.9rem;
    }

    .board-hero {
      width: var(--board-hero-size);
      height: calc(var(--board-hero-size) + 25px);
      border: 2px solid #444;
      border-radius: 8px;
      background: var(--bg-medium);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      transition: all 0.2s ease;
      position: relative;
      cursor: default;
    }

    .board-hero.can-attack {
      cursor: pointer;
      border-color: var(--neon-orange) !important;
      animation: readyPulse 1.5s ease-in-out infinite;
    }

    @keyframes readyPulse {
      0%, 100% { box-shadow: 0 0 5px rgba(255, 140, 0, 0.3); }
      50% { box-shadow: 0 0 15px rgba(255, 140, 0, 0.6); }
    }

    .board-hero.attacking {
      border-color: #e74c3c !important;
      box-shadow: 0 0 15px rgba(231, 76, 60, 0.6);
      transform: translateY(-5px);
    }

    .board-hero.targetable {
      cursor: crosshair;
      border-color: var(--neon-pink) !important;
      box-shadow: 0 0 15px rgba(255, 0, 110, 0.5);
      animation: targetPulse 0.8s ease-in-out infinite;
    }

    @keyframes targetPulse {
      0%, 100% { box-shadow: 0 0 5px rgba(255, 0, 110, 0.3); }
      50% { box-shadow: 0 0 20px rgba(255, 0, 110, 0.7); }
    }

    .board-hero.can-block {
      cursor: pointer;
      border-color: var(--neon-green) !important;
      box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
    }

    .board-hero.opponent-attacking {
      border-color: #e74c3c !important;
      animation: oppAttackPulse 1.2s ease-in-out infinite;
      cursor: pointer;
      transform: scale(1.03);
    }

    @keyframes oppAttackPulse {
      0%, 100% { box-shadow: 0 0 8px rgba(231, 76, 60, 0.4); }
      50% { box-shadow: 0 0 20px rgba(231, 76, 60, 0.8); }
    }

    .board-hero.opponent-attacking.blocked-attacker {
      border-color: var(--neon-green) !important;
      animation: none;
      box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
      transform: scale(1);
    }

    .board-hero.selected-to-block {
      border-color: var(--neon-yellow) !important;
      box-shadow: 0 0 20px rgba(255, 230, 109, 0.8) !important;
      animation: none !important;
      transform: scale(1.06);
    }

    .board-hero.assigned-blocker {
      border-color: var(--neon-green) !important;
      box-shadow: 0 0 12px rgba(0, 255, 136, 0.5);
    }

    .pair-badge {
      position: absolute;
      top: -22px;
      left: 50%;
      transform: translateX(-50%);
      background: var(--neon-yellow);
      color: #1a1a2e;
      font-size: 1.5rem;
      font-weight: 900;
      width: 44px;
      height: 44px;
      line-height: 44px;
      text-align: center;
      border-radius: 50%;
      font-family: 'Orbitron', sans-serif;
      z-index: 5;
      border: 3px solid #1a1a2e;
      box-shadow: 0 0 16px rgba(255, 230, 109, 0.95), 0 3px 6px rgba(0,0,0,0.7);
      animation: pairBadgePop 0.25s ease-out;
    }

    @keyframes pairBadgePop {
      0%   { transform: translateX(-50%) scale(0.4); opacity: 0; }
      60%  { transform: translateX(-50%) scale(1.25); opacity: 1; }
      100% { transform: translateX(-50%) scale(1); opacity: 1; }
    }

    .board-hero.has-taunt {
      box-shadow: inset 0 0 10px rgba(255, 230, 109, 0.3);
    }

    .board-hero.summoning-sick {
      opacity: 0.7;
    }

    .hero-art {
      height: 55px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }

    .hero-art-overlay {
      position: absolute;
      inset: 0;
    }

    .hero-icon {
      font-size: 1.8rem;
      position: relative;
      z-index: 1;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    }

    .hero-name {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.5rem;
      text-align: center;
      padding: 2px;
      background: rgba(0, 0, 0, 0.4);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .hero-stats {
      display: flex;
      justify-content: space-between;
      gap: 6px;
      padding: 4px 6px;
      font-family: 'Orbitron', sans-serif;
      font-size: 1.2rem;
      font-weight: 900;
      line-height: 1.05;
    }

    .hero-attack, .hero-defense {
      flex: 1;
      text-align: center;
      padding: 2px 6px;
      border-radius: 5px;
      background: rgba(10, 10, 20, 0.9);
      border: 2px solid currentColor;
      letter-spacing: 0.03em;
      box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
      text-shadow: 0 1px 0 #000, 0 0 6px rgba(0, 0, 0, 0.95);
    }

    .hero-attack  { color: #ff5a4a; }
    .hero-defense { color: #4fa8e0; }

    .hero-attack.buffed, .hero-defense.buffed {
      color: #5cff9d !important;
      text-shadow: 0 1px 0 #000, 0 0 8px rgba(0, 255, 136, 0.7);
    }

    .hero-defense.damaged {
      color: #ff5ab0 !important;
      text-shadow: 0 1px 0 #000, 0 0 8px rgba(255, 0, 110, 0.7);
    }

    .taunt-badge, .shield-badge, .sick-badge {
      position: absolute;
      font-size: 0.55rem;
      padding: 1px 4px;
      border-radius: 3px;
      font-weight: 700;
    }

    .taunt-badge {
      top: 2px;
      right: 2px;
      background: rgba(255, 230, 109, 0.3);
      border: 1px solid var(--neon-yellow);
      color: var(--neon-yellow);
    }

    .shield-badge {
      top: 2px;
      left: 2px;
      background: rgba(0, 180, 216, 0.3);
      border: 1px solid var(--neon-blue);
      color: var(--neon-blue);
    }

    .sick-badge {
      top: 2px;
      left: 50%;
      transform: translateX(-50%);
      font-size: 0.9rem;
      z-index: 2;
    }

    /* Battlefield Divider */
    .battlefield-divider {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 2rem;
      padding: 0.3rem;
      position: relative;
    }

    .battlefield-divider::before {
      content: '';
      position: absolute;
      left: 5%;
      right: 5%;
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--neon-purple), transparent);
    }

    .phase-indicator {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.7rem;
      color: var(--neon-purple);
      background: var(--bg-dark);
      padding: 2px 12px;
      border-radius: 4px;
      position: relative;
      z-index: 1;
      text-shadow: 0 0 10px rgba(155, 89, 182, 0.5);
    }

    /* Incoming-damage preview shown during blocker assignment.
       Two variants: .danger (still taking damage) pulses red;
       .safe (everything blocked) is steady green. */
    .phase-indicator.blocker-phase {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      font-size: 0.85rem;
      padding: 4px 14px;
    }
    .incoming-damage {
      font-family: 'Orbitron', sans-serif;
      font-size: 1.35rem;
      font-weight: 900;
      padding: 4px 12px;
      border-radius: 6px;
      letter-spacing: 0.05em;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      line-height: 1;
    }
    .incoming-damage.danger {
      color: #fff;
      background: linear-gradient(180deg, #e74c3c 0%, #8b1e1e 100%);
      border: 2px solid #ff9f9f;
      text-shadow: 0 0 8px rgba(255,80,80,0.9), 0 1px 0 #000;
      box-shadow: 0 0 18px rgba(231, 76, 60, 0.7), inset 0 1px 0 rgba(255,255,255,0.25);
      animation: incomingDamagePulse 0.9s ease-in-out infinite;
    }
    .incoming-damage.safe {
      color: #0b2b1a;
      background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
      border: 2px solid #bbf7d0;
      text-shadow: 0 1px 0 rgba(255,255,255,0.35);
      box-shadow: 0 0 14px rgba(0, 255, 136, 0.55), inset 0 1px 0 rgba(255,255,255,0.3);
    }
    .incoming-damage .dmg-label {
      font-size: 0.7rem;
      opacity: 0.85;
      letter-spacing: 0.15em;
    }
    @keyframes incomingDamagePulse {
      0%, 100% { transform: scale(1);    box-shadow: 0 0 18px rgba(231, 76, 60, 0.7), inset 0 1px 0 rgba(255,255,255,0.25); }
      50%      { transform: scale(1.06); box-shadow: 0 0 28px rgba(231, 76, 60, 0.95), inset 0 1px 0 rgba(255,255,255,0.3); }
    }

    .turn-indicator {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.65rem;
      color: var(--text-secondary);
      background: var(--bg-dark);
      padding: 2px 8px;
      position: relative;
      z-index: 1;
    }

    /* Action Buttons */
    .action-buttons {
      display: flex;
      gap: 0.5rem;
      align-items: center;
      flex-wrap: wrap;
    }

    .action-btn {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.7rem;
      font-weight: 700;
      padding: 0.4rem 1rem;
      border: 2px solid;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.2s ease;
      text-transform: uppercase;
    }

    .end-turn-btn {
      background: rgba(0, 255, 136, 0.15);
      border-color: var(--neon-green);
      color: var(--neon-green);
    }
    .end-turn-btn:hover {
      background: rgba(0, 255, 136, 0.3);
      box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
    }

    .attack-btn {
      background: rgba(231, 76, 60, 0.15);
      border-color: #e74c3c;
      color: #e74c3c;
      animation: attackBtnPulse 1s ease-in-out infinite;
    }
    @keyframes attackBtnPulse {
      0%, 100% { box-shadow: 0 0 5px rgba(231, 76, 60, 0.3); }
      50% { box-shadow: 0 0 20px rgba(231, 76, 60, 0.6); }
    }

    .mulligan-btn {
      background: rgba(243, 156, 18, 0.15);
      border-color: #f39c12;
      color: #f39c12;
      animation: mulliganPulse 1.5s ease-in-out infinite;
    }
    .mulligan-btn:hover {
      background: rgba(243, 156, 18, 0.3);
      box-shadow: 0 0 15px rgba(243, 156, 18, 0.4);
    }
    @keyframes mulliganPulse {
      0%, 100% { box-shadow: 0 0 5px rgba(243, 156, 18, 0.2); }
      50% { box-shadow: 0 0 15px rgba(243, 156, 18, 0.5); }
    }

    .block-btn {
      background: rgba(52, 152, 219, 0.15);
      border-color: #3498db;
      color: #3498db;
    }

    .cancel-btn {
      background: rgba(160, 160, 160, 0.1);
      border-color: #666;
      color: #999;
    }
    .cancel-btn:hover {
      background: rgba(160, 160, 160, 0.2);
    }

    .target-hint {
      font-size: 0.8rem;
      color: var(--neon-pink);
      font-style: italic;
      animation: pulse 1s ease-in-out infinite;
    }

    /* Game Log */
    .game-log {
      position: fixed;
      bottom: 80px;
      right: 10px;
      width: 250px;
      max-height: 150px;
      overflow-y: auto;
      background: rgba(0, 0, 0, 0.7);
      border: 1px solid #333;
      border-radius: 8px;
      padding: 0.5rem;
      font-size: 0.7rem;
      z-index: 50;
    }

    .log-entry {
      padding: 2px 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
      color: var(--text-secondary);
    }

    .log-entry:last-child {
      color: var(--text-primary);
      border-bottom: none;
    }

    /* Game Over */
    .game-over-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.85);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 100;
      animation: fadeIn 0.5s ease;
    }

    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    .game-over-content {
      text-align: center;
      display: flex;
      flex-direction: column;
      gap: 1rem;
      align-items: center;
    }

    .game-over-title {
      font-family: 'Orbitron', sans-serif;
      font-size: 3rem;
      color: var(--neon-yellow);
      text-shadow:
        0 0 10px var(--neon-yellow),
        0 0 30px var(--neon-yellow),
        0 0 60px rgba(255, 230, 109, 0.3);
      animation: victoryPulse 1s ease-in-out infinite;
    }

    @keyframes victoryPulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.05); }
    }

    /* Turn Transition */
    .turn-transition {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
      gap: 2rem;
      text-align: center;
    }

    .transition-player {
      font-family: 'Orbitron', sans-serif;
      font-size: 2.5rem;
      color: var(--neon-blue);
      text-shadow: 0 0 20px rgba(0, 180, 216, 0.5);
    }

    /* Toast */
    .toast {
      position: fixed;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%) translateY(100px);
      background: rgba(0, 0, 0, 0.9);
      border: 1px solid var(--neon-orange);
      border-radius: 8px;
      padding: 0.8rem 1.5rem;
      font-size: 0.9rem;
      color: var(--neon-orange);
      z-index: 1000;
      transition: transform 0.3s ease;
    }
    .toast.show {
      transform: translateX(-50%) translateY(0);
    }

    /* Flash Animations */
    .flash-damage {
      animation: flashDamage 0.5s ease;
    }
    @keyframes flashDamage {
      0%, 100% { background-color: transparent; }
      50% { background-color: rgba(231, 76, 60, 0.3); }
    }

    .flash-play {
      animation: flashPlay 0.5s ease;
    }
    @keyframes flashPlay {
      0%, 100% { background-color: transparent; }
      50% { background-color: rgba(0, 255, 136, 0.15); }
    }

    /* Keyword Badges */
    .keyword-badges-row {
      display: flex;
      flex-wrap: wrap;
      gap: 1px;
      padding: 0 3px;
      justify-content: center;
    }
    .keyword-badge {
      font-size: 0.4rem;
      padding: 0px 2px;
      border-radius: 2px;
      font-weight: 700;
      font-family: 'Orbitron', sans-serif;
      letter-spacing: 0.05em;
      line-height: 1.3;
    }
    .flying-badge {
      background: rgba(52, 152, 219, 0.4);
      border: 1px solid #3498db;
      color: #85c1e9;
    }
    .stealth-badge {
      background: rgba(127, 140, 141, 0.4);
      border: 1px solid #7f8c8d;
      color: #bdc3c7;
    }
    .dstrike-badge {
      background: rgba(231, 76, 60, 0.4);
      border: 1px solid #e74c3c;
      color: #f1948a;
    }
    .lifesteal-badge {
      background: rgba(155, 89, 182, 0.4);
      border: 1px solid #9b59b6;
      color: #d2b4de;
    }
    .poison-badge {
      background: rgba(39, 174, 96, 0.4);
      border: 1px solid #27ae60;
      color: #82e0aa;
    }

    /* Card Hover Preview Panel */
    .card-preview-panel {
      position: fixed;
      top: 50%;
      left: 20px;
      transform: translateY(-50%);
      width: 220px;
      background: var(--bg-medium);
      border: 2px solid var(--neon-purple);
      border-radius: 12px;
      padding: 12px;
      z-index: 200;
      box-shadow: 0 0 30px rgba(155, 89, 182, 0.3);
      animation: previewFadeIn 0.2s ease;
      pointer-events: none;
    }
    @keyframes previewFadeIn {
      from { opacity: 0; transform: translateY(-50%) scale(0.9); }
      to { opacity: 1; transform: translateY(-50%) scale(1); }
    }
    .preview-art {
      width: 100%;
      height: 120px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      overflow: hidden;
    }
    .preview-art-overlay {
      position: absolute;
      inset: 0;
    }
    .preview-icon {
      font-size: 3rem;
      position: relative;
      z-index: 1;
      filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5));
    }
    .preview-name {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.9rem;
      font-weight: 700;
      margin-top: 8px;
      text-align: center;
    }
    .preview-type {
      font-size: 0.7rem;
      color: var(--text-secondary);
      text-align: center;
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }
    .preview-stats {
      display: flex;
      justify-content: center;
      gap: 1.5rem;
      margin: 6px 0;
      font-family: 'Orbitron', sans-serif;
      font-weight: 900;
      font-size: 1.1rem;
    }
    .preview-effect {
      font-size: 0.75rem;
      color: var(--neon-yellow);
      text-align: center;
      margin: 4px 0;
    }
    .preview-flavor {
      font-size: 0.65rem;
      color: var(--text-secondary);
      font-style: italic;
      text-align: center;
      margin-top: 4px;
    }
    .preview-cost {
      position: absolute;
      top: 8px;
      left: 8px;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Orbitron', sans-serif;
      font-size: 0.9rem;
      font-weight: 900;
      color: white;
      text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    }
    .preview-keywords {
      display: flex;
      justify-content: center;
      gap: 4px;
      flex-wrap: wrap;
      margin: 4px 0;
    }
    .preview-keyword {
      font-size: 0.6rem;
      padding: 1px 6px;
      border-radius: 3px;
      font-weight: 700;
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.2);
    }

    /* Keyword Tooltip */
    .keyword-tooltip {
      position: fixed;
      background: rgba(0, 0, 0, 0.95);
      border: 1px solid var(--neon-blue);
      border-radius: 6px;
      padding: 8px 12px;
      font-size: 0.75rem;
      color: var(--text-primary);
      z-index: 300;
      max-width: 200px;
      pointer-events: none;
      box-shadow: 0 0 15px rgba(0, 180, 216, 0.3);
    }
    .keyword-tooltip strong {
      color: var(--neon-yellow);
    }

    /* ═══════════════════════════════════════════════════
       TUTORIAL OVERLAY
       ═══════════════════════════════════════════════════ */
    .tutorial-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.92);
      z-index: 500;
      display: flex;
      align-items: center;
      justify-content: center;
      animation: fadeIn 0.3s ease;
    }
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    .tutorial-modal {
      background: var(--bg-medium);
      border: 2px solid var(--neon-blue);
      border-radius: 16px;
      padding: 2rem;
      max-width: 600px;
      width: 90%;
      max-height: 85vh;
      overflow-y: auto;
      box-shadow: 0 0 40px rgba(0, 180, 216, 0.3);
    }
    .tutorial-modal h2 {
      font-family: 'Orbitron', sans-serif;
      color: var(--neon-blue);
      text-align: center;
      margin-bottom: 1.5rem;
      font-size: 1.4rem;
      text-shadow: 0 0 10px rgba(0, 180, 216, 0.5);
    }
    .tutorial-section {
      margin-bottom: 1.2rem;
      padding: 0.8rem;
      background: rgba(255, 255, 255, 0.03);
      border-radius: 8px;
      border-left: 3px solid var(--neon-purple);
    }
    .tutorial-section h3 {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.85rem;
      color: var(--neon-pink);
      margin-bottom: 0.4rem;
    }
    .tutorial-section p, .tutorial-section li {
      font-size: 0.85rem;
      color: var(--text-secondary);
      line-height: 1.5;
    }
    .tutorial-section ul {
      list-style: none;
      padding-left: 0;
    }
    .tutorial-section li {
      padding: 2px 0;
    }
    .tutorial-section li::before {
      content: '▸ ';
      color: var(--neon-blue);
    }

    /* ── Settings: volume sliders & mute row ─────────────────── */
    .settings-group { display: flex; flex-direction: column; gap: 0.6rem; }
    .settings-row {
      display: grid;
      grid-template-columns: 110px 1fr 44px;
      align-items: center;
      gap: 0.75rem;
      padding: 0.35rem 0;
    }
    .settings-row.settings-check {
      grid-template-columns: auto 1fr;
      gap: 0.6rem;
      cursor: pointer;
      user-select: none;
    }
    .settings-label {
      font-family: 'Rajdhani', sans-serif;
      font-size: 0.95rem;
      color: var(--text-primary);
      letter-spacing: 0.02em;
    }
    .settings-value {
      font-family: 'Orbitron', monospace;
      font-size: 0.8rem;
      color: var(--neon-yellow);
      text-align: right;
      min-width: 2.5ch;
    }
    .settings-slider {
      -webkit-appearance: none;
      appearance: none;
      width: 100%;
      height: 6px;
      background: linear-gradient(90deg, rgba(0,180,216,0.25), rgba(255,230,109,0.15));
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 999px;
      outline: none;
      cursor: pointer;
    }
    .settings-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 18px; height: 18px;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 30%, var(--fantasy-gold-light) 0%, var(--fantasy-gold) 55%, var(--fantasy-gold-dark) 100%);
      border: 1px solid var(--fantasy-brass);
      box-shadow: 0 0 6px rgba(255, 210, 120, 0.5);
      cursor: grab;
    }
    .settings-slider::-webkit-slider-thumb:active { cursor: grabbing; }
    .settings-slider::-moz-range-thumb {
      width: 18px; height: 18px;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 30%, var(--fantasy-gold-light) 0%, var(--fantasy-gold) 55%, var(--fantasy-gold-dark) 100%);
      border: 1px solid var(--fantasy-brass);
      box-shadow: 0 0 6px rgba(255, 210, 120, 0.5);
      cursor: grab;
    }
    .settings-slider:focus-visible { outline: 2px solid var(--neon-blue); outline-offset: 2px; }
    .settings-row.settings-check input[type=checkbox] {
      width: 16px; height: 16px;
      accent-color: var(--fantasy-gold);
    }
    .tutorial-keyword-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 4px 12px;
    }
    .tutorial-keyword-grid li {
      font-size: 0.8rem;
    }
    .tutorial-keyword-grid li strong {
      color: var(--neon-yellow);
    }
    .tutorial-close-row {
      display: flex;
      justify-content: center;
      margin-top: 1.2rem;
    }
    .tutorial-close-btn {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.85rem;
      font-weight: 700;
      padding: 0.7rem 2rem;
      border: 2px solid var(--neon-green);
      border-radius: 8px;
      background: rgba(0, 255, 136, 0.15);
      color: var(--neon-green);
      cursor: pointer;
      transition: all 0.3s ease;
      text-transform: uppercase;
    }
    .tutorial-close-btn:hover {
      background: rgba(0, 255, 136, 0.3);
      box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    }

    /* ═══════════════════════════════════════════════════
       UI TOOLTIPS (stat bar items, settings, etc.)
       ═══════════════════════════════════════════════════ */
    .has-tooltip {
      position: relative;
      cursor: help;
    }
    .has-tooltip::after {
      content: attr(data-tooltip);
      position: absolute;
      bottom: 120%;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(0, 0, 0, 0.95);
      border: 1px solid var(--neon-blue);
      border-radius: 6px;
      padding: 6px 10px;
      font-size: 0.7rem;
      color: var(--text-primary);
      white-space: nowrap;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.2s ease;
      z-index: 300;
      box-shadow: 0 0 10px rgba(0, 180, 216, 0.2);
      font-family: 'Rajdhani', sans-serif;
      font-weight: 400;
      letter-spacing: 0;
      text-transform: none;
    }
    .has-tooltip:hover::after {
      opacity: 1;
    }
    /* Tooltips that should appear below instead */
    .has-tooltip.tooltip-below::after {
      bottom: auto;
      top: 120%;
    }
    /* Wider tooltips for longer text */
    .has-tooltip.tooltip-wide::after {
      white-space: normal;
      width: 180px;
      text-align: center;
    }

    /* ═══════════════════════════════════════════════════
       GAMEPLAY HINTS (first-turn coaching)
       ═══════════════════════════════════════════════════ */
    .game-hint {
      position: fixed;
      bottom: 80px;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(0, 0, 0, 0.92);
      border: 1px solid var(--neon-yellow);
      border-radius: 8px;
      padding: 8px 16px;
      font-size: 0.8rem;
      color: var(--neon-yellow);
      z-index: 150;
      text-align: center;
      max-width: 500px;
      animation: hintPulse 2s ease-in-out infinite;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .game-hint .hint-icon {
      font-size: 1.1rem;
      flex-shrink: 0;
    }
    .game-hint .hint-dismiss {
      font-size: 0.7rem;
      padding: 2px 8px;
      border: 1px solid var(--neon-yellow);
      border-radius: 4px;
      background: transparent;
      color: var(--neon-yellow);
      cursor: pointer;
      flex-shrink: 0;
      margin-left: 4px;
    }
    .game-hint .hint-dismiss:hover {
      background: rgba(255, 230, 109, 0.2);
    }
    @keyframes hintPulse {
      0%, 100% { border-color: var(--neon-yellow); box-shadow: 0 0 8px rgba(255, 230, 109, 0.2); }
      50% { border-color: var(--neon-orange); box-shadow: 0 0 15px rgba(255, 140, 0, 0.3); }
    }

    /* In-game help button */
    .help-btn {
      font-size: 1rem;
      background: rgba(0, 180, 216, 0.15);
      border: 1px solid var(--neon-blue);
      color: var(--neon-blue);
      width: 28px;
      height: 28px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.3s ease;
    }
    .help-btn:hover {
      background: rgba(0, 180, 216, 0.3);
      box-shadow: 0 0 12px rgba(0, 180, 216, 0.4);
    }

    /* Combat Animations */
    @keyframes combatSlash {
      0% { transform: translateX(0) rotate(0); }
      25% { transform: translateX(10px) rotate(5deg); }
      50% { transform: translateX(-5px) rotate(-3deg); }
      100% { transform: translateX(0) rotate(0); }
    }
    .combat-clash {
      animation: combatSlash 0.4s ease;
    }

    @keyframes damageShake {
      0%, 100% { transform: translateX(0); }
      20% { transform: translateX(-5px); }
      40% { transform: translateX(5px); }
      60% { transform: translateX(-3px); }
      80% { transform: translateX(3px); }
    }
    .damage-shake {
      animation: damageShake 0.3s ease;
    }

    /* Floating Damage Numbers */
    .floating-damage {
      position: fixed;
      font-family: 'Orbitron', sans-serif;
      font-size: 1.8rem;
      font-weight: 900;
      color: #e74c3c;
      text-shadow: 0 0 10px rgba(231, 76, 60, 0.8), 0 2px 4px rgba(0,0,0,0.5);
      pointer-events: none;
      z-index: 500;
      animation: floatUp 1s ease-out forwards;
    }
    .floating-heal {
      color: var(--neon-green);
      text-shadow: 0 0 10px rgba(0, 255, 136, 0.8), 0 2px 4px rgba(0,0,0,0.5);
    }
    @keyframes floatUp {
      0% { opacity: 1; transform: translateY(0) scale(1); }
      50% { opacity: 1; transform: translateY(-30px) scale(1.2); }
      100% { opacity: 0; transform: translateY(-60px) scale(0.8); }
    }

    /* Card Play Animation */
    @keyframes cardEnter {
      0% { transform: translateY(50px) scale(0.5) rotate(-10deg); opacity: 0; }
      60% { transform: translateY(-10px) scale(1.1) rotate(2deg); opacity: 1; }
      100% { transform: translateY(0) scale(1) rotate(0); opacity: 1; }
    }
    .card-entering {
      animation: cardEnter 0.5s ease-out;
    }

    /* Particle Container */
    .particle-container {
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 400;
      overflow: hidden;
    }
    .particle {
      position: absolute;
      border-radius: 50%;
      pointer-events: none;
    }
    @keyframes particleFly {
      0% { transform: translate(0, 0) scale(1); opacity: 1; }
      100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
    }

    /* Speed controls */
    .speed-controls {
      display: flex;
      gap: 4px;
      align-items: center;
      font-size: 0.7rem;
    }
    .speed-btn {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.6rem;
      padding: 2px 6px;
      border: 1px solid #555;
      border-radius: 4px;
      background: transparent;
      color: var(--text-secondary);
      cursor: pointer;
    }
    .speed-btn.active {
      border-color: var(--neon-blue);
      color: var(--neon-blue);
    }

    /* Combat Preview */
    .combat-preview {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: rgba(0, 0, 0, 0.9);
      border: 2px solid var(--neon-orange);
      border-radius: 12px;
      padding: 1.5rem;
      z-index: 250;
      text-align: center;
      min-width: 300px;
      box-shadow: 0 0 30px rgba(255, 140, 0, 0.3);
    }
    .combat-preview h3 {
      font-family: 'Orbitron', sans-serif;
      color: var(--neon-orange);
      margin-bottom: 1rem;
    }
    .combat-matchup {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 1rem;
      margin: 0.5rem 0;
    }
    .combat-vs { color: #e74c3c; font-weight: 900; font-size: 1.2rem; }
    .combat-unit {
      text-align: center;
      font-size: 0.8rem;
    }
    .combat-unit-icon { font-size: 1.5rem; }
    .combat-result {
      margin-top: 0.5rem;
      font-size: 0.8rem;
      color: var(--neon-yellow);
    }

    /* Turn History */
    .turn-history {
      position: fixed;
      top: 10px;
      right: 10px;
      width: 250px;
      max-height: 80vh;
      overflow-y: auto;
      background: rgba(0, 0, 0, 0.85);
      border: 1px solid #444;
      border-radius: 8px;
      padding: 0.5rem;
      z-index: 100;
      display: none;
    }
    .turn-history.visible { display: block; }
    .turn-history h4 {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.7rem;
      color: var(--neon-blue);
      margin-bottom: 0.5rem;
    }
    .history-entry {
      font-size: 0.65rem;
      padding: 2px 0;
      border-bottom: 1px solid rgba(255,255,255,0.05);
      color: var(--text-secondary);
    }
    .history-turn-header {
      color: var(--neon-purple);
      font-weight: 700;
      margin-top: 4px;
    }

    /* Graveyard Viewer */
    .graveyard-btn {
      font-size: 0.7rem;
      padding: 2px 6px;
      background: rgba(127, 140, 141, 0.2);
      border: 1px solid #555;
      border-radius: 4px;
      color: var(--text-secondary);
      cursor: pointer;
    }
    .graveyard-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.9);
      z-index: 200;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 2rem;
      overflow-y: auto;
    }
    .graveyard-title {
      font-family: 'Orbitron', sans-serif;
      font-size: 1.5rem;
      color: var(--neon-purple);
      margin-bottom: 1rem;
    }
    .graveyard-cards {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      justify-content: center;
      max-width: 800px;
    }

    /* Deck Builder Styles */
    .deck-builder {
      display: flex;
      gap: 1rem;
      padding: 1rem;
      min-height: 100vh;
      max-width: 1200px;
      margin: 0 auto;
    }
    .db-pool {
      flex: 3;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
    .db-deck {
      flex: 1;
      min-width: 250px;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
    .db-filters {
      display: flex;
      gap: 0.5rem;
      flex-wrap: wrap;
      align-items: center;
    }
    .db-filter-btn {
      font-family: 'Rajdhani', sans-serif;
      font-size: 0.8rem;
      padding: 4px 10px;
      border: 1px solid #555;
      border-radius: 4px;
      background: transparent;
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.2s;
    }
    .db-filter-btn.active {
      border-color: var(--neon-blue);
      color: var(--neon-blue);
      background: rgba(0, 180, 216, 0.15);
    }
    .db-search {
      font-family: 'Rajdhani', sans-serif;
      font-size: 0.85rem;
      padding: 4px 10px;
      background: rgba(255,255,255,0.05);
      border: 1px solid #555;
      border-radius: 4px;
      color: var(--text-primary);
      width: 150px;
    }
    .db-search:focus {
      outline: none;
      border-color: var(--neon-blue);
    }
    .db-card-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(var(--card-width), 1fr));
      gap: 0.5rem;
      overflow-y: auto;
      max-height: 75vh;
      padding: 0.5rem;
    }
    .db-deck-list {
      flex: 1;
      overflow-y: auto;
      background: rgba(0,0,0,0.3);
      border: 1px solid #333;
      border-radius: 8px;
      padding: 0.5rem;
    }
    .db-deck-card {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 4px 8px;
      border-bottom: 1px solid rgba(255,255,255,0.05);
      font-size: 0.8rem;
      cursor: pointer;
      transition: background 0.2s;
    }
    .db-deck-card:hover {
      background: rgba(231, 76, 60, 0.2);
    }
    .db-deck-count {
      font-family: 'Orbitron', sans-serif;
      font-size: 1rem;
      text-align: center;
      padding: 0.5rem;
    }
    .db-mana-curve {
      display: flex;
      align-items: flex-end;
      gap: 2px;
      height: 50px;
      padding: 0 8px;
    }
    .db-mana-bar {
      flex: 1;
      background: var(--neon-blue);
      border-radius: 2px 2px 0 0;
      opacity: 0.7;
      min-height: 2px;
      position: relative;
    }
    .db-mana-label {
      position: absolute;
      bottom: -14px;
      left: 50%;
      transform: translateX(-50%);
      font-size: 0.5rem;
      color: var(--text-secondary);
    }
    .db-actions {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
    .db-btn {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.7rem;
      padding: 0.4rem 0.8rem;
      border: 1px solid;
      border-radius: 6px;
      cursor: pointer;
      text-align: center;
      transition: all 0.2s;
    }

    /* Settings / Sound Controls */
    .settings-bar {
      position: fixed;
      top: 5px;
      right: 5px;
      display: flex;
      gap: 4px;
      z-index: 150;
    }
    .settings-btn {
      font-size: 1rem;
      padding: 4px 8px;
      background: rgba(0,0,0,0.6);
      border: 1px solid #444;
      border-radius: 4px;
      cursor: pointer;
      color: var(--text-secondary);
      transition: all 0.2s;
    }
    .settings-btn:hover {
      border-color: var(--neon-blue);
      color: var(--neon-blue);
    }

    /* ═══════════════════════════════════════════════════
       STEP NARRATOR / ACTION BANNERS
       ═══════════════════════════════════════════════════ */

    .turn-splash {
      position: fixed;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      background: rgba(0, 0, 0, 0.75);
      z-index: 600;
      pointer-events: none;
      animation: splashIn 1.4s ease-out forwards;
    }
    @keyframes splashIn {
      0% { opacity: 0; }
      15% { opacity: 1; }
      75% { opacity: 1; }
      100% { opacity: 0; }
    }
    .splash-turn-label {
      font-family: 'Orbitron', sans-serif;
      font-size: 1rem;
      color: var(--text-secondary);
      text-transform: uppercase;
      letter-spacing: 0.4em;
      animation: splashSlideDown 0.3s ease-out;
    }
    .splash-player-name {
      font-family: 'Orbitron', sans-serif;
      font-size: 2.5rem;
      font-weight: 900;
      color: var(--neon-blue);
      text-shadow: 0 0 20px rgba(0, 180, 216, 0.6), 0 0 40px rgba(0, 180, 216, 0.3);
      animation: splashScaleIn 0.35s ease-out;
    }
    .splash-player-name.opponent {
      color: #e74c3c;
      text-shadow: 0 0 20px rgba(231, 76, 60, 0.6), 0 0 40px rgba(231, 76, 60, 0.3);
    }
    .splash-details {
      display: flex;
      gap: 1.5rem;
      margin-top: 0.5rem;
      animation: splashFadeUp 0.3s ease-out 0.15s both;
    }
    .splash-detail {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.8rem;
      color: var(--neon-yellow);
      text-shadow: 0 0 8px rgba(255, 230, 109, 0.4);
    }
    @keyframes splashSlideDown {
      from { transform: translateY(-20px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }
    @keyframes splashScaleIn {
      from { transform: scale(0.5); opacity: 0; }
      to { transform: scale(1); opacity: 1; }
    }
    @keyframes splashFadeUp {
      from { transform: translateY(10px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }

    .step-banner {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      z-index: 550;
      pointer-events: none;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.3rem;
      animation: bannerPop 0.6s ease-out forwards;
    }
    @keyframes bannerPop {
      0% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
      40% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
      100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    }
    .step-banner-icon {
      font-size: 2.5rem;
      filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.3));
      animation: bannerIconBounce 0.4s ease-out;
    }
    @keyframes bannerIconBounce {
      0% { transform: scale(0); }
      60% { transform: scale(1.3); }
      100% { transform: scale(1); }
    }
    .step-banner-title {
      font-family: 'Orbitron', sans-serif;
      font-size: 1.1rem;
      font-weight: 900;
      color: white;
      text-shadow: 0 0 15px rgba(255, 255, 255, 0.5), 0 2px 4px rgba(0,0,0,0.8);
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }
    .step-banner-desc {
      font-family: 'Rajdhani', sans-serif;
      font-size: 0.85rem;
      color: var(--neon-yellow);
      text-shadow: 0 1px 3px rgba(0,0,0,0.8);
      max-width: 350px;
      text-align: center;
      line-height: 1.3;
    }

    .phase-steps {
      display: flex;
      gap: 0;
      align-items: center;
      background: rgba(0, 0, 0, 0.4);
      border-radius: 20px;
      padding: 2px;
      position: relative;
      z-index: 1;
    }
    .phase-step {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.5rem;
      padding: 3px 8px;
      border-radius: 20px;
      color: var(--text-secondary);
      transition: all 0.3s ease;
      white-space: nowrap;
      letter-spacing: 0.05em;
    }
    .phase-step.active {
      background: var(--neon-purple);
      color: white;
      box-shadow: 0 0 12px rgba(155, 89, 182, 0.6);
    }
    .phase-step.completed {
      color: var(--neon-green);
    }
    .phase-arrow {
      color: #444;
      font-size: 0.5rem;
      margin: 0 1px;
    }

    @keyframes drawCardSlide {
      0% { transform: translateX(80px) translateY(-30px) rotate(15deg) scale(0.5); opacity: 0; }
      50% { transform: translateX(10px) translateY(-5px) rotate(3deg) scale(1.05); opacity: 1; }
      100% { transform: translateX(0) translateY(0) rotate(0) scale(1); opacity: 1; }
    }
    .card-drawing {
      animation: drawCardSlide 0.5s ease-out;
    }

    @keyframes energyPulse {
      0% { transform: scale(1); }
      30% { transform: scale(1.4); color: var(--neon-yellow); text-shadow: 0 0 15px rgba(255, 230, 109, 0.8); }
      100% { transform: scale(1); }
    }
    .energy-gained {
      animation: energyPulse 0.6s ease-out;
      display: inline-block;
    }

    @keyframes heroSummon {
      0% { transform: translateY(40px) scale(0); opacity: 0; }
      40% { transform: translateY(-8px) scale(1.1); opacity: 1; }
      60% { transform: translateY(4px) scale(0.95); }
      100% { transform: translateY(0) scale(1); opacity: 1; }
    }
    .hero-summoning {
      animation: heroSummon 0.6s ease-out;
    }

    @keyframes heroDeath {
      0% { transform: scale(1); opacity: 1; filter: brightness(1); }
      20% { transform: scale(1.1); filter: brightness(2); }
      50% { transform: scale(0.9) rotate(5deg); opacity: 0.6; filter: brightness(0.5) saturate(0); }
      100% { transform: scale(0) rotate(15deg); opacity: 0; filter: brightness(0) saturate(0); }
    }
    .hero-dying {
      animation: heroDeath 0.7s ease-in forwards;
      pointer-events: none;
    }

    @keyframes attackCharge {
      0% { transform: translateY(0); }
      30% { transform: translateY(5px); }
      60% { transform: translateY(-15px); }
      100% { transform: translateY(0); }
    }
    .hero-charging {
      animation: attackCharge 0.5s ease-in-out;
    }

    @keyframes blockerStance {
      0% { transform: scale(1); }
      50% { transform: scale(1.08); box-shadow: 0 0 20px rgba(0, 255, 136, 0.6); }
      100% { transform: scale(1.03); }
    }
    .hero-blocking-stance {
      animation: blockerStance 0.4s ease-out forwards;
    }

    .combat-clash-overlay {
      position: fixed;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 580;
      pointer-events: none;
      animation: clashFlash 0.6s ease-out forwards;
    }
    @keyframes clashFlash {
      0% { background: rgba(255, 255, 255, 0.3); }
      30% { background: rgba(255, 255, 255, 0); }
      100% { background: transparent; }
    }
    .clash-icon {
      font-size: 5rem;
      animation: clashBurst 0.5s ease-out forwards;
      filter: drop-shadow(0 0 20px rgba(255, 140, 0, 0.8));
    }
    @keyframes clashBurst {
      0% { transform: scale(0) rotate(-30deg); opacity: 0; }
      40% { transform: scale(1.4) rotate(10deg); opacity: 1; }
      100% { transform: scale(1.8) rotate(0deg); opacity: 0; }
    }

    @keyframes gadgetActivate {
      0% { transform: rotateY(90deg); opacity: 0; }
      50% { transform: rotateY(-10deg); opacity: 1; }
      100% { transform: rotateY(0); opacity: 1; }
    }
    .gadget-activating {
      animation: gadgetActivate 0.5s ease-out;
    }

    @keyframes spellCast {
      0% { transform: scale(0.3); opacity: 0; filter: blur(10px); }
      50% { transform: scale(1.15); opacity: 1; filter: blur(0); }
      100% { transform: scale(1); opacity: 1; }
    }
    .spell-casting {
      animation: spellCast 0.4s ease-out;
    }

    @keyframes healGlow {
      0% { box-shadow: inset 0 0 0 rgba(0, 255, 136, 0); }
      50% { box-shadow: inset 0 0 30px rgba(0, 255, 136, 0.4), 0 0 20px rgba(0, 255, 136, 0.3); }
      100% { box-shadow: inset 0 0 0 rgba(0, 255, 136, 0); }
    }
    .heal-glow {
      animation: healGlow 0.8s ease-out;
    }

    @keyframes buffShimmer {
      0% { box-shadow: 0 0 0 rgba(0, 255, 136, 0); }
      50% { box-shadow: 0 0 20px rgba(0, 255, 136, 0.5), inset 0 0 15px rgba(0, 255, 136, 0.2); }
      100% { box-shadow: 0 0 5px rgba(0, 255, 136, 0.1); }
    }
    .buff-shimmer {
      animation: buffShimmer 0.6s ease-out;
    }

    @keyframes destroyFlash {
      0% { box-shadow: 0 0 0 rgba(255, 0, 110, 0); }
      30% { box-shadow: 0 0 40px rgba(255, 0, 110, 0.8), inset 0 0 20px rgba(255, 0, 110, 0.5); }
      100% { box-shadow: 0 0 0 rgba(255, 0, 110, 0); }
    }
    .destroy-flash {
      animation: destroyFlash 0.5s ease-out;
    }

    @keyframes shieldApply {
      0% { box-shadow: 0 0 0 rgba(0, 180, 216, 0); }
      50% { box-shadow: 0 0 25px rgba(0, 180, 216, 0.7), inset 0 0 15px rgba(0, 180, 216, 0.3); }
      100% { box-shadow: 0 0 8px rgba(0, 180, 216, 0.2); }
    }
    .shield-apply {
      animation: shieldApply 0.6s ease-out;
    }

    .narrator-toast {
      position: fixed;
      bottom: 15%;
      left: 50%;
      transform: translateX(-50%) translateY(20px);
      background: rgba(0, 0, 0, 0.9);
      border: 1px solid var(--neon-purple);
      border-radius: 10px;
      padding: 0.6rem 1.2rem;
      z-index: 500;
      display: flex;
      align-items: center;
      gap: 0.6rem;
      opacity: 0;
      animation: narratorIn 0.3s ease-out forwards;
      pointer-events: none;
      max-width: 90%;
    }
    .narrator-toast.exit {
      animation: narratorOut 0.3s ease-in forwards;
    }
    @keyframes narratorIn {
      from { opacity: 0; transform: translateX(-50%) translateY(20px); }
      to { opacity: 1; transform: translateX(-50%) translateY(0); }
    }
    @keyframes narratorOut {
      from { opacity: 1; transform: translateX(-50%) translateY(0); }
      to { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    }
    .narrator-icon { font-size: 1.5rem; }
    .narrator-text {
      font-family: 'Rajdhani', sans-serif;
      font-size: 0.9rem;
      color: var(--text-primary);
      line-height: 1.3;
    }
    .narrator-text strong {
      color: var(--neon-yellow);
      font-family: 'Orbitron', sans-serif;
      font-size: 0.8rem;
    }

    .blocker-lines-svg {
      position: fixed;
      inset: 0;
      z-index: 60;
      pointer-events: none;
    }
    .blocker-line {
      stroke: var(--neon-green);
      stroke-width: 2;
      stroke-dasharray: 6 3;
      animation: dashFlow 0.5s linear infinite;
      filter: drop-shadow(0 0 4px rgba(0, 255, 136, 0.5));
    }
    @keyframes dashFlow {
      to { stroke-dashoffset: -9; }
    }

    /* Scrollbar */
    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: var(--bg-dark); }
    ::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

    /* ═══════════════════════════════════════════════════
       RESPONSIVE
       ═══════════════════════════════════════════════════ */
    @media (max-width: 768px) {
      .game-title { font-size: 2rem; }
      :root {
        --card-width: 85px;
        --card-height: 175px;
        --board-hero-size: 80px;
      }
      .game-log { display: none; }
      .hand { gap: 0.2rem; }
      .card-name { font-size: 0.45rem; }
      .card-effect { font-size: 0.4rem; }
    }

    @media (max-width: 480px) {
      :root {
        --card-width: 70px;
        --card-height: 150px;
        --board-hero-size: 65px;
      }
      .game-title { font-size: 1.5rem; }
      .player-info { gap: 0.5rem; font-size: 0.8rem; }
    }


    @media (pointer: coarse) {
      .board-hero, .hand-card { min-height: 44px; }
      .action-btn { min-height: 44px; padding: 0.6rem 1.2rem; }
      .menu-btn { min-height: 48px; }
      .settings-btn { min-width: 40px; min-height: 40px; }
    }
    @media (max-width: 768px) {
      .deck-builder { flex-direction: column; }
      .menu-buttons-grid { width: 90%; }
      .card-preview-panel { display: none; }
      .game-board { padding: 0.2rem; gap: 0.15rem; }
      .player-bar { padding: 0.3rem 0.5rem; }
      .action-buttons { justify-content: center; width: 100%; }
      .narrator-toast { font-size: 0.75rem; bottom: 10%; }
      .tutorial-modal { padding: 1rem; max-height: 90vh; }
      .game-hint { font-size: 0.7rem; max-width: 90%; bottom: 60px; }
      /* Stat-chip scaling for the narrower 80px board-hero / 85px card. */
      .card-stats { font-size: 0.8rem; gap: 3px; padding: 2px 3px; }
      .card-attack, .card-defense { border-width: 1.5px; padding: 1px 2px; border-radius: 3px; }
      .hero-stats { font-size: 0.95rem; gap: 4px; padding: 3px 4px; }
      .hero-attack, .hero-defense { border-width: 1.5px; padding: 1px 3px; border-radius: 4px; }
    }
    @media (max-width: 480px) {
      .menu-buttons-grid { grid-template-columns: 1fr; width: 95%; }
      .hand { gap: 0.1rem; }
      .board-row { gap: 0.3rem; padding: 0.2rem; }
      .player-name { font-size: 0.7rem; }
      .action-btn { font-size: 0.6rem; }
      .floating-damage { font-size: 1.2rem; }
      .hero-name { font-size: 0.4rem; }
      /* Phone: 65px hero / 70px card. Drop border to 1px so both chips
         fit across the hero width with room for text. */
      .card-stats { font-size: 0.7rem; gap: 2px; padding: 1px 2px; }
      .card-attack, .card-defense { border-width: 1px; padding: 1px 2px; border-radius: 3px; }
      .hero-stats { font-size: 0.8rem; gap: 3px; padding: 2px 3px; }
      .hero-attack, .hero-defense { border-width: 1px; padding: 1px 2px; border-radius: 3px; }
      .deck-select { padding: 1rem 0.6rem; gap: 1rem; }
      .deck-select .section-title { font-size: 1.4rem; }
      .deck-grid { gap: 0.8rem; }
      .deck-art { height: 180px; }
      .deck-info { padding: 0.75rem; }
      .deck-info h3 { font-size: 0.95rem; }
      .deck-info p { font-size: 0.8rem; }
    }
    @media (max-height: 500px) and (orientation: landscape) {
      :root { --card-width: 60px; --card-height: 120px; --board-hero-size: 55px; }
      .main-menu { min-height: auto; padding: 0.5rem; gap: 0.5rem; }
      .turn-splash { display: none; }
    }
    .chat-widget { position: fixed; bottom: 10px; left: 10px; width: 250px; z-index: 150; display: flex; flex-direction: column; gap: 4px; }
    .chat-log { max-height: 120px; overflow-y: auto; background: rgba(0,0,0,0.8); border: 1px solid #444; border-radius: 6px; padding: 4px 8px; font-size: 0.7rem; }
    .chat-input-row { display: flex; gap: 4px; }
    .chat-input { flex: 1; font-family: Rajdhani, sans-serif; font-size: 0.8rem; padding: 4px 8px; background: rgba(0,0,0,0.7); border: 1px solid #555; border-radius: 4px; color: var(--text-primary); }
    .chat-send-btn { font-family: Orbitron, sans-serif; font-size: 0.7rem; padding: 4px 10px; background: rgba(0,180,216,0.2); border: 1px solid var(--neon-blue); border-radius: 4px; color: var(--neon-blue); cursor: pointer; }
    .turn-timer { position: fixed; top: 50px; left: 50%; transform: translateX(-50%); font-family: Orbitron, sans-serif; font-size: 1.2rem; color: var(--neon-yellow); z-index: 160; }
    .turn-timer.urgent { color: #e74c3c; animation: timerPulse 0.5s ease-in-out infinite; }
    @keyframes timerPulse { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.1); } }
    .glossary-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 500; display: flex; align-items: center; justify-content: center; }
    .glossary-modal { background: var(--bg-medium); border: 2px solid var(--neon-blue); border-radius: 16px; padding: 2rem; max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto; }
    .glossary-item { display: flex; gap: 0.8rem; padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .glossary-keyword { font-family: Orbitron, sans-serif; font-size: 0.75rem; font-weight: 700; color: var(--neon-yellow); min-width: 100px; }
    .glossary-desc { font-size: 0.8rem; color: var(--text-secondary); }
    .daily-challenge-banner { background: linear-gradient(135deg, rgba(255,140,0,0.15), rgba(255,0,110,0.15)); border: 1px solid var(--neon-orange); border-radius: 8px; padding: 0.8rem 1.2rem; margin: 0.5rem auto; text-align: center; max-width: 400px; }
    .daily-challenge-title { font-family: Orbitron, sans-serif; font-size: 0.8rem; color: var(--neon-orange); margin-bottom: 0.3rem; }
    .daily-challenge-desc { font-size: 0.8rem; color: var(--text-secondary); }
    .daily-challenge-reward { font-size: 0.7rem; color: var(--neon-yellow); margin-top: 0.2rem; }
    .profile-card { background: var(--bg-medium); border: 2px solid var(--neon-purple); border-radius: 12px; padding: 1.5rem; text-align: center; max-width: 300px; margin: 0 auto 1rem; }
    .profile-avatar { font-size: 3rem; margin-bottom: 0.5rem; }
    .profile-name { font-family: Orbitron, sans-serif; font-size: 1.2rem; color: var(--neon-blue); }
    .profile-level { font-size: 0.9rem; color: var(--neon-yellow); margin: 0.3rem 0; }
    .profile-xp-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; margin: 0.5rem 0; }
    .profile-xp-fill { height: 100%; background: linear-gradient(90deg, var(--neon-blue), var(--neon-green)); border-radius: 3px; }
    .profile-stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; margin-top: 0.8rem; }
    .profile-stat-value { font-family: Orbitron, sans-serif; font-size: 1.1rem; font-weight: 700; }
    .profile-stat-label { font-size: 0.65rem; color: var(--text-secondary); }
    .enrage-badge { background: rgba(231,76,60,0.4); border: 1px solid #e74c3c; color: #f1948a; }
    .combo-badge { background: rgba(243,156,18,0.4); border: 1px solid #f39c12; color: #f9e79f; }
    .leaderboard-table { width: 100%; max-width: 600px; border-collapse: collapse; margin: 1rem auto; }
    .leaderboard-table th { font-family: Orbitron, sans-serif; font-size: 0.7rem; color: var(--neon-blue); padding: 0.5rem; border-bottom: 1px solid #444; text-align: left; }
    .leaderboard-table td { font-size: 0.8rem; padding: 0.4rem 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .replay-controls { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 0.5rem; align-items: center; background: rgba(0,0,0,0.9); border: 1px solid var(--neon-purple); border-radius: 8px; padding: 0.5rem 1rem; z-index: 200; }
    .replay-btn { font-family: Orbitron, sans-serif; font-size: 0.8rem; padding: 0.3rem 0.8rem; border: 1px solid #555; border-radius: 4px; background: transparent; color: var(--text-secondary); cursor: pointer; }
    .replay-btn:hover { border-color: var(--neon-blue); color: var(--neon-blue); }

    /* ── Card Play Animation ── */
    .card-play-overlay {
      position: fixed;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 590;
      pointer-events: none;
      background: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 70%);
      animation: cardPlayBgIn 0.3s ease-out forwards;
    }
    @keyframes cardPlayBgIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    .card-play-overlay-exit {
      animation: cardPlayBgOut 0.4s ease-in forwards;
    }
    @keyframes cardPlayBgOut {
      to { opacity: 0; }
    }
    .card-play-showcase {
      transform: scale(1.8);
      animation: cardShowcaseIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
      filter: drop-shadow(0 0 30px rgba(0, 180, 216, 0.6)) drop-shadow(0 0 60px rgba(0, 180, 216, 0.3));
    }
    @keyframes cardShowcaseIn {
      0% { transform: scale(0.3) rotate(-8deg) translateY(200px); opacity: 0; }
      70% { transform: scale(1.9) rotate(1deg) translateY(-10px); opacity: 1; }
      100% { transform: scale(1.8) rotate(0deg) translateY(0); opacity: 1; }
    }
    .card-play-overlay-exit .card-play-showcase {
      animation: cardShowcaseOut 0.4s ease-in forwards;
    }
    @keyframes cardShowcaseOut {
      0% { transform: scale(1.8) rotate(0deg); opacity: 1; }
      100% { transform: scale(0.5) rotate(5deg) translateY(-100px); opacity: 0; filter: brightness(2); }
    }

/* ═══════════════════════════════════════════════════════════════════
   FANTASY THEME OVERRIDES
   These rules cascade over the earlier (neon / synthwave) styling so
   every remaining surface — cards, board, log, modals, forms, toasts —
   matches the gilded parchment look established on the main menu.
   ═══════════════════════════════════════════════════════════════════ */

/* Typography: headings all switch to Cinzel; body copy stays Rajdhani
   for readability of card text. */
.game-title,
.section-title,
.game-subtitle,
.game-over-title,
.tutorial-modal h2,
.tutorial-section h3,
.preview-name,
.hero-name,
.card-name,
.deck-info h3,
.target-select-modal h3,
.pair-badge {
  font-family: var(--font-fantasy), 'Cinzel', serif !important;
  letter-spacing: 0.06em;
}
.game-title {
  color: var(--fantasy-gold-light);
  text-shadow:
    0 2px 0 #000,
    0 0 14px rgba(217, 179, 92, 0.55),
    0 0 28px rgba(211, 84, 0, 0.35);
  animation: titlePulse 3s ease-in-out infinite;
}
.title-accent {
  color: var(--fantasy-ember);
  text-shadow:
    0 2px 0 #000,
    0 0 12px rgba(211, 84, 0, 0.6),
    0 0 24px rgba(211, 84, 0, 0.3);
}
.section-title {
  color: var(--fantasy-gold);
  text-shadow: 0 2px 0 #000, 0 0 10px rgba(217, 179, 92, 0.4);
}

/* ── Game board — tavern table / battle map ── */
.game-board {
  background:
    linear-gradient(180deg, rgba(22, 14, 6, 0.55) 0%, rgba(12, 8, 4, 0.65) 100%);
  border-radius: 8px;
}
.battlefield-divider {
  border: none;
  height: 3px;
  background:
    linear-gradient(90deg,
      transparent 0%,
      var(--fantasy-gold-dark) 15%,
      var(--fantasy-gold) 50%,
      var(--fantasy-gold-dark) 85%,
      transparent 100%);
  box-shadow: 0 0 8px rgba(217, 179, 92, 0.35);
  margin: 0.25rem 0;
}
.battlefield-divider::before {
  content: "❖";
  color: var(--fantasy-gold);
  background: var(--bg-dark);
  padding: 0 0.5rem;
  text-shadow: 0 0 6px rgba(217, 179, 92, 0.55);
}

/* ── Player bars — banners with brass trim ── */
.player-bar {
  background:
    linear-gradient(180deg, rgba(74, 50, 22, 0.55) 0%, rgba(32, 22, 10, 0.75) 100%) !important;
  border: 2px solid var(--fantasy-brass) !important;
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 150, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.45);
}
.opponent-bar { border-color: #8a3a2c !important; }
.my-bar       { border-color: var(--fantasy-gold-dark) !important; }
.player-name {
  font-family: var(--font-fantasy), serif !important;
  color: var(--fantasy-gold-light);
  letter-spacing: 0.1em;
  text-shadow: 0 1px 0 #000;
}
.life-display  { color: #f26b56; text-shadow: 0 1px 0 #000, 0 0 6px rgba(231, 76, 60, 0.35); }
.energy-display{ color: var(--fantasy-gold-light); text-shadow: 0 1px 0 #000, 0 0 6px rgba(217, 179, 92, 0.35); }
.deck-count    { color: var(--fantasy-parchment-d); }

/* ── Cards — gilded brass frames, parchment interior ── */
.card {
  background:
    linear-gradient(180deg, #efe0b3 0%, #d5b888 55%, #9f8050 100%) !important;
  border: 2px solid var(--fantasy-brass) !important;
  border-radius: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 200, 0.6),
    inset 0 -3px 6px rgba(0, 0, 0, 0.28),
    0 0 0 1px var(--fantasy-gold-dark),
    0 2px 4px rgba(0, 0, 0, 0.55);
  color: var(--fantasy-ink);
}
.hand-card.playable {
  border-color: var(--fantasy-gold-light) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 200, 0.7),
    inset 0 -3px 6px rgba(0, 0, 0, 0.25),
    0 0 0 1px var(--fantasy-gold),
    0 0 12px rgba(217, 179, 92, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.55);
}
.hand-card.unplayable { opacity: 0.6; filter: grayscale(25%); }
.card-cost {
  background:
    radial-gradient(circle at 35% 35%, var(--fantasy-gold-light) 0%, var(--fantasy-gold) 45%, var(--fantasy-gold-dark) 100%) !important;
  border: 1px solid var(--fantasy-ink);
  color: var(--fantasy-ink) !important;
  font-family: var(--font-fantasy), serif;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.55);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.5), 0 0 8px rgba(217, 179, 92, 0.45);
}
.card-name {
  color: var(--fantasy-ink);
  background: linear-gradient(180deg, rgba(169, 136, 84, 0.35), rgba(138, 106, 42, 0.35));
  border-top: 1px solid var(--fantasy-gold-dark);
  border-bottom: 1px solid var(--fantasy-gold-dark);
  padding: 2px 4px;
}
.card-type-label {
  color: var(--fantasy-gold-dark) !important;
  font-family: var(--font-runic), 'Cinzel', serif !important;
  letter-spacing: 0.12em;
}
.card-effect {
  color: #2a1a08 !important;
  background: rgba(255, 250, 220, 0.55);
  border-top: 1px dashed var(--fantasy-gold-dark);
  padding: 2px 4px;
}
/* Fantasy-skin palette tweak — lean the red/blue into the parchment tone.
   Size and chip-boxing come from the base .card-stats rule above. */
.card-attack  { color: #ff7a5c; }
.card-defense { color: #7bb8e0; }
.card-back-img, .card-back {
  background:
    linear-gradient(135deg, #3a2615 0%, #1a100a 55%, #3a2615 100%) !important;
  border: 2px solid var(--fantasy-gold) !important;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--fantasy-gold-dark);
}

/* ── Board heroes — match card look ── */
.board-hero {
  background:
    linear-gradient(180deg, #efe0b3 0%, #d5b888 60%, #9f8050 100%) !important;
  border: 2px solid var(--fantasy-brass) !important;
  border-radius: 5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 200, 0.5),
    0 0 0 1px var(--fantasy-gold-dark),
    0 2px 4px rgba(0, 0, 0, 0.55);
}
.board-hero.can-attack {
  border-color: var(--fantasy-gold-light) !important;
  box-shadow: 0 0 0 1px var(--fantasy-gold), 0 0 14px rgba(217, 179, 92, 0.55), 0 2px 4px rgba(0,0,0,0.55);
}
.board-hero.targetable {
  border-color: #e0603a !important;
  box-shadow: 0 0 0 1px #c44a26, 0 0 14px rgba(224, 96, 58, 0.6), 0 2px 4px rgba(0,0,0,0.55);
}
.board-hero.has-taunt {
  border-color: var(--fantasy-crimson) !important;
  box-shadow: 0 0 0 1px var(--fantasy-gold-dark), 0 0 10px rgba(139, 30, 30, 0.6);
}
.hero-name {
  color: var(--fantasy-ink) !important;
  background: rgba(169, 136, 84, 0.4);
  border-top: 1px solid var(--fantasy-gold-dark);
  border-bottom: 1px solid var(--fantasy-gold-dark);
}
.hero-attack  { color: #ff7a5c; }
.hero-defense { color: #7bb8e0; }

/* Brass pin badges */
.taunt-badge, .shield-badge, .sick-badge,
.flying-badge, .stealth-badge, .dstrike-badge,
.lifesteal-badge, .poison-badge, .keyword-badge, .gadget-tag {
  background: linear-gradient(180deg, rgba(90, 60, 24, 0.92), rgba(40, 26, 10, 0.95)) !important;
  border: 1px solid var(--fantasy-gold-dark) !important;
  color: var(--fantasy-gold-light) !important;
  font-family: var(--font-fantasy), serif !important;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 0 #000;
  box-shadow: inset 0 1px 0 rgba(255,220,150,0.25), 0 1px 2px rgba(0,0,0,0.45);
  border-radius: 3px;
}
.taunt-badge    { color: #f2a08e !important; border-color: var(--fantasy-crimson) !important; }
.shield-badge   { color: #9fd0ee !important; }
.flying-badge   { color: #c8a6ed !important; }
.stealth-badge  { color: var(--fantasy-parchment) !important; }
.dstrike-badge  { color: #f6c87d !important; }
.lifesteal-badge{ color: #ff9db0 !important; }
.poison-badge   { color: #a6e07a !important; }

/* ── Game action buttons (End Turn / Attack / Block / Cancel / Mulligan) ── */
.action-btn, .end-turn-btn, .attack-btn, .block-btn, .cancel-btn, .mulligan-btn {
  font-family: var(--font-fantasy), serif !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fantasy-gold-light) !important;
  background:
    linear-gradient(180deg, rgba(70, 50, 22, 0.95) 0%, rgba(30, 20, 8, 0.98) 100%) !important;
  border: 2px solid var(--fantasy-brass) !important;
  border-radius: 4px;
  text-shadow: 0 1px 0 #000;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 150, 0.28),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5),
    0 2px 0 #1a0f06 !important;
  transition: all 0.25s ease;
}
.end-turn-btn:hover, .attack-btn:hover, .block-btn:hover, .cancel-btn:hover, .mulligan-btn:hover {
  border-color: var(--fantasy-gold-light) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 150, 0.42),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5),
    0 2px 0 #1a0f06,
    0 0 18px rgba(217, 179, 92, 0.55) !important;
  transform: translateY(-1px);
}
.attack-btn    { border-color: var(--fantasy-crimson) !important; color: #f2a08e !important; }
.end-turn-btn  { border-color: var(--fantasy-gold) !important; }
.cancel-btn    { border-color: #5a4a32 !important; color: var(--fantasy-parchment) !important; }
.mulligan-btn  { border-color: var(--fantasy-brass) !important; }
.attack-btn    { animation: none; }

/* ── Phase indicator & turn indicator ── */
.phase-indicator, .turn-indicator {
  font-family: var(--font-fantasy), serif !important;
  color: var(--fantasy-gold-light) !important;
  letter-spacing: 0.2em;
  text-shadow: 0 1px 0 #000, 0 0 8px rgba(217, 179, 92, 0.4);
  background:
    linear-gradient(180deg, rgba(74, 50, 22, 0.55), rgba(30, 20, 8, 0.75)) !important;
  border: 1px solid var(--fantasy-gold-dark) !important;
  border-radius: 3px;
}

/* ── Game log — weathered scroll ── */
.game-log {
  /* Authoritative position: keep it clear of both player bars so the
     energy / life counters are never obscured. */
  position: fixed !important;
  top: 74px !important;
  right: 10px !important;
  left: auto !important;
  bottom: auto !important;
  width: 230px !important;
  max-height: 140px !important;
  z-index: 40 !important;
  background:
    repeating-linear-gradient(0deg, rgba(169, 136, 84, 0.06) 0px, rgba(169, 136, 84, 0.06) 1px, transparent 1px, transparent 22px),
    linear-gradient(180deg, #2a1c0e 0%, #1a0f06 100%) !important;
  border: 2px solid var(--fantasy-brass) !important;
  border-radius: 4px;
  color: var(--fantasy-parchment) !important;
  font-family: 'Rajdhani', serif !important;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.6),
    inset 0 0 30px rgba(40, 26, 10, 0.4);
}
.log-entry {
  color: var(--fantasy-parchment) !important;
  border-bottom: 1px dashed rgba(169, 136, 84, 0.2) !important;
}

/* ── Room input / room code (online lobby) ── */
.room-input {
  font-family: var(--font-fantasy), serif !important;
  background: linear-gradient(180deg, rgba(232, 216, 168, 0.95), rgba(200, 180, 130, 0.95)) !important;
  border: 2px solid var(--fantasy-brass) !important;
  color: var(--fantasy-ink) !important;
  letter-spacing: 0.25em;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}
.room-input:focus {
  border-color: var(--fantasy-gold-light) !important;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(217, 179, 92, 0.55) !important;
}
.room-code {
  font-family: var(--font-fantasy), serif !important;
  color: var(--fantasy-gold-light) !important;
  text-shadow:
    0 2px 0 #000,
    0 0 16px rgba(217, 179, 92, 0.55) !important;
}
.waiting-spinner { color: var(--fantasy-parchment-d) !important; }

/* ── Deck select & deck options ── */
.deck-option {
  background:
    linear-gradient(180deg, rgba(74, 50, 22, 0.88), rgba(30, 20, 8, 0.95)) !important;
  border: 2px solid var(--fantasy-brass) !important;
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 150, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5),
    0 3px 8px rgba(0, 0, 0, 0.55);
  color: var(--fantasy-parchment);
}
.deck-option:hover {
  border-color: var(--fantasy-gold-light) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 150, 0.35),
    0 0 24px rgba(217, 179, 92, 0.45),
    0 3px 8px rgba(0, 0, 0, 0.55) !important;
}
.deck-info h3 { color: var(--fantasy-gold-light); text-shadow: 0 1px 0 #000; }
.deck-info p  { color: var(--fantasy-parchment-d); }
.deck-symbols { filter: drop-shadow(0 2px 3px #000) drop-shadow(0 0 6px rgba(217, 179, 92, 0.35)); }

/* ── Player slots (multiplayer lobby) ── */
.player-slot {
  background:
    linear-gradient(180deg, rgba(74, 50, 22, 0.72), rgba(30, 20, 8, 0.9)) !important;
  border: 2px solid var(--fantasy-brass) !important;
  color: var(--fantasy-parchment) !important;
  font-family: var(--font-fantasy), serif !important;
}
.player-slot.filled { border-color: var(--fantasy-gold) !important; }
.player-slot.empty  { border-style: dashed !important; color: var(--fantasy-parchment-d) !important; }

/* ── Tutorial / Codex modal — illuminated manuscript ── */
.tutorial-overlay {
  background: rgba(10, 6, 2, 0.78) !important;
  backdrop-filter: blur(3px);
}
.tutorial-modal {
  background:
    repeating-linear-gradient(0deg, rgba(169, 136, 84, 0.04) 0px, rgba(169, 136, 84, 0.04) 1px, transparent 1px, transparent 26px),
    linear-gradient(180deg, #2b1d0d 0%, #1a1009 100%) !important;
  border: 3px solid var(--fantasy-gold) !important;
  border-radius: 6px !important;
  color: var(--fantasy-parchment) !important;
  box-shadow:
    0 0 0 1px var(--fantasy-gold-dark),
    0 0 0 4px var(--fantasy-iron),
    0 20px 60px rgba(0, 0, 0, 0.8),
    inset 0 0 40px rgba(40, 26, 10, 0.4) !important;
}
.tutorial-modal h2 {
  color: var(--fantasy-gold-light) !important;
  text-shadow: 0 2px 0 #000, 0 0 12px rgba(217, 179, 92, 0.4);
  border-bottom: 1px solid var(--fantasy-gold-dark);
  padding-bottom: 0.4rem;
}
.tutorial-section h3 {
  color: var(--fantasy-ember) !important;
  text-shadow: 0 1px 0 #000;
  letter-spacing: 0.12em;
}
.tutorial-section p,
.tutorial-section li { color: var(--fantasy-parchment) !important; }
.tutorial-section strong { color: var(--fantasy-gold-light); }
.tutorial-section li::before {
  content: "❖ ";
  color: var(--fantasy-gold);
}
.tutorial-keyword-grid li strong {
  color: var(--fantasy-gold-light) !important;
  font-family: var(--font-fantasy), serif;
}

/* ── Target-select modal ── */
.target-select-overlay { background: rgba(10, 6, 2, 0.72) !important; }
.target-select-modal {
  background: linear-gradient(180deg, #2b1d0d 0%, #1a1009 100%) !important;
  border: 3px solid var(--fantasy-gold) !important;
  box-shadow: 0 0 0 1px var(--fantasy-gold-dark), 0 20px 60px rgba(0,0,0,0.75) !important;
  color: var(--fantasy-parchment) !important;
}
.target-select-modal h3 { color: var(--fantasy-gold-light) !important; font-family: var(--font-fantasy), serif !important; }
.target-player-btn {
  background: linear-gradient(180deg, rgba(74, 50, 22, 0.78), rgba(30, 20, 8, 0.92)) !important;
  border: 2px solid var(--fantasy-brass) !important;
  color: var(--fantasy-parchment) !important;
}
.target-player-btn:hover {
  border-color: var(--fantasy-gold-light) !important;
  box-shadow: 0 0 18px rgba(217, 179, 92, 0.5) !important;
}
.target-player-name { color: var(--fantasy-gold-light) !important; }

/* ── Game-over screen — victory banner / defeat shroud ── */
.game-over-overlay { background: rgba(10, 6, 2, 0.82) !important; }
.game-over-content {
  background:
    linear-gradient(180deg, #2b1d0d 0%, #1a1009 100%) !important;
  border: 3px solid var(--fantasy-gold) !important;
  border-radius: 8px;
  box-shadow:
    0 0 0 1px var(--fantasy-gold-dark),
    0 0 0 4px var(--fantasy-iron),
    0 20px 60px rgba(0, 0, 0, 0.85);
  color: var(--fantasy-parchment) !important;
}
.game-over-title {
  color: var(--fantasy-gold-light) !important;
  text-shadow:
    0 3px 0 #000,
    0 0 18px rgba(217, 179, 92, 0.65),
    0 0 36px rgba(211, 84, 0, 0.4);
  font-family: var(--font-fantasy), serif !important;
  letter-spacing: 0.15em;
}

/* ── Card preview panel ── */
.card-preview-panel {
  background:
    repeating-linear-gradient(0deg, rgba(169,136,84,0.04) 0px, rgba(169,136,84,0.04) 1px, transparent 1px, transparent 26px),
    linear-gradient(180deg, #2b1d0d 0%, #1a1009 100%) !important;
  border: 2px solid var(--fantasy-gold) !important;
  box-shadow: 0 0 0 1px var(--fantasy-gold-dark), 0 10px 30px rgba(0,0,0,0.7) !important;
  color: var(--fantasy-parchment) !important;
}
.preview-name     { color: var(--fantasy-gold-light) !important; font-family: var(--font-fantasy), serif !important; }
.preview-type     { color: var(--fantasy-ember) !important; font-family: var(--font-runic), serif !important; letter-spacing: 0.14em; }
.preview-effect   { color: var(--fantasy-parchment) !important; border-top: 1px dashed var(--fantasy-gold-dark); border-bottom: 1px dashed var(--fantasy-gold-dark); }
.preview-flavor   { color: var(--fantasy-parchment-d) !important; font-style: italic; }
.preview-stats    { border-top: 1px solid var(--fantasy-gold-dark); }
.preview-cost     { background: radial-gradient(circle at 35% 35%, var(--fantasy-gold-light) 0%, var(--fantasy-gold) 45%, var(--fantasy-gold-dark) 100%) !important; color: var(--fantasy-ink) !important; border: 1px solid var(--fantasy-ink); }
.preview-keyword  { background: linear-gradient(180deg, rgba(74,50,22,0.85), rgba(30,20,8,0.95)) !important; border: 1px solid var(--fantasy-gold-dark) !important; color: var(--fantasy-gold-light) !important; }

/* ── Toasts & hints — scroll ribbon ── */
.toast {
  background: linear-gradient(180deg, rgba(74,50,22,0.95), rgba(30,20,8,0.98)) !important;
  border: 2px solid var(--fantasy-gold) !important;
  border-radius: 4px;
  color: var(--fantasy-parchment) !important;
  font-family: var(--font-fantasy), serif !important;
  text-shadow: 0 1px 0 #000;
  box-shadow: 0 0 0 1px var(--fantasy-gold-dark), 0 4px 12px rgba(0,0,0,0.6) !important;
}
.game-hint {
  background: linear-gradient(180deg, rgba(74,50,22,0.95), rgba(30,20,8,0.98)) !important;
  border: 2px solid var(--fantasy-gold) !important;
  color: var(--fantasy-parchment) !important;
  font-family: 'Rajdhani', serif !important;
}
.game-hint .hint-icon { filter: drop-shadow(0 0 4px rgba(217, 179, 92, 0.5)); }
.game-hint .hint-dismiss {
  background: linear-gradient(180deg, rgba(90, 60, 24, 0.95), rgba(40, 26, 10, 0.98)) !important;
  border: 1px solid var(--fantasy-gold) !important;
  color: var(--fantasy-gold-light) !important;
  font-family: var(--font-fantasy), serif !important;
}
.narrator-toast {
  background: linear-gradient(180deg, rgba(74,50,22,0.95), rgba(30,20,8,0.98)) !important;
  border: 1px solid var(--fantasy-gold) !important;
  color: var(--fantasy-parchment) !important;
}
.narrator-text strong {
  color: var(--fantasy-gold-light) !important;
  font-family: var(--font-fantasy), serif !important;
}

/* ── Tooltip (has-tooltip) — carved stone tag ── */
.has-tooltip::after {
  background: linear-gradient(180deg, rgba(40,26,10,0.98), rgba(20,12,6,0.98)) !important;
  border: 1px solid var(--fantasy-gold-dark) !important;
  color: var(--fantasy-parchment) !important;
  font-family: var(--font-fantasy), serif !important;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6) !important;
}

/* ── Turn-transition splash ── */
.turn-transition {
  color: var(--fantasy-gold-light) !important;
  font-family: var(--font-fantasy), serif !important;
  letter-spacing: 0.25em;
  text-shadow: 0 3px 0 #000, 0 0 24px rgba(217, 179, 92, 0.55);
}

/* ── Help button (in-game settings cog etc.) ── */
.help-btn, .settings-btn {
  background: linear-gradient(180deg, rgba(74,50,22,0.85), rgba(30,20,8,0.95)) !important;
  border: 2px solid var(--fantasy-brass) !important;
  color: var(--fantasy-gold-light) !important;
  text-shadow: 0 1px 0 #000;
  box-shadow:
    inset 0 1px 0 rgba(255,220,150,0.25),
    0 2px 0 #1a0f06;
}
.help-btn:hover, .settings-btn:hover {
  border-color: var(--fantasy-gold-light) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,220,150,0.4),
    0 2px 0 #1a0f06,
    0 0 14px rgba(217,179,92,0.5) !important;
}

/* ── Pair badge (attacker/blocker numbering) ── */
.pair-badge {
  background: radial-gradient(circle at 35% 35%, var(--fantasy-gold-light) 0%, var(--fantasy-gold) 45%, var(--fantasy-gold-dark) 100%) !important;
  color: var(--fantasy-ink) !important;
  border: 3px solid var(--fantasy-ink) !important;
  box-shadow: 0 0 0 2px var(--fantasy-gold), 0 0 20px rgba(217, 179, 92, 0.85), 0 3px 6px rgba(0,0,0,0.7) !important;
}

/* ── Blocker line (combat pairing) — use gold instead of neon green ── */
.blocker-line {
  stroke: var(--fantasy-gold) !important;
  filter: drop-shadow(0 0 4px rgba(217, 179, 92, 0.55)) !important;
}

/* ── Menu footer & subtitle ── */
.menu-footer,
.game-subtitle {
  color: var(--fantasy-parchment-d) !important;
  font-family: 'Rajdhani', serif !important;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ── Scrollbar — brass ── */
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--fantasy-gold), var(--fantasy-gold-dark)) !important;
  border-radius: 3px;
  border: 1px solid var(--fantasy-iron);
}
::-webkit-scrollbar-track { background: var(--fantasy-iron) !important; }

/* ── Remove neon scanlines for a more natural look (kept definition intact
      for anything that still opts in) ── */
.scanlines { opacity: 0.08 !important; mix-blend-mode: overlay; }

/* ═══════════════════════════════════════════════════════════════════
   FANTASY THEME — REMAINING SURFACES
   Covers fork-leftover neon on: turn splash, chat, glossary, daily
   challenges, profile/achievements, leaderboard, replay, mode buttons,
   narrator, tutorial accent border, action buttons, enrage/combo badges.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Turn splash / player banner text ── */
.turn-splash,
.splash-player-name,
.splash-turn-label,
.splash-detail {
  font-family: var(--font-fantasy), serif !important;
  color: var(--fantasy-gold-light) !important;
  text-shadow: 0 2px 0 #000, 0 0 16px rgba(217, 179, 92, 0.55) !important;
  letter-spacing: 0.12em;
}
.splash-player-name.opponent {
  color: #f26b56 !important;
  text-shadow: 0 2px 0 #000, 0 0 16px rgba(231, 76, 60, 0.4) !important;
}

/* ── Action buttons (End Turn / Attack / Block / Mulligan) ── */
.action-btn,
.action-btn.attack-btn,
.action-btn.end-turn-btn,
.action-btn.block-btn,
.action-btn.cancel-btn,
.action-btn.mulligan-btn {
  font-family: var(--font-fantasy), serif !important;
  letter-spacing: 0.14em;
  background: linear-gradient(180deg, rgba(74, 50, 22, 0.95), rgba(30, 20, 8, 0.98)) !important;
  border: 2px solid var(--fantasy-brass) !important;
  color: var(--fantasy-parchment) !important;
  text-shadow: 0 1px 0 #000 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 150, 0.25),
    0 3px 0 #1a0f06,
    0 4px 8px rgba(0, 0, 0, 0.55) !important;
}
.action-btn.attack-btn { border-color: var(--fantasy-crimson) !important; }
.action-btn.end-turn-btn { border-color: var(--fantasy-gold) !important; color: var(--fantasy-gold-light) !important; }
.action-btn.block-btn { border-color: var(--fantasy-brass) !important; }
.action-btn.cancel-btn { border-color: var(--fantasy-parchment-d) !important; }
.action-btn:hover {
  border-color: var(--fantasy-gold-light) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 150, 0.4),
    0 3px 0 #1a0f06,
    0 0 14px rgba(217, 179, 92, 0.5) !important;
}

/* ── Mode buttons (VS AI / Local / Online) — swap cyberpunk hues for
     parchment variants, each with a distinct border tint so they're
     still distinguishable. ── */
.menu-btn,
.menu-btn.btn-ai,
.menu-btn.btn-2p,
.menu-btn.btn-online,
.menu-btn.btn-back {
  font-family: var(--font-fantasy), serif !important;
  background: linear-gradient(180deg, rgba(74, 50, 22, 0.92), rgba(30, 20, 8, 0.98)) !important;
  border: 2px solid var(--fantasy-brass) !important;
  color: var(--fantasy-parchment) !important;
  text-shadow: 0 1px 0 #000 !important;
  letter-spacing: 0.14em;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 150, 0.25),
    0 3px 0 #1a0f06,
    0 4px 10px rgba(0, 0, 0, 0.5) !important;
}
.menu-btn.btn-ai     { border-color: var(--fantasy-gold) !important; }
.menu-btn.btn-2p     { border-color: #6d5a9c !important; }
.menu-btn.btn-online { border-color: #5a8e5a !important; }
.menu-btn.btn-back   { border-color: var(--fantasy-parchment-d) !important; color: var(--fantasy-parchment-d) !important; }
.menu-btn:hover {
  border-color: var(--fantasy-gold-light) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 150, 0.4),
    0 3px 0 #1a0f06,
    0 0 16px rgba(217, 179, 92, 0.5) !important;
}

/* ── Tutorial modal left-accent border + bullets ── */
.tutorial-section {
  border-left: 3px solid var(--fantasy-gold) !important;
}
.tutorial-section li::before { color: var(--fantasy-gold) !important; }
.tutorial-section h3 { color: var(--fantasy-gold-light) !important; }

/* ── Narrator toast ── */
.narrator-toast {
  border: 1px solid var(--fantasy-gold) !important;
  background: linear-gradient(180deg, rgba(74, 50, 22, 0.97), rgba(26, 16, 6, 0.98)) !important;
}
.narrator-text strong {
  color: var(--fantasy-gold-light) !important;
  font-family: var(--font-fantasy), serif !important;
  text-shadow: 0 1px 0 #000;
}

/* ── In-game chat widget ── */
.chat-log { border: 1px solid var(--fantasy-brass) !important; background: rgba(26, 16, 6, 0.92) !important; color: var(--fantasy-parchment) !important; }
.chat-input {
  font-family: 'Rajdhani', sans-serif !important;
  border: 1px solid var(--fantasy-brass) !important;
  background: rgba(26, 16, 6, 0.9) !important;
  color: var(--fantasy-parchment) !important;
}
.chat-send-btn {
  font-family: var(--font-fantasy), serif !important;
  background: linear-gradient(180deg, rgba(74,50,22,0.95), rgba(30,20,8,0.98)) !important;
  border: 1px solid var(--fantasy-gold) !important;
  color: var(--fantasy-gold-light) !important;
  letter-spacing: 0.1em;
}

/* ── Turn timer HUD ── */
.turn-timer {
  font-family: var(--font-fantasy), serif !important;
  color: var(--fantasy-gold-light) !important;
  letter-spacing: 0.2em;
  text-shadow: 0 2px 0 #000, 0 0 10px rgba(217, 179, 92, 0.5);
}
.turn-timer.urgent { color: var(--fantasy-ember) !important; }

/* ── Keyword glossary ── */
.glossary-modal {
  background: linear-gradient(180deg, #2a1c0e 0%, #1a0f06 100%) !important;
  border: 2px solid var(--fantasy-brass) !important;
  color: var(--fantasy-parchment) !important;
}
.glossary-keyword {
  font-family: var(--font-fantasy), serif !important;
  color: var(--fantasy-gold-light) !important;
  letter-spacing: 0.1em;
}
.glossary-desc { color: var(--fantasy-parchment-d) !important; }

/* ── Daily challenge banner ── */
.daily-challenge-banner {
  background: linear-gradient(135deg, rgba(74, 50, 22, 0.6), rgba(139, 30, 30, 0.35)) !important;
  border: 1px solid var(--fantasy-gold) !important;
}
.daily-challenge-title {
  font-family: var(--font-fantasy), serif !important;
  color: var(--fantasy-gold-light) !important;
  letter-spacing: 0.12em;
}
.daily-challenge-desc { color: var(--fantasy-parchment) !important; }
.daily-challenge-reward { color: var(--fantasy-ember) !important; }

/* ── Profile card (achievements screen) ── */
.profile-card {
  background: linear-gradient(180deg, #2a1c0e 0%, #1a0f06 100%) !important;
  border: 2px solid var(--fantasy-brass) !important;
}
.profile-name {
  font-family: var(--font-fantasy), serif !important;
  color: var(--fantasy-gold-light) !important;
  letter-spacing: 0.1em;
}
.profile-level { color: var(--fantasy-ember) !important; }
.profile-xp-fill {
  background: linear-gradient(90deg, var(--fantasy-gold-dark), var(--fantasy-gold-light)) !important;
}
.profile-stat-value {
  font-family: var(--font-fantasy), serif !important;
  color: var(--fantasy-gold-light) !important;
}
.profile-stat-label { color: var(--fantasy-parchment-d) !important; }

/* ── Leaderboard table ── */
.leaderboard-table th {
  font-family: var(--font-fantasy), serif !important;
  color: var(--fantasy-gold-light) !important;
  letter-spacing: 0.14em;
  border-bottom: 1px solid var(--fantasy-brass) !important;
}
.leaderboard-table td {
  color: var(--fantasy-parchment) !important;
}

/* ── Replay controls ── */
.replay-controls {
  background: linear-gradient(180deg, rgba(74, 50, 22, 0.92), rgba(26, 16, 6, 0.98)) !important;
  border: 1px solid var(--fantasy-brass) !important;
}
.replay-btn {
  font-family: var(--font-fantasy), serif !important;
  color: var(--fantasy-parchment-d) !important;
  letter-spacing: 0.1em;
  border: 1px solid var(--fantasy-brass) !important;
}
.replay-btn:hover {
  color: var(--fantasy-gold-light) !important;
  border-color: var(--fantasy-gold) !important;
}

/* ── Combat status badges (enrage / combo) ── */
.enrage-badge {
  background: rgba(139, 30, 30, 0.45) !important;
  border: 1px solid var(--fantasy-crimson) !important;
  color: var(--fantasy-parchment) !important;
  font-family: var(--font-fantasy), serif !important;
}
.combo-badge {
  background: rgba(217, 179, 92, 0.25) !important;
  border: 1px solid var(--fantasy-gold) !important;
  color: var(--fantasy-gold-light) !important;
  font-family: var(--font-fantasy), serif !important;
}

/* ── Card-play showcase glow — gold instead of cyan ── */
.card-play-showcase {
  filter:
    drop-shadow(0 0 30px rgba(217, 179, 92, 0.65))
    drop-shadow(0 0 60px rgba(211, 84, 0, 0.35)) !important;
}

/* ── Settings slider focus ring ── */
.settings-slider:focus-visible {
  outline: 2px solid var(--fantasy-gold-light) !important;
  outline-offset: 2px;
}

/* ── Menu title / eyebrow / logo container ── */
.menu-title,
.title-eyebrow {
  font-family: var(--font-fantasy), serif !important;
  color: var(--fantasy-gold-light) !important;
  letter-spacing: 0.28em;
  text-shadow: 0 2px 0 #000, 0 0 10px rgba(217, 179, 92, 0.4);
}

/* ── Card effect text & gadget tags in player bar ── */
.card-effect {
  color: var(--fantasy-ember) !important;
  font-family: 'Rajdhani', sans-serif !important;
}
.gadget-tag {
  font-family: var(--font-fantasy), serif !important;
  color: var(--fantasy-gold-light) !important;
  background: linear-gradient(180deg, rgba(74, 50, 22, 0.85), rgba(26, 16, 6, 0.95)) !important;
  border: 1px solid var(--fantasy-gold) !important;
  letter-spacing: 0.06em;
}
