@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Press+Start+2P&display=swap');

:root {
    --font-main: "Inter", sans-serif;
    --font-pixel: "Press Start 2P", system-ui;

    --background: #020817;
    --background-secondary: #06101f;
    --header-background: rgba(2, 8, 23, 0.94);

    --panel: rgba(13, 27, 47, 0.9);
    --panel-light: rgba(18, 35, 59, 0.9);
    --panel-hover: rgba(23, 44, 73, 0.95);

    --border: rgba(126, 156, 201, 0.2);
    --border-light: rgba(147, 177, 220, 0.32);

    --text: #f4f7ff;
    --text-secondary: #a8b4c8;
    --text-muted: #6f7e96;

    --blue: #1976ff;
    --blue-light: #27a7ff;
    --green: #18c963;
    --yellow: #ffc928;
    --purple: #c85cff;
    --red: #ff5468;

    --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
    --transition: 0.25s ease;
}

::selection {
    background: var(--blue);
    color: #ffffff;
}


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


::-webkit-scrollbar-track {
    background: #020817;
}


::-webkit-scrollbar-thumb {
    border: 2px solid #020817;
    background: #1b416d;
}


::-webkit-scrollbar-thumb:hover {
    background: var(--blue);
}

/* Активний курсор */

html,
body {
    cursor: url("../images/default.png") 10 2, pointer !important;
}

a,
button,
input,
textarea,
select,
label,
[role="button"],
.clickable {
    cursor: url("../images/pointer.png") 10 2, pointer !important;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 0%,
            rgba(20, 81, 152, 0.16),
            transparent 40%),
        var(--background);
    color: var(--text);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.5;
}

body.light-theme {
    --background: #eaf1fb;
    --background-secondary: #f5f8fd;
    --header-background: rgba(246, 249, 254, 0.94);

    --panel: rgba(255, 255, 255, 0.94);
    --panel-light: rgba(242, 247, 255, 0.96);
    --panel-hover: #ffffff;

    --border: rgba(53, 82, 123, 0.16);
    --border-light: rgba(53, 82, 123, 0.28);

    --text: #0b1629;
    --text-secondary: #526079;
    --text-muted: #8490a5;

    --shadow: 0 18px 50px rgba(32, 54, 88, 0.12);
    --heading-lessons: #fff;
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

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

img {
    display: block;
    max-width: 100%;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 72px;
    border-bottom: 1px solid var(--border);
    background: var(--header-background);
    backdrop-filter: blur(18px);
}

.header__container {
    width: min(100% - 48px, 1500px);
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 42px;
}

.logo {
    flex-shrink: 0;
    font-family: var(--font-pixel);
    font-size: 20px;
    letter-spacing: -1px;
}

.logo__blue {
    color: #0056cb;
}

.header__nav {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 34px;
}

.header__link {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;
    font-family: var(--font-pixel);
    transition:
        color var(--transition),
        transform var(--transition);
}

.header__link:hover {
    color: var(--text);
    transform: translateY(-1px);
}

.header__link--active {
    color: var(--blue-light);
}

.header__link--active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    border-radius: 10px;
    background: var(--blue-light);
}

.header__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-button,
.mobile-menu-button {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition:
        color var(--transition),
        background var(--transition);
}

.icon-button:hover,
.mobile-menu-button:hover {
    background: var(--panel);
    color: var(--text);
}

.mobile-menu-button {
    display: none;
}

/* Buttons */

.button {
    min-height: 42px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform var(--transition),
        filter var(--transition),
        background var(--transition),
        border-color var(--transition);
}

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

.button--yellow {
    border-color: #ffe37c;
    background: var(--yellow);
    color: #221900;
    box-shadow:
        inset 0 -4px 0 rgba(136, 91, 0, 0.36),
        0 8px 20px rgba(255, 201, 40, 0.15);
    font-family: var(--font-pixel);
    font-size: 10px;
}

