/* =========================================================
   RESET & DESIGN TOKENS
========================================================= */

:root {
    --primary: #315efb;
    --primary-dark: #2447d8;
    --primary-light: #eef2ff;

    --secondary: #7657ff;

    --success: #16a36a;
    --warning: #f3a629;

    --text: #172033;
    --text-soft: #6f7a8d;
    --text-light: #98a2b3;

    --border: #e4e8f0;

    --surface: #ffffff;
    --surface-soft: #f7f9fd;

    --shadow-sm:
        0 4px 14px
        rgba(24, 39, 75, 0.06);

    --shadow-md:
        0 12px 32px
        rgba(24, 39, 75, 0.10);

    --shadow-lg:
        0 24px 55px
        rgba(24, 39, 75, 0.13);
}


* {
    box-sizing: border-box;
}


html {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    scroll-behavior: smooth;
}


body {
    margin: 0;

    min-height: 100vh;

    background:
        radial-gradient(
            circle at top left,
            rgba(49, 94, 251, 0.07),
            transparent 380px
        ),
        #f5f7fb;

    color: var(--text);
}


button,
input {
    font: inherit;
}


button {
    color: inherit;
}


/* =========================================================
   LOGIN
========================================================= */

.login-page {
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 24px;
}


.login-card {
    position: relative;

    width: 100%;
    max-width: 430px;

    padding: 36px;

    background:
        rgba(255, 255, 255, 0.96);

    border:
        1px solid
        rgba(228, 232, 240, 0.9);

    border-radius: 28px;

    box-shadow: var(--shadow-lg);

    overflow: hidden;
}


.login-card::before {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    top: -100px;
    right: -80px;

    border-radius: 50%;

    background:
        rgba(49, 94, 251, 0.08);

    pointer-events: none;
}


.logo-box {
    position: relative;
    z-index: 1;

    width: 66px;
    height: 66px;

    display: grid;
    place-items: center;

    margin-bottom: 24px;

    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );

    color: white;

    font-size: 29px;
    font-weight: 800;

    box-shadow:
        0 10px 24px
        rgba(49, 94, 251, 0.25);
}


.login-card h1 {
    margin:
        0
        0
        8px;

    font-size: 31px;

    letter-spacing: -0.03em;
}


.subtitle {
    margin:
        0
        0
        31px;

    color: var(--text-soft);

    line-height: 1.6;
}


/* =========================================================
   FORM
========================================================= */

.form-group label {
    display: block;

    margin-bottom: 9px;

    font-size: 14px;
    font-weight: 750;
}


.form-group input {
    width: 100%;

    padding:
        15px
        16px;

    border:
        2px solid
        var(--border);

    border-radius: 14px;

    outline: none;

    background: white;

    font-size: 18px;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}


.form-group input:hover {
    border-color: #cfd6e3;
}


.form-group input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 4px
        rgba(49, 94, 251, 0.10);
}


/* =========================================================
   BUTTON
========================================================= */

.button {
    width: 100%;

    padding: 15px;

    border: none;
    border-radius: 14px;

    font-weight: 750;

    cursor: pointer;

    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease;
}


.button:hover {
    transform: translateY(-2px);
}


.button:active {
    transform: translateY(0);
}


.button:disabled {
    opacity: 0.6;

    cursor: wait;

    transform: none;
}


.button-primary {
    background:
        linear-gradient(
            135deg,
            var(--primary),
            #5478ff
        );

    color: white;

    box-shadow:
        0 9px 20px
        rgba(49, 94, 251, 0.22);
}


.button-primary:hover {
    box-shadow:
        0 13px 28px
        rgba(49, 94, 251, 0.30);
}


.button-secondary {
    background: var(--primary-light);

    color: var(--primary-dark);
}


.button-secondary:hover {
    background: #e3e9ff;
}


/* =========================================================
   LOGIN MESSAGE
========================================================= */

.message {
    min-height: 22px;

    margin:
        8px
        0;

    font-size: 14px;
}


.message-error {
    color: #cf3039;
}


