﻿/* ==================== GLOBAL STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0c0c0c;
    --bg-panel: #1a1a1a;
    --bg-terminal: #000000;
    --text-primary: #ff6666;
    --text-secondary: #ffffff;
    --text-muted: #888888;
    --text-success: #ff6666;
    --text-error: #ff5555;
    --text-warning: #ffaa00;
    --accent-red: #ff4444;
    --accent-coral: #ff8866;
    --accent-orange: #ff6b35;
    --border-color: #333333;
    --shadow: rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
}

a {
    color: var(--accent-orange);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-red);
    text-decoration: underline;
}

/* ==================== CONTAINER LAYOUT ==================== */
.container {
    display: flex;
    height: 100vh;
}

/* ==================== LEFT PANEL ==================== */
.left-panel {
    width: 35%;
    background-color: var(--bg-panel);
    border-right: 2px solid var(--border-color);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.section-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-dark);
}

.section-header h1 {
    font-size: 1.5rem;
    color: var(--accent-red);
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.stat {
    color: var(--text-secondary);
}

.stat strong {
    color: var(--text-primary);
}

/* ==================== PROGRESS BAR ==================== */
.progress-container {
    padding: 1rem 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-terminal);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-orange));
    width: 0%;
    transition: width 0.5s ease;
}

/* ==================== TASKS ==================== */
.tasks-container {
    flex: 1;
    padding: 1.5rem;
}

.tasks-container h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--accent-coral);
}

#task-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-item {
    padding: 1rem;
    background-color: var(--bg-dark);
    border-left: 3px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: default;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.task-item.active {
    border-left-color: var(--accent-coral);
    background-color: rgba(255, 136, 102, 0.1);
}

.task-item.completed {
    border-left-color: var(--accent-red);
    opacity: 0.7;
}

.task-item.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.task-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.task-status {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Completed task icon - checkmark in circle */
.task-status.completed-icon::before {
    content: '✓';
    color: var(--accent-red);
    font-size: 16px;
    font-weight: bold;
}

.task-status.completed-icon::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid var(--accent-red);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Active task icon - hollow circle with dot */
.task-status.active-icon::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: var(--accent-orange);
    border-radius: 50%;
    position: absolute;
}

.task-status.active-icon::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid var(--accent-orange);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Locked task icon - padlock */
.task-status.locked-icon::before {
    content: '';
    width: 10px;
    height: 8px;
    background-color: transparent;
    border: 2px solid var(--text-muted);
    border-top: none;
    border-radius: 0 0 3px 3px;
    position: absolute;
    bottom: 3px;
}

.task-status.locked-icon::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border: 2px solid var(--text-muted);
    border-bottom: none;
    border-radius: 50% 50% 0 0;
    top: 2px;
}

.task-number {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 20px;
}

.task-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    flex: 1;
    line-height: 1.4;
}

.task-item.completed .task-description {
    color: var(--text-muted);
}

.task-item.locked .task-description {
    color: var(--text-muted);
}

.task-number-label {
    font-weight: bold;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.reset-task-btn-icon {
    margin-left: auto;
    width: 24px;
    height: 24px;
    padding: 0;
    background-color: rgba(255, 107, 53, 0.15);
    color: var(--accent-orange);
    border: 1px solid var(--accent-orange);
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.reset-task-btn-icon:hover {
    background-color: rgba(255, 107, 53, 0.3);
    border-color: var(--accent-red);
    color: var(--accent-red);
    transform: rotate(-45deg) scale(1.1);
}

.reset-task-btn-icon:active {
    transform: rotate(-45deg) scale(0.95);
}

/* ==================== NAVIGATION ==================== */
.section-navigation {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
}

.nav-btn {
    flex: 1;
    padding: 0.75rem;
    background-color: var(--accent-coral);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-btn:hover:not(:disabled) {
    background-color: var(--accent-red);
    transform: translateY(-2px);
}

.nav-btn:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.5;
}

/* ==================== CONTROLS ==================== */
.controls {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 1rem;
}

.control-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.control-btn:hover {
    background: var(--border-color);
    border-color: var(--accent-red);
}

.home-btn:hover {
    background: var(--accent-coral);
    color: var(--bg-terminal);
    border-color: var(--accent-coral);
}

.clear-btn:hover {
    background: var(--text-warning);
    color: var(--bg-terminal);
    border-color: var(--text-warning);
}

.reset-btn:hover {
    background: var(--text-error);
    color: var(--bg-terminal);
    border-color: var(--text-error);
}

.reset-danger-btn:hover {
    background: #cc0000;
    color: var(--bg-terminal);
    border-color: #cc0000;
}

/* Ko-fi Button Styles */
.kofi-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    text-decoration: none;
    border-color: #FF5E5B;
    color: #FF5E5B;
    font-size: 0.85rem;
    padding: 0.5rem;
    white-space: nowrap;
}

.kofi-btn:hover {
    background-color: #FF5E5B;
    border-color: #FF5E5B;
    color: #ffffff;
    text-decoration: none;
}

.kofi-icon-small {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* ==================== RIGHT PANEL - TERMINAL ==================== */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-terminal);
}

