/* DevOps Learning Tool - Dark Theme CSS */

:root {
    /* Dracula-inspired color palette */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-elevated: #30363d;
    
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    
    --accent-cyan: #58a6ff;
    --accent-green: #3fb950;
    --accent-yellow: #d29922;
    --accent-orange: #f78166;
    --accent-purple: #a371f7;
    --accent-pink: #f778ba;
    
    --border-default: #30363d;
    --border-muted: #21262d;
    
    --status-done: #238636;
    --status-partial: #9e6a03;
    --status-next: #58a6ff;
    --status-pending: #484f58;
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    
    --sidebar-width: 260px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ====================== */
/* Mobile-First Base Styles */
/* ====================== */

/* Mobile Menu Toggle - visible by default on mobile */
.mobile-menu-toggle {
    display: flex;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 10px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mobile-menu-toggle:hover {
    background: var(--bg-tertiary);
    transform: scale(1.05);
}

.mobile-menu-toggle.active {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.hamburger-line {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Sidebar Backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 140;
    backdrop-filter: blur(2px);
}

.sidebar-backdrop.visible {
    display: block;
}

/* Sidebar - hidden off-screen on mobile by default */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-default);
    padding: 1.5rem;
    position: fixed;
    top: 0;
    left: -100%;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 150;
    transition: left var(--transition-normal);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
}

.sidebar.open {
    left: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-default);
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--accent-cyan);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.logo-text .accent {
    color: var(--accent-cyan);
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--bg-tertiary);
    color: var(--accent-cyan);
}

.nav-link.current-lesson {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.15), rgba(163, 113, 247, 0.1));
    border: 1px solid rgba(88, 166, 255, 0.3);
    color: var(--accent-cyan);
}

.nav-icon {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ====================== */
/* Expandable Weeks Navigation */
/* ====================== */

.nav-weeks {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.weeks-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.week-nav-item {
    border-radius: 6px;
    overflow: hidden;
}

.week-nav-item.has-current .week-nav-header {
    background: rgba(88, 166, 255, 0.1);
    border-color: rgba(88, 166, 255, 0.3);
}

.week-nav-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.625rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.week-nav-header:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.week-expand-icon {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
    flex-shrink: 0;
}

.week-nav-item.expanded .week-expand-icon {
    transform: rotate(90deg);
}

.week-nav-number {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--accent-cyan);
    background: var(--bg-tertiary);
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    flex-shrink: 0;
}

.week-nav-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
}

.week-nav-progress {
    width: 24px;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}

.week-nav-progress::after {
    content: '';
    display: block;
    width: var(--progress);
    height: 100%;
    background: var(--accent-green);
    border-radius: 2px;
    transition: width var(--transition-normal);
}

.week-nav-lessons {
    display: none;
    flex-direction: column;
    padding: 0.25rem 0 0.5rem 1.25rem;
    margin-left: 0.5rem;
    border-left: 1px solid var(--border-default);
}

.week-nav-item.expanded .week-nav-lessons {
    display: flex;
}

.lesson-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.lesson-nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.lesson-nav-link.is-current {
    background: rgba(88, 166, 255, 0.15);
    color: var(--accent-cyan);
    border-left: 2px solid var(--accent-cyan);
    margin-left: -1px;
}

.lesson-nav-day {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.65rem;
    min-width: 18px;
    text-align: center;
    color: var(--text-muted);
}

.lesson-nav-link.is-current .lesson-nav-day {
    color: var(--accent-cyan);
}

.lesson-nav-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lesson-nav-status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.lesson-nav-link.status-done .lesson-nav-status {
    background: var(--accent-green);
}

.lesson-nav-link.status-partial .lesson-nav-status {
    background: var(--accent-yellow);
}

.lesson-nav-link.status-next .lesson-nav-status {
    background: var(--accent-cyan);
    animation: pulse 2s infinite;
}

