        :root {
 
            --accent-color: #166088;
            --light-gray: #f8f9fa;
            --border-color: #eaeaea;
            --text-color: #333;
            --text-muted: #6c757d;
            --success-color: #28a745;
            --warning-color: #ffc107;
            --danger-color: #dc3545;
            --block-red: #ff6b6b;
            --block-blue: #4ecdc4;
            --block-green: #96ceb4;
            --block-yellow: #ffeaa7;
            --block-purple: #a29bfe;
            --block-orange: #fd9a6e;
            --block-pink: #fd79a8;
            --block-brown: #d2691e;
            --container-bg: #f0f4f8;
            --game-bg: #f8f9fa;
        }
         
        
        .page-header {
            background: linear-gradient(135deg, rgba(197, 213, 234, 0.4) 0%, rgba(74, 111, 165, 0.4) 100%);
            padding: 1.5rem 0;
            margin-bottom: 2rem;
            border-bottom: 1px solid rgba(74, 111, 165, 0.2);
            position: relative;
            overflow: hidden;  color: var(--text-color);
        }
         
        .breadcrumb {
            background-color: transparent;
            padding: 0.5rem 0;
            margin-bottom: 0.5rem;
        }
        
        .breadcrumb-item a {
            color: var(--text-muted);
            text-decoration: none;
        }
        
        .breadcrumb-item.active {
            color: var(--text-color);
        }
        
        .game-area {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin: 2rem 0;
        }
        
        .gravity-game-container {
            width: 100%;
            height: 500px;
            background-color: var(--game-bg);
            border-radius: 10px;
            position: relative;
            overflow: hidden;
            margin-bottom: 2rem;
            border: 1px solid var(--border-color);
            outline: none;
        }
        
        .game-canvas-container {
            width: 100%;
            height: 100%;
            position: relative;
        }
        
        #gameCanvas {
            width: 100%;
            height: 100%;
            display: block;
        }
        
        .game-ui-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 5;
        }
        
        .containers-row {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            display: flex;
            justify-content: space-around;
            padding: 0 20px;
            box-sizing: border-box;
        }
        
        .container-item {
            width: 120px;
            height: 160px;
            background-color: var(--container-bg);
            border-radius: 10px 10px 0 0;
            border: 2px dashed #ccc;
            position: relative;
            transition: all 0.3s;
            pointer-events: auto;
        }
        
        .container-item:hover {
            border-color: var(--primary-color);
        }
        
        .container-item.active {
            border: 2px solid var(--primary-color);
            background-color: rgba(74, 111, 165, 0.1);
        }
        
        .container-label {
            position: absolute;
            top: -30px;
            left: 0;
            width: 100%;
            text-align: center;
            font-weight: bold;
            font-size: 1.2rem;
            color: var(--primary-color);
        }
        
        .container-color-indicator {
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            width: 30px;
            height: 30px;
            border-radius: 50%;
            border: 2px solid white;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }
        
        .falling-block {
            position: absolute;
            width: 40px;
            height: 40px;
            border-radius: 6px;
            box-shadow: 
                0 4px 8px rgba(0,0,0,0.2),
                inset 0 2px 4px rgba(255,255,255,0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            font-size: 0.9rem;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
            z-index: 10;
            transition: transform 0.1s;
        }
        
        .block-red { background-color: var(--block-red); }
        .block-blue { background-color: var(--block-blue); }
        .block-green { background-color: var(--block-green); }
        .block-yellow { background-color: var(--block-yellow); color: #333; }
        .block-purple { background-color: var(--block-purple); }
        .block-orange { background-color: var(--block-orange); }
        .block-pink { background-color: var(--block-pink); }
        .block-brown { background-color: var(--block-brown); }
        
        .next-block-indicator {
            position: absolute;
            top: 20px;
            right: 20px;
            background-color: white;
            border-radius: 8px;
            padding: 15px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            border: 1px solid var(--border-color);
            z-index: 20;
            pointer-events: auto;
        }
        
        .next-block-title {
            font-weight: 600;
            margin-bottom: 10px;
            color: var(--primary-color);
            text-align: center;
        }
        
        .next-block-preview {
            width: 60px;
            height: 60px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto;
            font-weight: bold;
            font-size: 1.2rem;
            color: white;
            box-shadow: 0 3px 6px rgba(0,0,0,0.2);
        }
        
        .game-controls {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 1rem;
            margin: 1.5rem 0;
        }
        
        .game-btn {
            padding: 0.75rem 1.5rem;
            border-radius: 6px;
            font-weight: 600;
            transition: all 0.3s;
            border: none;
        }
        
        .game-btn-primary {
            background-color: var(--primary-color);
            color: white;
        }
        
        .game-btn-primary:hover {
            background-color: var(--accent-color);
            transform: translateY(-2px);
        }
        
        .game-btn-secondary {
            background-color: #6c757d;
            color: white;
        }
        
        .game-btn-secondary:hover {
            background-color: #5a6268;
            transform: translateY(-2px);
        }
        
        .game-btn-success {
            background-color: var(--success-color);
            color: white;
        }
        
        .game-btn-success:hover {
            background-color: #218838;
            transform: translateY(-2px);
        }
        
        .game-stats {
            display: flex;
            justify-content: space-around;
            background-color: var(--light-gray);
            border-radius: 8px;
            padding: 1.5rem;
            margin: 1.5rem 0;
            border: 1px solid var(--border-color);
        }
        
        .stat-item {
            text-align: center;
        }
        
        .stat-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--primary-color);
            margin-bottom: 0.25rem;
        }
        
        .stat-label {
            color: var(--text-muted);
            font-size: 0.9rem;
        }
        
        .game-info-box {
            background-color: rgba(74, 111, 165, 0.05);
            border-left: 3px solid var(--primary-color);
            padding: 1rem;
            border-radius: 0 4px 4px 0;
            margin: 1.5rem 0;
        }
        
        .game-tip-box {
            background-color: rgba(255, 193, 7, 0.05);
            border-left: 3px solid var(--warning-color);
            padding: 1rem;
            border-radius: 0 4px 4px 0;
            margin: 1.5rem 0;
        }
        
        .level-selection {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin: 1.5rem 0;
        }
        
        .level-btn {
            padding: 0.75rem 1.5rem;
            border-radius: 6px;
            font-weight: 600;
            background-color: white;
            border: 2px solid var(--border-color);
            transition: all 0.3s;
        }
        
        .level-btn:hover {
            background-color: var(--light-gray);
        }
        
        .level-btn.active {
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }
        
        .victory-message {
            background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.3) 100%);
            border: 2px solid var(--success-color);
            border-radius: 8px;
            padding: 2rem;
            text-align: center;
            margin: 2rem 0;
            display: none;
        }
        
        .victory-title {
            font-size: 2rem;
            font-weight: 700;
            color: var(--success-color);
            margin-bottom: 1rem;
        }
        
        .difficulty-indicator {
            display: inline-block;
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 500;
            margin-right: 0.5rem;
        }
        
        .difficulty-easy {
            background-color: rgba(40, 167, 69, 0.1);
            color: #28a745;
        }
        
        .difficulty-medium {
            background-color: rgba(255, 193, 7, 0.1);
            color: #ffc107;
        }
        
        .difficulty-hard {
            background-color: rgba(220, 53, 69, 0.1);
            color: #dc3545;
        }
        
        .section-title {
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--primary-color);
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--border-color);
        }
        
        .strategy-tips {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 1rem;
            margin: 1.5rem 0;
        }
        
        .tip-card {
            background: white;
            border-radius: 8px;
            padding: 1.25rem;
            border: 1px solid var(--border-color);
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }
        
        .tip-icon {
            width: 48px;
            height: 48px;
            border-radius: 8px;
            background-color: rgba(74, 111, 165, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 1rem;
            color: var(--primary-color);
            font-size: 1.25rem;
        }
        
        .tip-title {
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--text-color);
        }
        
        .tip-desc {
            color: var(--text-muted);
            font-size: 0.9rem;
        }
        
        .game-mode-toggle {
            display: flex;
            background-color: var(--light-gray);
            border-radius: 6px;
            padding: 4px;
            margin-bottom: 1.5rem;
        }
        
        .mode-btn {
            flex: 1;
            text-align: center;
            padding: 0.75rem;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: 600;
        }
        
        .mode-btn.active {
            background-color: var(--primary-color);
            color: white;
        }
        
        .score-history {
            background-color: var(--light-gray);
            border-radius: 8px;
            padding: 1.5rem;
            margin: 1.5rem 0;
            max-height: 300px;
            overflow-y: auto;
            border: 1px solid var(--border-color);
        }
        
        .score-history-title {
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--primary-color);
        }
        
        .score-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .score-item {
            padding: 0.5rem;
            background-color: white;
            border-radius: 4px;
            border-left: 3px solid var(--primary-color);
        }
        
        .settings-panel {
            background-color: white;
            border-radius: 8px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            border: 1px solid var(--border-color);
        }
        
        .slider-container {
            margin: 1.5rem 0;
        }
        
        .slider-label {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.5rem;
        }
        
        @media (max-width: 768px) {
 
            .gravity-game-container {
                height: 400px;
            }
            
            .game-controls {
                flex-direction: column;
                align-items: center;
            }
            
            .game-btn {
                width: 100%;
                max-width: 300px;
            }
            
            .game-stats {
                flex-direction: column;
                gap: 1rem;
            }
            
            .containers-row {
                padding: 0 10px;
            }
            
            .container-item {
                width: 80px;
                height: 120px;
            }
        }
        
        @media (max-width: 480px) {
            .gravity-game-container {
                height: 350px;
            }
            
            .container-item {
                width: 70px;
                height: 100px;
            }
        }
        
        .toast-container {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 1050;
        }
        
        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }
        
        .pulse {
            animation: pulse 0.5s ease;
        }
        
        .game-active {
            pointer-events: none;
            opacity: 0.9;
        }
        
        .form-control {
            border: 1px solid #ddd;
            border-radius: 6px;
            padding: 0.75rem;
            transition: all 0.3s;
        }
        
        .form-control:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.15);
        }
        
        .btn {
            border-radius: 6px;
            padding: 0.75rem 1.5rem;
            font-weight: 600;
            transition: all 0.3s;
        }
        
        .btn-primary {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }
        
        .btn-primary:hover {
            background-color: var(--accent-color);
            border-color: var(--accent-color);
            transform: translateY(-1px);
        }
        
        .btn-outline-primary {
            color: var(--primary-color);
            border-color: var(--primary-color);
        }
        
        .btn-outline-primary:hover {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
            color: white;
        }
        
        .btn-outline-secondary {
            color: #6c757d;
            border-color: #6c757d;
        }
        
        .btn-outline-secondary:hover {
            background-color: #6c757d;
            border-color: #6c757d;
            color: white;
        }
        
        .alert {
            border-radius: 6px;
            border: 1px solid transparent;
            padding: 1rem;
            margin-bottom: 1rem;
        }
        
        .alert-success {
            background-color: rgba(40, 167, 69, 0.1);
            border-color: rgba(40, 167, 69, 0.2);
            color: #155724;
        }
        
        .alert-info {
            background-color: rgba(23, 162, 184, 0.1);
            border-color: rgba(23, 162, 184, 0.2);
            color: #0c5460;
        }
        
        .alert-warning {
            background-color: rgba(255, 193, 7, 0.1);
            border-color: rgba(255, 193, 7, 0.2);
            color: #856404;
        }
        
        .alert-danger {
            background-color: rgba(220, 53, 69, 0.1);
            border-color: rgba(220, 53, 69, 0.2);
            color: #721c24;
        }
        
        hr {
            border: 0;
            border-top: 1px solid var(--border-color);
            margin: 1.5rem 0;
        }
        
        .text-muted {
            color: var(--text-muted) !important;
        }
        
        .text-success {
            color: var(--success-color) !important;
        }
        
        .text-warning {
            color: var(--warning-color) !important;
        }
        
        .text-danger {
            color: var(--danger-color) !important;
        }
        
        .text-primary {
            color: var(--primary-color) !important;
        }
        
        .table {
            width: 100%;
            margin-bottom: 1rem;
            color: var(--text-color);
        }
        
        .table th {
            background-color: var(--light-gray);
            font-weight: 600;
        }
        
        .table-striped tbody tr:nth-of-type(odd) {
            background-color: rgba(0, 0, 0, 0.02);
        }
        
        .table-bordered {
            border: 1px solid var(--border-color);
        }
        
        .table-bordered th,
        .table-bordered td {
            border: 1px solid var(--border-color);
        }
         
        .physics-controls {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin: 1rem 0;
        }
        
        .physics-btn {
            padding: 0.5rem 1rem;
            border-radius: 4px;
            background-color: white;
            border: 1px solid var(--border-color);
            transition: all 0.3s;
        }
        
        .physics-btn.active {
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }
        
        .block-count-control {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin: 1.5rem 0;
        }
        
        .color-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            margin: 1.5rem 0;
        }
        
        .color-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .color-swatch {
            width: 20px;
            height: 20px;
            border-radius: 4px;
            border: 1px solid rgba(0,0,0,0.1);
        }
        
        .progress-bar-container {
            background-color: var(--light-gray);
            border-radius: 8px;
            padding: 1rem;
            margin: 1.5rem 0;
            border: 1px solid var(--border-color);
        }
        
        .progress-label {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.5rem;
        }
        
        .progress-bar {
            height: 10px;
            background-color: #e9ecef;
            border-radius: 5px;
            overflow: hidden;
        }
        
        .progress-fill {
            height: 100%;
            background-color: var(--primary-color);
            border-radius: 5px;
            transition: width 0.3s;
        }
        
        .particle {
            position: absolute;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            pointer-events: none;
            z-index: 100;
        }
        
        .combo-indicator {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 2rem;
            font-weight: bold;
            color: var(--success-color);
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
            z-index: 50;
            opacity: 0;
            pointer-events: none;
        }
        
        .powerup {
            position: absolute;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.5rem;
            z-index: 15;
            animation: float 3s infinite ease-in-out;
            box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        }
        
        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }
        
        .powerup-slow {
            background-color: #4a6fa5;
        }
        
        .powerup-magnet {
            background-color: #ff6b6b;
        }
        
        .powerup-bomb {
            background-color: #333;
        }
        
        .powerup-double {
            background-color: #28a745;
        }
        
        .powerup-freeze {
            background-color: #17a2b8;
        }
        
        .powerup-indicator {
            position: absolute;
            top: 20px;
            left: 20px;
            background-color: white;
            border-radius: 8px;
            padding: 10px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            border: 1px solid var(--border-color);
            z-index: 20;
            pointer-events: auto;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .powerup-icon {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 0.9rem;
        }
        
        .powerup-timer {
            font-size: 0.9rem;
            font-weight: bold;
            color: var(--primary-color);
        }
        
        .tutorial-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.7);
            z-index: 100;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            color: white;
            text-align: center;
            padding: 2rem;
        }
        
        .tutorial-content {
            max-width: 600px;
            background-color: white;
            color: var(--text-color);
            border-radius: 10px;
            padding: 2rem;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        }
        
        .tutorial-step {
            display: none;
        }
        
        .tutorial-step.active {
            display: block;
        }
        
        .tutorial-navigation {
            display: flex;
            justify-content: space-between;
            margin-top: 2rem;
        }
        
        .achievement-badge {
            display: inline-block;
            background-color: gold;
            color: #333;
            padding: 5px 10px;
            border-radius: 20px;
            font-weight: bold;
            margin: 5px;
            font-size: 0.8rem;
        }
        
        .settings-toggle {
            margin-bottom: 1rem;
            text-align: center;
        }
        
        .game-settings-collapse {
            transition: all 0.3s ease;
            overflow: hidden;
        }
        
        .game-settings-collapse.collapsed {
            max-height: 0;
            opacity: 0;
        }
        
        .game-settings-collapse.expanded {
            max-height: 1000px;
            opacity: 1;
        }
        
        /* 键盘禁用遮罩 */
        .keyboard-blocker {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: transparent;
            z-index: 9999;
            display: none;
        }
        
        .keyboard-blocker.active {
            display: block;
        }
        
        /* 简化游戏设置区域 */
        .compact-settings {
            display: none;
        }
        
        .compact-settings.active {
            display: block;
        }
        
        .compact-controls {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin: 15px 0;
            flex-wrap: wrap;
        }
        
        .compact-btn {
            padding: 8px 16px;
            background-color: white;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            font-size: 0.9rem;
            transition: all 0.3s;
        }
        
        .compact-btn:hover {
            background-color: var(--light-gray);
        }
        
        .compact-btn.active {
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }
    