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

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-bg: rgba(79, 70, 229, 0.1);
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
    --orange: #f97316;
    --orange-bg: rgba(249, 115, 22, 0.1);
    --pink: #ec4899;
    --sidebar-width: 256px;
    --header-height: 60px;
    --bg-body: #f8fafc;
    --bg-card: #fff;
    --bg-sidebar: #1e293b;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-sec: #475569;
    --text-muted: #94a3b8;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --radius: 8px
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-body);
    color: var(--text);
    line-height: 1.5
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

.loader {
    position: fixed;
    inset: 0;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 9999;
    transition: opacity .3s
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .8s linear infinite
}

.loader-text {
    font-size: 1.25rem;
    font-weight: 700
}

.loader-text span {
    color: var(--primary)
}

.toast-box {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999
}

.toast {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 280px;
    padding: 1rem;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--success);
    margin-bottom: .5rem;
    animation: fadeIn .3s
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem
}

.toast-content {
    flex: 1
}

.toast-title {
    font-weight: 600;
    font-size: .875rem
}

.toast-msg {
    font-size: .8rem;
    color: var(--text-sec)
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .625rem 1rem;
    font-family: inherit;
    font-size: .875rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all .15s
}

.btn-primary {
    background: var(--primary);
    color: #fff
}

.btn-primary:hover {
    background: var(--primary-hover)
}

.btn-secondary {
    background: var(--bg-body);
    color: var(--text);
    border: 1px solid var(--border)
}

.btn-sm {
    padding: .375rem .75rem;
    font-size: .8rem
}

.btn-block {
    width: 100%
}

.form-group {
    margin-bottom: 1rem
}

.form-label {
    display: block;
    font-size: .8rem;
    font-weight: 500;
    margin-bottom: .375rem
}

.form-input,
.form-select {
    width: 100%;
    padding: .625rem;
    font-family: inherit;
    font-size: .875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius)
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg)
}

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 400px
}

.auth-side {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 2rem
}

.auth-brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem
}

.auth-brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff
}

.auth-brand-text span {
    color: var(--warning)
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem
}

.auth-desc {
    color: #94a3b8;
    line-height: 1.7
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #fff
}

.auth-form {
    width: 100%;
    max-width: 320px
}

.auth-form h1 {
    font-size: 1.5rem;
    margin-bottom: .5rem
}

.auth-form p {
    color: var(--text-sec);
    margin-bottom: 2rem
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: .875rem;
    color: var(--text-sec)
}

.auth-footer a {
    color: var(--primary);
    cursor: pointer;
    font-weight: 500
}

.app {
    display: none;
    min-height: 100vh
}

.app.active {
    display: flex
}

/* Sidebar styles → static/css/sidebar.css */

.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh
}
/* Header styles → static/css/header.css */

.page {
    flex: 1;
    padding: 1.5rem
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: .25rem
}

.page-subtitle {
    color: var(--text-sec);
    font-size: .9rem;
    margin-bottom: 1.5rem
}

.section {
    display: none
}

.section.active {
    display: block;
    animation: fadeIn .3s
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem
}

.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden
}

.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px
}

.stat-card.blue::before {
    background: var(--primary)
}

.stat-card.green::before {
    background: var(--success)
}

.stat-card.yellow::before {
    background: var(--warning)
}

.stat-card.red::before {
    background: var(--danger)
}

.stat-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: .25rem
}

.stat-card.blue .stat-value {
    color: var(--primary)
}

.stat-card.green .stat-value {
    color: var(--success)
}

.stat-card.yellow .stat-value {
    color: var(--warning)
}

.stat-card.red .stat-value {
    color: var(--danger)
}

.stat-label {
    font-size: .8rem;
    color: var(--text-sec)
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center
}

.stat-card.blue .stat-icon {
    background: var(--primary-bg);
    color: var(--primary)
}

.stat-card.green .stat-icon {
    background: var(--success-bg);
    color: var(--success)
}

.stat-card.yellow .stat-icon {
    background: var(--warning-bg);
    color: var(--warning)
}

.stat-card.red .stat-icon {
    background: var(--danger-bg);
    color: var(--danger)
}

.stat-icon svg {
    width: 22px;
    height: 22px
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow)
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between
}

.card-title {
    font-size: .9rem;
    font-weight: 600
}

.card-body {
    padding: 1.25rem
}

.grid {
    display: grid;
    gap: 1.25rem
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr)
}

.chart-box {
    position: relative;
    height: 280px
}

.table-wrap {
    overflow-x: auto
}

table {
    width: 100%;
    border-collapse: collapse
}

th,
td {
    padding: .75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border)
}

