        :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;
            
            /* 2048 Tile Colors */
            --tile-2: #eee4da;
            --tile-4: #ede0c8;
            --tile-8: #f2b179;
            --tile-16: #f59563;
            --tile-32: #f67c5f;
            --tile-64: #f65e3b;
            --tile-128: #edcf72;
            --tile-256: #edcc61;
            --tile-512: #edc850;
            --tile-1024: #edc53f;
            --tile-2048: #edc22e;
            --tile-super: #3c3a32;
            --tile-text-light: #f9f6f2;
            --tile-text-dark: #776e65;
            --grid-color: #bbada0;
            --cell-color: #cdc1b4;
        }
         
        .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;
        }
        
        .game-container-2048 {
            width: 100%;
            max-width: 500px;
            background-color: #faf8ef;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 2rem;
            border: 1px solid var(--border-color);
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        
        .game-header-2048 {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .game-title-2048 {
            font-size: 3.5rem;
            font-weight: 800;
            color: #776e65;
            margin: 0;
            line-height: 1;
        }
        
        .game-title-2048 small {
            display: block;
            font-size: 1rem;
            font-weight: 500;
            color: #8f7a66;
        }
        
        .game-scores-container {
            display: flex;
            gap: 10px;
        }
        
        .score-box {
            background-color: #bbada0;
            color: white;
            padding: 10px 15px;
            border-radius: 6px;
            text-align: center;
            min-width: 80px;
        }
        
        .score-label {
            font-size: 0.85rem;
            text-transform: uppercase;
            font-weight: 600;
            margin-bottom: 5px;
        }
        
        .score-value {
            font-size: 1.5rem;
            font-weight: 700;
        }
        
        .game-intro {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .game-explanation {
            color: #776e65;
            font-size: 1.1rem;
            line-height: 1.4;
        }
        
        .game-grid-container {
            position: relative;
            background-color: var(--grid-color);
            border-radius: 8px;
            padding: 10px;
            margin-bottom: 20px;
            width: 100%;
            aspect-ratio: 1 / 1; /* Make it square */
        }
        
        .game-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            grid-template-rows: repeat(4, 1fr);
            gap: 10px; /* Reduced gap to make tiles fit better */
            position: relative;
            width: 100%;
            height: 100%;
        }
        
        .grid-cell {
            background-color: var(--cell-color);
            border-radius: 6px;
            width: 100%;
            height: 100%;
        }
        
        .tile {
            position: absolute;
            display: flex;
            justify-content: center;
            align-items: center;
            font-weight: 800;
            border-radius: 6px;
            transition: all 0.15s ease-in-out;
            z-index: 10;
            font-size: 2rem;
        }
        
        .tile-2 { background-color: var(--tile-2); color: var(--tile-text-dark); }
        .tile-4 { background-color: var(--tile-4); color: var(--tile-text-dark); }
        .tile-8 { background-color: var(--tile-8); color: var(--tile-text-light); }
        .tile-16 { background-color: var(--tile-16); color: var(--tile-text-light); }
        .tile-32 { background-color: var(--tile-32); color: var(--tile-text-light); }
        .tile-64 { background-color: var(--tile-64); color: var(--tile-text-light); }
        .tile-128 { background-color: var(--tile-128); color: var(--tile-text-light); font-size: 1.8rem; }
        .tile-256 { background-color: var(--tile-256); color: var(--tile-text-light); font-size: 1.8rem; }
        .tile-512 { background-color: var(--tile-512); color: var(--tile-text-light); font-size: 1.8rem; }
        .tile-1024 { background-color: var(--tile-1024); color: var(--tile-text-light); font-size: 1.6rem; }
        .tile-2048 { background-color: var(--tile-2048); color: var(--tile-text-light); font-size: 1.6rem; }
        .tile-super { background-color: var(--tile-super); color: var(--tile-text-light); font-size: 1.4rem; }
        
        .game-controls-2048 {
            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-btn-warning {
            background-color: var(--warning-color);
            color: #212529;
        }
        
        .game-btn-warning:hover {
            background-color: #e0a800;
            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, .game-over-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;
        }
        
        .game-over-message {
            background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.3) 100%);
            border: 2px solid var(--danger-color);
        }
        
        .victory-title, .game-over-title {
            font-size: 2rem;
            font-weight: 700;
            color: var(--success-color);
            margin-bottom: 1rem;
        }
        
        .game-over-title {
            color: var(--danger-color);
        }
         
        
        .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;
        }
        
        .keyboard-controls {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin: 1.5rem 0;
        }
        
        .keyboard-row {
            display: flex;
            margin-bottom: 10px;
        }
        
        .key {
            width: 60px;
            height: 60px;
            background-color: #f1f1f1;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 5px;
            font-size: 1.5rem;
            font-weight: 700;
            color: #333;
            box-shadow: 0 3px 0 #ddd;
            user-select: none;
        }
        
        .key.arrow-key {
            background-color: #e0e0e0;
        }
        
        .key-space {
            width: 200px;
        }
        
        .best-scores {
            background-color: var(--light-gray);
            border-radius: 8px;
            padding: 1.5rem;
            margin: 1.5rem 0;
            border: 1px solid var(--border-color);
        }
        
        .score-record {
            display: flex;
            justify-content: space-between;
            padding: 0.75rem 0;
            border-bottom: 1px solid var(--border-color);
        }
        
        .score-record:last-child {
            border-bottom: none;
        }
        
        .score-record-label {
            font-weight: 500;
            color: var(--text-color);
        }
        
        .score-record-value {
            font-weight: 700;
            color: var(--primary-color);
        }
        
        .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);
        }
        
        .usage-step {
            display: flex;
            margin-bottom: 1.5rem;
            align-items: flex-start;
        }
        
        .step-number {
            width: 28px;
            height: 28px;
            background-color: var(--primary-color);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 1rem;
            flex-shrink: 0;
            font-weight: 600;
            font-size: 0.9rem;
        }
        
        .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);
        }
        
        .action-btn {
            background-color: white;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 0.5rem 1rem;
            margin-left: 0.5rem;
            transition: all 0.3s;
            color: var(--text-color);
        }
        
        .action-btn:hover {
            background-color: var(--light-gray);
            color: var(--primary-color);
        }
        
        .social-icons {
            display: flex;
            gap: 0.75rem;
            margin-top: 1rem;
        }
        
        .social-icon {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background-color: var(--light-gray);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
            text-decoration: none;
            transition: all 0.3s;
        }
        
        .social-icon:hover {
            background-color: var(--primary-color);
            color: white;
            transform: translateY(-3px);
        }
        
        @media (max-width: 768px) {
            .tool-card {
                padding: 1.5rem;
            }
            
            .game-title-2048 {
                font-size: 2.5rem;
            }
            
            .game-scores-container {
                flex-direction: column;
            }
            
            .game-controls-2048 {
                flex-direction: column;
                align-items: center;
            }
            
            .game-btn {
                width: 100%;
                max-width: 300px;
            }
            
            .game-stats {
                flex-direction: column;
                gap: 1rem;
            }
            
            .tile {
                font-size: 1.5rem;
            }
            
            .tile-128, .tile-256, .tile-512 {
                font-size: 1.3rem;
            }
            
            .tile-1024, .tile-2048 {
                font-size: 1.1rem;
            }
            
            .tile-super {
                font-size: 0.9rem;
            }
        }
        
        @media (max-width: 480px) {
            .game-title-2048 {
                font-size: 2rem;
            }
            
            .game-grid-container {
                padding: 8px;
            }
            
            .game-grid {
                gap: 8px;
            }
            
            .tile {
                font-size: 1.2rem;
            }
        }
        
        .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;
        }
        
        @keyframes newTile {
            0% { transform: scale(0); }
            70% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }
        
        .new-tile {
            animation: newTile 0.3s ease;
        }
        
        @keyframes mergeTile {
            0% { transform: scale(1); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }
        
        .merge-tile {
            animation: mergeTile 0.3s ease;
        }
        
        .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;
        }
        
        .badge {
            font-weight: 600;
            padding: 0.35em 0.65em;
        }
        
        .progress {
            height: 10px;
            border-radius: 5px;
            margin-bottom: 1rem;
        }
        
        .progress-bar {
            border-radius: 5px;
        }
    