
        /* General Setup and Background */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
            background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            position: relative;
            /* Added for better 3D look on the whole scene */
            perspective: 1500px; 
        }

        .stars {
            position: absolute;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

        .star {
            position: absolute;
            background: white;
            border-radius: 50%;
            animation: twinkle 3s infinite;
        }

        @keyframes twinkle {
            0%, 100% { opacity: 0.3; transform: scale(1); }
            50% { opacity: 1; transform: scale(1.2); }
        }

        /* Preloader Styles (Kept for visual appeal) */
        #preloader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            transition: opacity 0.5s ease, visibility 0.5s ease;
        }

        #preloader.hidden {
            opacity: 0;
            visibility: hidden;
        }

        .loader {
            width: 300px;
            height: 150px;
            position: relative;
            perspective: 1000px;
        }

        .loader-cup {
            position: absolute;
            width: 60px;
            height: 90px;
            border-left: 15px solid transparent;
            border-right: 15px solid transparent;
            border-bottom: 90px solid rgba(255,215,0,0.9);
            animation: cupBounce 1.5s ease-in-out infinite;
            filter: drop-shadow(0 10px 30px rgba(255,215,0,0.6));
            transform-style: preserve-3d;
        }

        /* ... (other preloader styles - simplified for brevity, assuming existing styles are acceptable) ... */
        .loader-cup:nth-child(1) { left: 0; animation-delay: 0s; }
        .loader-cup:nth-child(2) { left: 50%; transform: translateX(-5%); animation-delay: 0.3s; }
        .loader-cup:nth-child(3) { right: 0; animation-delay: 0.6s; }

        @keyframes cupBounce {
            0%, 100% { transform: translateY(0) rotateX(0deg) rotateY(0deg) scale(1); }
            25% { transform: translateY(-40px) rotateX(-10deg) rotateY(-15deg) scale(1.15); }
            50% { transform: translateY(-50px) rotateX(0deg) rotateY(0deg) scale(1.2); }
            75% { transform: translateY(-40px) rotateX(-10deg) rotateY(15deg) scale(1.15); }
        }
        
        .loader-text {
            color: #FFD700;
            margin-top: 120px;
            font-size: 28px;
            font-weight: bold;
            letter-spacing: 3px;
            animation: textPulse 1.5s ease-in-out infinite;
            text-shadow: 0 0 20px rgba(255,215,0,0.5);
        }

        @keyframes textPulse {
            0%, 100% { opacity: 0.5; }
            50% { opacity: 1; }
        }
        
        /* Game Container - Main 3D Stage */
        .game-container {
            position: relative;
            z-index: 1;
            text-align: center;
            opacity: 0;
            transform: translateY(30px) rotateX(15deg) rotateY(0deg); /* Initial 3D tilt */
            animation: fadeInUp 0.8s ease forwards 0.5s;
            transform-style: preserve-3d; /* Key for internal 3D */
            transition: transform 0.5s ease;
        }

        @keyframes fadeInUp {
            to {
                opacity: 1;
                transform: translateY(0) rotateX(15deg) rotateY(0deg);
            }
        }

        /* Stats and Header (Minor styling updates) */
        .game-header { margin-bottom: 50px; }
        .game-title {
            color: #FFD700;
            font-size: 36px;
            font-weight: bold;
            text-shadow: 0 0 30px rgba(255,215,0,0.6), 0 4px 20px rgba(0,0,0,0.5);
            margin-bottom: 15px;
            animation: titleGlow 3s ease-in-out infinite;
            letter-spacing: 2px;
        }
        .game-subtitle {
            color: rgba(255,255,255,0.8);
            font-size: 20px;
            font-weight: 300;
            letter-spacing: 1px;
        }
        .stats-container {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-bottom: 30px;
            transform: translateZ(50px); /* Lifted slightly in 3D space */
        }
        .stat-box {
            background: rgba(255,255,255,0.05);
            backdrop-filter: blur(10px);
            border: 2px solid rgba(255,215,0,0.3);
            border-radius: 15px;
            padding: 15px 25px;
            min-width: 100px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 10px rgba(255,215,0,0.1);
        }
        .stat-label {
            color: rgba(255,255,255,0.6);
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 5px;
        }
        .stat-value {
            color: #FFD700;
            font-size: 30px;
            font-weight: bold;
            text-shadow: 0 0 20px rgba(255,215,0,0.5);
        }

        /* Game Area - The Table */
        #game {
            display: inline-block;
            position: relative;
            background: radial-gradient(circle at 50% 100%, #1a1a40 0%, #0f0c29 100%);
            padding: 50px 60px 60px;
            border-radius: 30px;
            box-shadow: 
                0 30px 80px rgba(0,0,0,0.8), /* Main Shadow */
                inset 0 -20px 60px rgba(0,0,0,0.5), /* Inner bottom shadow for depth */
                0 0 60px rgba(255,215,0,0.05); /* Soft outer glow */
            border: 3px solid rgba(255,215,0,0.2);
            /* Transform for the 'table' */
            transform: rotateX(-5deg) translateZ(0); 
            transform-style: preserve-3d;
            transition: all 0.5s ease;
        }

        /* ------------------------------------------
        CUP STYLES - MODIFIED TO USE 'glass.png'
        ------------------------------------------ 
        */
        #game .cup {
            /* Remove old trapezoid styling */
            border: none;
            height: 160px; /* Adjust to image height */
            width: 150px; /* Adjust to image width (approx) */
            cursor: pointer;
            float: left;
            margin: 0 30px; /* Adjusted margin for better spacing */
            position: relative;
            
            /* Use a placeholder image. Replace 'glass.png' with your actual image path */
            background: url('glass.png') no-repeat center bottom;
            background-size: contain; /* Ensure the image fits inside the container */
            
            /* 3D filter for a glowing shadow */
            filter: drop-shadow(0 10px 30px rgba(255,255,255,0.4));
            transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            
            /* Cup's own 3D properties */
            transform-origin: bottom;
            transform: translateZ(0) rotateX(0deg);
            /* Add some padding to simulate the ball being inside the glass area */
            padding-bottom: 5px; 
        }
        
        /* The Question Mark inside the Cup */
        #game .cup .question-mark {
            color: #FFD700;
            font-size: 40px;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            opacity: 0.8;
            text-shadow: 0 0 10px rgba(255,215,0,0.5);
            transition: opacity 0.4s;
        }
        
        /* Shadow/Reflection - Simplified as we use an image */
        #game .cup::before {
            content: '';
            position: absolute;
            bottom: -5px; /* Position right at the bottom of the glass image */
            left: 5px;
            right: 5px;
            height: 10px; /* Small reflection area */
            background: rgba(255,255,255,0.2);
            border-radius: 50%;
            opacity: 0.6;
            transition: opacity 0.4s ease;
            transform: scaleY(1) translateZ(-1px); 
            filter: blur(2px);
        }

        #game .cup:hover {
            /* Lift and tilt on hover */
            transform: translateY(-15px) scale(1.05) rotateX(-5deg) translateZ(10px); 
            filter: drop-shadow(0 20px 40px rgba(255,255,255,0.6)) drop-shadow(0 0 30px rgba(255,255,255,0.4));
        }

        #game .cup:hover::before {
            opacity: 0.9;
        }

        #game .ball {
            display: none;
            background: radial-gradient(circle at 30% 30%, #FFD700, #FFA500);
            border-radius: 50%;
            height: 35px;
            width: 35px;
            /* Adjust the left margin to center the ball under the new glass image */
            margin-left: 145px; /* Total width: 150px. Ball width: 35px. (150-35)/2 = 57.5px. Adjust based on actual margin */
            /* Calculated new margin for 150px wide cup and 30px cup margin: (150/2 - 35/2) + 30px = 75 - 17.5 + 30 = 87.5px. Use 87.5px or adjust as needed for visual centering. Let's use 85px to be safe. */
            margin-left: 135px; 
            
            position: absolute;
            bottom: 5px; /* Lift ball slightly off the surface */
            left: 0;
            box-shadow: 0 8px 25px rgba(255,215,0,0.7), inset 0 -3px 12px rgba(0,0,0,0.3), 0 0 40px rgba(255,215,0,0.4);
            animation: ballGlow 1.5s ease-in-out infinite;
            transform: translateZ(2px); /* Ensure it's above the table surface */
        }
        
        @keyframes ballGlow {
            0%, 100% { box-shadow: 0 8px 25px rgba(255,215,0,0.7), inset 0 -3px 12px rgba(0,0,0,0.3), 0 0 40px rgba(255,215,0,0.4); }
            50% { box-shadow: 0 8px 30px rgba(255,215,0,0.9), inset 0 -3px 15px rgba(0,0,0,0.5), 0 0 60px rgba(255,215,0,0.6); }
        }

        /* Result Popup and Button */
        #game-result {
            display: none;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 20px;
            font-weight: bold;
            text-align: center;
            color: white;
            padding: 10px 20px;
            border-radius: 20px;
            box-shadow: 0 15px 60px rgba(0,0,0,0.7);
            animation: resultPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            z-index: 100;
        }

        .success { background: linear-gradient(45deg, #10ac84, #00d2d3); }
        .failure { background: linear-gradient(45deg, #ee5253, #ff6348); }
        
        @keyframes resultPop {
            0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
            80% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
            100% { transform: translate(-50%, -50%) scale(1); }
        }

        #btn-play {
            /* ... (keep existing button styles) ... */
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            border: 0;
            border-radius: 50px;
            cursor: pointer;
            display: block;
            margin: 40px auto 0;
            padding: 12px 50px;
            color: white;
            font-size: 22px;
            font-weight: bold;
            box-shadow: 0 15px 40px rgba(245,87,108,0.5);
            transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            position: relative;
            overflow: hidden;
            letter-spacing: 1px;
            transform: translateZ(80px); /* Lifted for 3D effect */
        }

        #btn-play:hover {
            transform: translateY(-5px) scale(1.05) translateZ(80px); /* Maintain Z on hover */
            box-shadow: 0 20px 50px rgba(245,87,108,0.7), 0 0 40px rgba(245,87,108,0.4);
        }
        
        /* New Level Indicator Style */
        .level-indicator {
            position: absolute;
            top: 15px;
            right: 15px;
            background: #FFD700;
            color: #24243e;
            padding: 8px 15px;
            border-radius: 20px;
            font-weight: bold;
            font-size: 14px;
            letter-spacing: 1px;
            box-shadow: 0 5px 15px rgba(255,215,0,0.5);
            z-index: 10;
        }
        
        /* Sound Toggle */
        .sound-toggle {
            position: fixed;
            top: 20px;
            left: 20px;
            width: 50px;
            height: 50px;
            background: rgba(255, 215, 0, 0.1);
            backdrop-filter: blur(5px);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: #FFD700;
            cursor: pointer;
            z-index: 2000;
            border: 2px solid rgba(255, 215, 0, 0.3);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
            transition: background 0.2s, transform 0.2s;
        }

        .sound-toggle:hover {
            background: rgba(255, 215, 0, 0.2);
            transform: scale(1.05);
        }

        .sound-toggle:hover {
            background: rgba(255, 215, 0, 0.2);
            transform: scale(1.05);
        }

        /* Mobile Responsive Styles */
        @media (max-width: 768px) {
            body {
                perspective: 1000px;
            }

            .game-container {
                padding: 0 15px;
                width: 100%;
                transform: translateY(0) rotateX(0deg);
            }

            @keyframes fadeInUp {
                to {
                    opacity: 1;
                    transform: translateY(0) rotateX(0deg);
                }
            }

            .game-title {
                font-size: 36px;
                margin-bottom: 10px;
            }

            .game-subtitle {
                font-size: 14px;
            }

            .stats-container {
                flex-wrap: wrap;
                gap: 10px;
                margin-bottom: 20px;
                transform: translateZ(0);
            }

            .stat-box {
                padding: 10px 15px;
                min-width: 70px;
                flex: 1 1 calc(50% - 10px);
            }

            .stat-label {
                font-size: 10px;
            }

            .stat-value {
                font-size: 20px;
            }

            #game {
                padding: 60px 20px 40px;
                border-radius: 20px;
                transform: rotateX(0deg);
                overflow: hidden;
            }

            .level-indicator {
                top: 10px;
                right: 10px;
                padding: 6px 12px;
                font-size: 12px;
            }

            #game .cup {
                height: 100px;
                width: 90px;
                margin: 0 10px;
                background-size: contain;
                filter: drop-shadow(0 5px 15px rgba(255,255,255,0.3));
            }

            #game .cup .question-mark {
                font-size: 28px;
            }

            #game .cup:hover {
                transform: translateY(-10px) scale(1.05) rotateX(0deg);
                filter: drop-shadow(0 10px 20px rgba(255,255,255,0.5));
            }

            #game .ball {
                height: 25px;
                width: 25px;
                margin-left: 82.5px;
                bottom: 3px;
            }

            #game-result {
                font-size: 16px;
                padding: 8px 15px;
                max-width: 90%;
                border-radius: 15px;
            }

            #btn-play {
                padding: 15px 40px;
                font-size: 18px;
                margin: 30px auto 0;
                transform: translateZ(0);
            }

            #btn-play:hover {
                transform: translateY(-3px) scale(1.05);
            }

            .sound-toggle {
                width: 45px;
                height: 45px;
                font-size: 20px;
                top: 15px;
                left: 15px;
            }

            .loader {
                width: 200px;
                height: 100px;
            }

            .loader-cup {
                width: 40px;
                height: 60px;
                border-bottom: 60px solid rgba(255,215,0,0.9);
            }

            .loader-text {
                font-size: 20px;
                margin-top: 80px;
            }
        }

        @media (max-width: 480px) {
            .game-title {
                font-size: 28px;
            }

            .game-subtitle {
                font-size: 12px;
            }

            .stat-box {
                min-width: 60px;
            }

            .stat-value {
                font-size: 18px;
            }

            #game {
                padding: 50px 10px 30px;
            }

            #game .cup {
                height: 80px;
                width: 70px;
                margin: 0 5px;
            }

            #game .cup .question-mark {
                font-size: 22px;
            }

            #game .ball {
                height: 20px;
                width: 20px;
                margin-left: 62.5px;
            }

            #game-result {
                font-size: 14px;
                padding: 6px 12px;
            }

            #btn-play {
                padding: 12px 30px;
                font-size: 16px;
            }
        }

        /* Landscape Mobile */
        @media (max-height: 600px) and (orientation: landscape) {
            .game-header {
                margin-bottom: 20px;
            }

            .game-title {
                font-size: 28px;
            }

            .stats-container {
                margin-bottom: 15px;
            }

            #game {
                padding: 40px 20px 30px;
            }

            #btn-play {
                margin: 20px auto 0;
            }
        }