/* =========================================================
   SEPARATOR
========================================================= */

.separator {
    display: flex;
    align-items: center;

    gap: 12px;

    margin:
        26px
        0;

    color: var(--text-light);
}


.separator span {
    flex: 1;

    height: 1px;

    background: var(--border);
}


.separator p {
    margin: 0;
}


.guest-text {
    margin:
        14px
        0
        0;

    color: var(--text-light);

    text-align: center;

    font-size: 13px;
}
/* =========================================================
   LEVEL PROGRESS
========================================================= */

.level-progress-info {
    min-height: 20px;

    margin-top: 15px;

    padding-top: 14px;

    border-top:
        1px solid
        var(--border);

    color: var(--text-soft);

    font-size: 13px;

    font-weight: 650;
}


.level-completed {
    border-color:
        rgba(22, 163, 106, 0.32);
}


.level-completed::before {
    transform: scaleX(1);

    background:
        linear-gradient(
            90deg,
            #16a36a,
            #42c68d
        );
}


.level-completed
.level-number {
    background:
        linear-gradient(
            135deg,
            #16a36a,
            #42c68d
        );
}


.level-locked {
    opacity: 0.52;

    cursor: not-allowed;

    transform: none !important;

    box-shadow: none !important;

    background: #f5f6f8;
}


.level-locked:hover {
    border-color:
        var(--border);

    transform: none;
}


.level-locked
.level-number {
    background: #aeb6c5;

    box-shadow: none;
}


.level-locked
.start-label {
    color: #8c96a8;
}


/* =========================================================
   PRACTICE PAGE
========================================================= */

.practice-body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% 10%,
            rgba(49, 94, 251, 0.10),
            transparent 450px
        ),
        #f5f7fb;
}


.practice-page {
    width:
        min(
            760px,
            calc(100% - 32px)
        );

    margin:
        34px
        auto
        70px;
}


.practice-loading {
    padding: 45px;

    border:
        1px solid
        var(--border);

    border-radius: 24px;

    background: white;

    box-shadow: var(--shadow-md);

    color: var(--text-soft);

    text-align: center;
}


/* =========================================================
   GAME CARD
========================================================= */

.practice-game {
    padding:
        28px
        32px
        36px;

    border:
        1px solid
        var(--border);

    border-radius: 30px;

    background:
        rgba(
            255,
            255,
            255,
            0.97
        );

    box-shadow: var(--shadow-lg);
}


/* =========================================================
   PRACTICE PROGRESS
========================================================= */

.practice-progress-row {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;
}


.practice-progress-row > div {
    display: flex;

    flex-direction: column;

    gap: 3px;
}


.practice-label {
    color: var(--text-light);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 0.08em;
}


.practice-progress-row strong {
    font-size: 17px;
}


.practice-score-mini {
    text-align: right;
}


.practice-score-mini span {
    color: var(--text-light);

    font-size: 11px;
}


.practice-score-mini strong {
    color: var(--success);
}


.question-progress-track {
    width: 100%;

    height: 8px;

    margin-top: 14px;

    border-radius: 999px;

    background: #edf0f5;

    overflow: hidden;
}


.question-progress-bar {
    width: 0;

    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--secondary)
        );

    transition:
        width 0.3s ease;
}


/* =========================================================
   TIMER
========================================================= */

.timer-wrapper {
    display: flex;

    justify-content: center;

    margin:
        31px
        0
        19px;
}


.timer-circle {
    width: 112px;

    height: 112px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    border:
        7px solid
        #e2e7ff;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f2f5ff
        );

    box-shadow:
        0 12px 28px
        rgba(
            49,
            94,
            251,
            0.12
        );

    transition:
        border-color 0.2s ease,
        transform 0.2s ease;
}


.timer-label {
    color: var(--text-light);

    font-size: 9px;

    font-weight: 850;

    letter-spacing: 0.10em;
}


.timer-circle strong {
    margin:
        1px
        0
        -2px;

    color: var(--primary);

    font-size: 35px;

    line-height: 1;
}


.timer-circle small {
    color: var(--text-soft);

    font-size: 11px;
}