.lesson-nav-link.status-pending .lesson-nav-status {
    background: var(--bg-elevated);
}

.principles {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-default);
    flex-shrink: 0;
}

.principles-list {
    list-style: none;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.principles-list li {
    padding: 0.375rem 0;
    padding-left: 1rem;
    position: relative;
}

.principles-list li::before {
    content: "›";
    position: absolute;
    left: 0;
    color: var(--accent-purple);
}

/* Main Content - mobile first */
.content {
    flex: 1;
    margin-left: 0;
    padding: 1rem;
    padding-top: 5rem; /* Space for mobile menu button */
    width: 100%;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Progress Overview */
.progress-overview {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    min-width: 100px;
}

.stat-card.current {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.1), rgba(163, 113, 247, 0.05));
    border-color: rgba(88, 166, 255, 0.3);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Week Cards */
.weeks-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.week-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    overflow: hidden;
}

.week-card.has-progress {
    border-color: rgba(63, 185, 80, 0.3);
}

.week-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-default);
}

.week-title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.week-number {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-cyan);
}

.week-title h2 {
    font-size: 1.1rem;
    font-weight: 500;
}

.week-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.progress-bar {
    width: 120px;
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan));
    border-radius: 3px;
    transition: width var(--transition-normal);
}

.progress-text {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    min-width: 40px;
}

/* Days Grid */
/* Days Grid - mobile first (2 cols) */
.days-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 1rem;
}

.day-card {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    position: relative;
    min-height: 80px;
}

.day-card:hover {
    background: var(--bg-elevated);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.day-card.is-current {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 1px var(--accent-cyan), 0 0 20px rgba(88, 166, 255, 0.15);
}

.day-card.is-project {
    background: linear-gradient(135deg, rgba(163, 113, 247, 0.1), rgba(247, 120, 186, 0.05));
}

.day-card.status-done {
    border-left: 3px solid var(--status-done);
}

.day-card.status-partial {
    border-left: 3px solid var(--status-partial);
}

.day-card.status-next {
    border-left: 3px solid var(--status-next);
}

.day-number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.day-title {
    font-size: 0.8rem;
    line-height: 1.3;
    flex: 1;
}

.project-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.35rem;
    background: var(--accent-purple);
    color: white;
    border-radius: 3px;
}

.day-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0.5rem;
}

.status-done .day-status-indicator {
    background: var(--status-done);
}

.status-partial .day-status-indicator {
    background: var(--status-partial);
}

.status-next .day-status-indicator {
    background: var(--status-next);
    animation: pulse 2s infinite;
}

.status-pending .day-status-indicator {
    background: var(--status-pending);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Lesson Page Styles */
.lesson-header {
    margin-bottom: 2rem;
}

.lesson-breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.lesson-breadcrumb a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.lesson-breadcrumb a:hover {
    text-decoration: underline;
}

.separator {
    margin: 0 0.5rem;
    color: var(--text-muted);
}

.lesson-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.day-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: 4px;
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
}

.day-badge.project {
    background: linear-gradient(135deg, rgba(163, 113, 247, 0.2), rgba(247, 120, 186, 0.1));
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

.lesson-info h1 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.lesson-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.85rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-done .status-dot { background: var(--status-done); }
.status-partial .status-dot { background: var(--status-partial); }
.status-pending .status-dot { background: var(--status-pending); }

/* Lesson Sections */
.lesson-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.lesson-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 1.5rem;
}

.lesson-section h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-icon {
    font-size: 1rem;
    opacity: 0.8;
}

.goal-section .section-icon { color: var(--accent-yellow); }
.why-section .section-icon { color: var(--accent-orange); }
.tasks-section .section-icon { color: var(--accent-cyan); }
.commands-section .section-icon { color: var(--accent-green); }
.tips-section .section-icon { color: var(--accent-pink); }
.checklist-section .section-icon { color: var(--accent-purple); }
.output-section .section-icon { color: var(--accent-cyan); }

