        :root {
            --primary-color: #9c27b0;
            --secondary-color: #e1bee7;
            --accent-color: #7b1fa2;
            --light-gray: #f8f9fa;
            --border-color: #eaeaea;
            --text-color: #333;
            --text-muted: #6c757d;
            --success-color: #28a745;
            --warning-color: #ffc107;
            --danger-color: #dc3545;
            --arrow-up: #ff6b6b;
            --arrow-right: #4ecdc4;
            --arrow-down: #45b7d1;
            --arrow-left: #96ceb4;
            --target-cell: #ffb74d;
            --grid-bg: #f5f5f5;
            --grid-line: #ddd;
        }
         
        .page-header {
            background: linear-gradient(135deg, rgba(225, 190, 231, 0.4) 0%, rgba(156, 39, 176, 0.4) 100%);
            padding: 1.5rem 0;
            margin-bottom: 2rem;
            border-bottom: 1px solid rgba(156, 39, 176, 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;
        }
        
        .arrows-game-container {
            width: 100%;
            max-width: 700px;
            background-color: #f5f5f5;
            border-radius: 10px;
            position: relative;
            overflow: hidden;
            margin-bottom: 2rem;
            border: 1px solid var(--border-color);
            padding: 20px;
        }
        
        .arrows-grid {
            display: grid;
            gap: 2px;
            margin: 0 auto;
            background-color: var(--grid-line);
            border: 2px solid var(--grid-line);
            border-radius: 4px;
            overflow: hidden;
        }
        
        .grid-cell {
            background-color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            cursor: pointer;
            transition: all 0.2s;
            aspect-ratio: 1/1;
        }
        
        .grid-cell:hover {
            background-color: rgba(156, 39, 176, 0.05);
        }
        
        .grid-cell.target {
            background-color: rgba(255, 183, 77, 0.2);
            position: relative;
        }
        
        .grid-cell.target::after {
            content: "★";
            position: absolute;
            top: 5px;
            right: 5px;
            color: var(--target-cell);
            font-size: 12px;
        }
        
        .arrow {
            font-size: 1.8rem;
            transition: transform 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .arrow.up {
            color: var(--arrow-up);
            transform: rotate(0deg);
        }
        
        .arrow.right {
            color: var(--arrow-right);
            transform: rotate(90deg);
        }
        
        .arrow.down {
            color: var(--arrow-down);
            transform: rotate(180deg);
        }
        
        .arrow.left {
            color: var(--arrow-left);
            transform: rotate(270deg);
        }
        
        .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(156, 39, 176, 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(156, 39, 176, 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(156, 39, 176, 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);
        }
        
        .grid-size-controls {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin: 1rem 0;
        }
        
        .target-controls {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin: 1rem 0;
        }
        
        .cell-coordinate {
            position: absolute;
            bottom: 2px;
            right: 2px;
            font-size: 0.6rem;
            color: rgba(0,0,0,0.3);
        }
        
        .rotation-counter {
            position: absolute;
            top: 2px;
            left: 2px;
            font-size: 0.7rem;
            background-color: rgba(0,0,0,0.1);
            border-radius: 50%;
            width: 16px;
            height: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
        }
        
        @media (max-width: 768px) {
            .tool-card {
                padding: 1.5rem;
            }
            
            .arrows-game-container {
                padding: 10px;
            }
            
            .game-controls {
                flex-direction: column;
                align-items: center;
            }
            
            .game-btn {
                width: 100%;
                max-width: 300px;
            }
            
            .game-stats {
                flex-direction: column;
                gap: 1rem;
            }
            
            .arrow {
                font-size: 1.4rem;
            }
        }
        
        @media (max-width: 480px) {
            .arrow {
                font-size: 1.2rem;
            }
            
            .cell-coordinate {
                font-size: 0.5rem;
            }
        }
        
        .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(156, 39, 176, 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);
        }
         
        .solved-cell {
            animation: solvedGlow 1s ease;
        }
        
        @keyframes solvedGlow {
            0% { box-shadow: 0 0 5px rgba(40, 167, 69, 0.5); }
            50% { box-shadow: 0 0 20px rgba(40, 167, 69, 0.8); }
            100% { box-shadow: none; }
        }
        
        .target-indicator {
            display: inline-block;
            width: 20px;
            height: 20px;
            background-color: var(--target-cell);
            border-radius: 50%;
            margin-right: 8px;
            vertical-align: middle;
        }
        
        .progress-container {
            margin: 1rem 0;
        }
        
        .progress-bar {
            height: 10px;
            border-radius: 5px;
            background-color: var(--light-gray);
            overflow: hidden;
        }
        
        .progress-fill {
            height: 100%;
            background-color: var(--primary-color);
            width: 0%;
            transition: width 0.5s ease;
        }
        
        .progress-text {
            display: flex;
            justify-content: space-between;
            font-size: 0.9rem;
            margin-top: 0.25rem;
            color: var(--text-muted);
        }
        
        .hint-arrow {
            position: absolute;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            color: rgba(156, 39, 176, 0.7);
            z-index: 1;
            opacity: 0;
            transition: opacity 0.3s;
        }
        
        .show-hint .hint-arrow {
            opacity: 1;
        }
        
        .solving-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(255, 255, 255, 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
            border-radius: 10px;
            display: none;
        }
        
        .solving-overlay.active {
            display: flex;
        }
        
        .loading-spinner {
            width: 40px;
            height: 40px;
            border: 4px solid rgba(156, 39, 176, 0.1);
            border-top: 4px solid var(--primary-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        .auto-solve-speed {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin: 1rem 0;
        }
        
        .speed-slider {
            flex-grow: 1;
        }
    