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

        body {
            font-family: 'Arial', sans-serif;
            background: radial-gradient(1200px 600px at 20% 0%, #111 0%, #000 60%, #020202 100%);
            color: #fff;
            min-height: 100vh;
            padding: 10px;
        }

        .game-container {
            max-width: 1800px;
            margin: 0 auto;
        }

        .game-header {
            text-align: center;
            margin-bottom: 10px;
            padding: 10px;
            background: linear-gradient(135deg, rgba(25,25,25,0.9), rgba(10,10,10,0.9));
            border-radius: 5px;
            border: 2px solid #ffffff;
            box-shadow: 0 0 20px rgba(255,255,255,0.35), inset 0 0 10px rgba(255,255,255,0.12);
        }

        .game-header h1 {
            font-size: 1.8em;
            color: #d20a0a;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
            margin-bottom: 5px;
            font-weight: bold;
            letter-spacing: 2px;
        }

        .game-stats {
            display: flex;
            justify-content: center;
            margin-top: 5px;
            gap: 15px;
        }

        .stat-box {
            background: #1a1a1a;
            padding: 5px 15px;
            border-radius: 3px;
            font-size: 0.95em;
            border: 1px solid #333;
        }

        .stat-label {
            color: #999;
            font-size: 0.8em;
        }

        .stat-value {
            font-weight: bold;
            font-size: 1.1em;
            color: #fff;
        }

        .game-board {
            display: grid;
            grid-template-columns: 1fr;
            grid-template-rows: auto auto auto;
            gap: 10px;
            min-height: 500px;
        }

        .opponent-area, .player-area {
            background: linear-gradient(160deg, rgba(26,26,26,0.95), rgba(15,15,15,0.95));
            border-radius: 5px;
            padding: 10px;
            backdrop-filter: blur(2px);
            box-shadow: 0 0 20px rgba(255,255,255,0.04) inset;
        }

        .opponent-area {
            border: 2px solid #d20a0a;
            box-shadow: 0 0 18px rgba(210,10,10,0.15);
        }

        .player-area {
            border: 2px solid #00e1ff;
            box-shadow: 0 0 18px rgba(0,225,255,0.15);
        }

        .area-header {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 8px;
            gap: 8px;
        }

        .player-name {
            font-size: 1.1em;
            font-weight: bold;
            min-width: 80px;
        }

        .health-bar {
            flex: 1;
            max-width: 250px;
            margin: 0 10px;
        }

        .health-bar-bg {
            background: #333;
            height: 20px;
            border-radius: 3px;
            overflow: hidden;
            position: relative;
            border: 1px solid #555;
        }

        .health-bar-fill {
            height: 100%;
            background: #d20a0a;
            transition: width 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 0.85em;
        }

        .player-area .health-bar-fill {
            background: #fff;
            color: #000;
        }

        .fighter-zone {
            display: flex;
            gap: 10px;
            margin-bottom: 8px;
            justify-content: center;
            align-items: stretch; /* feed stretches to the active card's height */
        }
        /* Spacer pushes content right */
        .fighter-zone::before { content: ''; flex: 1 1 0; }

        .fighter-zone > .card,
        .fighter-zone > .empty-slot { flex: 0 0 auto; }

        .bench-zone {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .bench-card {
            width: 120px;
            padding: 8px;
        }

        .hand-counter {
            margin-top: 4px;
            font-size: 0.85em;
            color: #aaa;
        }

        .card {
            background: linear-gradient(180deg, #0f0f12 0%, #121216 60%, #0a0a0d 100%);
            border: 2px solid rgba(255,255,255,0.3);
            border-radius: 5px;
            padding: 10px;
            width: 160px;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
            position: relative;
            overflow: hidden;
        }

        .card:hover {
            transform: translateY(-5px) scale(1.02);
            box-shadow: 0 10px 24px rgba(0, 225, 255, 0.2);
            border-color: #00e1ff;
        }

        .fighter-card:hover {
            box-shadow: 0 10px 24px rgba(100, 150, 255, 0.4);
            border-color: #6c9eff;
        }

        .technique-card:hover {
            box-shadow: 0 10px 24px rgba(255, 80, 80, 0.4);
            border-color: #ff5050;
        }

        .defense-card:hover {
            box-shadow: 0 10px 24px rgba(255, 215, 0, 0.4);
            border-color: #ffd700;
        }

        .corner-card:hover {
            box-shadow: 0 10px 24px rgba(100, 255, 100, 0.4);
            border-color: #64ff64;
        }

        .card.fighter-card {
            width: 180px;
            background: linear-gradient(180deg, #1a1a2e 0%, #16213e 60%, #0f1626 100%);
            border-color: rgba(100, 150, 255, 0.5);
        }

        .card.technique-card {
            background: linear-gradient(180deg, #2e1010 0%, #1f0b0b 60%, #140808 100%);
            border-color: rgba(255, 80, 80, 0.5);
        }

        .card.defense-card {
            background: linear-gradient(180deg, #2e2810 0%, #1f1c0b 60%, #141008 100%);
            border-color: rgba(255, 215, 0, 0.5);
        }

        .card.corner-card {
            background: linear-gradient(180deg, #1a2e1a 0%, #132419 60%, #0d1a10 100%);
            border-color: rgba(100, 255, 100, 0.5);
        }

        .card.opponent-card {
            border-color: #d20a0a;
        }

        .card.opponent-card:hover {
            box-shadow: 0 10px 24px rgba(210, 10, 10, 0.35);
            border-color: #d20a0a;
        }

        .card.disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .card.disabled:hover {
            transform: none;
            box-shadow: none;
        }

        .card-header {
            font-weight: bold;
            font-size: 0.95em;
            margin-bottom: 6px;
            color: #fff;
            letter-spacing: 0.5px;
        }

        .opponent-card .card-header {
            color: #d20a0a;
        }

        .card-type {
            font-size: 0.7em;
            color: #999;
            margin-bottom: 5px;
        }

        .fighter-card .card-type {
            color: #6c9eff;
        }

        .technique-card .card-type {
            color: #ff5050;
        }

        .defense-card .card-type {
            color: #ffd700;
        }

        .corner-card .card-type {
            color: #64ff64;
        }

        .card-stats {
            margin: 6px 0;
        }

        .card-stat {
            display: flex;
            justify-content: space-between;
            margin: 3px 0;
            font-size: 0.8em;
        }

        .card-stat-label {
            color: #999;
        }

        .card-stat-value {
            font-weight: bold;
            color: #fff;
        }

        .card-energy {
            position: absolute;
            top: 8px;
            right: 8px;
            background: linear-gradient(135deg, #00e1ff, #007a8a);
            color: #fff;
            width: 25px;
            height: 25px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 0.95em;
            border: 1px solid rgba(255,255,255,0.6);
            box-shadow: 0 0 8px rgba(0,225,255,0.5);
        }

        .card-ability {
            margin-top: 6px;
            padding-top: 6px;
            border-top: 1px solid #333;
            font-size: 0.75em;
            font-style: italic;
            color: #d20a0a;
        }

        .technique-card .card-ability {
            color: #ff5050;
        }

        .defense-card .card-ability {
            color: #ffd700;
        }

        .corner-card .card-ability {
            color: #64ff64;
        }

        .hand-area {
            display: flex;
            gap: 8px;
            overflow-x: auto;
            padding: 8px;
            background: #0a0a0a;
            border-radius: 5px;
            min-height: 220px;
            border: 1px solid #333;
        }

        .hand-label {
            font-weight: bold;
            margin-bottom: 6px;
            color: #fff;
            font-size: 0.9em;
        }

        .center-area {
            background: linear-gradient(135deg, rgba(26,26,32,0.95), rgba(12,12,16,0.95));
            border-radius: 5px;
            padding: 10px;
            text-align: center;
            border: 1px solid #333;
            box-shadow: 0 0 16px rgba(0,225,255,0.1);
            max-width: 560px;
            justify-self: center;
        }

        .action-buttons {
            display: flex;
            gap: 10px;
            justify-content: center;
            margin-top: 8px;
        }

        .difficulty-control {
            display: flex;
            gap: 6px;
            align-items: center;
            justify-content: center;
            margin-top: 8px;
            font-size: 0.8em;
            color: #aaa;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .difficulty-control select {
            background: #1a1a20;
            color: #00e1ff;
            border: 1px solid #333;
            border-radius: 3px;
            padding: 3px 6px;
            font-size: 0.95em;
            font-weight: bold;
            cursor: pointer;
        }

        .btn {
            padding: 8px 20px;
            font-size: 0.95em;
            font-weight: bold;
            border: 2px solid #fff;
            border-radius: 3px;
            cursor: pointer;
            transition: all 0.2s;
            text-transform: uppercase;
        }

        .btn:hover {
            transform: scale(1.03);
        }

        .btn-primary {
            background: linear-gradient(135deg, #00e1ff, #007a8a);
            color: #fff;
            border-color: #00e1ff;
            box-shadow: 0 0 10px rgba(0,225,255,0.2);
        }

        .btn-primary:hover {
            filter: brightness(1.08);
            transform: translateY(-1px) scale(1.02);
        }

        .btn-danger {
            background: #d20a0a;
            color: #fff;
            border-color: #d20a0a;
        }

        .btn-danger:hover {
            background: #fff;
            color: #d20a0a;
            border-color: #fff;
        }

        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        .game-log {
            background: linear-gradient(160deg, rgba(26,26,26,0.95), rgba(15,15,15,0.95));
            border-radius: 5px;
            padding: 10px;
            border: 1px solid #333;
            grid-column: 2;
            grid-row: 1 / span 3;
            max-height: none;
            height: 100%;
            overflow-y: auto;
            box-shadow: 0 0 18px rgba(255,255,255,0.05) inset;
        }

        .game-log h3 {
            margin-bottom: 6px;
            color: #fff;
            font-size: 1em;
        }

        .log-entry {
            padding: 4px;
            margin: 3px 0;
            border-left: 2px solid #fff;
            padding-left: 8px;
            font-size: 0.85em;
        }

        .log-item {
            padding: 4px;
            margin: 3px 0;
            border-left: 3px solid #999;
            padding-left: 8px;
            font-size: 0.85em;
            color: #ddd;
            background: rgba(255,255,255,0.03);
            border-radius: 3px;
        }

        .log-item.opponent-log {
            border-left-color: #d20a0a;
            background: rgba(210,10,10,0.08);
        }

        .log-item.player-log {
            border-left-color: #00e1ff;
            background: rgba(0,225,255,0.08);
        }

        #gameLogMessages {
            min-height: 100px;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .log-entry.opponent {
            border-left-color: #d20a0a;
        }

        .log-entry.damage {
            color: #d20a0a;
        }

        .log-entry.heal {
            color: #4ecca3;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            justify-content: center;
            align-items: center;
            z-index: 1000;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: linear-gradient(160deg, rgba(26,26,26,0.98), rgba(15,15,15,0.98));
            padding: 30px;
            border-radius: 5px;
            text-align: center;
            max-width: 400px;
            border: 3px solid #00e1ff;
            box-shadow: 0 0 30px rgba(0,225,255,0.2);
        }

        /* Opening fighter selection */
        .selection-modal .modal-content {
            max-width: 760px;
        }
        /* Reaction window */
        #reactionModal .modal-content {
            max-width: 560px;
            border-color: #ffcc00;
            box-shadow: 0 0 36px rgba(255,204,0,0.35);
        }
        #reactionTitle {
            color: #ffcc00;
        }
        .select-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            justify-content: center;
            margin-top: 10px;
        }
        .select-card {
            border: 2px solid rgba(255,255,255,0.25);
            border-radius: 6px;
            padding: 8px;
            width: 180px;
            transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
        }
        .select-card:hover {
            transform: translateY(-4px) scale(1.02);
            border-color: #00e1ff;
            box-shadow: 0 12px 20px rgba(0,225,255,0.15);
            cursor: pointer;
        }

        .drawn-card-preview {
            width: 100%;
            border-color: #00e1ff;
            box-shadow: 0 0 16px rgba(0,225,255,0.3);
            background: rgba(0,40,50,0.5);
            cursor: default;
            margin-bottom: 12px;
        }
        .drawn-card-preview:hover {
            transform: none;
            border-color: #00e1ff;
        }
        .drawn-label {
            font-size: 0.7em;
            color: #00e1ff;
            text-transform: uppercase;
            font-weight: 700;
            letter-spacing: 1px;
            margin-bottom: 6px;
            display: block;
            padding: 4px 0;
        }

        .modal-content h2 {
            font-size: 2em;
            margin-bottom: 15px;
            color: #fff;
        }

        .modal-content.defeat h2 {
            color: #d20a0a;
        }

        /* Fighter stamina bar */
        .stamina-bar-bg {
            background: #333;
            height: 8px;
            border-radius: 3px;
            overflow: hidden;
            position: relative;
            border: 1px solid #555;
            margin-top: 6px;
        }

        .stamina-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, #4ecca3, #ffd700, #e94560);
            transition: width 0.3s ease;
        }

        .empty-slot {
            width: 180px;
            height: 250px;
            border: 2px dashed #333;
            border-radius: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #555;
            font-style: italic;
            font-size: 0.85em;
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-5px); }
            75% { transform: translateX(5px); }
        }

        .shake {
            animation: shake 0.3s ease-in-out;
        }

        @keyframes glow {
            0%, 100% { box-shadow: 0 0 10px rgba(210, 10, 10, 0.5); }
            50% { box-shadow: 0 0 20px rgba(210, 10, 10, 0.8); }
        }

        @keyframes glowBlue {
            0%, 100% { box-shadow: 0 0 10px rgba(100, 150, 255, 0.5); }
            50% { box-shadow: 0 0 20px rgba(100, 150, 255, 0.8); }
        }

        @keyframes glowRed {
            0%, 100% { box-shadow: 0 0 10px rgba(255, 80, 80, 0.5); }
            50% { box-shadow: 0 0 20px rgba(255, 80, 80, 0.8); }
        }

        @keyframes glowYellow {
            0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
            50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
        }

        @keyframes glowGreen {
            0%, 100% { box-shadow: 0 0 10px rgba(100, 255, 100, 0.5); }
            50% { box-shadow: 0 0 20px rgba(100, 255, 100, 0.8); }
        }

        .glow {
            animation: glow 1s ease-in-out infinite;
        }

        .fighter-card.glow {
            animation: glowBlue 1s ease-in-out infinite;
        }

        .technique-card.glow {
            animation: glowRed 1s ease-in-out infinite;
        }

        .defense-card.glow {
            animation: glowYellow 1s ease-in-out infinite;
        }

        .corner-card.glow {
            animation: glowGreen 1s ease-in-out infinite;
        }

        /* Action feed and floating combat text */
        .action-feed { /* global (legacy) */
            position: fixed;
            top: 14px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 2000;
            display: flex;
            flex-direction: column;
            gap: 6px;
            pointer-events: none;
        }
        .inline-action-feed { /* per-side inline feed */
            display: flex;
            flex-direction: column;
            justify-content: flex-end; /* newest message sits at the card's bottom edge */
            align-items: stretch;
            gap: 2px;
            min-height: 20px;
            flex: 1 1 0; /* match spacer flex to center the card */
            pointer-events: none;
            width: 100%;
            /* No fixed cap: align-items:stretch on .fighter-zone sizes this to the
               active fighter card, so messages fill it and never spill past the
               card's bottom. overflow:hidden clips cleanly if they ever exceed it. */
            overflow: hidden;
        }
        .action-item {
            background: rgba(0,0,0,0.6);
            border: 1px solid rgba(255,255,255,0.25);
            border-left-width: 3px;
            color: #fff;
            padding: 3px 8px;
            border-radius: 3px;
            text-align: left;
            box-shadow: 0 4px 12px rgba(0,0,0,0.4);
            display: block;
            width: 100%; /* expand to fill feed width */
            font-size: 0.8em;
            line-height: 1.2;
            flex-shrink: 0;
        }
        /* Keep only the 6 most recent messages (remove older ones from DOM in game.js) */
        /* Messages are colored by CORNER only — one blue theme for the player, one red for the
           opponent (no per-move-type colors). 'ko' just bolds the line. */
        .action-item.player {
            border-left-color: #00e1ff;
            background: rgba(0, 225, 255, 0.14);
            color: #eaffff;
        }
        .action-item.opponent {
            border-left-color: #d20a0a;
            background: rgba(210, 10, 10, 0.16);
            color: #ffe6e6;
        }
        .action-item.ko { font-weight: bold; }

        .action-item.new-message {
            animation: messageSlideIn 0.3s ease-out;
        }

        @keyframes messageSlideIn {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes feedIn {
            from { opacity: 0; transform: translate(-50%, -8px); }
            to { opacity: 1; transform: translate(-50%, 0); }
        }
        @keyframes feedOut {
            to { opacity: 0; transform: translate(-50%, -8px); }
        }

        .float-text {
            position: absolute;
            left: 50%;
            top: 30%;
            transform: translateX(-50%);
            color: #fff;
            font-weight: bold;
            text-shadow: 0 2px 6px rgba(0,0,0,0.7);
            animation: rise 0.8s ease-out forwards;
            pointer-events: none;
        }
        .float-text.damage { color: #ff5b5b; }
        .float-text.heal { color: #4ecca3; }
        .float-text.info { color: #ffd700; }
        @keyframes rise {
            from { opacity: 0; transform: translate(-50%, 12px) scale(0.95); }
            30% { opacity: 1; }
            to { opacity: 0; transform: translate(-50%, -22px) scale(1.05); }
        }

        #turnIndicator {
            font-size: 1.2em;
            margin-bottom: 5px;
            color: #fff;
        }

        #actionPrompt {
            font-size: 0.9em;
            color: #999;
            margin-bottom: 8px;
        }

        /* Mobile Responsive Design */
        @media screen and (max-width: 768px) {
            html, body {
                max-width: 100vw;
                overflow-x: clip;
            }

            body {
                padding: 5px;
            }

            .game-container {
                max-width: 100%;
                width: 100%;
            }

            .game-header {
                padding: 8px;
            }

            .game-header h1 {
                font-size: 1.2em;
                letter-spacing: 1px;
            }

            .game-stats {
                flex-wrap: wrap;
                gap: 6px;
            }

            .stat-box {
                padding: 3px 8px;
                font-size: 0.8em;
            }

            .game-board {
                min-height: auto;
                gap: 8px;
                width: 100%;
            }

            .opponent-area, .player-area {
                padding: 6px;
                width: 100%;
                box-sizing: border-box;
                overflow-x: clip;
            }

            .area-header {
                flex-direction: row;
                flex-wrap: wrap;
                align-items: center;
                justify-content: center;
                gap: 6px 10px;
                margin-left: 0; /* base rule shifts it 30px right — undo on mobile */
            }

            /* The desktop spacer that pushes the active card right isn't needed
               in the mobile single-column layout and just adds dead space. */
            .fighter-zone::before { display: none; }

            .player-name {
                font-size: 0.95em;
            }

            .health-bar {
                max-width: 100%;
                width: 100%;
                margin: 0;
            }

            .health-bar-bg {
                height: 16px;
            }

            .health-bar-fill {
                font-size: 0.7em;
            }

            /* In the mobile column layout the feed sits BELOW the card, so it must
               size to its own content (the desktop `flex: 1 1 0` would otherwise
               fight the column height and clip messages). Show all of them. */
            .inline-action-feed {
                flex: 0 0 auto;
                width: 100%;
                min-height: 0;
                max-height: none;
                overflow: visible;
                justify-content: flex-start;
            }

            .fighter-zone {
                flex-direction: column;
                align-items: center;
                gap: 6px;
                width: 100%;
            }

            .bench-zone {
                gap: 5px;
                justify-content: center;
                width: 100%;
            }

            .bench-card {
                width: 28%;
                min-width: 75px;
                max-width: 90px;
                padding: 5px;
            }

            .card {
                width: 45%;
                min-width: 130px;
                max-width: 150px;
                padding: 6px;
                flex-shrink: 0;
            }

            .card.fighter-card {
                width: 85%;
                max-width: 200px;
                min-width: 140px;
            }

            .card-header {
                font-size: 0.8em;
                margin-bottom: 4px;
            }

            .card-type {
                font-size: 0.65em;
            }

            .card-stat {
                font-size: 0.7em;
            }

            .card-energy {
                width: 20px;
                height: 20px;
                font-size: 0.75em;
            }

            .card-ability {
                font-size: 0.65em;
            }

            .hand-area {
                gap: 5px;
                padding: 5px;
                min-height: 160px;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                width: 100%;
                display: flex;
                flex-wrap: nowrap;
            }

            .center-area {
                padding: 8px;
                max-width: 100%;
                width: 100%;
            }

            #turnIndicator {
                font-size: 1em;
            }

            #actionPrompt {
                font-size: 0.8em;
            }

            .action-buttons {
                flex-direction: row;
                flex-wrap: wrap;
                gap: 8px;
                width: 100%;
            }

            .btn {
                padding: 12px 14px;
                font-size: 0.85em;
                flex: 1;
                box-sizing: border-box;
            }

            .modal {
                padding: 12px 10px;
                /* Top-align + scroll so a modal taller than the screen (discard
                   preview, reaction grid) stays fully reachable instead of having
                   its top/bottom clipped off-screen. */
                align-items: flex-start;
            }

            .modal-content {
                padding: 15px;
                max-width: 95%;
                width: 95%;
                margin: 0 auto;
                box-sizing: border-box;
                max-height: none;
            }

            .modal-content h2 {
                font-size: 1.4em;
                margin-bottom: 10px;
            }

            .selection-modal .modal-content {
                max-width: 98%;
                width: 98%;
            }

            .select-grid {
                gap: 6px;
                max-width: 100%;
            }

            .select-card {
                width: 28%;
                min-width: 100px;
                max-width: 130px;
                padding: 5px;
            }

            .game-log {
                grid-column: 1;
                grid-row: auto;
                max-height: 300px;
                margin-top: 8px;
                width: 100%;
            }

            .log-entry {
                font-size: 0.75em;
                padding: 3px;
                padding-left: 6px;
            }

            .action-feed {
                top: 10px;
                left: 50%;
                width: 90%;
                max-width: 90%;
            }

            .action-item {
                min-width: auto;
                width: 100%;
                padding: 5px 8px;
                font-size: 0.8em;
            }

            .empty-slot {
                width: 85%;
                max-width: 200px;
                min-width: 140px;
                height: 120px;
                font-size: 0.75em;
            }

            /* Tighten the vertical rhythm so the single column isn't endless */
            .fighter-zone {
                margin-bottom: 4px;
            }
        }

        /* Extra small mobile devices */
        @media screen and (max-width: 480px) {
            body {
                padding: 3px;
            }

            .game-header {
                padding: 6px;
            }

            .game-header h1 {
                font-size: 1em;
            }

            .stat-box {
                padding: 3px 6px;
                font-size: 0.75em;
            }

            .stat-label {
                font-size: 0.7em;
            }

            .stat-value {
                font-size: 0.95em;
            }

            .opponent-area, .player-area {
                padding: 5px;
            }

            .player-name {
                font-size: 0.85em;
            }

            .health-bar-bg {
                height: 14px;
            }

            .health-bar-fill {
                font-size: 0.65em;
            }

            .bench-card {
                width: 30%;
                min-width: 70px;
                max-width: 85px;
                padding: 4px;
            }

            .card {
                width: 45%;
                min-width: 110px;
                max-width: 130px;
                padding: 5px;
                flex-shrink: 0;
            }

            .card.fighter-card {
                width: 90%;
                max-width: 180px;
                min-width: 120px;
            }

            .card-header {
                font-size: 0.75em;
                margin-bottom: 3px;
            }

            .card-type {
                font-size: 0.6em;
                margin-bottom: 3px;
            }

            .card-stat {
                font-size: 0.65em;
                margin: 2px 0;
            }

            .card-energy {
                width: 18px;
                height: 18px;
                font-size: 0.7em;
                top: 5px;
                right: 5px;
            }

            .card-ability {
                font-size: 0.6em;
                margin-top: 4px;
                padding-top: 4px;
            }

            .hand-area {
                gap: 4px;
                padding: 4px;
                min-height: 140px;
            }

            .hand-label {
                font-size: 0.8em;
            }

            .hand-counter {
                font-size: 0.75em;
            }

            .center-area {
                padding: 5px;
            }

            #turnIndicator {
                font-size: 0.85em;
            }

            #actionPrompt {
                font-size: 0.7em;
            }

            .btn {
                padding: 8px 12px;
                font-size: 0.8em;
            }

            .modal-content {
                padding: 12px;
            }

            .modal-content h2 {
                font-size: 1.2em;
            }

            .modal-content p {
                font-size: 0.85em;
            }

            .select-card {
                width: 30%;
                min-width: 95px;
                max-width: 115px;
                padding: 4px;
            }

            .game-log {
                max-height: 250px;
                padding: 6px;
            }

            .game-log h3 {
                font-size: 0.85em;
            }

            .log-entry {
                font-size: 0.7em;
            }

            .action-item {
                min-width: auto;
                width: 100%;
                padding: 4px 6px;
                font-size: 0.75em;
            }

            .empty-slot {
                width: 90%;
                max-width: 180px;
                min-width: 120px;
                height: 160px;
                font-size: 0.7em;
            }

            .stamina-bar-bg {
                height: 6px;
                margin-top: 4px;
            }
        }

        .footer {
            text-align: center;
            padding: 20px;
            margin-top: 20px;
            background: linear-gradient(135deg, rgba(25,25,25,0.9), rgba(10,10,10,0.9));
            border-radius: 5px;
            border: 1px solid #333;
            font-size: 0.9em;
        }

        .footer a {
            color: #00e1ff;
            text-decoration: none;
            transition: color 0.3s;
        }

        .footer a:hover {
            color: #00b8d4;
            text-decoration: underline;
        }