.goal-box, .why-box, .output-box {
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border-left: 3px solid var(--accent-cyan);
    color: var(--text-secondary);
    line-height: 1.7;
}

.why-box {
    border-left-color: var(--accent-orange);
}

/* Tasks */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.task-item:hover {
    background: var(--bg-elevated);
}

.task-checkbox {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.task-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.task-checkbox .checkmark {
    display: block;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-default);
    border-radius: 4px;
    background: var(--bg-secondary);
    transition: all var(--transition-fast);
}

.task-checkbox input:checked + .checkmark {
    background: var(--accent-green);
    border-color: var(--accent-green);
}

.task-checkbox input:checked + .checkmark::after {
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.task-content {
    flex: 1;
}

.task-text {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.task-detail {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.task-detail code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    padding: 0.15rem 0.4rem;
    background: var(--bg-primary);
    border-radius: 4px;
    color: var(--accent-cyan);
}

/* Commands */
.commands-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.command-block {
    background: var(--bg-tertiary);
    border-radius: 8px;
    overflow: hidden;
}

.command-description {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-default);
}

.command-code {
    position: relative;
    background: var(--bg-primary);
}

.command-code pre {
    padding: 1rem;
    overflow-x: auto;
    margin: 0;
}

.command-code code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-green);
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.copy-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.copy-btn.copied {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: white;
}

.command-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(210, 153, 34, 0.1);
    border-top: 1px solid rgba(210, 153, 34, 0.3);
    font-size: 0.85rem;
    color: var(--accent-yellow);
}

.warning-icon {
    font-size: 1rem;
}

/* Tips */
.tips-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tips-list li {
    padding: 0.75rem 1rem;
    padding-left: 2rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    position: relative;
    color: var(--text-secondary);
}

.tips-list li::before {
    content: "💡";
    position: absolute;
    left: 0.75rem;
    font-size: 0.9rem;
}

/* Checklist */
.checklist {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.checklist-item:hover {
    background: var(--bg-elevated);
}

.checklist-item input {
    position: absolute;
    opacity: 0;
}

.checklist-item .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-default);
    border-radius: 50%;
    background: var(--bg-secondary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.checklist-item input:checked + .checkmark {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
}

.checklist-item input:checked + .checkmark::after {
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
}

/* Lesson Actions */
.lesson-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-default);
}

.nav-buttons, .progress-buttons {
    display: flex;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font-sans);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.btn-partial {
    background: rgba(158, 106, 3, 0.15);
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

.btn-partial:hover {
    background: rgba(158, 106, 3, 0.25);
}

.btn-complete {
    background: linear-gradient(135deg, var(--accent-green), #2ea043);
    border-color: var(--accent-green);
    color: white;
}

.btn-complete:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* ====================== */
/* MOBILE-FIRST RESPONSIVE */
/* ====================== */

/* Base mobile styles already defined above */

/* Small tablets (>= 600px) */
@media (min-width: 600px) {
    .content {
        padding: 1.5rem;
    }
    
    .days-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .lesson-title-row {
        flex-direction: row;
    }
}

/* Tablets (>= 768px) */
@media (min-width: 768px) {
    .content {
        padding: 2rem;
    }
    
    .days-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .lesson-actions {
        flex-direction: row;
    }
}

/* Desktop (>= 992px) - Show sidebar */
@media (min-width: 992px) {
    .mobile-menu-toggle {
        display: none;
    }
    
    .sidebar {
        left: 0;
        box-shadow: none;
    }
    
    .content {
        margin-left: var(--sidebar-width);
        padding: 2rem 3rem;
        padding-top: 2rem;
        width: calc(100% - var(--sidebar-width));
    }
    
    .days-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Large desktop (>= 1200px) */
@media (min-width: 1200px) {
    .days-grid {
        grid-template-columns: repeat(7, 1fr);
    }
}

/* Quiz Section */
.quiz-section {
    border-color: var(--accent-purple);
    background: linear-gradient(135deg, var(--bg-secondary), rgba(163, 113, 247, 0.05));
}

.quiz-section .section-icon {
    color: var(--accent-purple);
}

.quiz-intro {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.quiz-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quiz-question {
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid var(--border-default);
    transition: all var(--transition-fast);
}

.quiz-question.answered-correct {
    border-color: var(--accent-green);
    background: linear-gradient(135deg, var(--bg-tertiary), rgba(63, 185, 80, 0.1));
}

.quiz-question.answered-wrong {
    border-color: var(--accent-orange);
    background: linear-gradient(135deg, var(--bg-tertiary), rgba(247, 129, 102, 0.1));
}

.question-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.question-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--accent-purple);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 8px;
    flex-shrink: 0;
}

.question-text {
    font-weight: 500;
    line-height: 1.5;
    padding-top: 0.25rem;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-left: 2.5rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.quiz-option:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-cyan);
}

.quiz-option input {
    position: absolute;
    opacity: 0;
}

.option-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-default);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.quiz-option input:checked + .option-marker {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: white;
}