.timer-warning {
    border-color: #f3b944;

    transform: scale(1.04);
}


.timer-warning strong {
    color: #dc8d00;
}


/* =========================================================
   QUESTION
========================================================= */

.question-wrapper {
    text-align: center;
}


.question-instruction {
    margin:
        0
        0
        8px;

    color: var(--text-soft);

    font-size: 14px;
}


.question-text {
    margin-bottom: 20px;

    color: var(--text);

    font-size:
        clamp(
            52px,
            10vw,
            78px
        );

    font-weight: 850;

    letter-spacing: -0.055em;
}


.answer-wrapper {
    display: flex;

    justify-content: center;

    align-items: center;

    gap: 15px;
}


.equal-sign {
    color: var(--text-light);

    font-size: 37px;

    font-weight: 700;
}


.answer-input {
    width: 170px;

    padding:
        14px
        15px;

    border:
        3px solid
        #dfe4ee;

    border-radius: 18px;

    outline: none;

    background: white;

    color: var(--primary);

    text-align: center;

    font-size: 42px;

    font-weight: 850;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


.answer-input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 5px
        rgba(
            49,
            94,
            251,
            0.10
        );
}


.answer-input:disabled {
    background: #f5f7fa;
}


.answer-help {
    margin:
        15px
        0
        0;

    color: var(--text-light);

    font-size: 12px;
}


/* =========================================================
   FEEDBACK
========================================================= */

.answer-feedback {
    min-height: 31px;

    margin-top: 20px;

    text-align: center;

    font-size: 18px;

    font-weight: 800;
}


.feedback-correct {
    color: var(--success);
}


.feedback-wrong {
    color: #d33a44;
}


.feedback-timeout {
    color: #c17b00;
}


/* =========================================================
   RESULT
========================================================= */

.result-screen {
    padding:
        38px
        34px;

    border:
        1px solid
        var(--border);

    border-radius: 30px;

    background: white;

    box-shadow: var(--shadow-lg);

    text-align: center;
}


.result-icon {
    width: 78px;

    height: 78px;

    display: grid;

    place-items: center;

    margin:
        0
        auto
        22px;

    border-radius: 50%;

    font-size: 37px;

    font-weight: 850;
}


.result-pass {
    background: #e5f8ef;

    color: var(--success);
}


.result-fail {
    background: #fff0d8;

    color: #d28b00;
}


.result-screen h1 {
    margin:
        7px
        0
        8px;

    font-size: 33px;
}


.result-message {
    max-width: 500px;

    margin:
        0
        auto
        27px;

    color: var(--text-soft);

    line-height: 1.55;
}


.result-score {
    width: 155px;

    height: 155px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    margin:
        0
        auto
        28px;

    border:
        9px solid
        var(--primary-light);

    border-radius: 50%;
}


.result-score strong {
    color: var(--primary);

    font-size: 39px;
}


.result-score span {
    color: var(--text-soft);

    font-size: 12px;
}


/* =========================================================
   RESULT STATS
========================================================= */

.result-grid {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(
                0,
                1fr
            )
        );

    gap: 11px;

    margin-bottom: 20px;
}


.result-stat {
    padding:
        16px
        9px;

    border:
        1px solid
        var(--border);

    border-radius: 16px;

    background: var(--surface-soft);
}


.result-stat span {
    display: block;

    margin-bottom: 5px;

    color: var(--text-light);

    font-size: 11px;
}


.result-stat strong {
    font-size: 21px;
}


.best-score-box {
    margin:
        18px
        0;

    padding: 13px;

    border-radius: 13px;

    background: var(--primary-light);

    color: var(--primary-dark);

    font-size: 13px;

    font-weight: 700;
}


/* =========================================================
   RESULT ACTIONS
========================================================= */

.result-actions {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 12px;

    margin-top: 25px;
}


/* =========================================================
   MOBILE PRACTICE
========================================================= */

