@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root {
    color-scheme: dark;
    --bg: #080d17;
    --surface: #111a2a;
    --line: #2c4161;
    --text: #edf2ff;
    --muted: #abbad0;
    --accent: #a4beff;
    --primary: #315cd5;
    --teal: #81dce5;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    margin: 0;
    min-height: 100vh;
    font: 16px/1.85 Vazirmatn, Tahoma, sans-serif;
    color: var(--text);
    background: radial-gradient(ellipse at 75% 0, #152241 0, transparent 48%), var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid #a6c7ff; outline-offset: 4px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); line-height: 1.4; }
h2 { font-size: 1.25rem; }
p { color: var(--muted); overflow-wrap: anywhere; white-space: pre-line; }
.shell { max-width: 1180px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.top { border-bottom: 1px solid var(--line); background: #0a101cdf; }
.nav, nav, .brand, .actions, .heading, .row, .footer { display: flex; align-items: center; gap: 16px; }
.nav, .heading, .row, .footer { justify-content: space-between; }
.nav { min-height: 76px; }
nav, .actions, .heading { flex-wrap: wrap; }
nav a { color: var(--muted); }
nav a[aria-current] { color: var(--text); font-weight: 700; }
.brand { gap: 10px; color: var(--text); font-size: 1.25rem; }
.mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--primary); font-size: .8rem; }
main { min-height: 76vh; padding-block: clamp(24px, 5vw, 60px); }
.footer { padding-block: 20px; border-top: 1px solid var(--line); color: var(--muted); }
.button, button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 8px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    white-space: nowrap;
}
.button:hover, button:hover { filter: brightness(1.15); text-decoration: none; }
.secondary, .plain { background: #142037; border-color: var(--line); }
.plain { padding: 3px 12px; }
.hero { display: grid; grid-template-columns: 1.18fr 1fr; gap: clamp(25px, 6vw, 88px); align-items: center; padding-block: clamp(32px, 9vw, 110px); }
.hero h1 { font-size: clamp(2.1rem, 4.3vw, 4rem); line-height: 1.4; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 1.1rem; margin-block: 20px 24px; }
.hero-preview { border: 1px solid #34517e; border-radius: 24px; padding: 20px; background: #111b30; box-shadow: 0 25px 85px #040812b3; }
.preview-screen { display: grid; place-items: center; aspect-ratio: 16/9; border-radius: 14px; background: radial-gradient(ellipse at center, #284b9c, #101933 70%); }
.preview-screen span { display: grid; place-items: center; width: 70px; height: 70px; background: #4a77ef; border-radius: 50%; box-shadow: 0 0 55px #4f87ffc0; }
.preview-line { margin-block: 15px; height: 5px; background: #2b3c58; border-radius: 10px; overflow: hidden; }
.preview-line i { display: block; width: 42%; height: 100%; background: var(--accent); }
.preview-bars { display: grid; gap: 8px; }
.preview-bars i { height: 12px; background: #1d2b45; border-radius: 5px; }
.preview-bars i:last-child { width: 64%; }
.card, .notice { margin-block: 0 16px; padding: clamp(14px, 3vw, 25px); border: 1px solid var(--line); background: var(--surface); border-radius: 16px; }
.notice { background: #112348; }
.error { background: #391c2c; color: #ffd9df; }
.narrow { max-width: 500px; margin-inline: auto; }
.heading { margin-bottom: 22px; }
.stack { display: grid; gap: 13px; }
.stack > button { justify-self: start; }
form.stack { margin-top: 12px; }
label { display: grid; gap: 4px; color: var(--muted); font-weight: 500; }
input, select, textarea {
    width: 100%;
    min-width: 0;
    padding: 8px 12px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0b111d;
}
textarea { min-height: 92px; resize: vertical; }
input[type=checkbox] { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 7px; padding-block: 4px; }
.inset { margin-inline-start: 22px; }
.grant, .chapter, .lesson { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; min-width: 0; overflow-wrap: anywhere; }
.chapter, .lesson { margin-block: 8px; }
.lesson { background: #0c1423; }
.row > div { min-width: 0; overflow-wrap: anywhere; }
.row > a, .locked { flex-shrink: 0; }
summary { font-weight: 700; }
summary small, .muted, .locked { color: var(--muted); }
.locked { font-size: .86rem; padding: 2px 8px; background: #242d40; border-radius: 6px; }
.watch-grid { display: grid; grid-template-columns: minmax(220px, .75fr) minmax(0, 2fr); gap: 16px; align-items: start; }
video { display: block; width: 100%; max-height: 65vh; margin-top: 10px; background: black; border-radius: 8px; }
@media (max-width: 700px) {
    .hero, .watch-grid { grid-template-columns: 1fr; }
    .nav { min-height: 65px; padding-block: 8px; }
    .nav, nav { gap: 8px; }
    nav { font-size: .85rem; }
}

body {
    background:
        radial-gradient(ellipse at 87% -12%, #203c78 0, transparent 46%),
        radial-gradient(ellipse at 8% 36%, #12253f 0, transparent 34%),
        var(--bg);
}
.top { border-bottom: 2px solid #263a57; }
.shell { max-width: 1340px; }
h1 { letter-spacing: -.025em; font-weight: 800; }
h2 { color: #dce8ff; }
nav a { padding: 5px 9px; border-radius: 8px; }
nav a[aria-current] { color: #c9d9ff; background: #25416d; }
.mark { background: linear-gradient(145deg, #5c8cff, #294ab8); box-shadow: inset 0 0 0 1px #98b3ff68; }
.heading { margin-bottom: clamp(24px, 4vw, 42px); }
.card, .notice {
    margin-bottom: 22px;
    padding: clamp(18px, 3vw, 34px);
    border: 2px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 12px 30px #04081145;
}
.card { background: linear-gradient(155deg, #152238, var(--surface) 66%); }
.hero-preview { border-width: 2px; }
.button, button { min-height: 43px; }
.secondary, .plain { background: #182b47; border-color: #3a5279; color: #d5e2ff; }
.plain { min-height: 36px; }
.stack { gap: 18px; }
label { gap: 7px; color: #bbcbe4; }
input, select, textarea { border-width: 2px; }
.chapter, .lesson, .grant { border-width: 2px; padding: 13px 16px; }
.chapter, .lesson { margin-block: 12px; }
.chapter > summary, .watch-course > summary { color: #bdd2ff; }
.lesson > summary, .watch-chapter > summary { color: #d4dfef; }
.danger { color: #ffd1d8; background: #442538; border-color: #88465d; }
.delete-form { margin-top: 16px; }
.license-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 24px; align-items: center; }
.license-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; color: var(--muted); margin-top: 10px; }
.license-meta code { display: inline-block; color: var(--teal); overflow-wrap: anywhere; }
.badge { border: 1px solid #53617b; border-radius: 100px; padding: 0 10px; background: #263248; }
.badge.live { color: #99eee1; border-color: #347974; background: #173a40; }
.copy-feedback { grid-column: 1 / -1; color: var(--teal); }
.copy-feedback:empty { display: none; }
.watch-grid { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: clamp(16px, 3vw, 32px); }
.watch-sidebar { padding: clamp(13px, 2vw, 22px); position: sticky; top: 16px; max-height: calc(100dvh - 32px); overflow: auto; }
.watch-sidebar h2 { margin-bottom: 14px; }
.watch-course, .activation { border: 2px solid #31486b; background: #121f34; border-radius: 12px; padding: 11px 12px; margin-block: 10px; }
.activation > summary { color: var(--teal); }
.watch-chapter { margin-top: 9px; border-inline-start: 2px solid #3c5378; padding-inline-start: 11px; }
.watch-item, .watch-locked { display: block; padding: 8px; border-radius: 8px; margin-top: 5px; background: #0e192c; overflow-wrap: anywhere; }
.watch-item { display: flex; justify-content: space-between; gap: 10px; }
.watch-item[aria-current] { background: #253e6e; color: #ecf2ff; box-shadow: inset 0 0 0 1px #5578b8; }
.watch-item small, .watch-locked small { color: var(--teal); white-space: nowrap; }
.watch-locked small { color: #b7c1d5; }
.watch-locked p { padding: 6px; font-size: .9rem; }
.course-info { display: inline-block; font-size: .88rem; margin-block: 5px; color: var(--teal); }
.player { min-width: 0; scroll-margin-top: 16px; }
.player h2 { font-size: clamp(1.35rem, 3vw, 2rem); margin-block: 0 10px; }
.player video { border-radius: 12px; margin-top: 18px; }
.player-placeholder { display: grid; justify-items: center; align-content: center; text-align: center; min-height: clamp(170px, 36vw, 360px); gap: 12px; }
.player-placeholder .mark { width: 52px; height: 52px; }
.eyebrow, .publisher-contact strong { color: var(--teal); }
.publisher-contact { margin-top: 24px; padding: 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; border-top: 2px solid var(--line); overflow-wrap: anywhere; }
.editor { border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: #0b1424; }
.toolbar, .toolbar-buttons { display: flex; flex-wrap: wrap; align-items: end; gap: 7px; }
.toolbar { background: #192a44; padding: 12px; }
.toolbar button, .toolbar input, .toolbar select { background: #101e34; border: 1px solid #455d83; min-height: 36px; padding: 4px 8px; font-size: .85rem; }
.toolbar input[type=color] { width: 45px; }
.editor-surface { min-height: 160px; padding: 14px; outline-offset: -3px; }
.rich-text { overflow-wrap: anywhere; line-height: 2; }
.rich-text p { color: inherit; }
.rich-text h3 { color: #afc8fc; }
.lesson-reading { margin-top: 20px; padding-top: 18px; border-top: 2px solid var(--line); }
.otp-note { margin-top: 12px; }
.otp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.otp-actions button:disabled { opacity: .65; cursor: default; }
@media (max-width: 800px) {
    .watch-grid { grid-template-columns: minmax(0, 1fr); }
    .watch-sidebar { position: static; max-height: none; margin-bottom: 0; }
}
@media (max-width: 540px) {
    .license-card { grid-template-columns: minmax(0, 1fr); }
    .nav { flex-wrap: wrap; }
    nav { padding-bottom: 4px; }
    .chapter, .lesson, .grant { padding-inline: 9px; }
}
