:root {
    /* Color Palette - Deep Cosmos & Neon Accents */
    --bg-dark: #020617;
    --bg-panel: rgba(255, 255, 255, 0.03);
    --bg-glass: rgba(15, 23, 42, 0.6);
    --border-glass: rgba(255, 255, 255, 0.08);

    --primary: #38bdf8;
    /* Sky Blue */
    --secondary: #c084fc;
    /* Purple */
    --accent: #f472b6;
    /* Pink */
    --success: #4ade80;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    /* Typography */
    --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-math: 'KaTeX_Main', 'Toimes New Roman', serif;

    /* Spacing & Radius */
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(192, 132, 252, 0.1) 0%, transparent 40%);
    color: var(--text-main);
    font-family: var(--font-ui);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Layout */
#app {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
#sidebar {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glass);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow-y: auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.05em;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-glass);
}

.nav-group h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.95rem;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-item.active {
    border-left: 3px solid var(--primary);
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.1), transparent);
}

/* Main Content */
#content {
    padding: 3rem;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.hero-section {
    max-width: 800px;
    animation: fadeIn 0.5s ease-out;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 600px;
}

/* Glass Panels */
.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 1rem;
    margin-top: 2rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Problem Cards */
.problem-card {
    transition: border-color 0.3s;
}

.problem-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-glass);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: bold;
}

.badge-diff-1 {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.badge-diff-2 {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

.badge-diff-3 {
    background: rgba(250, 204, 21, 0.2);
    color: #facc15;
}

.badge-diff-4 {
    background: rgba(244, 114, 182, 0.2);
    color: #f472b6;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.option-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 1rem;
    border-radius: var(--radius-md);
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.option-btn.correct {
    background: rgba(74, 222, 128, 0.2);
    border-color: #4ade80;
}

.option-btn.wrong {
    background: rgba(248, 113, 113, 0.2);
    border-color: #f87171;
}

.short-answer-box {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.short-answer-box input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    color: white;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    flex: 1;
}

.btn-check {
    background: var(--primary);
    color: black;
    border: none;
    padding: 0 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: bold;
    cursor: pointer;
}

.explanation {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.hidden {
    display: none;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}