/* Shared Course Styles - Glassmorphic Theme */
:root {
    --primary: #0284C7;
    --primary-dark: #0369A1;
    --accent: #8B5CF6;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --glass: rgba(15, 23, 42, 0.8);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.7);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: rgba(0, 0, 0, 0.1);
    --glass: rgba(255, 255, 255, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    transition: background-color 0.3s;
    line-height: 1.6;
}

.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 280px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    padding: 2rem;
    overflow-y: auto;
    transition: var(--transition);
}

.sidebar h2 {
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: 2rem;
    font-size: 1.5rem;
    text-align: center;
}

.nav-item {
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(2, 132, 199, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.mode-btn {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: var(--transition);
}

.mode-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.main {
    flex: 1;
    padding: 3rem;
    overflow-y: auto;
    scroll-behavior: smooth;
    background: radial-gradient(circle at top right, rgba(2, 132, 199, 0.05), transparent);
}

.section {
    max-width: 900px;
    margin: 0 auto 3rem;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section h2 {
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.code-box {
    background: #0f172a;
    color: #38bdf8;
    padding: 1.5rem;
    border-radius: 16px;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
    position: relative;
    overflow-x: auto;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.code-box::before {
    content: 'CODE';
    position: absolute;
    top: 0;
    right: 1.5rem;
    font-size: 0.7rem;
    color: rgba(56, 189, 248, 0.4);
    font-weight: 800;
}

.live-output {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: #22c55e;
}

#hamburger {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 1000;
    width: 45px;
    height: 45px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

@media(max-width: 768px) {
    #hamburger { display: flex; }
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100%;
        z-index: 999;
    }
    .sidebar.active { left: 0; }
    .main { padding: 1.5rem; padding-top: 5rem; }
    .section { padding: 1.5rem; }
}
