
        /* --- General & Root Styles --- */
        :root {
            --bg-color: #1a1a2e;
            --card-color: #2a2a4e;
            --primary-accent: #00a8ff;
            --primary-accent-dark: #007ab8;
            --text-color: #e0e0e0;
            --border-color: #404060;
            --winner-glow: #00ffaa;
            --error-color: #ff4d4d;
            --success-color: #00ffaa;
            --font-family: 'Poppins', sans-serif;
        }

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

        body {
            font-family: var(--font-family);
            text-align: center;
            background: linear-gradient(135deg, var(--bg-color), #0f0f1a);
            color: var(--text-color);
            padding: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            min-height: 100vh;
            overflow-x: hidden;
            position: relative;
        }

        /* Subtle background animation */
        body::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle, rgba(0,168,255,0.1) 0%, transparent 70%);
            opacity: 0.5;
            animation: pulse-bg 10s infinite alternate ease-in-out;
            z-index: -1;
        }

        @keyframes pulse-bg {
            0% { transform: scale(1); opacity: 0.3; }
            100% { transform: scale(1.2); opacity: 0.6; }
        }

        /* --- Typography & Main Container --- */
        h1 {
            font-size: 3rem;
            color: var(--primary-accent);
            margin-bottom: 20px;
            text-shadow: 0 0 5px var(--primary-accent), 0 0 15px var(--primary-accent);
            animation: neon-glow 1s infinite alternate;
        }

        @keyframes neon-glow {
            from { text-shadow: 0 0 10px var(--primary-accent); }
            to { text-shadow: 0 0 20px var(--primary-accent), 0 0 40px var(--primary-accent); }
        }

        h2 {
            font-size: 1.8rem;
            margin-bottom: 15px;
            /* border-bottom: 2px solid var(--primary-accent); */
            padding-bottom: 10px;
            position: relative;
        }

        h2::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 100%;
            height: 2px;
            background: linear-gradient(to right, transparent, var(--primary-accent), transparent);
            animation: shine 3s infinite linear;
        }
        

        @keyframes shine {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        h3 {
            margin-top: 20px;
            font-weight: 400;
            font-size: 1.2rem;
        }

        .container {
            width: 100%;
            max-width: 1200px;
            animation: fade-in 1s ease-out;
        }

        @keyframes fade-in {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* --- Player & Game Controls Layout --- */
        .players {
            display: flex;
            justify-content: space-around;
            align-items: flex-start;
            gap: 30px;
            margin: 30px 0;
            perspective: 2000px;
        }

        .player, .game-controls, .leaderboard {
            background-color: var(--card-color);
            border-radius: 20px;
            padding: 30px;
            border: 1px solid var(--border-color);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
            transition: all 0.4s ease;
            position: relative;
            overflow: hidden;
        }

        .player:hover{
            transform: translateY(-5px) rotateX(4deg) scale(1.05);
            box-shadow: 0 12px 30px rgba(0, 168, 255, 0.3);
        }
        .game-controls:hover{
            transform: translateY(-1px) scale(1.02);
            box-shadow: 0 12px 30px rgba(0, 168, 255, 0.3);
        }
        .leaderboard:hover{
            box-shadow: 0 12px 30px rgba(0, 168, 255, 0.3);
        }

        .player {
            width: 35%;
        }
        
        .game-controls {
            width: 25%;
            padding-top: 60px;
            padding-bottom: 60px;
            align-self: center;
        }
        
        .leaderboard {
            width: 100%;
            margin-top: 30px;
        }

        .player-info {
            margin: 20px 0;
            font-size: 1rem;
            line-height: 1.6;
            display: flex;
            justify-content: space-around;
        }
        
        .player-info span {
            font-weight: 600;
            color: var(--primary-accent);
            transition: color 0.3s;
            position: relative;
        }

        .player-info span.updated {
            animation: balance-update 1s ease;
        }

        @keyframes balance-update {
            0% { color: var(--success-color); transform: scale(1.2); }
            100% { color: var(--primary-accent); transform: scale(1); }
        }

        /* --- Buttons & Inputs --- */
        button, input[type="number"], input[type="range"], select {
            font-family: var(--font-family);
            width: 100%;
            padding: 14px;
            margin: 10px 0;
            border-radius: 10px;
            border: 1px solid var(--border-color);
            background-color: #33335a;
            color: var(--text-color);
            font-size: 1.1rem;
            transition: all 0.3s ease;
        }
        
        input::placeholder {
            color: #888;
        }

        input:focus, select:focus {
            outline: none;
            border-color: var(--primary-accent);
            box-shadow: 0 0 10px var(--primary-accent);
        }

        input[type="range"] {
            -webkit-appearance: none;
            height: 8px;
            background: var(--border-color);
            border-radius: 5px;
        }

        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 20px;
            height: 20px;
            background: var(--primary-accent);
            border-radius: 50%;
            cursor: pointer;
            box-shadow: 0 0 5px var(--primary-accent);
        }

        .slider-value {
            font-size: 0.9rem;
            color: var(--primary-accent);
            margin-top: -5px;
        }

        button {
            background-color: var(--primary-accent);
            color: #fff;
            font-weight: 600;
            cursor: pointer;
            border: none;
            position: relative;
            overflow: hidden;
        }

        button::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
            transition: left 0.5s;
        }

        button:hover::before {
            left: 100%;
        }

        button:hover:not(:disabled) {
            background-color: var(--primary-accent-dark);
            transform: scale(1.05);
        }
        
        button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: scale(1);
        }
        
        button i {
            margin-right: 10px;
        }

        /* Address display with copy */
        .address-wrapper {
            position: relative;
        }

        .address-wrapper select {
            padding-right: 40px;
        }

        .copy-btn {
            position: absolute;
            right: 1px;
            /* transform: translateY(-10%); */
            background: transparent;
            border: none;
            color: var(--text-color);
            cursor: pointer;
            font-size: 1.2rem;
            transition: color 0.3s;
        }

        .copy-btn:hover {
            color: var(--primary-accent);
        }

        /* --- Winner Highlight --- */
        @keyframes glow {
            0% { box-shadow: 0 0 10px var(--winner-glow); }
            50% { box-shadow: 0 0 30px var(--winner-glow), 0 0 50px var(--winner-glow); }
            100% { box-shadow: 0 0 10px var(--winner-glow); }
        }

        .winner {
            border-color: var(--winner-glow);
            animation: glow 1.5s infinite ease-in-out, winner-shake 0.5s;
        }

        @keyframes winner-shake {
            0% { transform: translate(1px, 1px) rotate(0deg); }
            10% { transform: translate(-1px, -2px) rotate(-1deg); }
            20% { transform: translate(-3px, 0px) rotate(1deg); }
            30% { transform: translate(3px, 2px) rotate(0deg); }
            40% { transform: translate(1px, -1px) rotate(1deg); }
            50% { transform: translate(-1px, 2px) rotate(-1deg); }
            60% { transform: translate(-3px, 1px) rotate(0deg); }
            70% { transform: translate(3px, 1px) rotate(-1deg); }
            80% { transform: translate(-1px, -1px) rotate(1deg); }
            90% { transform: translate(1px, 2px) rotate(0deg); }
            100% { transform: translate(1px, -2px) rotate(-1deg); }
        }

        /* --- Coin Toss Animation --- */
        .coin-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            backdrop-filter: blur(5px);
        }

        .coin {
            position: relative;
            width: 200px;
            height: 200px;
            transform-style: preserve-3d;
            transition: transform 0.5s ease-out;
        }

        .coin.flipping {
            animation: flip 4s ease-out forwards;
        }
        
        .coin .front, .coin .back {
            position: absolute;
            width: 100%;
            height: 100%;
            backface-visibility: hidden;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 7rem;
            color: var(--bg-color);
            box-shadow: 0 0 20px rgba(255,255,255,0.5);
        }

        .coin .front { /* Heads - Player 1 */
            background: linear-gradient(45deg, #ffd700, #f0c000);
            z-index: 2;
        }

        .coin .back { /* Tails - Player 2 */
            background: linear-gradient(45deg, #c0c0c0, #a0a0a0);
            transform: rotateY(180deg);
            z-index: 1;
        }

        @keyframes flip {
            from { transform: rotateY(0deg); }
            to { transform: rotateY(2160deg); /* More spins for drama */ }
        }
        @keyframes border-animate {
            0% { background-position: 0 0; }
            50% { background-position: 300% 0; }
            100% { background-position: 0 0; }
        }

        /* --- Status Toast --- */
        .status-toast {
            position: fixed;
            bottom: -100px;
            left: 50%;
            transform: translateX(-50%);
            background-color: var(--primary-accent);
            color: white;
            padding: 20px 40px;
            border-radius: 10px;
            box-shadow: 0 8px 20px rgba(0,0,0,0.6);
            z-index: 2000;
            transition: bottom 0.5s ease, opacity 0.5s;
            font-weight: 600;
            font-size: 1.2rem;
        }

        .status-toast.show {
            bottom: 50px;
            opacity: 1;
        }

        .status-toast.error {
            background-color: var(--error-color);
        }

        .status-toast.success {
            background-color: var(--success-color);
        }

        /* --- Leaderboard Styles --- */
        .leaderboard h2 {
            margin-bottom: 20px;
        }

        .leaderboard-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
        }

        .leaderboard-table th,
        .leaderboard-table td {
            padding: 15px;
            text-align: left;
            border-bottom: 1px solid var(--border-color);
            transition: background 0.3s;
        }

        .leaderboard-table th {
            background-color: #33335a;
            font-weight: 600;
        }

        .leaderboard-table tr:hover {
            background-color: #404060;
            cursor: pointer;
        }

        .leaderboard-table tr.new {
            animation: new-row 1s ease;
        }

        @keyframes new-row {
            from { background: var(--success-color); color: #000; }
            to { background: transparent; color: var(--text-color); }
        }

        /* --- Confetti Canvas --- */
        #confetti {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1500;
        }

        /* --- Responsive Design --- */
        @media (max-width: 900px) {
            .players {
                flex-direction: column;
                align-items: center;
            }
            .player, .game-controls {
                width: 90%;
                max-width: 500px;
            }
            .game-controls {
                padding: 30px;
            }
            .leaderboard {
                width: 100%;
            }
            h1 { font-size: 2.5rem; }
            .coin { width: 150px; height: 150px; }
            .coin .front, .coin .back { font-size: 5rem; }
        }