.button--blue {
    border-color: #63b3ff;
    background: linear-gradient(180deg, #2588ff, #1262e9);
    color: #ffffff;
    box-shadow:
        inset 0 -3px 0 rgba(2, 37, 117, 0.35),
        0 8px 20px rgba(25, 118, 255, 0.22);
}

.button--blue i {
    margin-left: 5px;
    color: #0e3e7a;
    font-size: 18px;
}

.button--outline {
    width: 100%;
    border-color: var(--border-light);
    background: transparent;
    color: var(--text);
}

.button--outline:hover {
    border-color: var(--blue-light);
    background: rgba(39, 167, 255, 0.08);
}

.header__theme-mobile {
    display: none;
}

@media (max-width: 960px) {
    .header__theme-mobile {
        width: 100%;
        min-height: 48px;
        padding: 14px 16px;

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

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

        background: var(--panel);
        color: var(--text-secondary);

        font-family: var(--font-main);
        font-size: 14px;
        font-weight: 600;
        text-align: left;

        cursor: pointer;

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

    .header__theme-mobile:hover {
        border-color: var(--blue-light);
        background: rgba(39, 167, 255, 0.1);
        color: var(--text);
    }

    .header__theme-mobile i {
        width: 20px;
        color: var(--blue-light);
        font-size: 17px;
        text-align: center;
    }
}

/* Main layout */

.page {
    padding: 18px 0 50px;
}

.page__container {
    width: min(100% - 48px, 1500px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
    align-items: start;
}

.content {
    min-width: 0;
}

/* Hero */

.hero {
    position: relative;
    min-height: 170px;
    overflow: hidden;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px 8px 0 0;
    background:
        linear-gradient(90deg,
            rgba(2, 14, 30, 0.96) 0%,
            rgba(2, 14, 30, 0.72) 44%,
            rgba(2, 14, 30, 0.08) 100%),
        url("../images/lessons-background.webp") center / cover no-repeat;
    box-shadow: var(--shadow);
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            transparent 50%,
            rgba(3, 12, 26, 0.55));
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 690px;
    padding: 34px 38px;
}

.hero__label {
    margin-bottom: 14px;
    color: var(--blue-light);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero__title {
    margin-bottom: 14px;
    font-family: var(--font-pixel);
    font-size: clamp(25px, 3vw, 38px);
    line-height: 1.3;
    color: #fff;

    text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
}

.hero__description {
    max-width: 610px;
    color: #eef5ff;
    font-size: 15px;
    line-height: 1.75;
}

.hero__description span {
    color: var(--blue-light);
}

/* Statistics */

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0;
}

.stat-card {
    min-width: 0;
    min-height: 110px;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 17px;
    border: 1px solid var(--border);
    background:
        linear-gradient(145deg,
            var(--panel-light),
            var(--panel));
    box-shadow: var(--shadow);
}

.stat-card:first-child {
    border-radius: 0 0 0 8px;
}

.stat-card:last-child {
    border-radius: 0 0 8px 0;
}

.stat-card__icon {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stat-card__content {
    min-width: 0;
}

.stat-card__label {
    margin-bottom: 3px;
    color: var(--text-secondary);
    font-size: 13px;
}

.stat-card__value {
    display: block;
    font-size: 17px;
    white-space: nowrap;
}

/* Progress */

.progress-section {
    padding: 23px 0 16px;
}

.progress-section__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: end;
}

.progress-section__title {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
}

.progress-section__row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.progress {
    height: 8px;
    flex: 1;
    overflow: hidden;
    border: 1px solid rgba(123, 151, 190, 0.16);
    border-radius: 30px;
    background: rgba(114, 138, 174, 0.15);
}

.progress__bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #13b858, #21d36d);
    box-shadow: 0 0 12px rgba(24, 201, 99, 0.34);
    transition: width 0.5s ease;
}

.progress__bar--blue {
    background: linear-gradient(90deg, #166df6, #2ba2ff);
    box-shadow: 0 0 12px rgba(25, 118, 255, 0.3);
}

.progress__bar--yellow {
    background: linear-gradient(90deg, #f5af18, #ffdb48);
    box-shadow: 0 0 12px rgba(255, 201, 40, 0.28);
}

.progress__bar--green {
    background: linear-gradient(90deg, #12b953, #28df78);
}

.progress-section__percent {
    min-width: 40px;
    font-size: 14px;
    font-weight: 700;
    text-align: right;
}

/* Course sections */

.course-sections {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.course-section {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background:
        linear-gradient(145deg,
            var(--panel-light),
            var(--panel));
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.course-section[hidden] {
    display: none;
}

.course-section__header {
    width: 100%;
    min-height: 64px;
    padding: 14px 22px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition);
}

.course-section__header:hover {
    background: rgba(58, 87, 125, 0.08);
}

.course-section__number {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(124, 153, 194, 0.38);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
}

.course-section__heading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.course-section__title {
    flex-shrink: 0;
    font-family: var(--font-pixel);
    font-size: 11px;
    line-height: 1.4;
}

.course-section__description {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-section__meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
}

.course-section__meta .fa-chevron-up,
.course-section__meta .fa-chevron-down {
    color: var(--green);
    transition: transform var(--transition);
}

.course-section__club {
    color: #ec60ff;
    font-size: 11px;
    font-weight: 900;
}

.course-section__body {
    max-height: 0;
    overflow: hidden;
    border-top: 0 solid var(--border);
    opacity: 0;
    transition:
        max-height 0.45s ease,
        opacity 0.3s ease,
        border-width 0.3s ease;
}

.course-section--opened .course-section__body {
    max-height: 1000px;
    border-top-width: 1px;
    opacity: 1;
}

.lesson {
    position: relative;
    min-height: 72px;
    padding: 13px 24px 13px 58px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(125, 156, 201, 0.1);
}

.lesson:last-child {
    border-bottom: 0;
}

.lesson::before {
    content: "";
    position: absolute;
    top: -50%;
    bottom: -50%;
    left: 34px;
    width: 1px;
    background: rgba(110, 146, 194, 0.25);
}

.lesson:first-child::before {
    top: 50%;
}

.lesson:last-child::before {
    bottom: 50%;
}

.lesson__status {
    position: relative;
    z-index: 1;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(126, 156, 201, 0.35);
    border-radius: 50%;
    background: #111e32;
    color: var(--text-muted);
    font-size: 12px;
}

.lesson--completed .lesson__status {
    border-color: var(--green);
    background: var(--green);
    color: #ffffff;
}

.lesson--active .lesson__status {
    border-color: var(--blue);
    background: var(--blue);
    color: #ffffff;
    box-shadow: 0 0 18px rgba(25, 118, 255, 0.25);
}

.lesson__content {
    min-width: 0;
}

.lesson__title {
    margin-bottom: 3px;
    font-size: 13px;
    font-weight: 700;
}

.lesson__description {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lesson__result {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    text-align: right;
}

.lesson__button {
    min-height: 36px;
    padding: 0 20px;
}

.lesson__xp {
    color: var(--blue-light);
    font-size: 12px;
    white-space: nowrap;
}

.lesson__locked-text {
    color: var(--text-muted);
    font-size: 12px;
}

.lesson--locked {
    opacity: 0.55;
}

.empty-section {
    padding: 30px;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
}

/* Sidebar */

.sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-card {
    padding: 22px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    background:
        linear-gradient(145deg,
            var(--panel-light),
            var(--panel));
    box-shadow: var(--shadow);
}

.sidebar-card__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.sidebar-card__title {
    font-size: 16px;
    line-height: 1.4;
}

.sidebar-card__counter {
    color: var(--text-secondary);
    font-size: 12px;
}

.sidebar-card__description {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.65;
}

/* Profile */

.profile-card__top {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-card__avatar {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    overflow: hidden;
    border-radius: 8px;
}

.profile-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.profile-card__name {
    margin-bottom: 3px;
    font-size: 15px;
}

.profile-card__level {
    color: var(--text-secondary);
    font-size: 12px;
}

.profile-card__progress {
    margin-bottom: 18px;
}

.profile-card__progress p {
    margin-top: 7px;
    color: var(--text-secondary);
    font-size: 11px;
    text-align: right;
}

.profile-card__note {
    margin-top: 14px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.6;
}

/* Sidebar progress */

.sidebar-progress {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.sidebar-progress__icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
}

.sidebar-progress__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-progress__content {
    min-width: 0;
    flex: 1;
}

.sidebar-progress__heading {
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
}

/* Badges */

.badges {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 8px;
    width: 100%;
    min-width: 0;
}

.badge {
    position: relative;
    min-width: 0;
    width: 100%;
    height: 58px;

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

    padding: 3px;
    border: 1px solid transparent;
    border-radius: 8px;
    outline: none;

    cursor: help;

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

.badge img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 54px;
    max-height: 54px;

    object-fit: contain;
    object-position: center;

    pointer-events: none;
}

.badge:hover,
.badge:focus-visible {
    z-index: 20;
    border-color: rgba(39, 167, 255, 0.35);
    background: rgba(39, 167, 255, 0.07);
    transform: translateY(-3px);
}

.badge--locked img {
    filter: grayscale(1);
    opacity: 0.42;
}

.badge--locked:hover img,
.badge--locked:focus-visible img {
    filter: grayscale(0.65);
    opacity: 0.7;
}

/* Загальна оболонка підказки */

.badge::before,
.badge::after {
    position: absolute;
    left: 50%;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0.18s ease;
}

/* Сам блок підказки */

.badge::after {
    content:
        attr(data-title) "\A"
        attr(data-description);

    bottom: calc(100% + 12px);
    z-index: 30;

    width: 220px;
    max-width: min(220px, 80vw);
    padding: 12px 14px;

    border: 1px solid var(--border-light);
    border-radius: 8px;

    background: #071426;
    color: var(--text-secondary);

    box-shadow:
        0 14px 35px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);

    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.55;
    text-align: left;
    white-space: pre-line;

    transform: translate(-50%, 7px);
}

/* Маленька стрілка */

.badge::before {
    content: "";
    bottom: calc(100% + 5px);
    z-index: 31;

    width: 12px;
    height: 12px;

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

    background: #071426;

    transform:
        translateX(-50%) translateY(7px) rotate(45deg);
}

.badge:hover::before,
.badge:hover::after,
.badge:focus-visible::before,
.badge:focus-visible::after {
    visibility: visible;
    opacity: 1;
}

.badge:hover::after,
.badge:focus-visible::after {
    transform: translate(-50%, 0);
}

.badge:hover::before,
.badge:focus-visible::before {
    transform:
        translateX(-50%) translateY(0) rotate(45deg);
}

/* Щоб підказки крайніх нагород не виходили за межі екрана */

.badge:nth-child(4n + 1)::after {
    left: 0;
    transform: translate(0, 7px);
}

.badge:nth-child(4n + 1):hover::after,
.badge:nth-child(4n + 1):focus-visible::after {
    transform: translate(0, 0);
}

.badge:nth-child(4n + 1)::before {
    left: 24px;
}

.badge:nth-child(4n)::after {
    right: 0;
    left: auto;
    transform: translate(0, 7px);
}

.badge:nth-child(4n):hover::after,
.badge:nth-child(4n):focus-visible::after {
    transform: translate(0, 0);
}

.badge:nth-child(4n)::before {
    right: 24px;
    left: auto;
}

/* Світла тема */

body.light-theme .badge::after,
body.light-theme .badge::before {
    background: #ffffff;
}

body.light-theme .badge::after {
    color: var(--text-secondary);
    box-shadow:
        0 14px 35px rgba(32, 54, 88, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Для дуже вузької бокової колонки */

@media (max-width: 500px) {
    .badges {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px 5px;
    }

    .badge {
        width: 100%;
        height: 42px;
        padding: 1px;
    }

    .badge img {
        width: 100%;
        height: 100%;
        max-width: 40px;
        max-height: 40px;
    }

    .badge::after {
        width: 190px;
        font-size: 11px;
    }
}

.sidebar-card {
    min-width: 0;
    height: auto;
}

.sidebar {
    align-items: start;
}

@media (max-width: 960px) {
    .sidebar {
        align-items: start;
    }

    .sidebar-card {
        width: 100%;
        align-self: start;
    }
}

.footer {
    margin-top: 100px;
    padding: 70px 0 25px;
    border-top: 1px solid var(--panel-border);
    background:
        linear-gradient(180deg,
            rgba(5, 16, 35, 0.7),
            #020712);
}


.footer__grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 0.7fr) 1.35fr;
    gap: 55px;
    padding-bottom: 60px;
}


.footer__logo {
    display: block;
    width: 155px;
    margin-bottom: 24px;
    font-size: 20px;
}

.footer__logo span {
    color: #0056cb;
}


.footer__description,
.footer__newsletter p {
    max-width: 300px;
    margin-bottom: 25px;
    color: var(--text-secondary);
    font-family: "Inter", sans-serif;
    font-size: 14px;
    line-height: 1.75;
}


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


.footer__socials a {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-size: 18px;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.footer__socials a:hover {
    border-color: var(--blue);
    background: rgba(22, 136, 255, 0.1);
    color: var(--blue-light);
    transform: translateY(-3px);
}


.footer__title {
    min-height: 32px;
    margin-bottom: 22px;
    font-size: 10px;
    line-height: 1.5;
}


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


.footer__links a {
    color: var(--text-secondary);
    font-family: "Inter", sans-serif;
    font-size: 14px;
    transition:
        color 0.2s ease,
        padding-left 0.2s ease;
}


.footer__links a:hover {
    padding-left: 5px;
    color: var(--blue-light);
}

.footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--panel-border);
    color: var(--text-muted);
    font-family: "Inter", sans-serif;
    font-size: 13px;
}


.footer__bottom i {
    color: var(--red);
}


/* =========================
   Footer
========================= */

.footer {
    margin-top: 80px;
    padding: 64px 0 24px;
    border-top: 1px solid var(--border);
    background:
        radial-gradient(circle at 15% 0%,
            rgba(25, 118, 255, 0.1),
            transparent 32%),
        linear-gradient(180deg,
            rgba(6, 16, 31, 0.78),
            var(--background));
    transition:
        background 0.25s ease,
        border-color 0.25s ease;
}

.footer .container {
    width: min(100% - 48px, 1500px);
    margin: 0 auto;
}

.footer__grid {
    display: grid;
    grid-template-columns:
        minmax(240px, 1.4fr) minmax(150px, 0.75fr) minmax(150px, 0.75fr) minmax(240px, 1.15fr);
    gap: 48px;
    padding-bottom: 54px;
}

.footer__brand,
.footer__column,
.footer__newsletter {
    min-width: 0;
}

.footer__logo {
    display: inline-block;
    margin-bottom: 22px;
    color: var(--text);
    font-family: var(--font-pixel);
    font-size: 18px;
    line-height: 1.4;
    letter-spacing: -1px;
    transition:
        color 0.25s ease,
        transform 0.25s ease;
}

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

.footer__logo span {
    color: var(--blue-light);
}

.footer__description,
.footer__newsletter p {
    max-width: 330px;
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.75;
}

.footer__title {
    min-height: 30px;
    margin-bottom: 20px;
    color: var(--text);
    font-family: var(--font-pixel);
    font-size: 10px;
    line-height: 1.6;
}

.footer__links {
    display: grid;
    gap: 13px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer__links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.5;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.footer__links a::before {
    content: "";
    width: 0;
    height: 1px;
    margin-right: 0;
    background: var(--blue-light);
    transition:
        width 0.2s ease,
        margin-right 0.2s ease;
}

.footer__links a:hover {
    color: var(--blue-light);
    transform: translateX(3px);
}

.footer__links a:hover::before {
    width: 10px;
    margin-right: 7px;
}

.footer__socials {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.footer__socials a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--panel);
    color: var(--text-secondary);
    font-size: 17px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.footer__socials a:hover {
    border-color: var(--blue-light);
    background: rgba(39, 167, 255, 0.1);
    color: var(--blue-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(25, 118, 255, 0.16);
}

.footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 13px;
    line-height: 1.6;
}

.footer__bottom p:last-child {
    text-align: right;
}

.footer__bottom i {
    margin: 0 4px;
    color: var(--red);
    animation: footer-heart 1.8s ease-in-out infinite;
}

@keyframes footer-heart {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.14);
    }
}

/* =========================
   Footer: світла тема
========================= */

body.light-theme .footer {
    background:
        radial-gradient(circle at 15% 0%,
            rgba(25, 118, 255, 0.09),
            transparent 34%),
        linear-gradient(180deg,
            rgba(232, 240, 252, 0.8),
            var(--background-secondary));
}

body.light-theme .footer__socials a {
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 24px rgba(32, 54, 88, 0.08);
}

body.light-theme .footer__socials a:hover {
    background: rgba(25, 118, 255, 0.09);
    box-shadow: 0 10px 24px rgba(25, 118, 255, 0.12);
}

/* =========================
   Footer: адаптивність
========================= */

@media (max-width: 1100px) {
    .footer__grid {
        grid-template-columns: 1.3fr 0.8fr 0.8fr;
        gap: 42px 34px;
    }

    .footer__newsletter {
        grid-column: 1 / -1;
        padding-top: 28px;
        border-top: 1px solid var(--border);
    }

    .footer__newsletter p {
        max-width: 520px;
    }
}

@media (max-width: 760px) {
    .footer {
        margin-top: 60px;
        padding-top: 50px;
    }

    .footer .container {
        width: min(100% - 32px, 1500px);
    }

    .footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 38px 28px;
        padding-bottom: 42px;
    }

    .footer__brand {
        grid-column: 1 / -1;
    }

    .footer__description {
        max-width: 520px;
    }

    .footer__newsletter {
        grid-column: 1 / -1;
    }

    .footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .footer__bottom p:last-child {
        text-align: left;
    }
}

@media (max-width: 500px) {
    .footer {
        margin-top: 48px;
        padding: 42px 0 20px;
    }

    .footer .container {
        width: min(100% - 24px, 1500px);
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-bottom: 34px;
    }

    .footer__brand,
    .footer__newsletter {
        grid-column: auto;
    }

    .footer__column,
    .footer__newsletter {
        padding-top: 26px;
        border-top: 1px solid var(--border);
    }

    .footer__title {
        min-height: 0;
        margin-bottom: 16px;
    }

    .footer__logo {
        font-size: 16px;
    }

    .footer__description,
    .footer__newsletter p {
        font-size: 13px;
    }

    .footer__bottom {
        padding-top: 20px;
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .footer__bottom i {
        animation: none;
    }

    .footer__logo,
    .footer__links a,
    .footer__links a::before,
    .footer__socials a {
        transition: none;
    }
}

/* Responsive */

@media (max-width: 1200px) {
    .page__container {
        grid-template-columns: minmax(0, 1fr) 270px;
    }

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

    .stat-card:first-child,
    .stat-card:last-child {
        border-radius: 0;
    }

    .stat-card:nth-child(3) {
        border-radius: 0 0 0 8px;
    }

    .stat-card:nth-child(4) {
        border-radius: 0 0 8px 0;
    }

    .course-section__description {
        display: none;
    }
}

@media (max-width: 960px) {

    .header__container,
    .page__container {
        width: min(100% - 32px, 1500px);
    }

    .header__container {
        gap: 20px;
    }

    .header__nav {
        position: fixed;
        top: 72px;
        right: 16px;
        left: 16px;
        height: auto;
        padding: 12px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--background-secondary);
        box-shadow: var(--shadow);
    }

    .header__nav.header__nav--opened {
        display: flex;
    }

    .header__link {
        height: auto;
        padding: 14px 16px;
        border-radius: 6px;
    }

    .header__link--active::after {
        display: none;
    }

    .header__link--active {
        background: rgba(39, 167, 255, 0.1);
    }

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

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

    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-card {
        grid-row: span 2;
        align-self: flex-start;
    }
}

@media (max-width: 720px) {
    .header {
        height: 64px;
    }

    .header__container {
        width: min(100% - 24px, 1500px);
    }

    .header__nav {
        top: 64px;
    }

    .logo {
        font-size: 16px;
    }

    .header__actions .icon-button {
        display: none;
    }

    .header__signup {
        display: none;
    }

    .page {
        padding-top: 12px;
    }

    .page__container {
        width: min(100% - 24px, 1500px);
    }

    .hero {
        min-height: 220px;
        background-position: 62% center;
    }

    .hero__content {
        padding: 26px 22px;
    }

    .hero__title {
        font-size: 25px;
    }

    .hero__description {
        font-size: 14px;
    }

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

    .stat-card {
        min-height: 84px;
        padding: 15px 18px;
        border-radius: 0;
    }

    .stat-card:nth-child(3) {
        border-radius: 0;
    }

    .stat-card:nth-child(4) {
        border-radius: 0 0 8px 8px;
    }

    .progress-section__top {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .filter select {
        width: 100%;
    }

    .course-section__header {
        grid-template-columns: 34px minmax(0, 1fr);
        padding: 14px;
    }

    .course-section__meta {
        grid-column: 2;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .course-section__heading {
        display: block;
    }

    .lesson {
        padding: 16px 14px 16px 42px;
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .lesson::before {
        left: 24px;
    }

    .lesson__result {
        grid-column: 2;
        justify-content: flex-start;
        margin-top: 5px;
    }

    .lesson__description {
        white-space: normal;
    }

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

    .profile-card {
        grid-row: auto;
        align-self: flex-start;
    }
}

@media (max-width: 430px) {
    .hero__content {
        padding: 24px 18px;
    }

    .hero__title {
        font-size: 21px;
    }

    .stat-card__icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .course-section__title {
        font-size: 9px;
    }

    .course-section__meta {
        gap: 9px;
    }

    .sidebar-card {
        padding: 18px;
    }
}