/* =========================================================
   STARDANCE LEARNING HUB
   STYLE.CSS v1.1
   Matched to current index.html
   ========================================================= */


/* =========================================================
   1. RESET
   ========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    color: #ffffff;

    background:
        radial-gradient(
            circle at top,
            #202b55 0%,
            #10152d 45%,
            #080b18 100%
        );

    line-height: 1.6;
}

button,
textarea,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,
textarea:focus-visible {
    outline: 3px solid #67e8f9;
    outline-offset: 3px;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   2. PAGE SYSTEM
   ========================================================= */

.page {
    min-height: 100vh;
    padding: 50px 30px;
}

.hidden {
    display: none !important;
}


/* =========================================================
   3. HEADER
   ========================================================= */

#header {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;

    background:
        rgba(8, 11, 24, 0.92);

    backdrop-filter: blur(15px);

    border-bottom:
        1px solid rgba(255, 255, 255, 0.08);
}

.navbar {
    width: 100%;
    max-width: 1250px;

    margin: auto;
    padding: 15px 25px;

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

    gap: 25px;
}

.logo {
    color: #67e8f9;

    font-size: 1.35rem;
    font-weight: 800;

    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;

    gap: 6px;
}

.nav-links button {
    border: none;

    background: transparent;

    color: #cbd5e1;

    padding: 9px 13px;

    border-radius: 10px;

    transition:
        color 0.2s,
        background 0.2s,
        transform 0.2s;
}

.nav-links button:hover {
    color: #67e8f9;

    background:
        rgba(103, 232, 249, 0.10);

    transform: translateY(-2px);
}


/* =========================================================
   4. GENERAL PAGE HEADER
   ========================================================= */

.page-header {
    width: 100%;
    max-width: 1000px;

    margin: 0 auto 45px;

    text-align: center;
}

.page-header h1 {
    margin: 8px 0 12px;

    font-size:
        clamp(2rem, 5vw, 4rem);

    line-height: 1.1;
}

.page-header > p:last-child {
    color: #94a3b8;

    font-size: 1.05rem;
}

.eyebrow {
    color: #67e8f9 !important;

    font-size: 0.78rem !important;

    font-weight: 800;

    letter-spacing: 2px;

    text-transform: uppercase;
}


/* =========================================================
   5. HOME / HERO
   ========================================================= */

.home-page {
    padding-top: 0;
}

.hero {
    min-height: 82vh;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding:
        70px 20px
        50px;
}

.hero h1 {
    margin: 15px 0 25px;

    font-size:
        clamp(3rem, 8vw, 6rem);

    line-height: 1;

    letter-spacing: -2px;

    background:
        linear-gradient(
            90deg,
            #67e8f9,
            #a78bfa,
            #f0abfc
        );

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}

.hero h1 span {
    background:
        linear-gradient(
            90deg,
            #a78bfa,
            #f0abfc
        );

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}

.hero-description {
    width: 100%;
    max-width: 760px;

    color: #cbd5e1;

    font-size: 1.15rem;

    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;

    flex-wrap: wrap;

    justify-content: center;

    gap: 14px;

    margin-bottom: 45px;
}


/* =========================================================
   6. BUTTONS
   IMPORTANT: MATCHES HTML
   ========================================================= */

.primary-button,
.secondary-button,
.course-button,
.back-button {
    border-radius: 12px;

    font-weight: 700;

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


/* Primary */

.primary-button {
    border: none;

    padding: 13px 23px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #06b6d4,
            #6366f1
        );

    box-shadow:
        0 10px 30px
        rgba(59, 130, 246, 0.25);
}

.primary-button:hover {
    transform: translateY(-3px);

    box-shadow:
        0 15px 35px
        rgba(59, 130, 246, 0.42);
}

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


/* Secondary */

.secondary-button {
    border:
        1px solid
        rgba(255, 255, 255, 0.14);

    padding: 13px 23px;

    color: #dbeafe;

    background:
        rgba(255, 255, 255, 0.06);
}

.secondary-button:hover {
    transform: translateY(-3px);

    color: #ffffff;

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

    border-color:
        rgba(103, 232, 249, 0.3);
}


/* Back */

.back-button {
    border:
        1px solid
        rgba(255, 255, 255, 0.10);

    padding: 9px 14px;

    color: #cbd5e1;

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

    margin-bottom: 25px;
}

.back-button:hover {
    color: #67e8f9;

    background:
        rgba(103, 232, 249, 0.08);

    border-color:
        rgba(103, 232, 249, 0.25);
}


