:root {
    --primary: #4F46E5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #EC4899;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #0f172a;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; color: var(--primary); margin-top: 2rem; }
h3 { font-size: 1.25rem; margin-top: 1.5rem; }

a { color: var(--primary); text-decoration: none; transition: 0.2s; }
a:hover { color: var(--secondary); }

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--gray);
}
.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: white;
    padding: 4rem 0 6rem;
    text-align: center;
    border-radius: 0 0 3rem 3rem;
    margin-bottom: 3rem;
}

.hero h1 { color: white; margin-bottom: 1rem; }
.hero p { opacity: 0.9; font-size: 1.2rem; max-width: 600px; margin: 0 auto; }

/* Cards Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: -3rem;
}

.card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
    border: 1px solid #e2e8f0;
}

.card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.card.student .card-icon { background: #e0e7ff; color: #4338ca; }
.card.teacher .card-icon { background: #fce7f3; color: #be185d; }
.card.school .card-icon { background: #dcfce7; color: #15803d; }

.btn-link {
    display: inline-block;
    margin-top: 1.5rem;
    font-weight: 600;
}

/* Documentation Content Page */
.doc-layout {
    display: flex;
    gap: 3rem;
    padding: 2rem 0;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 6rem;
    height: fit-content;
}

.sidebar-menu {
    list-style: none;
    border-left: 2px solid #e2e8f0;
}

.sidebar-menu li a {
    display: block;
    padding: 0.5rem 1.5rem;
    color: var(--gray);
    font-size: 0.95rem;
    border-left: 2px solid transparent;
    margin-left: -2px;
}

.sidebar-menu li a:hover, .sidebar-menu li a.active {
    color: var(--primary);
    border-left-color: var(--primary);
    background: linear-gradient(90deg, #f1f5f9 0%, transparent 100%);
}

.content {
    flex: 1;
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.feature-block {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary);
}

.pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}
.pill.pro { background: #4F46E5; color: white; }
.pill.free { background: #10b981; color: white; }

footer {
    text-align: center;
    padding: 3rem 0;
    color: var(--gray);
    margin-top: 4rem;
    border-top: 1px solid #e2e8f0;
}

/* Responsive */
@media (max-width: 768px) {
    .doc-layout { flex-direction: column; }
    .sidebar { width: 100%; position: relative; top: 0; margin-bottom: 2rem; }
    .content { padding: 1.5rem; }
}

/* --- Premium Mastery Components --- */

.doc-divider {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 3rem 0;
}

.lead {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 2rem;
}

.alert {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    align-items: flex-start;
}
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-warning { background: #fffbeb; border: 1px solid #fef3c7; color: #92400e; }
.alert i { font-size: 1.25rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.premium-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}
.premium-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.premium-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
}

.pro-tip {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    gap: 1.25rem;
    margin: 2rem 0;
}
.pro-tip i { font-size: 1.5rem; color: #16a34a; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}
.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}
.data-table th { background: #f8fafc; font-weight: 600; color: var(--gray); }

.mistake-matrix {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 2rem 0;
}
.mistake-matrix h4 { color: #be185d; }

.info-box {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    border-radius: 0.75rem;
}
.info-box h5 { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }

.academy-box {
    background: #fdf2f8;
    border: 1px solid #fbcfe8;
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.academy-benefit {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.academy-benefit i {
    background: white;
    color: #be185d;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.text-success { color: #10b981; }
.text-warning { color: #f59e0b; }
.text-danger { color: #ef4444; }

@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