@media (
    max-width: 600px
) {

    .practice-page {
        width:
            calc(
                100% - 22px
            );

        margin-top: 16px;
    }


    .practice-game {
        padding:
            22px
            18px
            28px;

        border-radius: 24px;
    }


    .timer-wrapper {
        margin-top: 24px;
    }


    .timer-circle {
        width: 98px;

        height: 98px;
    }


    .timer-circle strong {
        font-size: 30px;
    }


    .question-text {
        font-size: 54px;
    }


    .answer-input {
        width: 145px;

        font-size: 37px;
    }


    .result-screen {
        padding:
            30px
            19px;
    }


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


    .result-actions {
        grid-template-columns:
            1fr;
    }

}

/* =========================================================
   TOPBAR
========================================================= */

.topbar {
    position: sticky;

    top: 0;

    z-index: 20;

    min-height: 76px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding:
        0
        max(
            22px,
            calc(
                (100vw - 1100px)
                / 2
            )
        );

    background:
        rgba(255, 255, 255, 0.92);

    border-bottom:
        1px solid
        rgba(228, 232, 240, 0.85);

    backdrop-filter:
        blur(16px);
}


.topbar-brand {
    display: flex;
    flex-direction: column;
}


.topbar small {
    display: block;

    margin-bottom: 3px;

    color: var(--text-light);

    font-size: 11px;
    font-weight: 750;

    letter-spacing: 0.07em;
}


.topbar strong {
    font-size: 15px;
}


/* =========================================================
   BACK / LOGOUT
========================================================= */

.logout-button,
.back-button {
    padding:
        9px
        15px;

    border:
        1px solid
        var(--border);

    border-radius: 11px;

    background: white;

    color: var(--text);

    text-decoration: none;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}


.logout-button:hover,
.back-button:hover {
    background: var(--primary-light);

    border-color: #c8d2ff;

    color: var(--primary-dark);

    transform:
        translateY(-1px);
}


/* =========================================================
   DASHBOARD CONTAINER
========================================================= */

.dashboard {
    width:
        min(
            1100px,
            calc(
                100% - 44px
            )
        );

    margin:
        36px
        auto
        75px;
}


/* =========================================================
   WELCOME
========================================================= */

.welcome-card {
    position: relative;

    margin-bottom: 34px;

    padding:
        32px
        34px;

    border-radius: 26px;

    background:
        linear-gradient(
            135deg,
            #315efb 0%,
            #566eff 60%,
            #7657ff 100%
        );

    color: white;

    box-shadow:
        0 18px 38px
        rgba(49, 94, 251, 0.20);

    overflow: hidden;
}


.welcome-card::after {
    content: "✓";

    position: absolute;

    right: 28px;
    top: 50%;

    transform:
        translateY(-50%);

    font-size: 95px;
    font-weight: 800;

    color:
        rgba(255,255,255,0.09);
}


.welcome-card p {
    margin: 0;

    opacity: 0.82;
}


.welcome-card h1 {
    margin:
        6px
        0;

    font-size: 31px;

    letter-spacing: -0.03em;
}


.welcome-card span {
    opacity: 0.9;
}


/* =========================================================
   GUEST
========================================================= */

.guest-notice {
    margin-bottom: 34px;

    padding:
        21px
        24px;

    border:
        1px solid
        #f4df9e;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            #fff7dc,
            #fff0c4
        );

    color: #684c00;
}


.guest-notice p {
    margin:
        6px
        0
        0;

    line-height: 1.5;
}


/* =========================================================
   SECTION TITLE
========================================================= */

.section-title {
    margin-bottom: 22px;
}


.section-title p {
    margin: 0;

    color: var(--primary);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 0.09em;
}


.section-title h2 {
    margin:
        6px
        0
        0;

    font-size: 29px;

    letter-spacing: -0.025em;
}


/* =========================================================
   SUBJECT
========================================================= */

.subject-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap: 18px;
}


.subject-card {
    position: relative;

    width: 100%;

    min-height: 158px;

    display: flex;
    align-items: center;

    gap: 21px;

    padding: 25px;

    border:
        1.5px solid
        var(--border);

    border-radius: 23px;

    background: white;

    text-align: left;

    overflow: hidden;

    transition:
        transform 0.20s ease,
        border-color 0.20s ease,
        box-shadow 0.20s ease,
        background 0.20s ease;
}