.terminal-header {
    padding: 1rem 1.5rem;
    background-color: var(--bg-panel);
    border-bottom: 2px solid var(--accent-red);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Terminal Title with Logo and Badge */
.terminal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.redhat-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.os-badge {
    background: var(--accent-orange);
    color: var(--bg-terminal);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
}

.terminal-title-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.terminal-logo {
    height: 32px;
    width: 32px;
    object-fit: contain;
}

.terminal-text {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: var(--accent-red);
    font-weight: bold;
}



/* Terminal Header Actions Container */
.terminal-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Ko-fi Icon in Terminal Header */
.kofi-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.4rem 0.6rem;
    background-color: transparent;
    color: #FF5E5B;
    border: 1px solid #FF5E5B;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.kofi-icon-link:hover {
    background-color: #FF5E5B;
    color: #ffffff;
    transform: scale(1.05);
}

.kofi-icon-tiny {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.header-status {
    color: var(--accent-red);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    margin: 0 1rem;
}

.header-status.visible {
    opacity: 1;
}

/* ==================== TERMINAL CONTENT ==================== */
.terminal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem 2.5rem;
    overflow-y: auto;
    min-height: 0;
}

/* ==================== COMMAND HISTORY ==================== */
.command-history {
    flex: 0 0 auto;
    margin-bottom: 0;
    font-family: 'Courier New', monospace;
    padding: 0.5rem 0;
}

.history-entry {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(64, 64, 64, 0.2);
    position: relative;
    margin-bottom: 0.75rem;
}

.history-entry:last-child {
    border-bottom: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.history-command-line {
    display: flex;
    align-items: baseline;
    margin-bottom: 0;
    font-family: 'Courier New', monospace;
    position: relative;
    cursor: default;
}

.history-prompt {
    color: var(--accent-red);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    flex-shrink: 0;
}

.history-command {
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    word-break: break-word;
    margin-left: 0.5rem;
}

.history-output {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--accent-coral);
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

.grep-highlight {
    background-color: rgba(255, 107, 53, 0.4);
    color: var(--accent-red);
    font-weight: bold;
    padding: 0 2px;
    border-radius: 2px;
}

.history-result {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.375rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
}

.history-result::before {
    content: '';
    flex-shrink: 0;
}

.history-result.success {
    color: var(--text-success);
    background-color: rgba(74, 222, 128, 0.12);
    border-left: 3px solid var(--text-success);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

/* Success icon - checkmark in circle */
.history-result.success::before {
    content: '✓';
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--text-success);
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    color: var(--text-success);
}

.history-result.error {
    color: #ffffff;
    background-color: rgba(248, 113, 113, 0.98);
    border: 2px solid var(--text-error);
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    white-space: nowrap;
}

/* Error icon - exclamation mark in circle */
.history-result.error::before {
    content: '!';
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
}

/* Show error on hover over command line */
.history-entry.has-error .history-command-line:hover .history-result.error {
    opacity: 1;
    visibility: visible;
}

.history-result.hint {
    color: var(--text-warning);
    background-color: rgba(251, 191, 36, 0.12);
    border-left: 3px solid var(--text-warning);
}

/* Hint icon - lightbulb */
.history-result.hint::before {
    content: '';
    width: 10px;
    height: 12px;
    border: 2px solid var(--text-warning);
    border-radius: 50% 50% 0 0;
    position: relative;
    display: block;
}

.history-result.hint::after {
    content: '';
    position: absolute;
    left: 0.75rem;
    width: 8px;
    height: 3px;
    background-color: var(--text-warning);
    margin-top: -3px;
}

.history-result.explanation {
    color: var(--accent-coral);
    background-color: rgba(255, 136, 102, 0.12);
    border-left: 3px solid var(--accent-coral);
}

/* Explanation icon - book/document */
.history-result.explanation::before {
    content: '?';
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-coral);
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    color: var(--accent-coral);
}

.history-result.info {
    color: var(--text-secondary);
    background-color: rgba(160, 160, 160, 0.08);
    border-left: 3px solid var(--text-secondary);
    font-style: italic;
}

/* Info icon - i in circle */
.history-result.info::before {
    content: 'i';
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--text-secondary);
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    font-style: normal;
    color: var(--text-secondary);
}

.history-help {
    display: block;
    margin-top: 0.375rem;
    padding: 0.75rem 1rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--text-secondary);
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.history-result-container {
    margin-top: 0.375rem;
}