th {
    background: var(--bg-body);
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-sec);
    text-transform: uppercase
}

td {
    font-size: .875rem
}

.badge {
    display: inline-flex;
    padding: .25rem .625rem;
    font-size: .75rem;
    font-weight: 500;
    border-radius: 20px
}

.badge-green {
    background: var(--success-bg);
    color: var(--success)
}

.badge-blue {
    background: var(--primary-bg);
    color: var(--primary)
}

.score {
    display: inline-flex;
    padding: .25rem .625rem;
    border-radius: var(--radius);
    font-size: .8rem;
    font-weight: 600
}

.score.high {
    background: var(--success-bg);
    color: var(--success)
}

.score.mid {
    background: var(--warning-bg);
    color: var(--warning)
}

.score.low {
    background: var(--danger-bg);
    color: var(--danger)
}

.empty {
    text-align: center;
    padding: 3rem
}

.empty-icon {
    font-size: 4rem;
    opacity: .4;
    margin-bottom: 1rem
}

.empty h3 {
    margin-bottom: .5rem
}

.empty p {
    color: var(--text-sec);
    margin-bottom: 1.5rem
}

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

.quiz-card {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s
}

.quiz-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1)
}

.quiz-card.kids {
    border-color: var(--orange)
}

.quiz-card.genz {
    border-color: var(--primary)
}

.quiz-card.adult {
    border-color: var(--pink)
}

.quiz-icon {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    margin: 0 auto 1.25rem
}

.quiz-card.kids .quiz-icon {
    background: var(--orange-bg)
}

.quiz-card.genz .quiz-icon {
    background: var(--primary-bg)
}

.quiz-card.adult .quiz-icon {
    background: rgba(236, 72, 153, 0.1)
}

.quiz-card h3 {
    font-size: 1.125rem;
    margin-bottom: .5rem
}

.quiz-card p {
    color: var(--text-sec);
    font-size: .875rem;
    margin-bottom: 1rem
}

.quiz-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: .75rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem
}

.quiz-btn {
    padding: .625rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: .875rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer
}

.quiz-card.kids .quiz-btn {
    background: var(--orange)
}

.quiz-card.genz .quiz-btn {
    background: var(--primary)
}

.quiz-card.adult .quiz-btn {
    background: var(--pink)
}

.learn-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem
}

.learn-stat {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem
}

.learn-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem
}

.learn-stat-icon.blue {
    background: var(--info-bg)
}

.learn-stat-icon.green {
    background: var(--success-bg)
}

.learn-stat-icon.orange {
    background: var(--orange-bg)
}

.learn-stat-icon.purple {
    background: var(--primary-bg)
}

.learn-stat h4 {
    font-size: 1.25rem;
    font-weight: 700
}

.learn-stat p {
    font-size: .8rem;
    color: var(--text-sec)
}

.tabs {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: .5rem
}

.tab {
    padding: .625rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-sec);
    cursor: pointer
}

.tab:hover {
    background: var(--bg-body);
    color: var(--text)
}

.tab.active {
    background: var(--primary);
    color: #fff
}

.tab-content {
    display: none
}

.tab-content.active {
    display: block;
    animation: fadeIn .2s
}

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

.course-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all .2s
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1)
}

.course-thumb {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative
}

.course-thumb.kids {
    background: linear-gradient(135deg, #fed7aa, #fdba74)
}

.course-thumb.genz {
    background: linear-gradient(135deg, #c7d2fe, #a5b4fc)
}

.course-thumb.general {
    background: linear-gradient(135deg, #a5f3fc, #67e8f9)
}

.course-badge {
    position: absolute;
    top: .75rem;
    right: .75rem;
    padding: .25rem .5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 600
}

.course-body {
    padding: 1.25rem
}

.course-cat {
    display: inline-block;
    padding: .2rem .5rem;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 600;
    margin-bottom: .5rem
}

.course-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .375rem
}

.course-desc {
    font-size: .8rem;
    color: var(--text-sec);
    margin-bottom: 1rem
}

.course-meta {
    display: flex;
    gap: 1rem;
    font-size: .75rem;
    color: var(--text-muted);
    margin-bottom: 1rem
}

.course-progress {
    margin-bottom: 1rem
}

.course-progress-head {
    display: flex;
    justify-content: space-between;
    font-size: .75rem;
    margin-bottom: .375rem
}

.course-progress-bar {
    height: 6px;
    background: var(--bg-body);
    border-radius: 3px;
    overflow: hidden
}

.course-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px
}

.course-btn {
    width: 100%;
    padding: .625rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem
}

.video-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all .2s
}

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow)
}

.video-thumb {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 2rem
}

