
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
            background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
            min-height: 100vh;
            color: white;
            overflow-x: auto;
        }

        .glass-panel {
            background: rgba(255, 255, 255, 0.95);
            -webkit-backdrop-filter: blur(15px);
            backdrop-filter: blur(15px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
        }

        .canvas-container {
            background: #ffffff;
            border: 3px solid #e2e8f0;
            box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
        }

        #mathCanvas {
            cursor: default;
            display: block;
        }

        .control-btn {
            transition: all 0.3s ease;
            font-weight: 600;
        }

        .control-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(8, 145, 178, 0.3);
        }

        .control-btn:active {
            transform: translateY(0);
        }

        .info-display {
            background: rgba(8, 145, 178, 0.1);
            border-left: 4px solid #0891b2;
        }

        .optimal-badge {
            background: linear-gradient(135deg, #059669, #10b981);
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.8; }
        }

        .step-indicator {
            background: linear-gradient(135deg, #0891b2, #0e7490);
            color: white;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 14px;
        }

        .step-indicator.active {
            background: linear-gradient(135deg, #eab308, #f59e0b);
            animation: glow 1.5s infinite alternate;
        }

        @keyframes glow {
            from { box-shadow: 0 0 10px rgba(234, 179, 8, 0.5); }
            to { box-shadow: 0 0 20px rgba(234, 179, 8, 0.8); }
        }

        .slider-container input[type="range"] {
            -webkit-appearance: none;
            appearance: none;
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: #e2e8f0;
            outline: none;
        }

        .slider-container input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: linear-gradient(135deg, #0891b2, #0e7490);
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 8px;
            color: #1e293b;
            font-size: 14px;
            font-weight: 500;
        }

        .legend-color {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            border: 2px solid rgba(255, 255, 255, 0.8);
        }

        .footer {
            background: linear-gradient(to right, #2c3e50, #1a2530);
            color: #ecf0f1;
            text-align: center;
            padding: 20px;
            margin-top: 25px;
            border-radius: 0 0 10px 10px;
        }

        @media (max-width: 768px) {
            .main-layout {
                flex-direction: column;
            }
            
            .canvas-container {
                order: 1;
            }
            
            .control-panel {
                order: 2;
                margin-top: 20px;
            }
            
            #mathCanvas {
                width: 100%;
                height: auto;
            }
        }