/* =========================================================
   7. HERO STATS
   ========================================================= */

.hero-stats {
    width: 100%;
    max-width: 800px;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 18px;
}

.stat-card {
    padding: 22px;

    text-align: center;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);

    border-radius: 18px;

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

    backdrop-filter: blur(10px);

    transition:
        transform 0.2s,
        background 0.2s;
}

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

    background:
        rgba(255, 255, 255, 0.075);
}

.stat-card strong {
    display: block;

    color: #67e8f9;

    font-size: 2rem;

    line-height: 1.2;

    margin-bottom: 5px;
}

.stat-card span {
    color: #94a3b8;
}


/* =========================================================
   8. HOME INTRODUCTION
   ========================================================= */

.home-introduction {
    width: 100%;
    max-width: 1100px;

    margin: auto;

    text-align: center;
}

.home-introduction > h2 {
    margin-bottom: 12px;

    font-size:
        clamp(1.8rem, 4vw, 2.7rem);
}

.home-introduction > p {
    max-width: 750px;

    margin: 0 auto 35px;

    color: #94a3b8;
}

.feature-grid {
    display: grid;

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

    gap: 20px;
}

.feature-card {
    padding: 25px;

    text-align: center;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);

    border-radius: 20px;

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

    transition:
        transform 0.25s,
        background 0.25s,
        border-color 0.25s;
}

.feature-card:hover {
    transform: translateY(-6px);

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

    border-color:
        rgba(103, 232, 249, 0.25);
}

.feature-icon {
    font-size: 2.5rem;

    margin-bottom: 12px;
}

.feature-card h3 {
    margin-bottom: 8px;
}

.feature-card p {
    color: #94a3b8;

    font-size: 0.95rem;
}


/* =========================================================
   9. COURSE GRID
   ========================================================= */

.course-grid {
    width: 100%;
    max-width: 1100px;

    margin: auto;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 25px;
}

.course-card {
    min-height: 410px;

    display: flex;

    flex-direction: column;

    padding: 28px;

    border:
        1px solid
        rgba(255, 255, 255, 0.09);

    border-radius: 22px;

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

    backdrop-filter: blur(12px);

    transition:
        transform 0.25s,
        border-color 0.25s,
        background 0.25s;
}

.course-card:hover {
    transform: translateY(-7px);

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

    border-color:
        rgba(103, 232, 249, 0.28);
}

.course-card h2 {
    margin: 15px 0 10px;

    font-size: 1.7rem;
}

.course-card p {
    color: #94a3b8;

    flex: 1;

    margin-bottom: 20px;
}

.course-icon {
    width: 65px;
    height: 65px;

    display: flex;

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

    border-radius: 16px;

    font-weight: 900;

    font-size: 1.15rem;
}

.html-icon {
    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #f97316,
            #dc2626
        );
}

.css-icon {
    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #38bdf8,
            #2563eb
        );
}

.js-icon {
    color: #111827;

    background:
        linear-gradient(
            135deg,
            #facc15,
            #f59e0b
        );
}

.course-info {
    display: flex;

    justify-content: space-between;

    gap: 10px;

    margin-bottom: 18px;

    color: #94a3b8;

    font-size: 0.85rem;
}

.course-button {
    width: 100%;

    padding: 12px 16px;

    border:
        1px solid
        rgba(103, 232, 249, 0.2);

    color: #dbeafe;

    background:
        rgba(103, 232, 249, 0.08);
}

.course-button:hover {
    color: #ffffff;

    background:
        rgba(103, 232, 249, 0.16);

    transform: translateY(-2px);
}


/* =========================================================
   10. COURSE LEVEL PAGE
   ========================================================= */

.course-page {
    padding-top: 55px;
}

.level-grid {
    width: 100%;
    max-width: 1050px;

    margin: auto;

    display: grid;

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

    gap: 20px;
}

.level-card {
    min-height: 240px;

    display: flex;

    flex-direction: column;

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

    gap: 8px;

    padding: 25px;

    border:
        1px solid
        rgba(255, 255, 255, 0.09);

    border-radius: 20px;

    color: #ffffff;

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

    transition:
        transform 0.25s,
        background 0.25s,
        border-color 0.25s;
}

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

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

    border-color:
        rgba(103, 232, 249, 0.3);
}

.level-number {
    color: #67e8f9;

    font-size: 0.8rem;

    font-weight: 800;

    letter-spacing: 2px;
}

