/* Modern Learning Platform Design */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #0f172a;
    --text-main: #1e293b;
    --text-light: #64748b;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --code-bg: #1e1e1e;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: relative;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2.5rem;
}

.brand i {
    font-size: 1.8rem;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.nav-item:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

.nav-item.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.nav-item i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

/* User Profile (Bottom Sidebar) */
.user-profile {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 1.5rem 3rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
}

.header-title h1 {
    font-size: 1.5rem;
    color: var(--secondary);
}

.header-title p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar-bg {
    width: 150px;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--success);
    width: 35%;
    /* Dynamic */
    border-radius: 4px;
}

/* Level Tabs */
.level-tabs {
    display: flex;
    gap: 1rem;
    padding: 0 3rem;
    margin-top: 2rem;
    border-bottom: 1px solid var(--border);
}

.tab {
    padding: 1rem 1.5rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    font-weight: 600;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px 3px 0 0;
}

/* Content Area */
.content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 3rem;
    scroll-behavior: smooth;
    transition: opacity 0.2s ease;
}

.lesson-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.lesson-title {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.lesson-meta {
    display: flex;
    gap: 1rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-beginner {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-intermediate {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-advanced {
    background-color: #fce7f3;
    color: #9d174d;
}

.lesson-content {
    line-height: 1.7;
    color: var(--text-light);
}

.lesson-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.lesson-content ul,
.lesson-content ol {
    list-style-position: inside;
    margin-left: 1rem;
    margin-bottom: 1rem;
}

.lesson-content ol {
    list-style-type: decimal;
}

/* Code Snippets */
pre {
    background-color: var(--code-bg);
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--radius);
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    margin: 1.5rem 0;
    position: relative;
    border: 1px solid #333;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Syntax Highlighting (Simulated) */
.token.keyword {
    color: #c678dd;
}

.token.function {
    color: #61afef;
}

.token.string {
    color: #98c379;
}

.token.comment {
    color: #5c6370;
    font-style: italic;
}

.token.number {
    color: #d19a66;
}

/* Interactive Elements */
.action-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}