:root {
    --bg: #090b0f;
    --surface: #101319;
    --surface-2: #151922;
    --surface-3: #1b202a;

    --border: #252b35;

    --text: #f2f4f7;
    --muted: #9299a6;

    --primary: #7c8cff;
    --primary-dark: #5969e8;

    --success: #54d38a;

    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}


.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    height: 72px;

    display: flex;
    align-items: center;

    padding: 0 28px;

    background: rgba(9, 11, 15, .94);
    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(12px);

    z-index: 100;
}

.brand {
    width: 230px;

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

    font-weight: 700;
}

.brand-mark {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    border-radius: 10px;

    background: var(--primary);
    color: white;
}

.header-search {
    flex: 1;
    max-width: 560px;
}

.header-search input {
    width: 100%;

    padding: 12px 18px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;

    color: var(--text);
}

.header-search input::placeholder {
    color: var(--muted);
}

.header-actions {
    margin-left: auto;

    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-button {
    position: relative;

    width: 40px;
    height: 40px;

    background: transparent;
    color: var(--muted);

    border-radius: 10px;
}

.notification-dot {
    position: absolute;

    width: 7px;
    height: 7px;

    top: 8px;
    right: 8px;

    background: #ff657a;
    border-radius: 50%;
}

.profile-mini {
    background: transparent;
}

.avatar {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: var(--surface-3);
    border: 1px solid var(--border);

    color: white;
    font-weight: 700;
}

.avatar.small {
    width: 34px;
    height: 34px;

    font-size: 13px;
}

.avatar.large {
    width: 90px;
    height: 90px;

    font-size: 30px;
}


.sidebar {
    position: fixed;

    top: 72px;
    bottom: 0;
    left: 0;

    width: 230px;

    padding: 25px 15px;

    background: var(--surface);

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

    z-index: 50;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    width: 100%;

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

    padding: 12px 14px;

    background: transparent;

    color: var(--muted);

    border-radius: 10px;

    text-align: left;

    transition: .2s ease;
}

.nav-item:hover {
    background: var(--surface-2);
    color: var(--text);
}

.nav-item.active {
    background: var(--surface-3);
    color: var(--text);
}

.nav-item span:first-child {
    width: 20px;
    text-align: center;
}

.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 20px 5px;
}

.sidebar-bottom {
    position: absolute;
    bottom: 25px;
    left: 15px;
    right: 15px;

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

    padding-top: 15px;
}


.main-content {
    margin-left: 230px;
    padding: 110px 55px 70px;

    max-width: 1450px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    max-width: 800px;
    margin-bottom: 45px;
}

.eyebrow {
    display: inline-block;

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

    letter-spacing: .13em;

    color: var(--primary);

    margin-bottom: 10px;
}

.page-header h1 {
    margin: 0;

    font-size: clamp(34px, 4vw, 58px);

    line-height: 1.05;

    letter-spacing: -1.8px;
}

.page-header h1 span {
    color: var(--primary);
}

.page-header p {
    max-width: 650px;

    margin-top: 18px;

    color: var(--muted);

    font-size: 16px;
    line-height: 1.7;
}


.primary-button {
    padding: 12px 20px;

    background: var(--primary);
    color: white;

    border-radius: 10px;

    font-weight: 700;

    transition: .2s ease;
}

.primary-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.primary-button.full {
    width: 100%;
}

.secondary-button {
    padding: 11px 18px;

    background: transparent;

    color: var(--text);

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

    border-radius: 10px;
}

.text-button {
    background: transparent;
    color: var(--primary);
    font-weight: 700;
}


.progress-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 30px;

    background: var(--surface);

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

    border-radius: var(--radius);

    margin-bottom: 55px;
}

.small-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    color: var(--muted);
}

.progress-banner h2 {
    margin: 8px 0;
}

.progress-banner p {
    margin: 0;
    color: var(--muted);
}

.progress-circle {
    width: 82px;
    height: 82px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    border: 5px solid var(--primary);

    font-size: 16px;
}


.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    margin-bottom: 20px;
}

.section-heading h2 {
    margin: 0;
}


.content-grid {
    display: grid;

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

    gap: 20px;
}

.knowledge-card,
.challenge-preview {
    background: var(--surface);

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

    border-radius: var(--radius);

    padding: 23px;
}

.knowledge-card {
    display: flex;
    flex-direction: column;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category {
    display: inline-block;

    padding: 6px 9px;

    border-radius: 6px;

    background: var(--surface-3);

    color: var(--primary);

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

    letter-spacing: .08em;
}

.save-button {
    background: transparent;

    color: var(--muted);

    font-size: 20px;
}

.knowledge-card h3 {
    font-size: 21px;
    line-height: 1.25;

    margin: 20px 0 12px;
}

.knowledge-card p,
.challenge-preview p {
    color: var(--muted);

    line-height: 1.6;

    font-size: 14px;
}

.creator {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-top: 22px;
}

.creator div {
    display: flex;
    flex-direction: column;
}

.creator strong {
    font-size: 13px;
}

.creator span {
    font-size: 11px;
    color: var(--muted);
}

.card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin: 20px 0;

    color: var(--muted);

    font-size: 11px;
}

.challenge-preview {
    display: flex;
    flex-direction: column;
    justify-content: center;

    background:
        linear-gradient(
            145deg,
            var(--surface-2),
            var(--surface)
        );
}

.challenge-preview h3 {
    font-size: 25px;
    line-height: 1.25;
}

.challenge-stats {
    display: flex;
    gap: 15px;

    color: var(--muted);

    font-size: 12px;

    margin: 10px 0 25px;
}


.search-large {
    display: flex;
    gap: 10px;

    max-width: 850px;

    margin-bottom: 50px;
}