.history-result.toggleable {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.toggle-explanation-btn {
    padding: 0.25rem 0.6rem;
    background-color: var(--accent-coral);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

.toggle-explanation-btn:hover {
    background-color: var(--accent-red);
    transform: scale(1.05);
}

.toggle-explanation-btn:active {
    transform: scale(0.95);
}

.explanation-detail {
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 136, 102, 0.12);
    border-left: 3px solid var(--accent-coral);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: slideDown 0.3s ease;
}

.explanation-detail.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== TERMINAL INPUT LINE ==================== */
.terminal-input-line {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    margin-top: 0.25rem;
    flex-shrink: 0;
    font-family: 'Courier New', monospace;
}

.terminal-prompt {
    color: var(--accent-red);
    font-weight: bold;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    margin-right: 0.5rem;
}

.terminal-input {
    flex: 1;
    background-color: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    outline: none;
    padding: 0;
    margin: 0;
    line-height: 1.5;
}

.terminal-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.terminal-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.terminal-hint-info {
    margin-top: 0.5rem;
    padding: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    text-align: center;
    opacity: 0.6;
    font-style: italic;
}

/* ==================== SCROLLBAR STYLING ==================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }

    .left-panel {
        width: 100%;
        max-height: 40vh;
        border-right: none;
        border-bottom: 2px solid var(--border-color);
    }

    .right-panel {
        height: 60vh;
    }
}

@media (max-width: 768px) {
    .section-header h1 {
        font-size: 1.2rem;
    }

    .stats {
        flex-direction: column;
        gap: 0.5rem;
    }

    .section-navigation {
        flex-direction: column;
    }

    .controls {
        flex-direction: column;
    }

    .input-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .submit-btn,
    .hint-btn {
        width: 100%;
    }
    
    .prompt {
        width: 100%;
    }
}

/* ==================== UTILITY CLASSES ==================== */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ==================== LANDING PAGE ==================== */
.landing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(12, 12, 12, 0.98) 0%, rgba(26, 26, 26, 0.98) 100%);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease;
}

.landing-overlay.hidden {
    display: none;
}

.landing-content {
    width: 90%;
    max-width: 750px;
    max-height: 95vh;
    overflow-y: auto;
    padding: 25px 30px;
    background: var(--bg-panel);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    box-shadow: 0 10px 40px var(--shadow);
}

.landing-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.landing-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 8px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.landing-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.2;
}

.landing-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 3px;
}

/* Ko-fi Link on Landing Page */
.kofi-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    margin-top: 0.75rem;
    background-color: #FF5E5B;
    color: #ffffff;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255, 94, 91, 0.25);
}

.kofi-link:hover {
    background-color: #ff4542;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(255, 94, 91, 0.35);
    text-decoration: none;
    color: #ffffff;
}

.kofi-icon {
    width: 16px;
    height: 16px;
}

.landing-options {
    width: 100%;
}

.practice-mode-section h2 {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-align: center;
}

.practice-mode-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    margin-bottom: 10px;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.practice-mode-btn:hover {
    border-color: var(--text-primary);
    background: rgba(255, 102, 102, 0.05);
    transform: translateX(5px);
}

.practice-mode-btn.primary {
    border-color: var(--text-primary);
    background: rgba(255, 102, 102, 0.1);
}

.practice-mode-btn.primary:hover {
    background: rgba(255, 102, 102, 0.15);
    box-shadow: 0 5px 20px rgba(255, 102, 102, 0.2);
}

.btn-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    color: var(--text-primary);
}

.btn-text {
    flex: 1;
}

.btn-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.btn-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Chapter Selection */
.chapter-selection {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.chapter-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.chapter-selection-header h2 {
    font-size: 1.3rem;
    color: var(--text-secondary);
}

.back-btn {
    padding: 8px 18px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.back-btn:hover {
    border-color: var(--text-primary);
    background: rgba(255, 102, 102, 0.1);
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.chapter-card {
    padding: 16px;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.chapter-card:hover {
    border-color: var(--text-primary);
    background: rgba(255, 102, 102, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 102, 102, 0.1);
}

.chapter-number {
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chapter-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.chapter-description {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin-bottom: 10px;
}

.chapter-stats {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chapter-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.chapter-stat strong {
    color: var(--text-primary);
}

/* Responsive Landing Page */
@media (max-width: 768px) {
    .landing-content {
        padding: 20px;
        width: 95%;
    }
    
    .landing-title {
        font-size: 1.6rem;
    }
    
    .landing-logo {
        width: 60px;
        height: 60px;
    }
    
    .practice-mode-btn {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    
    .chapter-grid {
        grid-template-columns: 1fr;
    }
}