.level-icon {
    font-size: 3rem;

    margin: 5px 0;
}

.level-card strong {
    font-size: 1.25rem;
}

.level-card > span:last-child {
    color: #94a3b8;

    font-size: 0.9rem;
}


/* =========================================================
   11. LESSON LAYOUT
   ========================================================= */

.lesson-page {
    padding-top: 40px;
}

.lesson-layout {
    width: 100%;
    max-width: 1300px;

    margin: auto;

    display: grid;

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

    gap: 25px;

    align-items: start;
}


/* =========================================================
   12. LESSON SIDEBAR
   ========================================================= */

.lesson-sidebar {
    position: sticky;
    top: 85px;

    padding: 18px;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);

    border-radius: 18px;

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

    backdrop-filter: blur(12px);
}

.lesson-sidebar-title {
    padding: 10px 4px 16px;

    display: flex;

    flex-direction: column;

    gap: 3px;

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.08);

    margin-bottom: 15px;
}

#lesson-course {
    color: #67e8f9;

    font-size: 0.8rem;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: 1px;
}

#lesson-level {
    font-size: 1.2rem;
}

.lesson-list {
    display: flex;

    flex-direction: column;

    gap: 7px;
}

.lesson-item {
    width: 100%;

    padding: 11px 12px;

    text-align: left;

    border: none;

    border-radius: 10px;

    color: #cbd5e1;

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

    transition:
        background 0.2s,
        color 0.2s,
        transform 0.2s;
}

.lesson-item:hover {
    color: #ffffff;

    background:
        rgba(103, 232, 249, 0.10);

    transform: translateX(3px);
}

.lesson-item.active {
    color: #67e8f9;

    background:
        linear-gradient(
            90deg,
            rgba(6, 182, 212, 0.20),
            rgba(99, 102, 241, 0.20)
        );

    border-left:
        3px solid #67e8f9;
}


/* =========================================================
   13. LESSON MAIN
   ========================================================= */

.lesson-main {
    min-width: 0;
}

.lesson-header {
    margin-bottom: 25px;
}

.lesson-header h1 {
    margin-top: 8px;

    font-size:
        clamp(2rem, 5vw, 3.5rem);

    line-height: 1.1;
}


/* =========================================================
   14. LESSON BODY
   ========================================================= */

.lesson-body {
    margin-bottom: 25px;

    padding: 28px;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.045);
}

.lesson-body p {
    color: #cbd5e1;

    margin-bottom: 15px;
}

.lesson-body h2,
.lesson-body h3,
.lesson-body h4 {
    margin:
        20px 0 10px;

    color: #ffffff;
}

.lesson-body strong {
    color: #67e8f9;
}

.lesson-body code {
    padding: 2px 6px;

    border-radius: 5px;

    color: #67e8f9;

    background:
        rgba(103, 232, 249, 0.08);

    font-family:
        "Courier New",
        monospace;
}


/* =========================================================
   15. EDITOR BOX
   MATCHES HTML .editor-box
   ========================================================= */

.editor-box {
    overflow: hidden;

    margin-top: 25px;

    border:
        1px solid
        rgba(255, 255, 255, 0.10);

    border-radius: 18px;

    background:
        #080b16;

    box-shadow:
        0 15px 40px
        rgba(0, 0, 0, 0.25);
}

.editor-header {
    min-height: 55px;

    display: flex;

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

    gap: 15px;

    padding: 10px 15px;

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

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.08);
}

.editor-header span {
    color: #dbeafe;

    font-weight: 700;
}

.editor-header button {
    border: none;

    border-radius: 8px;

    padding: 8px 14px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #06b6d4,
            #6366f1
        );

    font-weight: 700;
}

.editor-header button:hover {
    opacity: 0.9;

    transform: translateY(-1px);
}


/* =========================================================
   16. CODE EDITOR
   ========================================================= */

#code-editor {
    display: block;

    width: 100%;

    min-height: 350px;

    padding: 20px;

    resize: vertical;

    border: none;

    outline: none;

    color: #dbeafe;

    background:
        #080b16;

    font-family:
        "Courier New",
        Consolas,
        monospace;

    font-size: 14px;

    line-height: 1.65;

    tab-size: 4;
}

#code-editor::placeholder {
    color: #64748b;
}

#code-editor:focus {
    box-shadow:
        inset 0 0 0 1px
        rgba(103, 232, 249, 0.3);
}


/* =========================================================
   17. PREVIEW BOX
   MATCHES HTML .preview-box
   ========================================================= */