.video-thumb.v1 {
    background: linear-gradient(135deg, #fecaca, #fca5a5)
}

.video-thumb.v2 {
    background: linear-gradient(135deg, #bfdbfe, #93c5fd)
}

.video-thumb.v3 {
    background: linear-gradient(135deg, #bbf7d0, #86efac)
}

.video-thumb.v4 {
    background: linear-gradient(135deg, #fde68a, #fcd34d)
}

.video-play {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .15s
}

.video-card:hover .video-play {
    opacity: 1
}

.video-dur {
    position: absolute;
    bottom: .5rem;
    right: .5rem;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 4px;
    font-size: .65rem
}

.video-body {
    padding: .875rem
}

.video-title {
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: .25rem
}

.video-meta {
    font-size: .7rem;
    color: var(--text-muted)
}

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

.article-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    gap: 1.25rem;
    cursor: pointer;
    transition: all .2s
}

.article-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
    border-left: 3px solid var(--primary)
}

.article-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0
}

.article-icon.a1 {
    background: var(--success-bg)
}

.article-icon.a2 {
    background: var(--info-bg)
}

.article-icon.a3 {
    background: var(--warning-bg)
}

.article-content {
    flex: 1
}

.article-cat {
    display: inline-block;
    padding: .2rem .5rem;
    background: var(--bg-body);
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 600;
    color: var(--text-sec);
    margin-bottom: .375rem
}

.article-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .25rem
}

.article-desc {
    font-size: .8rem;
    color: var(--text-sec);
    margin-bottom: .5rem
}

.article-meta {
    display: flex;
    gap: 1rem;
    font-size: .75rem;
    color: var(--text-muted)
}

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

.worksheet-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem
}

.worksheet-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem
}

.worksheet-icon.pdf {
    background: var(--danger-bg)
}

.worksheet-icon.doc {
    background: var(--info-bg)
}

.worksheet-content {
    flex: 1
}

.worksheet-title {
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: .25rem
}

.worksheet-meta {
    font-size: .75rem;
    color: var(--text-muted)
}

/* BLOCK STYLE READER */
.reader {
    display: none;
    position: fixed;
    inset: 0;
    background: #f1f5f9;
    z-index: 200;
    overflow-y: auto
}

.reader.active {
    display: block;
    animation: fadeIn .3s
}

.reader-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem
}

.reader-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem
}

.reader-back {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.25rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-family: inherit;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04)
}

.reader-back:hover {
    border-color: var(--primary);
    color: var(--primary)
}

.reader-back svg {
    width: 18px;
    height: 18px
}

.reader-actions {
    display: flex;
    gap: .75rem
}

.reader-btn {
    width: 44px;
    height: 44px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04)
}

.reader-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff
}

.reader-btn svg {
    width: 20px;
    height: 20px
}

.reader-hero {
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden
}

.reader-hero.article {
    background: linear-gradient(135deg, #667eea, #764ba2)
}

.reader-hero.video {
    background: linear-gradient(135deg, #f093fb, #f5576c)
}

.reader-hero.course {
    background: linear-gradient(135deg, #4facfe, #00f2fe)
}

.reader-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 1rem
}

.reader-tag-icon {
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem
}

.reader-hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem
}

.reader-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem
}

.reader-meta-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: .5rem 1rem;
    border-radius: 50px;
    font-size: .875rem
}

.reader-progress-block {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06)
}

.reader-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .75rem
}

.reader-progress-label {
    font-size: .875rem;
    font-weight: 600
}

.reader-progress-val {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary)
}

.reader-progress-bar {
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden
}

.reader-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #818cf8);
    border-radius: 6px
}

.reader-video-block {
    background: #000;
    border-radius: 20px;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3)
}

.reader-video-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    display: flex;
    align-items: center;
    justify-content: center
}

.reader-video-bg span {
    font-size: 6rem;
    opacity: .3
}

.reader-play-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem
}

.reader-play {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(79, 70, 229, 0.5)
}

.reader-play:hover {
    transform: scale(1.1)
}

.reader-play svg {
    width: 36px;
    height: 36px;
    color: #fff;
    margin-left: 6px
}

.reader-play-label {
    color: #fff;
    font-size: .875rem;
    opacity: .8
}

.reader-lessons-block {
    background: #fff;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden
}

.lessons-head {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between
}

.lessons-head h3 {
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .75rem
}

.lessons-count {
    background: var(--primary-bg);
    color: var(--primary);
    padding: .25rem .75rem;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 600
}

.lessons-list {
    padding: 1rem
}

.lesson-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-radius: 14px;
    margin-bottom: .75rem;
    cursor: pointer;
    transition: all .2s;
    border: 2px solid transparent
}

