
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 1rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .container {
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
        }

        .header {
            text-align: center;
            margin-bottom: 2rem;
        }

        .title {
            font-size: 3rem;
            font-weight: bold;
            color: white;
            margin-bottom: 1rem;
            text-balance: balance;
        }

        .subtitle {
            font-size: 1.125rem;
            color: rgba(255, 255, 255, 0.8);
            margin-bottom: 1.5rem;
            text-pretty: pretty;
        }

        .stats {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .stat-card {
            padding: 0.5rem 1rem;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: white;
            font-weight: 600;
        }

        .success-card {
            background: rgba(34, 197, 94, 0.2);
            border-color: rgba(74, 222, 128, 0.3);
            color: rgb(134, 239, 172);
            animation: success-pulse 2s infinite;
        }

        .buttons {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1rem;
        }

        .btn {
            padding: 0.5rem 1rem;
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 0.5rem;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(8px);
            color: white;
            cursor: pointer;
            font-size: 0.875rem;
            font-weight: 500;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-1px);
        }

        .btn-blue {
            background: rgba(59, 130, 246, 0.2);
            border-color: rgba(96, 165, 250, 0.3);
            color: rgb(191, 219, 254);
        }

        .btn-blue:hover {
            background: rgba(59, 130, 246, 0.3);
        }

        .game-board {
            display: flex;
            justify-content: center;
            align-items: flex-end;
            gap: 2rem;
            max-width: 1000px;
            margin: 0 auto;
        }

        .tube-container {
            position: relative;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .tube-container.selected {
            transform: scale(1.05);
        }

        .tube-container.selected::before {
            content: '';
            position: absolute;
            inset: -8px;
            border: 2px solid #fbbf24;
            border-radius: 50%;
            animation: pulse 2s infinite;
        }

        .tube {
            position: relative;
            width: 80px;
            height: 128px;
            margin: 0 auto;
        }

        .tube-body {
            position: absolute;
            left: 16px;
            right: 16px;
            bottom: 0px;
            top: 16px;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(8px);
            border-radius: 0 0 50% 50%;
            border: 2px solid rgba(255, 255, 255, 0.3);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        }

        .tube-rim {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
           height: 20px;
            background: rgba(255, 255, 255, 0.3);
            backdrop-filter: blur(8px);
            border-radius: 8px 8px 0 0;
            border: 2px solid rgba(255, 255, 255, 0.4);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .balls-container {
            position: absolute;
            bottom: 10px;
            left: 10px;
            right: 10px;
            display: flex;
            flex-direction: column-reverse;
            gap: 2px;
        }

        .ball {
            width: 100%;
            height: 24px;
            border-radius: 50%;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
            transition: all 0.3s ease;
        }

        .ball.bouncing {
            animation: ball-bounce 0.6s ease-in-out;
        }

        .tube-label {
            text-align: center;
            margin-top: 0.5rem;
            color: rgba(255, 255, 255, 0.6);
            font-size: 0.875rem;
            font-weight: 500;
        }

        .modal {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(4px);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            z-index: 50;
        }

        .modal.hidden {
            display: none;
        }

        .modal-content {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 1rem;
            max-width: 512px;
            width: 100%;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
            padding: 1.5rem;
        }

        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1.5rem;
        }

        .modal-title {
            font-size: 1.5rem;
            font-weight: bold;
            color: #1f2937;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .close-btn {
            background: none;
            border: none;
            font-size: 1.25rem;
            color: #6b7280;
            cursor: pointer;
            padding: 0.25rem;
            border-radius: 0.25rem;
            transition: color 0.2s;
        }

        .close-btn:hover {
            color: #374151;
        }

        .rules {
            color: #374151;
            margin-bottom: 1.5rem;
        }

        .rule {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            margin-bottom: 1rem;
        }

        .rule-number {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 0.875rem;
            font-weight: bold;
            margin-top: 2px;
            flex-shrink: 0;
        }

        .rule-1 { background: #3b82f6; }
        .rule-2 { background: #10b981; }
        .rule-3 { background: #f59e0b; }
        .rule-4 { background: #8b5cf6; }
        .rule-5 { background: #ef4444; }

        .tips {
            margin-top: 1.5rem;
            padding: 1rem;
            background: #fef3c7;
            border-radius: 0.5rem;
            border: 1px solid #fcd34d;
        }

        .tips-title {
            font-weight: 600;
            color: #92400e;
            margin-bottom: 0.5rem;
        }

        .tips-list {
            font-size: 0.875rem;
            color: #b45309;
            list-style: none;
        }

        .tips-list li {
            margin-bottom: 0.25rem;
        }

        .modal-footer {
            margin-top: 1.5rem;
            display: flex;
            justify-content: center;
        }

        .btn-primary {
            background: #3b82f6;
            color: white;
            border: none;
            padding: 0.5rem 2rem;
            border-radius: 0.5rem;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.2s;
        }

        .btn-primary:hover {
            background: #2563eb;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        @keyframes success-pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        @keyframes ball-bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }

        @media (max-width: 768px) {
            .title {
                font-size: 2rem;
            }
            
            .game-board {
                gap: 1rem;
            }
            
            .tube {
                width: 60px;
                height: 96px;
            }
            
            .tube-body {
                left: 6px;
                right: 6px;
                top: 12px;
            }
            
            .tube-rim {
                height: 24px;
            }
            
            .ball {
                height: 18px;
            }
        }
