
:root {
    --bg: #07111e;
    --panel: #0d1b2b;
    --panel2: #102337;
    --line: #1e344a;
    --text: #e6f0fb;
    --muted: #91a7bd;
    --blue: #39a6ff;
    --cyan: #56e0d1;
    --green: #4bd29b;
    --red: #ff6b79;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    background:
        radial-gradient(
            ellipse at 80% -10%,
            #12345a 0,
            transparent 42%
        ),
        var(--bg);
    color: var(--text);
    font: 15px/1.6 Inter, Segoe UI, Arial, sans-serif;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
    border: 0;
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text);
    font-weight: 700;
    transition: .2s ease;
}

button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

header,
.shell {
    max-width: 1200px;
    margin: auto;
}

header {
    padding: 24px 24px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.mark {
    border: 1px solid #23649b;
    color: var(--cyan);
    background: #0b2740;
    padding: 10px;
    border-radius: 12px;
    font-weight: 900;
}

.brand b {
    display: block;
    letter-spacing: 1.3px;
}

.brand small {
    color: var(--muted);
    letter-spacing: 2px;
    font-size: 10px;
}

.tag {
    border: 1px solid #204b65;
    color: #7fd9e6;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 10px;
    letter-spacing: 1px;
}

/* LOGIN AND REGISTER */

.login-view {
    min-height: 75vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(460px, 100%);
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(160deg, #10243a, #0b1725);
    box-shadow: 0 20px 60px #0004;
}

.eyebrow {
    color: var(--cyan);
    letter-spacing: 2px;
    font-size: 11px;
    font-weight: 800;
}

h1 {
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.2;
    margin: 8px 0 14px;
}

.muted {
    color: var(--muted);
}

label {
    display: block;
    margin: 18px 0;
    color: #b7c8d9;
    font-size: 13px;
}

input {
    display: block;
    width: 100%;
    margin-top: 8px;
    background: #071321;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    outline: none;
    transition: .2s ease;
}

input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px #39a6ff18;
}

.primary {
    width: 100%;
    background: linear-gradient(90deg, #147ad0, #26a6c5);
    margin-top: 8px;
}

.primary:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.primary span {
    float: right;
}

.ghost {
    background: #152a3e;
    border: 1px solid var(--line);
}

.ghost:hover {
    background: #1c3852;
    border-color: #315b7b;
}

#switchAuthBtn {
    width: 100%;
    margin-top: 12px;
}

.notice {
    color: var(--red);
    min-height: 22px;
    font-size: 13px;
}

.tiny {
    font-size: 11px;
    color: #7891a9;
}

/* DASHBOARD */

.welcome {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
}

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

.stat {
    padding: 18px;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 14px;
}

.stat small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 1px;
}

.stat strong {
    font-size: 26px;
}

/* LESSONS */

.layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 16px;
    padding: 0 24px;
}

.lesson-list,
.lesson-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
}

.lesson-list h3 {
    margin: 0 0 14px;
}

.lesson-item {
    width: 100%;
    display: flex;
    text-align: left;
    gap: 12px;
    background: transparent;
    border: 1px solid transparent;
    margin: 4px 0;
    padding: 12px;
    border-radius: 10px;
}

.lesson-item:hover,
.lesson-item.active {
    background: var(--panel2);
    border-color: #25435f;
}

.lesson-item.locked {
    opacity: .45;
    cursor: not-allowed;
}

.lesson-item .number {
    color: var(--cyan);
    font-weight: 800;
}

.lesson-item small {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.lesson-panel {
    min-height: 490px;
}

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

.pulse {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 15px var(--cyan);
}

.lesson-panel h2 {
    margin-top: 4px;
}

.lesson-text {
    color: #c3d3e3;
}

.lesson-text ul {
    padding-left: 22px;
}

.callout {
    background: #10273a;
    border-left: 3px solid var(--cyan);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 18px 0;
}

/* QUIZ */

.quiz {
    border-top: 1px solid var(--line);
    padding-top: 18px;
    margin-top: 24px;
}

.question {
    border: 1px solid var(--line);
    padding: 14px;
    border-radius: 12px;
    margin: 12px 0;
}

.question label {
    margin: 8px 0;
    cursor: pointer;
}

.question input {
    display: inline-block;
    width: auto;
    margin: 0 8px 0 0;
}

.quiz-result {
    padding: 12px;
    border-radius: 10px;
    margin: 12px 0;
}

.pass {
    background: #0b3228;
    color: #78e8b5;
}

.fail {
    background: #3b1d28;
    color: #ffb3be;
}

.secondary {
    background: #17344e;
    border: 1px solid #2c5575;
}

.secondary:hover {
    background: #214765;
}

.footer-note {
    color: var(--muted);
    font-size: 12px;
}

footer {
    margin: 24px;
    padding: 16px;
    color: var(--muted);
    font-size: 12px;
    border-top: 1px solid var(--line);
}

/* MOBILE */

@media (max-width: 760px) {
    .layout {
        grid-template-columns: 1fr;
    }

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

    .tag {
        display: none;
    }

    .welcome {
        padding: 18px 24px;
    }

    .lesson-panel {
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 18px 16px;
    }

    .login-view {
        padding: 16px;
    }

    .login-card {
        padding: 24px 20px;
    }

    .stats {
        grid-template-columns: 1fr;
        margin: 0 16px 18px;
    }

    .layout {
        padding: 0 16px;
    }

    .welcome {
        padding: 18px 16px;
        gap: 12px;
    }

    footer {
        margin: 16px;
    }
}