.lesson-card:last-child {
    margin-bottom: 0
}

.lesson-card:hover {
    background: #f1f5f9;
    transform: translateX(4px)
}

.lesson-card.done {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7)
}

.lesson-card.current {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-color: var(--primary)
}

.lesson-num {
    width: 44px;
    height: 44px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    font-weight: 700;
    flex-shrink: 0
}

.lesson-card.done .lesson-num {
    background: linear-gradient(135deg, var(--success), #14b8a6);
    border-color: transparent;
    color: #fff
}

.lesson-card.current .lesson-num {
    background: linear-gradient(135deg, var(--primary), #818cf8);
    border-color: transparent;
    color: #fff
}

.lesson-info {
    flex: 1
}

.lesson-title {
    font-size: .9375rem;
    font-weight: 600;
    margin-bottom: .25rem
}

.lesson-dur {
    font-size: .8rem;
    color: var(--text-muted)
}

.lesson-status {
    padding: .375rem .875rem;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 600
}

.lesson-card.done .lesson-status {
    background: var(--success-bg);
    color: var(--success)
}

.lesson-card.current .lesson-status {
    background: var(--primary);
    color: #fff
}

.lesson-card:not(.done):not(.current) .lesson-status {
    background: #f1f5f9;
    color: var(--text-muted)
}

.content-block {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06)
}

.content-block-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9
}

.content-block-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem
}

.content-block-icon.blue {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe)
}

.content-block-icon.green {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0)
}

.content-block-icon.yellow {
    background: linear-gradient(135deg, #fef3c7, #fde68a)
}

.content-block-icon.purple {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe)
}

.content-block-title {
    font-size: 1.25rem;
    font-weight: 700
}

.content-block p {
    font-size: 1rem;
    line-height: 1.9;
    color: #475569;
    margin-bottom: 1.25rem
}

.content-block ul,
.content-block ol {
    margin: 1.25rem 0;
    padding-left: 1.5rem
}

.content-block li {
    font-size: 1rem;
    line-height: 1.8;
    color: #475569;
    margin-bottom: .75rem
}

.callout {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 14px;
    margin: 1.5rem 0
}

.callout.tip {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #86efac
}

.callout.warn {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fcd34d
}

.callout-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0
}

.callout.tip .callout-icon {
    background: #22c55e;
    color: #fff
}

.callout.warn .callout-icon {
    background: #f59e0b;
    color: #fff
}

.callout-body {
    flex: 1
}

.callout-title {
    font-size: .875rem;
    font-weight: 700;
    margin-bottom: .375rem
}

.callout.tip .callout-title {
    color: #15803d
}

.callout.warn .callout-title {
    color: #b45309
}

.callout-text {
    font-size: .9375rem;
    line-height: 1.7;
    color: #475569
}

.reader-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem
}

.reader-main {
    min-width: 0
}

.reader-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content
}

.sidebar-block {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06)
}

.sidebar-block-title {
    font-size: .875rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: .5rem
}

.sidebar-action {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .875rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: .625rem;
    cursor: pointer;
    transition: all .2s
}

.sidebar-action:last-child {
    margin-bottom: 0
}

.sidebar-action:hover {
    background: var(--primary-bg);
    transform: translateX(4px)
}

.sidebar-action-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem
}

.sidebar-action-icon.green {
    background: var(--success-bg);
    color: var(--success)
}

.sidebar-action-icon.blue {
    background: var(--info-bg);
    color: var(--info)
}

.sidebar-action-icon.purple {
    background: var(--primary-bg);
    color: var(--primary)
}

.sidebar-action-icon.orange {
    background: var(--orange-bg);
    color: var(--orange)
}

.sidebar-action-text {
    font-size: .8125rem;
    font-weight: 600
}

.notes-area {
    width: 100%;
    min-height: 100px;
    padding: .875rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: .875rem;
    resize: vertical
}

.notes-area:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff
}

.notes-save {
    width: 100%;
    margin-top: .75rem;
    padding: .75rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: .8125rem;
    font-weight: 600;
    cursor: pointer
}

.author-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 16px
}

.author-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem
}

.author-info h4 {
    font-size: 1rem;
    font-weight: 700
}

.author-info p {
    font-size: .8125rem;
    color: var(--text-muted);
    margin-top: .25rem
}

.quiz-screen,
.result-screen {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-body);
    z-index: 200;
    overflow-y: auto
}

.quiz-screen.active,
.result-screen.active {
    display: block;
    animation: fadeIn .3s
}

.quiz-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem
}