/* =========================================================
   INI YANG MEMBUAT MATEMATIKA JELAS AKTIF
========================================================= */

button.subject-card {
    cursor: pointer;
}


button.subject-card::after {
    content: "›";

    position: absolute;

    right: 22px;
    top: 50%;

    transform:
        translateY(-50%)
        translateX(-4px);

    color: #a7b0c0;

    font-size: 31px;

    opacity: 0;

    transition:
        opacity 0.20s ease,
        transform 0.20s ease,
        color 0.20s ease;
}


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

    border-color:
        rgba(49, 94, 251, 0.55);

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #f8f9ff
        );

    box-shadow:
        0 18px 40px
        rgba(37, 62, 137, 0.12);
}


button.subject-card:hover::after {
    opacity: 1;

    color: var(--primary);

    transform:
        translateY(-50%)
        translateX(0);
}


button.subject-card:active {
    transform:
        translateY(-2px)
        scale(0.995);
}


button.subject-card:focus-visible {
    outline: none;

    border-color:
        var(--primary);

    box-shadow:
        0 0 0 4px
        rgba(49, 94, 251, 0.13);
}


.subject-icon {
    min-width: 65px;

    height: 65px;

    display: grid;
    place-items: center;

    border-radius: 19px;

    background:
        linear-gradient(
            135deg,
            #edf1ff,
            #e3e9ff
        );

    color: var(--primary);

    font-size: 29px;
    font-weight: 850;

    transition:
        transform 0.20s ease,
        background 0.20s ease,
        color 0.20s ease;
}


button.subject-card:hover
.subject-icon {
    transform:
        scale(1.08)
        rotate(-3deg);

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );

    color: white;

    box-shadow:
        0 10px 22px
        rgba(49, 94, 251, 0.22);
}


.subject-card h3 {
    margin:
        0
        0
        7px;

    font-size: 20px;
}


.subject-card p {
    max-width: 330px;

    margin: 0;

    color: var(--text-soft);

    line-height: 1.55;
}


/* =========================================================
   DISABLED SUBJECT
========================================================= */

.subject-disabled {
    opacity: 0.44;

    background: #fafbfc;

    filter:
        grayscale(0.15);

    cursor: default;
}


.subject-disabled::after {
    content: "Segera";

    position: absolute;

    top: 16px;
    right: 17px;

    padding:
        5px
        8px;

    border-radius: 999px;

    background: #edf0f4;

    color: #929cad;

    font-size: 10px;
    font-weight: 700;
}


/* =========================================================
   PAGE HEADING / HERO
========================================================= */

.page-heading {
    position: relative;

    margin-bottom: 27px;

    padding:
        28px
        30px;

    border:
        1px solid
        #e2e7f3;

    border-radius: 24px;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f7f9ff 100%
        );

    box-shadow: var(--shadow-sm);

    overflow: hidden;
}


.page-heading::after {
    content: "";

    position: absolute;

    width: 160px;
    height: 160px;

    right: -55px;
    top: -75px;

    border-radius: 50%;

    background:
        rgba(49, 94, 251, 0.07);

    pointer-events: none;
}


.page-heading h1 {
    position: relative;

    margin:
        7px
        0
        8px;

    font-size: 33px;

    letter-spacing: -0.03em;
}


.page-heading p:not(.eyebrow) {
    position: relative;

    margin: 0;

    color: var(--text-soft);

    line-height: 1.55;
}


.eyebrow {
    position: relative;

    margin: 0;

    color: var(--primary);

    font-size: 12px;
    font-weight: 850;

    letter-spacing: 0.11em;
}


/* =========================================================
   TOPIC / STAGE GRID
========================================================= */

.learning-grid {
    display: grid;

    gap: 16px;
}