.search-large input {
    flex: 1;

    padding: 15px 18px;

    background: var(--surface);

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

    border-radius: 10px;

    color: var(--text);
}

.categories-grid {
    display: grid;

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

    gap: 12px;
}

.category-card {
    min-height: 120px;

    padding: 18px;

    background: var(--surface);

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

    border-radius: 14px;

    text-align: left;

    color: var(--text);

    transition: .2s ease;
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.category-card strong,
.category-card span {
    display: block;
}

.category-card span {
    margin-top: 10px;

    color: var(--muted);

    font-size: 12px;
}


.challenge-main {
    max-width: 800px;

    padding: 35px;

    background: var(--surface);

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

    border-radius: var(--radius);
}

.challenge-main h2 {
    font-size: 30px;
    line-height: 1.3;

    margin: 25px 0;
}

.answers {
    display: grid;
    gap: 10px;

    margin-bottom: 25px;
}

.answer {
    padding: 17px;

    background: var(--surface-2);

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

    border-radius: 10px;

    color: var(--text);

    text-align: left;

    transition: .2s ease;
}

.answer:hover {
    border-color: var(--primary);
}


.create-options {
    display: grid;

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

    gap: 20px;

    max-width: 850px;
}

.create-option {
    padding: 30px;

    background: var(--surface);

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

    border-radius: var(--radius);

    text-align: left;

    color: var(--text);
}

.create-option:hover {
    border-color: var(--primary);
}

.create-icon {
    display: block;

    font-size: 30px;

    margin-bottom: 20px;

    color: var(--primary);
}

.create-option strong,
.create-option small {
    display: block;
}

.create-option strong {
    font-size: 19px;
}

.create-option small {
    margin-top: 10px;

    color: var(--muted);

    line-height: 1.5;
}

.creator-info {
    max-width: 700px;

    margin-top: 55px;

    padding: 30px;

    background: var(--surface);

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

    border-radius: var(--radius);
}

.creator-info p {
    color: var(--muted);
    line-height: 1.7;
}


.empty-state {
    max-width: 600px;

    padding: 70px 30px;

    text-align: center;

    background: var(--surface);

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

    border-radius: var(--radius);
}

.empty-icon {
    font-size: 40px;
    color: var(--primary);
}

.empty-state p {
    color: var(--muted);

    line-height: 1.6;

    margin-bottom: 25px;
}


.stats-grid {
    display: grid;

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

    gap: 15px;

    margin-bottom: 25px;
}

.stat-card {
    padding: 25px;

    background: var(--surface);

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

    border-radius: 14px;
}

.stat-card span,
.stat-card strong {
    display: block;
}

.stat-card span {
    color: var(--muted);
    font-size: 12px;
}

.stat-card strong {
    font-size: 32px;
    margin-top: 12px;
}

.progress-panel {
    max-width: 850px;

    padding: 30px;

    background: var(--surface);

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

    border-radius: var(--radius);
}

.progress-row {
    display: grid;

    grid-template-columns: 130px 1fr 45px;

    align-items: center;

    gap: 15px;

    margin-top: 25px;

    font-size: 13px;
}

.progress-row strong {
    text-align: right;
}

.bar {
    height: 8px;

    overflow: hidden;

    background: var(--surface-3);

    border-radius: 10px;
}

.bar span {
    display: block;

    height: 100%;

    background: var(--primary);
}


.profile-header {
    display: flex;
    align-items: center;
    gap: 22px;

    padding-bottom: 35px;

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

.profile-header h1 {
    margin: 5px 0;
}

.profile-header p {
    margin: 0;

    color: var(--muted);
}

.profile-header .secondary-button {
    margin-left: auto;
}

.profile-stats {
    display: flex;

    gap: 55px;

    padding: 30px 0 55px;
}

.profile-stats strong,
.profile-stats span {
    display: block;
}

.profile-stats strong {
    font-size: 25px;
}

.profile-stats span {
    margin-top: 5px;

    color: var(--muted);

    font-size: 12px;
}


.mobile-nav {
    display: none;
}


@media (max-width: 1100px) {

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

    .categories-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

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


@media (max-width: 750px) {

    .topbar {
        height: 64px;

        padding: 0 16px;
    }

    .brand {
        width: auto;
    }

    .brand span {
        display: none;
    }

    .header-search {
        display: none;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;

        padding:
            95px 17px
            100px;
    }

    .page-header {
        margin-bottom: 32px;
    }

    .page-header h1 {
        font-size: 36px;
    }

    .content-grid,
    .create-options,
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .progress-banner {
        align-items: flex-start;
        gap: 20px;
    }

    .section-heading {
        align-items: center;
    }

    .challenge-main {
        padding: 22px;
    }

    .challenge-main h2 {
        font-size: 24px;
    }

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

    .progress-row {
        grid-template-columns:
            100px 1fr 40px;
    }

    .profile-header {
        flex-wrap: wrap;
    }

    .profile-header .secondary-button {
        margin-left: 0;
    }

    .profile-stats {
        gap: 25px;
        justify-content: space-between;
    }

    .mobile-nav {
        position: fixed;

        display: flex;

        left: 10px;
        right: 10px;
        bottom: 10px;

        height: 65px;

        padding: 5px;

        background: rgba(16, 19, 25, .96);

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

        border-radius: 18px;

        backdrop-filter: blur(12px);

        z-index: 200;
    }

    .mobile-nav-item {
        flex: 1;

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

        gap: 3px;

        background: transparent;

        color: var(--muted);
    }

    .mobile-nav-item.active {
        color: var(--primary);
    }

    .mobile-nav-item span {
        font-size: 18px;
    }

    .mobile-nav-item small {
        font-size: 9px;
    }
}