:root {
    --bg: #050713;
    --bg-soft: #0a0d1c;
    --card: rgba(255, 255, 255, .075);
    --card-strong: rgba(255, 255, 255, .105);
    --line: rgba(255, 255, 255, .13);
    --text: #f7f8ff;
    --muted: rgba(247, 248, 255, .68);
    --cyan: #19d7ec;
    --blue: #2f8cff;
    --violet: #6b68ff;
    --danger: #ff5d7d;
    --success: #49e6a1;
    --warning: #ffd166;
    --shadow: 0 30px 90px rgba(0, 0, 0, .45);
    --radius: 28px;
    --radius-sm: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 18% 20%, rgba(25, 215, 236, .18), transparent 34%),
        radial-gradient(circle at 82% 22%, rgba(107, 104, 255, .18), transparent 34%),
        linear-gradient(135deg, #050713, #070a18 45%, #050713);
    letter-spacing: .01em;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--cyan); }

.grid-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
    z-index: -2;
}

.grid-bg::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(25,215,236,.10), transparent 32%, rgba(107,104,255,.10));
    z-index: -1;
}

.wrap {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(22px);
    background: rgba(5, 7, 19, .72);
}

.nav-inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: -.03em;
}

.brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 0 16px rgba(25,215,236,.22));
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .18em;
    font-weight: 600;
    margin-top: 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    color: rgba(247,248,255,.78);
    font-weight: 650;
}

.mobile-menu {
    display: none;
    border: 1px solid var(--line);
    color: var(--text);
    background: var(--card);
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 20px;
}

.card {
    background: linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.045));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    backdrop-filter: blur(22px);
}

.hero {
    margin-top: 46px;
    padding: clamp(28px, 6vw, 74px);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(25,215,236,.22), rgba(107,104,255,.22));
    filter: blur(62px);
    right: -120px;
    top: -110px;
}

.hero > * { position: relative; z-index: 1; }

.title {
    margin: 14px 0;
    max-width: 900px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: .93;
    letter-spacing: -.075em;
    font-weight: 900;
}

.title.medium {
    font-size: clamp(32px, 5vw, 58px);
}

.gradient {
    background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.muted {
    color: var(--muted);
    line-height: 1.75;
    font-size: 16px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--cyan);
    background: rgba(25, 215, 236, .10);
    border: 1px solid rgba(25, 215, 236, .38);
    border-radius: 999px;
    padding: 9px 15px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .03em;
}

.badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 18px var(--cyan);
}

.btn {
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 28px;
    border-radius: 999px;
    color: #030712;
    background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet));
    font-weight: 900;
    letter-spacing: .01em;
    box-shadow: 0 18px 42px rgba(25,215,236,.16);
    transition: transform .18s ease, filter .18s ease, border-color .18s ease;
}

.btn:hover {
    color: #030712;
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.btn.ghost {
    color: var(--text);
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.13);
    box-shadow: none;
}

.btn.danger {
    color: #fff;
    background: rgba(255, 93, 125, .16);
    border: 1px solid rgba(255, 93, 125, .42);
}

.btn.small {
    min-height: 42px;
    padding: 0 18px;
    font-size: 14px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.section {
    padding: 28px;
    margin-top: 24px;
}

.layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
    padding-bottom: 60px;
}

.sidebar {
    position: sticky;
    top: 106px;
    padding: 16px;
    margin-top: 46px;
}

.side-link {
    display: flex;
    padding: 15px 16px;
    border-radius: 16px;
    color: var(--muted);
    font-weight: 800;
    margin-bottom: 8px;
}

.side-link.active,
.side-link:hover {
    color: var(--text);
    background: rgba(25,215,236,.10);
}

.lesson-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.lesson-card {
    padding: 28px;
    min-height: 250px;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.lesson-card:hover {
    transform: translateY(-6px);
    border-color: rgba(25,215,236,.44);
    background: linear-gradient(145deg, rgba(25,215,236,.12), rgba(107,104,255,.09));
}

.lesson-card h2,
.section h2,
.card h2 {
    letter-spacing: -.04em;
    font-size: 26px;
}

.row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
}

.form {
    display: grid;
    gap: 14px;
}

.input,
textarea,
select {
    width: 100%;
    min-height: 58px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.075);
    color: var(--text);
    padding: 0 18px;
    outline: none;
    font: inherit;
    transition: border-color .18s ease, background .18s ease;
}

textarea {
    padding-top: 16px;
    min-height: 140px;
    resize: vertical;
}

.input:focus,
textarea:focus,
select:focus {
    border-color: rgba(25,215,236,.58);
    background: rgba(255,255,255,.10);
}

.input::placeholder,
textarea::placeholder { color: rgba(247,248,255,.45); }

.auth {
    width: min(620px, calc(100% - 32px));
    min-height: calc(100vh - 86px);
    margin: 0 auto;
    display: grid;
    place-items: center;
    padding: 42px 0;
}

.auth-box {
    width: 100%;
    padding: clamp(28px, 6vw, 54px);
}

.alert {
    border-radius: 18px;
    padding: 16px 18px;
    background: rgba(25,215,236,.10);
    border: 1px solid rgba(25,215,236,.34);
    color: var(--text);
    line-height: 1.55;
}

.alert.error {
    background: rgba(255, 93, 125, .10);
    border-color: rgba(255, 93, 125, .38);
}

.video-box {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: #000;
    aspect-ratio: 16 / 9;
    margin-top: 24px;
}

.video-box iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.comment {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    margin-top: 14px;
}

.reply {
    margin-left: 26px;
    border-color: rgba(25,215,236,.28);
}

.meta {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.11);
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.table th,
.table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,.09);
}

.table th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .09em;
}

.status {
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 900;
    background: rgba(255,255,255,.08);
}

.status.active,
.status.approved { color: var(--success); }
.status.pending { color: var(--warning); }
.status.blocked,
.status.rejected { color: var(--danger); }

.empty {
    padding: 24px;
    color: var(--muted);
    text-align: center;
}

.material-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    margin-top: 12px;
}

@media (max-width: 980px) {
    .layout,
    .row,
    .lesson-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        margin-top: 24px;
    }
}

@media (max-width: 760px) {
    .nav-inner { min-height: 72px; }

    .mobile-menu { display: inline-flex; }

    .nav-links {
        display: none;
        position: absolute;
        left: 16px;
        right: 16px;
        top: 78px;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border-radius: 24px;
        background: rgba(5,7,19,.94);
        border: 1px solid var(--line);
        backdrop-filter: blur(22px);
    }

    .nav-links.open { display: flex; }

    .brand span { font-size: 14px; }

    .hero,
    .section,
    .auth-box { border-radius: 22px; }

    .title { letter-spacing: -.06em; }

    .btn { width: 100%; }

    .actions { width: 100%; }

    .reply { margin-left: 0; }
}