.option-text {
    flex: 1;
    color: var(--text-secondary);
}

.quiz-option input:checked ~ .option-text {
    color: var(--text-primary);
}

.option-result {
    font-size: 1.1rem;
    display: none;
}

.quiz-option.correct .option-marker {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: white;
}

.quiz-option.correct .option-result {
    display: block;
}

.quiz-option.correct .option-result::after {
    content: "✓";
    color: var(--accent-green);
}

.quiz-option.wrong .option-marker {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
    color: white;
}

.quiz-option.wrong .option-result {
    display: block;
}

.quiz-option.wrong .option-result::after {
    content: "✗";
    color: var(--accent-orange);
}

.quiz-option.show-correct .option-marker {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: white;
}

.question-explanation {
    margin-top: 1rem;
    margin-left: 2.5rem;
    padding: 1rem;
    background: rgba(88, 166, 255, 0.1);
    border-left: 3px solid var(--accent-cyan);
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.question-explanation strong {
    color: var(--accent-cyan);
}

.quiz-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.btn-quiz-submit {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    border: none;
    color: white;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
}

.btn-quiz-submit:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(163, 113, 247, 0.3);
}

.btn-quiz-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-quiz-reset {
    background: var(--bg-tertiary);
    border-color: var(--border-default);
    color: var(--text-secondary);
}

.btn-quiz-reset:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.quiz-results {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    text-align: center;
}

.results-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.score-value {
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent-green);
}

.score-total {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.results-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.results-message.excellent {
    color: var(--accent-green);
}

.results-message.good {
    color: var(--accent-cyan);
}

.results-message.needs-work {
    color: var(--accent-yellow);
}

/* Subtask Sections */
.subtask-section {
    border: 1px solid var(--border-default);
    border-left: 4px solid var(--accent-cyan);
    margin-bottom: 1rem;
}

.subtask-section:nth-child(odd) {
    border-left-color: var(--accent-purple);
}

.subtask-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-default);
    margin-bottom: 1rem;
}

.subtask-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 10px;
    flex-shrink: 0;
}

.subtask-info {
    flex: 1;
}

