:root {
    --bg-base: #0a0c10;
    --bg-surface: #12151c;
    --bg-card: #1a1f29;
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.4);
    --secondary: #06b6d4;
    --accent: #f472b6;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --success: #10b981;
    --error: #ef4444;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px var(--primary-glow);
    }

    50% {
        box-shadow: 0 0 20px var(--primary-glow);
    }

    100% {
        box-shadow: 0 0 5px var(--primary-glow);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

/* UI Premium: Layout Master */
.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr 340px;
    height: 100vh;
}

/* Sidebar: Glassmorphism Ultra */
.sidebar-premium {
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
}

.brand {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 3.5rem;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-group {
    margin-bottom: 2.5rem;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    padding-left: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 4px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), transparent);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

/* Main Content: Modern Dashboard */
.main-view {
    padding: 2rem 3rem;
    overflow-y: auto;
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.05), transparent);
}

.welcome-section {
    margin-bottom: 3rem;
}

.welcome-section h1 {
    font-size: 2.5rem;
    font-weight: 850;
    margin-bottom: 8px;
}

.grid-path {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.phase-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 2.5rem;
    position: relative;
    transition: transform 0.3s;
}

.phase-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.3);
}

.phase-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
}

.phase-info h2 {
    font-size: 1.8rem;
    font-weight: 800;
}

.phase-badge {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}

.lesson-scroll {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.lesson-box {
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    text-decoration: none;
}

.node-pro {
    width: 84px;
    height: 84px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: all 0.4s;
}

.lesson-box:hover .node-pro {
    border-color: var(--primary);
    transform: rotate(5deg) scale(1.05);
    animation: glow 2s infinite;
}

.lesson-box.completed .node-pro {
    background: var(--primary);
    color: white;
}

/* Right Stats Panel */
.stats-panel {
    background: var(--bg-surface);
    border-left: 1px solid var(--border-color);
    padding: 2.5rem 1.5rem;
}

.stat-card-pro {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card-pro h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.xp-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-top: 12px;
}

.xp-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
}