.preview-box {
    overflow: hidden;

    margin-top: 25px;

    border:
        1px solid
        rgba(255, 255, 255, 0.10);

    border-radius: 18px;

    background:
        #ffffff;

    box-shadow:
        0 15px 40px
        rgba(0, 0, 0, 0.25);
}

.preview-header {
    height: 50px;

    display: flex;

    align-items: center;

    padding: 0 16px;

    color: #dbeafe;

    background:
        #111827;

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.08);
}

.preview-header span {
    font-weight: 700;
}

#preview {
    display: block;

    width: 100%;

    min-height: 380px;

    border: none;

    background: #ffffff;
}


/* =========================================================
   18. CHALLENGE BOX
   MATCHES HTML .challenge-box
   ========================================================= */

.challenge-box {
    margin-top: 25px;

    padding: 28px;

    border:
        1px solid
        rgba(103, 232, 249, 0.15);

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            rgba(99, 102, 241, 0.15),
            rgba(6, 182, 212, 0.10)
        );
}

.challenge-box h2 {
    margin:
        5px 0 10px;
}

#challenge-text {
    color: #cbd5e1;

    margin-bottom: 20px;
}


/* =========================================================
   19. LESSON NAVIGATION
   ========================================================= */

.lesson-navigation {
    display: flex;

    justify-content: space-between;

    gap: 15px;

    margin-top: 30px;

    padding-top: 25px;

    border-top:
        1px solid
        rgba(255, 255, 255, 0.08);
}


/* =========================================================
   20. PROJECTS
   ========================================================= */

.project-grid {
    width: 100%;
    max-width: 1100px;

    margin: auto;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 25px;
}

.project-card {
    min-height: 280px;

    padding: 28px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);

    border-radius: 20px;

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

    transition:
        transform 0.25s,
        background 0.25s,
        border-color 0.25s;
}

.project-card:hover {
    transform: translateY(-6px);

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

    border-color:
        rgba(103, 232, 249, 0.25);
}

.project-icon {
    font-size: 3rem;

    margin-bottom: 10px;
}

.project-card h2 {
    margin-bottom: 10px;
}

.project-card p {
    color: #94a3b8;

    flex: 1;

    margin-bottom: 20px;
}

.project-card > span {
    color: #67e8f9;

    font-size: 0.85rem;

    font-weight: 700;
}


/* =========================================================
   21. PROGRESS DASHBOARD
   ========================================================= */

.progress-dashboard {
    width: 100%;
    max-width: 1000px;

    margin: auto;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;
}

.progress-card {
    padding: 28px;

    text-align: center;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.05);
}

.progress-card span {
    display: block;

    color: #94a3b8;

    font-size: 0.8rem;

    font-weight: 800;

    letter-spacing: 1px;

    margin-bottom: 8px;
}

.progress-card strong {
    color: #67e8f9;

    font-size: 2rem;
}


/* =========================================================
   22. XP BAR
   ========================================================= */

.xp-section {
    width: 100%;
    max-width: 1000px;

    margin: 30px auto 50px;
}

.xp-bar-container {
    width: 100%;

    height: 16px;

    overflow: hidden;

    border-radius: 50px;

    background:
        rgba(255, 255, 255, 0.08);
}

.xp-bar {
    width: 0%;

    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            #06b6d4,
            #6366f1,
            #a78bfa
        );

    transition:
        width 0.5s ease;
}

#progress-text {
    margin-top: 10px;

    color: #94a3b8;

    text-align: center;
}


/* =========================================================
   23. BADGES
   ========================================================= */

.badges-section {
    width: 100%;
    max-width: 1000px;

    margin: auto;
}

.badges-section > h2 {
    text-align: center;

    margin-bottom: 25px;
}

.badges-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;
}

.badge {
    padding: 25px;

    text-align: center;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);

    border-radius: 18px;

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

    opacity: 0.4;

    filter: grayscale(1);

    transition:
        opacity 0.3s,
        filter 0.3s,
        transform 0.3s,
        border-color 0.3s;
}

.badge.locked {
    opacity: 0.4;
}

.badge.unlocked {
    opacity: 1;

    filter: grayscale(0);

    transform: translateY(-4px);

    border-color:
        rgba(250, 204, 21, 0.45);
}

.badge-icon {
    font-size: 3rem;

    margin-bottom: 10px;
}

.badge h3 {
    margin-bottom: 6px;
}

.badge p {
    color: #94a3b8;

    font-size: 0.9rem;
}