.subtask-info h2 {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.subtask-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.subtask-checkbox {
    position: relative;
    cursor: pointer;
}

.subtask-checkbox input {
    position: absolute;
    opacity: 0;
}

.subtask-checkbox .checkmark {
    display: block;
    width: 28px;
    height: 28px;
    border: 2px solid var(--border-default);
    border-radius: 50%;
    background: var(--bg-secondary);
    transition: all var(--transition-fast);
}

.subtask-checkbox input:checked + .checkmark {
    background: var(--accent-green);
    border-color: var(--accent-green);
}

.subtask-checkbox input:checked + .checkmark::after {
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
}

.subtask-objective {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    border-left: 3px solid var(--accent-yellow);
}

/* Steps List */
.subtask-steps h3,
.subtask-deep-dive h3,
.subtask-exercise h3,
.subtask-concepts h3 {
    font-size: 1rem;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.steps-list {
    list-style: none;
    counter-reset: step-counter;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.step-item {
    counter-increment: step-counter;
    position: relative;
    padding-left: 3rem;
}

.step-item::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
}

.step-content {
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.step-content strong {
    color: var(--text-primary);
}

.step-content code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    padding: 0.15rem 0.4rem;
    background: var(--bg-primary);
    border-radius: 4px;
    color: var(--accent-cyan);
}

.step-code {
    position: relative;
    background: var(--bg-primary);
    border-radius: 8px;
    margin: 0.75rem 0;
}

.step-code pre {
    padding: 1rem;
    overflow-x: auto;
    margin: 0;
}

.step-code code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-green);
}

.step-expected {
    padding: 0.75rem 1rem;
    background: rgba(63, 185, 80, 0.1);
    border-left: 3px solid var(--accent-green);
    border-radius: 0 6px 6px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.step-expected strong {
    color: var(--accent-green);
}

.step-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(210, 153, 34, 0.1);
    border-left: 3px solid var(--accent-yellow);
    border-radius: 0 6px 6px 0;
    font-size: 0.9rem;
    color: var(--accent-yellow);
    margin-top: 0.5rem;
}

/* Deep Dive */
.subtask-deep-dive {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.deep-dive-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.deep-dive-content p {
    margin-bottom: 1rem;
}

.deep-dive-content ul, .deep-dive-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.deep-dive-content li {
    margin-bottom: 0.5rem;
}

/* Exercise */
.subtask-exercise {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(163, 113, 247, 0.1), rgba(247, 120, 186, 0.05));
    border: 1px solid rgba(163, 113, 247, 0.3);
    border-radius: 10px;
}

.exercise-prompt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.exercise-hints, .exercise-solution {
    margin-top: 1rem;
}

.exercise-hints summary, .exercise-solution summary {
    cursor: pointer;
    font-weight: 500;
    color: var(--accent-purple);
    padding: 0.5rem 0;
}

.exercise-hints summary:hover, .exercise-solution summary:hover {
    color: var(--accent-pink);
}

.exercise-hints ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-top: 0.75rem;
    color: var(--text-secondary);
}

.exercise-hints li {
    margin-bottom: 0.5rem;
}

.solution-content {
    margin-top: 0.75rem;
}

.solution-content pre {
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    overflow-x: auto;
}

.solution-content code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-green);
}

/* Key Concepts */
.subtask-concepts {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.concepts-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.concepts-list li {
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    line-height: 1.5;
}

.concepts-list strong {
    color: var(--accent-cyan);
}

/* Subtask progress indicator */
.subtask-section.completed {
    border-left-color: var(--accent-green) !important;
    opacity: 0.85;
}

.subtask-section.completed .subtask-number {
    background: var(--accent-green);
}

/* ====================== */
/* Progress Charts Styles */
/* ====================== */

.charts-section {
    margin-bottom: 2.5rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.chart-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 1.5rem;
}

.chart-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-card h3::before {
    content: "📊";
    font-size: 1.1rem;
}

.chart-container {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container.chart-bar {
    height: 220px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-color.completed { background: var(--accent-green); }
.legend-color.in-progress { background: var(--accent-yellow); }
.legend-color.pending { background: var(--bg-elevated); }

.streak-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(247, 129, 102, 0.15), rgba(210, 153, 34, 0.1));
    border: 1px solid rgba(247, 129, 102, 0.3);
    border-radius: 12px;
    max-width: 200px;
}

.streak-icon {
    font-size: 2rem;
    animation: flicker 1.5s ease-in-out infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.streak-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent-orange);
}

.streak-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ====================== */
/* Lesson Layout with Side Terminal */
/* ====================== */

