:root {
            --bg: radial-gradient(1000px 600px at 80% -10%, #1b0044 0%, #090015 40%, #05020b 100%);
            --card-bg: rgba(255, 255, 255, 0.06);
            --border: rgba(255, 255, 255, 0.14);
            --text: #e8e7ff;
            --muted: #a7a6c6;
            --primary: #00f0ff;
            --accent: #ff00d4;
            --win: #4df3a1;
            --lose: #ff6679;
            --draw: #f0c419;
            --shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
            --radius: 16px;
            --ring: 0 0 0 2px var(--border);
            --btn-grad: linear-gradient(135deg, color-mix(in srgb, var(--primary), #fff 10%), color-mix(in srgb, var(--accent), #fff 5%));
        }

        /* Themes */
        body.theme-neon {
            --bg: radial-gradient(1000px 600px at 80% -10%, #1b0044 0%, #090015 40%, #05020b 100%);
            --card-bg: rgba(255, 255, 255, 0.06);
            --border: rgba(255, 255, 255, 0.14);
            --text: #e8e7ff;
            --muted: #a7a6c6;
            --primary: #00f0ff;
            --accent: #ff00d4;
            --win: #4df3a1;
            --lose: #ff6679;
            --draw: #f0c419;
            --btn-grad: linear-gradient(135deg, #00f0ff, #ff00d4);
        }

        body.theme-glass {
            --bg: linear-gradient(160deg, #f3f7ff 0%, #eef2ff 40%, #eaf6ff 100%);
            --card-bg: rgba(255, 255, 255, 0.55);
            --border: rgba(83, 95, 144, 0.18);
            --text: #12131a;
            --muted: #4e5d78;
            --primary: #4f46e5;
            --accent: #06b6d4;
            --win: #16a34a;
            --lose: #dc2626;
            --draw: #d97706;
            --btn-grad: linear-gradient(135deg, #4f46e5, #06b6d4);
        }

        body.theme-sunset {
            --bg: linear-gradient(140deg, #1a0b2e 0%, #3b0d4f 35%, #ff3d77 70%, #ffb86c 100%);
            --card-bg: rgba(255, 255, 255, 0.08);
            --border: rgba(255, 255, 255, 0.20);
            --text: #fff8f3;
            --muted: #f5d6cd;
            --primary: #ffb86c;
            --accent: #ff3d77;
            --win: #8aff9c;
            --lose: #ffd1d9;
            --draw: #ffe08a;
            --btn-grad: linear-gradient(135deg, #ff3d77, #ffb86c);
        }

        /* Base layout */
        * {
            box-sizing: border-box
        }

        html,
        body {
            height: 100%
        }

        body {
            margin: 0;
            background: var(--bg);
            color: var(--text);
            font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
            display: grid;
            place-items: center;
            padding: 24px;
            transition: background 400ms ease;
        }

        .container {
            width: min(980px, 96vw);
            display: grid;
            gap: 18px;
        }

        /* Header */
        .header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .title {
            font-weight: 800;
            font-size: clamp(22px, 4.8vw, 40px);
            letter-spacing: 0.3px;
            line-height: 1.1;
            display: flex;
            align-items: center;
            gap: .6rem;
            user-select: none;
        }

        .title .brand {
            color: var(--primary);
            text-shadow: 0 0 12px color-mix(in srgb, var(--primary), transparent 40%), 0 0 30px color-mix(in srgb, var(--accent), transparent 60%);
            filter: saturate(1.2);
        }

        .title .sep {
            opacity: .35;
            font-weight: 400;
        }

        /* Chips / Buttons */
        .actions {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .chip,
        .btn {
            appearance: none;
            border: 1px solid var(--border);
            background: var(--card-bg);
            color: var(--text);
            padding: 10px 14px;
            border-radius: 999px;
            cursor: pointer;
            transition: transform .15s ease, border-color .2s, background-color .2s, box-shadow .2s;
            box-shadow: var(--ring);
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-weight: 600;
        }

        .btn.primary {
            background: var(--btn-grad);
            color: #fff;
            border: none;
            box-shadow: 0 10px 28px color-mix(in srgb, var(--accent), transparent 70%);
        }

        .chip:hover,
        .btn:hover {
            transform: translateY(-1px)
        }

        .chip:active,
        .btn:active {
            transform: translateY(0) scale(.98)
        }

        .chip:focus-visible,
        .btn:focus-visible {
            outline: 3px solid color-mix(in srgb, var(--primary), #fff 25%);
            outline-offset: 2px
        }

        /* Cards */
        .card {
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        /* Scoreboard */
        .scoreboard {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            gap: 14px;
            align-items: stretch;
        }

        .panel {
            padding: 16px;
            display: grid;
            grid-template-columns: auto 1fr auto;
            align-items: center;
            gap: 12px;
            position: relative;
        }

        .who {
            font-weight: 800;
            font-size: 14px;
            letter-spacing: .3px;
            color: var(--muted);
            text-transform: uppercase;
        }

        .score {
            font-size: clamp(26px, 4vw, 40px);
            font-weight: 900;
            letter-spacing: .5px;
        }

        .badge {
            font-weight: 700;
            font-size: 12px;
            padding: 6px 10px;
            border-radius: 999px;
            background: color-mix(in srgb, var(--primary), transparent 85%);
            color: color-mix(in srgb, var(--primary), #000 25%);
            border: 1px solid color-mix(in srgb, var(--primary), transparent 60%);
        }

        .panel.win {
            border-color: color-mix(in srgb, var(--win), transparent 40%);
            box-shadow: 0 0 0 2px color-mix(in srgb, var(--win), transparent 70%), var(--shadow);
            animation: bump .35s ease
        }

        .panel.lose {
            border-color: color-mix(in srgb, var(--lose), transparent 40%);
            box-shadow: 0 0 0 2px color-mix(in srgb, var(--lose), transparent 70%), var(--shadow);
        }

        @keyframes bump {
            0% {
                transform: scale(1)
            }

            50% {
                transform: scale(1.03)
            }

            100% {
                transform: scale(1)
            }
        }

        .vs {
            display: grid;
            place-items: center;
            padding: 8px 14px;
            min-width: 80px;
        }

        .vs .ring {
            width: 74px;
            aspect-ratio: 1;
            border-radius: 999px;
            border: 2px dashed color-mix(in srgb, var(--accent), transparent 25%);
            display: grid;
            place-items: center;
            position: relative;
            isolation: isolate;
        }

        .vs .ring::after {
            content: "";
            position: absolute;
            inset: -8px;
            border-radius: inherit;
            background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--accent), transparent 85%) 0%, transparent 60%);
            filter: blur(6px);
            z-index: -1;
            opacity: .7;
        }

        .vs .txt {
            font-weight: 900;
            letter-spacing: 1px;
            color: var(--accent);
        }

        .last-moves {
            margin-top: 8px;
            font-size: 14px;
            color: var(--muted);
            text-align: center;
        }

        /* Choices */
        .choices {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
        }

        .choice-btn {
            position: relative;
            isolation: isolate;
            overflow: hidden;
            padding: 18px;
            border-radius: var(--radius);
            border: 1px solid var(--border);
            background: linear-gradient(180deg, color-mix(in srgb, var(--card-bg), transparent 10%), color-mix(in srgb, var(--card-bg), #000 4%));
            color: var(--text);
            cursor: pointer;
            display: grid;
            gap: 10px;
            align-items: center;
            justify-items: center;
            transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
            box-shadow: var(--ring), var(--shadow);
            min-height: 115px;
            user-select: none;
        }

        .choice-btn:hover {
            transform: translateY(-2px);
            border-color: color-mix(in srgb, var(--primary), transparent 50%);
            box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary), transparent 70%), var(--shadow)
        }

        .choice-btn:active {
            transform: translateY(0) scale(.98)
        }

        .choice-btn:focus-visible {
            outline: 3px solid color-mix(in srgb, var(--primary), #fff 25%);
            outline-offset: 2px
        }

        .choice-icon {
            font-size: clamp(34px, 6.5vw, 44px);
            filter: drop-shadow(0 6px 16px color-mix(in srgb, var(--accent), transparent 75%));
        }

        .choice-label {
            font-weight: 800;
            letter-spacing: .4px;
            color: var(--muted);
        }

        /* Ripple effect */
        .ripple {
            position: absolute;
            border-radius: 50%;
            transform: scale(0);
            animation: ripple .6s ease-out forwards;
            background: color-mix(in srgb, var(--primary), transparent 70%);
            pointer-events: none;
            filter: blur(1px);
        }

        @keyframes ripple {
            to {
                transform: scale(3.6);
                opacity: 0
            }
        }

        /* Result */
        .result {
            padding: 16px;
            display: grid;
            gap: 6px;
        }

        .result .headline {
            font-size: clamp(18px, 3.6vw, 24px);
            font-weight: 900;
        }

        .result .detail {
            color: var(--muted)
        }

        .headline.win {
            color: var(--win)
        }

        .headline.lose {
            color: var(--lose)
        }

        .headline.draw {
            color: var(--draw)
        }

        /* Footer controls */
        .footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
            padding: 12px 14px;
        }

        .kbd {
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
            border: 1px solid var(--border);
            background: var(--card-bg);
            border-radius: 6px;
            padding: 2px 6px;
            color: var(--muted);
            box-shadow: var(--ring);
        }

        /* Win Modal */
        .modal {
            position: fixed;
            inset: 0;
            display: none;
            place-items: center;
            z-index: 999;
        }

        .modal.show {
            display: grid;
        }

        .modal .backdrop {
            position: absolute;
            inset: 0;
            background: rgba(0, 0, 0, .5);
            backdrop-filter: blur(6px);
        }

        .modal .modal-card {
            position: relative;
            z-index: 2;
            padding: 22px 20px;
            width: min(92vw, 460px);
            text-align: center;
            animation: pop .22s ease-out;
        }

        @keyframes pop {
            from {
                transform: scale(.92);
                opacity: 0
            }

            to {
                transform: scale(1);
                opacity: 1
            }
        }

        .modal .trophy {
            font-size: 56px;
            filter: drop-shadow(0 6px 16px color-mix(in srgb, var(--accent), transparent 70%));
            margin-bottom: 6px;
        }

        .modal .win-title {
            margin: 4px 0 2px;
            font-size: clamp(22px, 4vw, 28px);
            font-weight: 900;
            color: var(--win);
        }

        .modal .reason {
            color: var(--muted);
            margin-bottom: 12px
        }

        .modal .actions {
            display: flex;
            justify-content: center;
            gap: 10px;
        }

        /* Confetti */
        .modal .confetti {
            position: absolute;
            inset: 0;
            pointer-events: none;
            z-index: 1;
            overflow: hidden;
        }

        .modal .confetti .piece {
            position: absolute;
            top: -20px;
            width: 8px;
            height: 14px;
            border-radius: 2px;
            opacity: .95;
            animation: fall linear forwards;
        }

        @keyframes fall {
            to {
                transform: translateY(110vh) rotate(360deg)
            }
        }

        /* Responsive */
        @media (max-width: 700px) {
            .scoreboard {
                grid-template-columns: 1fr;
            }

            .vs {
                order: -1
            }
        }

        @media (prefers-reduced-motion: reduce) {
            * {
                transition: none !important;
                animation: none !important
            }
        }

        /*label style*/
        .label{
            display: block;
        }