/* =========================================================
   24. REQUIREMENTS
   ========================================================= */

.requirements-grid {
    width: 100%;
    max-width: 1050px;

    margin: auto;

    display: grid;

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

    gap: 20px;
}

.requirement-card {
    position: relative;

    padding: 28px;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);

    border-radius: 20px;

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

    transition:
        transform 0.25s,
        background 0.25s,
        border-color 0.25s;
}

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

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

    border-color:
        rgba(103, 232, 249, 0.25);
}

.requirement-number {
    width: 48px;
    height: 48px;

    display: flex;

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

    margin-bottom: 15px;

    border:
        2px solid #67e8f9;

    border-radius: 50%;

    color: #67e8f9;

    font-size: 1.2rem;

    font-weight: 800;
}

.requirement-card h2 {
    margin-bottom: 10px;
}

.requirement-card p {
    color: #94a3b8;

    margin-bottom: 18px;
}

.requirement-card > span {
    color: #22c55e;

    font-size: 0.8rem;

    font-weight: 800;

    letter-spacing: 1px;
}


/* =========================================================
   25. RESPONSIVE — 1100px
   ========================================================= */

@media (max-width: 1100px) {

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

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

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

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

}


/* =========================================================
   26. RESPONSIVE — 850px
   ========================================================= */

@media (max-width: 850px) {

    .navbar {
        flex-direction: column;

        justify-content: center;

        padding: 14px;
    }

    .nav-links {
        flex-wrap: wrap;

        justify-content: center;
    }

    .lesson-layout {
        grid-template-columns: 1fr;
    }

    .lesson-sidebar {
        position: static;
    }

    .lesson-list {
        display: grid;

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

    .progress-dashboard {
        grid-template-columns:
            1fr;
    }

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

}


/* =========================================================
   27. RESPONSIVE — 650px
   ========================================================= */

@media (max-width: 650px) {

    .page {
        padding:
            35px 15px;
    }

    .hero {
        min-height: 75vh;

        padding:
            45px 10px;
    }

    .hero h1 {
        font-size: 3rem;

        letter-spacing: -1px;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        width: 100%;

        flex-direction: column;
    }

    .hero-buttons button {
        width: 100%;
    }

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

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

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

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

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

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

    .lesson-list {
        grid-template-columns:
            1fr;
    }

    .lesson-navigation {
        flex-direction: column;
    }

    .lesson-navigation button {
        width: 100%;
    }

    .editor-header {
        flex-direction: column;

        align-items: stretch;
    }

    .editor-header button {
        width: 100%;
    }

    #code-editor {
        min-height: 280px;

        font-size: 13px;
    }

    #preview {
        min-height: 300px;
    }

}


/* =========================================================
   28. SCROLLBAR
   ========================================================= */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #080b18;
}

::-webkit-scrollbar-thumb {
    border-radius: 20px;

    background:
        linear-gradient(
            #06b6d4,
            #6366f1
        );
}

::-webkit-scrollbar-thumb:hover {
    background:
        linear-gradient(
            #22d3ee,
            #818cf8
        );
}


/* =========================================================
   29. SELECTION
   ========================================================= */

::selection {
    color: #ffffff;

    background: #6366f1;
}


/* =========================================================
   30. ANIMATION
   ========================================================= */

@keyframes pageEnter {

    from {
        opacity: 0;

        transform:
            translateY(12px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }

}

.page:not(.hidden) {
    animation:
        pageEnter 0.3s ease;
}


/* =========================================================
   31. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            0.01ms !important;
    }

}
/* =========================================================
   COMPATIBILITY FIX
   Matches the ACTUAL current index.html
   ========================================================= */

/* Navigation */
.nav-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-buttons button {
    border: 0;
    background: transparent;
    color: #cbd5e1;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
}

.nav-buttons button:hover {
    color: #67e8f9;
    background: rgba(103, 232, 249, 0.1);
}


/* Section headings */
.section-heading {
    max-width: 1000px;
    margin: 0 auto 40px;
    text-align: center;
}

.section-heading h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin: 8px 0 12px;
}

.section-heading p {
    color: #94a3b8;
}


/* Hero */
.hero > p {
    max-width: 750px;
    margin: 0 auto 25px;
    color: #cbd5e1;
}


/* Features */
.features {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature {
    padding: 25px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    transition: 0.25s;
}

.feature:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.08);
    border-color: rgba(103,232,249,0.3);
}

.feature h3 {
    margin: 10px 0;
}

.feature p {
    color: #94a3b8;
}