.lesson-layout {
    display: flex;
    gap: 0;
    position: relative;
}

.lesson-main {
    flex: 1;
    min-width: 0;
    transition: margin-right var(--transition-normal);
}

/* margin-right is now set dynamically via JS based on terminal width */

/* ====================== */
/* Side Terminal Styles */
/* ====================== */

.terminal-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    min-width: 280px;
    max-width: 70vw;
    height: 100vh;
    background: #0a0a0a;
    border-left: 1px solid var(--border-default);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transform: translateX(0);
    transition: transform var(--transition-normal);
}

.terminal-sidebar.collapsed {
    transform: translateX(100%);
}

.terminal-sidebar.resizing {
    transition: none;
    user-select: none;
}

/* Resize Handle */
.terminal-resize-handle {
    position: absolute;
    left: -4px;
    top: 0;
    width: 8px;
    height: 100%;
    cursor: ew-resize;
    background: transparent;
    z-index: 10;
    transition: background var(--transition-fast);
}

.terminal-resize-handle:hover,
.terminal-resize-handle.active {
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}

.terminal-resize-handle::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 40px;
    background: #444;
    border-radius: 2px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.terminal-resize-handle:hover::before,
.terminal-resize-handle.active::before {
    opacity: 1;
    background: var(--accent-cyan);
}

/* Width indicator during resize */
.terminal-sidebar.resizing::after {
    content: attr(data-width);
    position: absolute;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.35rem 0.6rem;
    background: var(--bg-elevated);
    border: 1px solid var(--accent-cyan);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-cyan);
    white-space: nowrap;
    pointer-events: none;
}

.terminal-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #111;
    border-bottom: 1px solid #222;
}

.terminal-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-green);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
}

.terminal-icon {
    font-size: 1rem;
}

.terminal-controls {
    display: flex;
    gap: 0.25rem;
}

.terminal-ctrl-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #333;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.terminal-ctrl-btn:hover {
    background: #222;
    color: var(--text-primary);
    border-color: #444;
}

.collapse-icon {
    display: inline-block;
    transition: transform var(--transition-fast);
}

.terminal-sidebar.collapsed .collapse-icon {
    transform: rotate(180deg);
}

.terminal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    color: #c7c7c7;
    line-height: 1.5;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.terminal-output::-webkit-scrollbar {
    width: 6px;
}

.terminal-output::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.terminal-welcome {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #222;
}

.welcome-text {
    color: var(--accent-green);
    font-weight: 600;
}

.welcome-hint {
    color: #555;
    font-size: 0.8rem;
}

.terminal-line {
    margin: 0.25rem 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.terminal-line.command {
    color: #fff;
}

.terminal-line.command::before {
    content: attr(data-prompt);
    color: var(--accent-green);
    margin-right: 0.5rem;
}

.terminal-line.output {
    color: #c7c7c7;
}

.terminal-line.error {
    color: var(--accent-orange);
}

.terminal-line.success {
    color: var(--accent-green);
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #111;
    border-top: 1px solid #222;
}

.terminal-prompt {
    color: var(--accent-green);
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.85rem;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.terminal-input::placeholder {
    color: #444;
}

/* Terminal Tab (when collapsed) */
.terminal-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 80px;
    background: linear-gradient(180deg, #1a1a1a, #111);
    border: 1px solid #333;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: var(--accent-green);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-fast);
}

.terminal-tab:hover {
    background: linear-gradient(180deg, #222, #1a1a1a);
    width: 42px;
}

.terminal-sidebar.collapsed ~ .terminal-tab {
    opacity: 1;
    pointer-events: auto;
}

/* Charts - mobile first */
.charts-grid {
    grid-template-columns: 1fr;
}

.chart-container {
    height: 180px;
}

.streak-card {
    max-width: 100%;
}

/* Charts on larger screens */
@media (min-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr 2fr;
    }
    
    .chart-container {
        height: 200px;
    }
    
    .streak-card {
        max-width: 200px;
    }
}

/* ====================== */
/* Responsive Design */
/* ====================== */

/* Large screens (default) - terminal pushes content */
@media (min-width: 1201px) {
    .lesson-layout.terminal-open .lesson-main {
        /* Margin is set dynamically by JS */
    }
}

/* Medium screens - terminal overlays with backdrop */
@media (max-width: 1200px) {
    .terminal-sidebar {
        max-width: 420px;
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.6);
    }
    
    /* Add backdrop when terminal is open */
    .lesson-layout.terminal-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 99;
        pointer-events: auto;
    }
    
    .lesson-layout.terminal-open .lesson-main {
        margin-right: 0 !important;
    }
}

