        :root {
            --primary-color: #2c7da0;
            --secondary-color: #a9d6e5;
            --accent-color: #01497c;
            --light-gray: #f8f9fa;
            --border-color: #eaeaea;
            --text-color: #333;
            --text-muted: #6c757d;
            --success-color: #28a745;
            --warning-color: #ffc107;
            --danger-color: #dc3545;
            --disk-1: #ff6b6b;
            --disk-2: #4ecdc4;
            --disk-3: #45b7d1;
            --disk-4: #96ceb4;
            --disk-5: #ffeaa7;
            --disk-6: #fdcb6e;
            --disk-7: #e17055;
            --disk-8: #a29bfe;
            --disk-9: #fd79a8;
            --tower-color: #8b4513;
            --base-color: #654321;
        }
         
        
        .page-header {
            background: linear-gradient(135deg, rgba(169, 214, 229, 0.4) 0%, rgba(44, 125, 160, 0.4) 100%);
            padding: 1.5rem 0;
            margin-bottom: 2rem;
            border-bottom: 1px solid rgba(44, 125, 160, 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;
        }
        
        .hanoi-game-container {
            width: 100%;
            max-width: 900px;
            height: 400px;
            background-color: #f5f5f5;
            border-radius: 10px;
            position: relative;
            overflow: hidden;
            margin-bottom: 2rem;
            border: 1px solid var(--border-color);
        }
        
        .hanoi-towers {
            display: flex;
            justify-content: space-around;
            align-items: flex-end;
            width: 100%;
            height: 100%;
            padding: 20px;
            position: relative;
        }
        
        .tower {
            width: 30%;
            height: 90%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-end;
            position: relative;
        }
        
        .tower-base {
            width: 100%;
            height: 15px;
            background-color: var(--base-color);
            border-radius: 5px;
            position: absolute;
            bottom: 0;
        }
        
        .tower-rod {
            width: 12px;
            height: 85%;
            background-color: var(--tower-color);
            border-radius: 5px;
            position: absolute;
            bottom: 15px;
            z-index: 1;
        }
        
        .tower-label {
            position: absolute;
            bottom: -25px;
            font-weight: bold;
            font-size: 1.2rem;
            color: var(--primary-color);
        }
        
        .tower-disks {
            display: flex;
            flex-direction: column-reverse; /* 反向排列，底部圆盘在底部 */
            align-items: center;
            justify-content: flex-start; /* 从顶部开始 */
            width: 100%;
            height: 100%;
            z-index: 2;
        }
        
        .disk {
            height: 24px;
            margin: 1px 0;
            border-radius: 12px 12px 0 0;
            transition: all 0.5s ease;
            box-shadow: 
                inset 0 -2px 5px rgba(0,0,0,0.3),
                0 2px 5px rgba(0,0,0,0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            font-size: 0.8rem;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
            position: relative;
            border-bottom: 2px solid rgba(0,0,0,0.4);
        }
        
        .disk::after {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            border-radius: 12px 12px 0 0;
            background: linear-gradient(to bottom, 
                rgba(255,255,255,0.3) 0%, 
                rgba(255,255,255,0.1) 30%,
                rgba(0,0,0,0.1) 70%,
                rgba(0,0,0,0.3) 100%);
            pointer-events: none;
        }
        
        .disk-1 { 
            background-color: var(--disk-1); 
            height: 16px; 
            border-radius: 8px 8px 0 0; 
        }
        .disk-2 { 
            background-color: var(--disk-2); 
            height: 18px; 
            border-radius: 9px 9px 0 0; 
        }
        .disk-3 { 
            background-color: var(--disk-3); 
            height: 20px; 
            border-radius: 10px 10px 0 0; 
        }
        .disk-4 { 
            background-color: var(--disk-4); 
            height: 22px; 
            border-radius: 11px 11px 0 0; 
        }
        .disk-5 { 
            background-color: var(--disk-5); 
            height: 24px; 
            border-radius: 12px 12px 0 0; 
        }
        .disk-6 { 
            background-color: var(--disk-6); 
            height: 26px; 
            border-radius: 13px 13px 0 0; 
        }
        .disk-7 { 
            background-color: var(--disk-7); 
            height: 28px; 
            border-radius: 14px 14px 0 0; 
        }
        .disk-8 { 
            background-color: var(--disk-8); 
            height: 30px; 
            border-radius: 15px 15px 0 0; 
        }
        .disk-9 { 
            background-color: var(--disk-9); 
            height: 32px; 
            border-radius: 16px 16px 0 0; 
        }
        
        .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(44, 125, 160, 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(44, 125, 160, 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;
        }
        
        .move-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);
        }
        
        .move-history-title {
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--primary-color);
        }
        
        .move-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .move-item {
            padding: 0.5rem;
            background-color: white;
            border-radius: 4px;
            border-left: 3px solid var(--primary-color);
            font-family: monospace;
        }
        
        .move-item.current {
            background-color: rgba(44, 125, 160, 0.1);
            font-weight: bold;
        }
        
        .algorithm-info {
            background-color: rgba(108, 117, 125, 0.05);
            border-left: 3px solid #6c757d;
            padding: 1rem;
            border-radius: 0 4px 4px 0;
            margin: 1.5rem 0;
            font-family: monospace;
            font-size: 0.9rem;
            line-height: 1.6;
        }
        
        .slider-container {
            margin: 1.5rem 0;
        }
        
        .slider-label {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.5rem;
        }
        
        .speed-controls {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin: 1rem 0;
        }
        
        .speed-btn {
            padding: 0.5rem 1rem;
            border-radius: 4px;
            background-color: white;
            border: 1px solid var(--border-color);
            transition: all 0.3s;
        }
        
        .speed-btn.active {
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }
        
        @media (max-width: 768px) {
            .tool-card {
                padding: 1.5rem;
            }
            
            .hanoi-game-container {
                height: 300px;
            }
            
            .game-controls {
                flex-direction: column;
                align-items: center;
            }
            
            .game-btn {
                width: 100%;
                max-width: 300px;
            }
            
            .game-stats {
                flex-direction: column;
                gap: 1rem;
            }
            
            .disk {
                font-size: 0.7rem;
            }
        }
        
        @media (max-width: 480px) {
            .hanoi-game-container {
                height: 250px;
            }
            
            .tower {
                width: 28%;
            }
            
            .disk {
                height: 18px;
                font-size: 0.6rem;
            }
            
            .disk-1 { height: 14px; }
            .disk-2 { height: 16px; }
            .disk-3 { height: 18px; }
            .disk-4 { height: 20px; }
            .disk-5 { height: 22px; }
            .disk-6 { height: 24px; }
            .disk-7 { height: 26px; }
            .disk-8 { height: 28px; }
            .disk-9 { height: 30px; }
        }
        
        .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;
        }
        
        .solving-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(44, 125, 160, 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);
        }
         
        .step-content {
            flex: 1;
        }
        
        .faq-section {
            margin-top: 2rem;
        }
        
        .accordion-button:not(.collapsed) {
            background-color: rgba(44, 125, 160, 0.1);
            color: var(--primary-color);
            font-weight: 600;
        }
        
        .accordion-button:focus {
            box-shadow: 0 0 0 3px rgba(44, 125, 160, 0.25);
            border-color: var(--primary-color);
        }
      
    