.learning-card {
    position: relative;

    width: 100%;

    display: grid;

    grid-template-columns:
        auto
        minmax(
            0,
            1fr
        )
        auto;

    align-items: center;

    gap: 21px;

    padding:
        23px
        24px;

    border:
        1.5px solid
        var(--border);

    border-radius: 21px;

    background: white;

    text-align: left;

    cursor: pointer;

    box-shadow: var(--shadow-sm);

    transition:
        transform 0.20s ease,
        border-color 0.20s ease,
        box-shadow 0.20s ease,
        background 0.20s ease;
}


.learning-card:hover {
    transform:
        translateY(-4px);

    border-color:
        rgba(49, 94, 251, 0.50);

    background:
        linear-gradient(
            135deg,
            white,
            #f8f9ff
        );

    box-shadow: var(--shadow-md);
}


.learning-card:active {
    transform:
        translateY(-1px);
}


.learning-card:focus-visible {
    outline: none;

    border-color:
        var(--primary);

    box-shadow:
        0 0 0 4px
        rgba(49, 94, 251, 0.12);
}


.learning-card h3 {
    margin:
        0
        0
        6px;

    font-size: 20px;
}


.learning-card p {
    margin: 0;

    color: var(--text-soft);

    line-height: 1.55;
}


.learning-icon,
.stage-number {
    width: 61px;
    height: 61px;

    display: grid;
    place-items: center;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            #edf1ff,
            #e5eaff
        );

    color: var(--primary);

    font-size: 29px;
    font-weight: 850;

    transition:
        transform 0.20s ease,
        background 0.20s ease,
        color 0.20s ease;
}


.learning-card:hover
.learning-icon,
.learning-card:hover
.stage-number {
    transform:
        scale(1.07);

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );

    color: white;
}


.stage-number {
    font-size: 21px;
}


.card-arrow {
    color: #a6afbf;

    font-size: 32px;

    transition:
        color 0.20s ease,
        transform 0.20s ease;
}


.learning-card:hover
.card-arrow {
    color: var(--primary);

    transform:
        translateX(4px);
}


/* =========================================================
   LEVEL GRID
========================================================= */

.level-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap: 18px;
}


.level-card {
    position: relative;

    width: 100%;

    padding: 23px;

    border:
        1.5px solid
        var(--border);

    border-radius: 21px;

    background: white;

    text-align: left;

    cursor: pointer;

    box-shadow: var(--shadow-sm);

    overflow: hidden;

    transition:
        transform 0.20s ease,
        border-color 0.20s ease,
        box-shadow 0.20s ease;
}


.level-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 4px;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--secondary)
        );

    transform:
        scaleX(0);

    transform-origin:
        left;

    transition:
        transform 0.22s ease;
}


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

    border-color:
        rgba(49, 94, 251, 0.45);

    box-shadow:
        0 18px 40px
        rgba(36, 61, 134, 0.11);
}


.level-card:hover::before {
    transform:
        scaleX(1);
}


.level-card:active {
    transform:
        translateY(-2px);
}


.level-card:focus-visible {
    outline: none;

    border-color:
        var(--primary);

    box-shadow:
        0 0 0 4px
        rgba(49, 94, 251, 0.12);
}


.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 12px;

    margin-bottom: 19px;
}


.level-number {
    width: 52px;
    height: 52px;

    display: grid;
    place-items: center;

    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            #5e73ff
        );

    color: white;

    font-size: 19px;
    font-weight: 850;

    box-shadow:
        0 9px 20px
        rgba(49, 94, 251, 0.22);

    transition:
        transform 0.20s ease;
}


.level-card:hover
.level-number {
    transform:
        scale(1.07)
        rotate(-3deg);
}


.time-badge {
    padding:
        7px
        11px;

    border:
        1px solid
        #dfe5ff;

    border-radius: 999px;

    background: var(--primary-light);

    color: var(--primary-dark);

    font-size: 13px;
    font-weight: 750;
}


.level-card h3 {
    margin:
        0
        0
        15px;

    font-size: 22px;
}


.level-info {
    display: flex;
    justify-content: space-between;

    flex-wrap: wrap;

    gap: 10px;

    color: var(--text-soft);

    font-size: 13px;
}


