        /* 
         ================================================================
         🎨 CSS SECTION: The "Paint and Decorations"
         This part makes everything look pretty! We tell the computer 
         what colors to use, how big things should be, and where to put them.
         It's like dressing up our game board in cool clothes!
         ================================================================ 
        */
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

        body {
            font-family: 'Inter', sans-serif;
            background: #0f172a;
            color: white;
            margin: 0;
            overflow: hidden;
            touch-action: none;
        }

        #game-container {
            position: relative;
            width: 100vw;
            height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
        }

        canvas {
            display: block;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 12px;
            box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.2);
            max-width: 95vw;
            max-height: 70vh;
            touch-action: none;
            cursor: pointer;
        }

        #bonus-jewels-panel {
            width: min(95vw, 500px);
            padding: 0.6rem 0.75rem;
            margin-bottom: 0.5rem;
            background: linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(49, 46, 129, 0.88));
            border: 1px solid rgba(129, 140, 248, 0.45);
            border-radius: 16px;
            box-shadow: 0 0 24px rgba(99, 102, 241, 0.22), inset 0 0 24px rgba(15, 23, 42, 0.65);
            z-index: 10;
        }

        #bonus-counter-row,
        #bonus-inventory-row {
            display: flex;
            justify-content: center;
            gap: 0.5rem;
        }

        #bonus-counter-row {
            margin-bottom: 0.35rem;
        }

        #bonus-inventory-row {
            margin-top: 0.4rem;
        }

        .bonus-title {
            color: #bfdbfe;
            font-size: 0.7rem;
            font-weight: 900;
            letter-spacing: 0.22em;
            text-align: center;
            text-transform: uppercase;
            text-shadow: 0 0 10px rgba(96, 165, 250, 0.9);
        }

        .bonus-counter,
        .bonus-slot {
            width: 4.4rem;
            min-height: 2.25rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            border-radius: 9999px;
            background: rgba(15, 23, 42, 0.82);
            border: 1px solid rgba(148, 163, 184, 0.35);
            box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.4);
        }

        .bonus-slot {
            width: 2.75rem;
            min-height: 2.75rem;
            border-radius: 12px;
        }

        .bonus-slot.has-gem {
            cursor: pointer;
            border-color: rgba(191, 219, 254, 0.7);
        }

        .bonus-slot.selected {
            border-color: #facc15;
            box-shadow: 0 0 18px rgba(250, 204, 21, 0.85), inset 0 0 12px rgba(0, 0, 0, 0.35);
            transform: translateY(-2px);
        }

        .bonus-mini-gem {
            width: 1.55rem;
            height: 1.55rem;
            border-radius: 50%;
            box-shadow: inset 0.25rem 0.25rem 0.2rem rgba(255, 255, 255, 0.35), inset -0.25rem -0.25rem 0.25rem rgba(0, 0, 0, 0.28), 0 0 10px currentColor;
        }

        .bonus-empty-gem {
            width: 1.55rem;
            height: 1.55rem;
            border-radius: 50%;
            border: 1px dashed rgba(148, 163, 184, 0.55);
        }

        .bonus-count {
            color: #f8fafc;
            font-size: 0.85rem;
            font-weight: 900;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
        }

        .ui-panel {
            width: 100%;
            max-width: 500px;
            padding: 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 10;
        }

        .stat-card {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            padding: 0.5rem 1.2rem;
            border-radius: 12px;
            text-align: center;
            min-width: 100px;
        }

        .stat-label {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: #94a3b8;
        }

        .stat-value {
            font-size: 1.5rem;
            font-weight: 900;
            color: #f8fafc;
        }

        #overlay {
            position: absolute;
            inset: 0;
            background: rgba(15, 23, 42, 0.9);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 100;
            backdrop-filter: blur(12px);
        }

        .btn {
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
            padding: 1rem 3rem;
            border-radius: 9999px;
            font-weight: bold;
            font-size: 1.5rem;
            transition: all 0.2s;
            cursor: pointer;
            border: none;
            color: white;
            box-shadow: 0 10px 25px -3px rgba(79, 70, 229, 0.5);
        }

        #message-box {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(255, 255, 255, 0.95);
            color: #0f172a;
            padding: 1rem 2rem;
            border-radius: 12px;
            font-size: 2.5rem;
            font-weight: 900;
            text-transform: uppercase;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255,255,255,0.5);
            pointer-events: none;
            opacity: 0;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            z-index: 50;
        }

        #progress-container {
            width: 100%;
            max-width: 500px;
            padding: 0.5rem 1rem;
            z-index: 10;
        }

        #progress-track {
            width: 100%;
            height: 8px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 9999px;
            overflow: hidden;
        }

        #progress-fill {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, #6366f1, #a855f7);
            border-radius: 9999px;
            transition: width 0.3s ease;
        }

        #progress-text {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: #94a3b8;
            text-align: center;
            margin-top: 0.25rem;
        }

        #tutorial-box {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.9);
            background: rgba(255, 255, 255, 0.95);
            padding: 2.5rem;
            border-radius: 16px;
            text-align: center;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(79, 70, 229, 0.3);
            opacity: 0;
            pointer-events: none;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            z-index: 60;
        }

        #tutorial-box.show {
            opacity: 1;
            pointer-events: auto;
            transform: translate(-50%, -50%) scale(1);
        }

        #disclaimer-box {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.9);
            background: rgba(255, 255, 255, 0.95);
            padding: 2.5rem;
            border-radius: 16px;
            text-align: center;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(79, 70, 229, 0.3);
            opacity: 0;
            pointer-events: none;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            z-index: 60;
        }

        #disclaimer-box.show {
            opacity: 1;
            pointer-events: auto;
            transform: translate(-50%, -50%) scale(1);
        }
    
