:root {
    --primary-color: #4F46E5; /* Indigo */
    --primary-dark: #3730A3;
    --accent-color: #06B6D4; /* Cyan */
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --success-color: #10b981;
    --error-color: #ef4444;
    
    --sidebar-width: 280px;
    --transition-speed: 0.3s;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-light);
    height: 100vh;
    overflow: hidden;
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: transform var(--transition-speed) ease;
    z-index: 100;
}

.sidebar-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.sidebar-header h1 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    line-height: 1.2;
    font-weight: 700;
}

.nav-menu {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
}

.nav-item.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: radial-gradient(circle at top right, #1e293b 0%, #0f172a 100%);
}

.top-bar {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    background: rgba(15, 23, 42, 0.9);
}

.breadcrumbs {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
}

.content-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 3rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* Typography & Content Styling */
h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

p {
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: #cbd5e1;
}

.welcome-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.welcome-card {
    text-align: center;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.hero-illustration {
    font-size: 5rem;
    color: var(--primary-color);
    margin-top: 1rem;
    opacity: 0.8;
}

/* Buttons */
.btn-primary, .btn-secondary {
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    transition: transform 0.1s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:active {
    transform: scale(0.98);
}

.full-width {
    width: 100%;
}

.menu-toggle {
    display: none; /* Desktop default */
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    margin-right: 1rem;
    cursor: pointer;
}

/* Quiz Overlay */
.quiz-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s;
}

.quiz-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.quiz-container {
    background: var(--bg-card);
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.quiz-header {
    background: var(--primary-dark);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}

.close-quiz-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1.8rem;
    cursor: pointer;
}

.quiz-body {
    padding: 2rem;
    overflow-y: auto;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz-option {
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quiz-option:hover {
    background: rgba(255,255,255,0.1);
}

.quiz-option.selected {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.1);
}

.quiz-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        height: 100%;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .menu-toggle {
        display: block;
    }

    .content-scroll-area {
        padding: 1.5rem;
    }
}