.start-label {
    display: inline-flex;
    align-items: center;

    margin-top: 21px;

    color: var(--primary);

    font-weight: 750;

    transition:
        transform 0.20s ease;
}


.level-card:hover
.start-label {
    transform:
        translateX(4px);
}


/* =========================================================
   LOADING / EMPTY / ERROR
========================================================= */

.loading-card,
.error-card,
.empty-card {
    padding: 25px;

    border:
        1px solid
        var(--border);

    border-radius: 18px;

    background: white;

    box-shadow: var(--shadow-sm);

    color: var(--text-soft);
}


.error-card {
    border-color: #f2c9cd;

    background: #fff7f8;

    color: #c52c35;
}


/* =========================================================
   UTILITIES
========================================================= */

.hidden {
    display: none !important;
}


/* =========================================================
   TABLET / MOBILE
========================================================= */

@media (
    max-width: 700px
) {

    .login-page {
        padding: 16px;
    }


    .login-card {
        padding: 27px;
    }


    .dashboard {
        width:
            calc(
                100% - 28px
            );

        margin-top: 21px;
    }


    .topbar {
        padding:
            0
            15px;
    }


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


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


    .page-heading {
        padding: 23px;
    }


    .learning-card {
        gap: 15px;

        padding: 19px;
    }


    .learning-icon,
    .stage-number {
        width: 52px;
        height: 52px;
    }


    .welcome-card {
        padding:
            25px
            24px;
    }

}


/* =========================================================
   SMALL PHONE
========================================================= */

@media (
    max-width: 430px
) {

    .login-card h1 {
        font-size: 27px;
    }


    .page-heading h1 {
        font-size: 27px;
    }


    .subject-card {
        gap: 16px;

        min-height: 135px;

        padding: 19px;
    }


    .subject-icon {
        min-width: 55px;

        height: 55px;
    }


    button.subject-card::after {
        display: none;
    }


    .learning-card p {
        font-size: 14px;
    }


    .learning-card {
        grid-template-columns:
            auto
            1fr
            auto;
    }


    .card-arrow {
        font-size: 26px;
    }


    .level-card {
        padding: 20px;
    }


    .level-info {
        flex-direction: column;
    }

}
/* =========================================================
   STAGE PROGRESSION
========================================================= */

.stage-progress {
    margin-top: 10px;

    color: var(--primary);

    font-size: 13px;

    font-weight: 700;
}


.stage-completed {
    border-color:
        rgba(
            22,
            163,
            106,
            0.35
        );
}


.stage-completed
.stage-number {
    background:
        linear-gradient(
            135deg,
            #16a36a,
            #43c78e
        );

    color: white;
}


.stage-completed
.stage-progress {
    color: var(--success);
}


.stage-locked {
    opacity: 0.52;

    background: #f5f6f8;

    cursor: not-allowed;

    transform: none !important;

    box-shadow: none !important;
}


.stage-locked:hover {
    border-color:
        var(--border);

    transform: none;
}


.stage-locked
.stage-number {
    background: #d7dce5;

    color: #8c95a4;
}


.stage-locked
.stage-progress {
    color: #8c95a4;
}


/* =========================================================
   LOCKED STAGE MESSAGE
========================================================= */

.stage-locked-message {
    grid-column: 1 / -1;

    max-width: 520px;

    margin: 20px auto;

    padding:
        38px
        32px;

    border:
        1px solid
        var(--border);

    border-radius: 24px;

    background: white;

    box-shadow: var(--shadow-md);

    text-align: center;
}


.stage-lock-icon {
    width: 70px;

    height: 70px;

    display: grid;

    place-items: center;

    margin:
        0
        auto
        18px;

    border-radius: 50%;

    background: #f0f2f6;

    font-size: 29px;
}


.stage-locked-message h3 {
    margin:
        0
        0
        9px;

    font-size: 23px;
}


.stage-locked-message p {
    margin:
        0
        0
        24px;

    color: var(--text-soft);

    line-height: 1.6;
}