/* Course header */
.course-header {
    max-width: 1000px;
    margin: 0 auto 40px;
    text-align: center;
}

.course-header h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin: 10px 0;
}

.course-header p {
    color: #94a3b8;
}


/* Course cards are clickable */
.course-card {
    cursor: pointer;
}

.course-level {
    display: inline-block;
    margin-top: 15px;
    color: #67e8f9;
    font-weight: 700;
}


/* Level buttons */
.level-button {
    width: 100%;
    min-height: 220px;

    display: flex;
    align-items: center;
    gap: 20px;

    padding: 25px;

    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 20px;

    color: white;
    background: rgba(255,255,255,0.05);

    cursor: pointer;
    text-align: left;

    transition: 0.25s;
}

.level-button:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.09);
    border-color: rgba(103,232,249,0.3);
}

.level-button > span {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.level-button b {
    font-size: 1.2rem;
}

.level-button small,
.level-button em {
    color: #94a3b8;
    font-size: 0.85rem;
}

.level-button em {
    font-style: normal;
}


/* Lesson sidebar */
.lesson-sidebar-header {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.lesson-sidebar-header h3 {
    color: #67e8f9;
}

.lesson-sidebar-header p {
    color: #94a3b8;
}


/* Lesson content */
.lesson-content {
    min-width: 0;
}

#lesson-body {
    margin: 20px 0;
    padding: 25px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    background: rgba(255,255,255,0.045);
}

#lesson-body p {
    color: #cbd5e1;
    margin-bottom: 15px;
}

#lesson-body h3,
#lesson-body h4 {
    margin: 15px 0 10px;
}


/* Editor */
.editor {
    overflow: hidden;
    margin-top: 25px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    background: #080b16;
}

.editor-top {
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.editor-top span {
    font-weight: 700;
}

.run-button {
    border: 0;
    border-radius: 8px;
    padding: 9px 15px;
    color: white;
    background: linear-gradient(135deg,#06b6d4,#6366f1);
    cursor: pointer;
    font-weight: 700;
}

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


/* Preview */
.preview-heading {
    margin: 25px 0 8px;
    color: #cbd5e1;
    font-weight: 700;
}

#preview {
    width: 100%;
    min-height: 380px;
    display: block;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    background: white;
}


/* Challenge */
.challenge {
    margin-top: 25px;
    padding: 25px;
    border: 1px solid rgba(103,232,249,0.18);
    border-radius: 18px;
    background: linear-gradient(
        135deg,
        rgba(99,102,241,0.15),
        rgba(6,182,212,0.1)
    );
}

.challenge h3 {
    margin-bottom: 10px;
}

.challenge p {
    color: #cbd5e1;
    margin-bottom: 18px;
}

.challenge-button {
    border: 0;
    border-radius: 10px;
    padding: 11px 17px;
    color: white;
    background: linear-gradient(135deg,#06b6d4,#6366f1);
    cursor: pointer;
    font-weight: 700;
}


/* Lesson navigation */
.lesson-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 25px;
}

.lesson-navigation button {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 11px 18px;
    color: #dbeafe;
    background: rgba(255,255,255,0.06);
    cursor: pointer;
}

.lesson-navigation button:hover {
    background: rgba(103,232,249,0.1);
    border-color: rgba(103,232,249,0.3);
}


/* Progress */
.progress-card {
    max-width: 900px;
    margin: 0 auto 30px;
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
}

.xp-number {
    color: #67e8f9;
    font-size: 2.5rem;
    font-weight: 800;
}

.progress-bar {
    width: 100%;
    height: 14px;
    margin: 20px 0;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
}

#xp-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        #06b6d4,
        #6366f1,
        #a78bfa
    );
    transition: width 0.4s ease;
}

.progress-description {
    color: #94a3b8;
}


/* Badges */
.badges {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.badge {
    padding: 25px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    background: rgba(255,255,255,0.05);
    opacity: 0.45;
    filter: grayscale(1);
    transition: 0.3s;
}

.badge.unlocked {
    opacity: 1;
    filter: grayscale(0);
    border-color: rgba(250,204,21,0.4);
}


/* Mobile */
@media (max-width: 800px) {

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

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

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

    .nav-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .lesson-navigation {
        flex-direction: column;
    }

    .lesson-navigation button {
        width: 100%;
    }

}

@media (max-width: 600px) {

    .level-button {
        flex-direction: column;
        align-items: flex-start;
    }

    .editor-top {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .run-button {
        width: 100%;
    }

}