/* Smaller screens */
@media (max-width: 1000px) {
    .terminal-sidebar {
        max-width: 380px;
    }
    
    .terminal-resize-handle {
        display: none;
    }
}

/* Terminal on tablets */
@media (max-width: 992px) {
    .terminal-sidebar {
        max-width: 340px;
    }
}

/* Mobile terminal styles */
@media (max-width: 600px) {
    .terminal-sidebar {
        max-width: 100%;
        width: 100% !important;
    }
    
    .terminal-tab {
        bottom: 1rem;
        top: auto;
        transform: none;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        right: 1rem;
        border: 1px solid #333;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 180px;
    }
    
    .streak-card {
        max-width: 100%;
    }
    
    .lesson-section {
        padding: 1rem;
    }
}

/* Vertical/Portrait monitors */
@media (max-aspect-ratio: 1/1) {
    .terminal-sidebar {
        /* On portrait screens, terminal takes less width */
        max-width: min(400px, 45vw);
    }
    
    .lesson-layout.terminal-open .lesson-main {
        margin-right: 0 !important;
    }
}

/* Very tall/narrow screens (vertical monitor) */
@media (max-width: 1400px) and (min-height: 900px) {
    .terminal-sidebar {
        max-width: min(380px, 35vw);
    }
}

/* Ultra-wide screens */
@media (min-width: 1800px) {
    .terminal-sidebar {
        max-width: 500px;
    }
}

/* ====================== */
/* Authentication Styles */
/* ====================== */

/* User Section in Sidebar */
.user-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.logout-btn:hover {
    background: rgba(247, 129, 102, 0.15);
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

/* Auth Container */
.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 2rem;
    gap: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.auth-logo .logo-icon {
    font-size: 1.5rem;
    color: var(--accent-cyan);
}

.auth-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.auth-logo .accent {
    color: var(--accent-cyan);
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 1.5rem;
}

.flash-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.flash-error {
    background: rgba(247, 129, 102, 0.15);
    border: 1px solid rgba(247, 129, 102, 0.3);
    color: var(--accent-orange);
}

.flash-success {
    background: rgba(63, 185, 80, 0.15);
    border: 1px solid rgba(63, 185, 80, 0.3);
    color: var(--accent-green);
}

.flash-info {
    background: rgba(88, 166, 255, 0.15);
    border: 1px solid rgba(88, 166, 255, 0.3);
    color: var(--accent-cyan);
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-cyan);
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border: none;
    color: white;
    font-weight: 600;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(88, 166, 255, 0.3);
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1rem;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-default);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Auth Features */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 420px;
    width: 100%;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.feature-icon {
    font-size: 1.25rem;
}

/* Auth page responsive */
@media (max-width: 600px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-features {
        display: none;
    }
}

/* Auth Page Body */
.auth-body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a1a2e 50%, var(--bg-primary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-main {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
}

/* ====================== */
/* No Terminal Layout */
/* ====================== */

.lesson-layout.no-terminal .lesson-main {
    margin-right: 0 !important;
    width: 100%;
    max-width: 100%;
}

.lesson-layout.no-terminal {
    width: 100%;
}