.quiz-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border-radius: 24px;
    padding: 1.5rem 2rem;
    color: #fff;
    margin-bottom: 1.5rem
}

.quiz-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem
}

.quiz-header h2 {
    font-size: 1.25rem;
    font-weight: 600
}

.quiz-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center
}

.quiz-close svg {
    width: 20px;
    height: 20px
}

.quiz-progress-row {
    display: flex;
    align-items: center;
    gap: 1rem
}

.quiz-progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden
}

.quiz-progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 4px
}

.quiz-progress-text {
    font-size: .875rem;
    font-weight: 600
}

.quiz-question {
    background: #fff;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem
}

.question-badge {
    display: inline-block;
    padding: .375rem .75rem;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: var(--radius);
    font-size: .75rem;
    font-weight: 600;
    margin-bottom: 1rem
}

.question-text {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem
}

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

.option {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: 1rem;
    background: var(--bg-body);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all .15s
}

.option:hover,
.option.selected {
    border-color: var(--primary);
    background: var(--primary-bg)
}

.option-letter {
    width: 32px;
    height: 32px;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 600
}

.option:hover .option-letter,
.option.selected .option-letter {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem
}

.quiz-nav-btn {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.25rem;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer
}

.quiz-nav-btn.prev {
    background: #fff;
    border: 1px solid var(--border)
}

.quiz-nav-btn.next {
    background: var(--primary);
    color: #fff
}

.quiz-nav-btn.submit {
    background: var(--success);
    color: #fff
}

.quiz-nav-btn svg {
    width: 18px;
    height: 18px
}

.result-wrap {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem
}

.result-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15)
}

.result-header {
    background: linear-gradient(135deg, var(--success), #14b8a6);
    padding: 2.5rem;
    text-align: center;
    color: #fff
}

.result-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: .5rem
}

.result-score-circle {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1.5rem auto 0
}

.result-score-value {
    font-size: 2.5rem;
    font-weight: 800
}

.result-score-label {
    font-size: .75rem;
    opacity: .8
}

.result-body {
    padding: 1.5rem
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
    margin-bottom: 1.5rem
}

.result-stat {
    text-align: center;
    padding: 1rem;
    background: var(--bg-body);
    border-radius: 12px
}

.result-stat-value {
    font-size: 1.25rem;
    font-weight: 700
}

.result-stat-label {
    font-size: .75rem;
    color: var(--text-sec);
    margin-top: .25rem
}

.result-traits {
    margin-bottom: 1.5rem
}

.result-traits h4 {
    font-size: .875rem;
    font-weight: 600;
    margin-bottom: 1rem
}

.trait {
    margin-bottom: .875rem
}

.trait-head {
    display: flex;
    justify-content: space-between;
    font-size: .8rem;
    margin-bottom: .375rem
}

.trait-bar {
    height: 8px;
    background: var(--bg-body);
    border-radius: 4px;
    overflow: hidden
}

.trait-fill {
    height: 100%;
    border-radius: 4px
}

.result-actions {
    display: flex;
    gap: .75rem
}

.result-actions .btn {
    flex: 1
}

.profile-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px
}

.profile-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.25rem
}

.profile-avatar {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700
}

.profile-info h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: .25rem
}

.profile-info p {
    color: var(--text-sec)
}

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

.profile-form .full {
    grid-column: span 2
}

@media(max-width:1200px) {

    .stats,
    .learn-stats {
        grid-template-columns: repeat(2, 1fr)
    }

    .quiz-grid,
    .course-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .video-grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .reader-grid {
        grid-template-columns: 1fr
    }
}

@media(max-width:992px) {
    .auth {
        grid-template-columns: 1fr
    }

    .auth-side {
        display: none
    }

    .sidebar {
        transform: translateX(-100%)
    }

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

    .main {
        margin-left: 0
    }

    .menu-btn {
        display: flex
    }

    .quiz-grid,
    .course-grid {
        grid-template-columns: 1fr
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .worksheet-grid {
        grid-template-columns: 1fr
    }

    .grid-2 {
        grid-template-columns: 1fr
    }
}

@media(max-width:640px) {

    .stats,
    .learn-stats {
        grid-template-columns: 1fr
    }

    .video-grid {
        grid-template-columns: 1fr
    }

    .result-stats {
        grid-template-columns: 1fr
    }

    .profile-form {
        grid-template-columns: 1fr
    }

    .profile-form .full {
        grid-column: span 1
    }

    .quiz-nav,
    .result-actions {
        flex-direction: column
    }

    .page {
        padding: 1rem
    }

    .reader-hero-title {
        font-size: 1.5rem
    }

    .reader-sidebar {
        display: none
    }
}