/* ==================================================
   STARKCODE — GLOBAL STYLES
================================================== */

* {
    box-sizing: border-box;
}

:root {
    --bg: #0B0E18;
    --bg-secondary: #0F1422;
    --header: #080B13;

    --card: #151A2A;
    --card-hover: #1A2135;

    --border: #252D43;
    --border-hover: #34466E;

    --text: #FFFFFF;
    --text-secondary: #A7B0C3;
    --text-muted: #737D92;

    --blue: #247BFF;
    --purple: #5548E8;

    --gradient: linear-gradient(
        135deg,
        var(--blue),
        var(--purple)
    );

    --radius: 16px;
    --transition: 0.25s ease;
}


/* ==================================================
   BODY
================================================== */

body {
    margin: 0;

    background:
        radial-gradient(
            circle at 50% -20%,
            rgba(36, 123, 255, 0.12),
            transparent 40%
        ),
        var(--bg);

    color: var(--text);

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

    line-height: 1.5;
}


/* ==================================================
   HEADER
================================================== */

header {
    position: sticky;

    top: 0;

    z-index: 100;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 15px 30px;

    background: rgba(8, 11, 19, 0.88);

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

    backdrop-filter: blur(15px);
}


/* ==================================================
   LOGO
================================================== */

.logo img {
    display: block;

    width: 180px;

    height: auto;

    border-radius: 10px;
}


/* ==================================================
   NAVIGATION
================================================== */

nav {
    display: flex;

    align-items: center;

    gap: 35px;
}

nav a {
    position: relative;

    color: var(--text-secondary);

    text-decoration: none;

    font-size: 15px;

    transition: var(--transition);
}

nav a:hover {
    color: var(--text);
}

nav a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -8px;

    width: 0;
    height: 2px;

    background: var(--gradient);

    border-radius: 10px;

    transition: width var(--transition);
}

nav a:hover::after {
    width: 100%;
}


/* ==================================================
   GLOBAL BUTTONS
================================================== */

button {
    padding: 11px 20px;

    border: none;

    border-radius: 10px;

    background: var(--gradient);

    color: white;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    transition:
        transform var(--transition),
        box-shadow var(--transition),
        opacity var(--transition);
}

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

    box-shadow:
        0 8px 25px
        rgba(36, 123, 255, 0.25);
}

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


/* ==================================================
   HERO
================================================== */

.head {
    display: flex;

    justify-content: center;

    align-items: center;

    min-height: 430px;

    padding: 80px 20px;

    text-align: center;

    background:
        radial-gradient(
            circle at center,
            rgba(85, 72, 232, 0.14),
            transparent 45%
        );
}

.head section {
    max-width: 800px;

    background: transparent;
}

.head h1 {
    margin: 0;

    font-size: clamp(45px, 7vw, 72px);

    line-height: 1.05;

    background: var(--gradient);

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

    color: transparent;
}

.head p {
    margin-top: 20px;

    color: var(--text-secondary);

    font-size: 20px;
}


/* ==================================================
   MAIN
================================================== */

main {
    width: min(1200px, 100%);

    margin: 0 auto;

    padding: 40px 20px 80px;
}

.text h2 {
    margin-bottom: 35px;

    text-align: center;

    font-size: 36px;
}


/* ==================================================
   COURSE SEARCH
================================================== */

.search-box {
    position: relative;

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

    margin: 0 auto 10px;
}

#courseSearch {
    display: block;

    width: 100%;

    margin: 0;

    padding: 16px 55px 16px 20px;

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

    border-radius: 14px;

    outline: none;

    background: var(--bg-secondary);

    color: white;

    font-size: 16px;

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

#courseSearch::placeholder {
    color: var(--text-muted);
}

#courseSearch:focus {
    border-color: var(--blue);

    box-shadow:
        0 0 0 3px
        rgba(36, 123, 255, 0.12);
}


/* ==================================================
   CLEAR SEARCH
================================================== */

#clearSearch {
    position: absolute;

    top: 50%;
    right: 10px;

    width: 34px;
    height: 34px;

    display: none;

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

    padding: 0;

    transform: translateY(-50%);

    border: none;
    border-radius: 8px;

    background: transparent;

    color: var(--text-muted);

    font-size: 24px;
    font-weight: 400;

    cursor: pointer;

    box-shadow: none;
}

#clearSearch:hover {
    transform: translateY(-50%);

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

    color: white;

    box-shadow: none;
}


/* ==================================================
   COURSE COUNT
================================================== */

#courseCount {
    margin: 10px 0 25px;

    text-align: center;

    color: var(--text-muted);

    font-size: 14px;
}


/* ==================================================
   COURSE GRID
================================================== */

.course {
    display: grid;

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

    gap: 24px;
}


/* ==================================================
   COURSE CARD
================================================== */

.course section {
    position: relative;

    min-height: 190px;

    padding: 28px;

    overflow: hidden;

    background: var(--card);

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

    border-radius: var(--radius);

    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

.course section::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 3px;

    background: var(--gradient);

    opacity: 0;

    transition: opacity var(--transition);
}

.course section:hover {
    transform: translateY(-6px);

    background: var(--card-hover);

    border-color: var(--border-hover);

    box-shadow:
        0 15px 40px
        rgba(0, 0, 0, 0.3),

        0 0 25px
        rgba(36, 123, 255, 0.08);
}

.course section:hover::before {
    opacity: 1;
}

.course h3 {
    margin-top: 0;

    margin-bottom: 10px;

    font-size: 24px;
}

.course p {
    margin-bottom: 25px;

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


/* ==================================================
   NO RESULTS
================================================== */

.no-results {
    grid-column: 1 / -1;

    padding: 50px;

    text-align: center;

    color: var(--text-muted);

    font-size: 18px;
}


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

.login {
    width: min(500px, calc(100% - 40px));

    margin: 20px auto 80px;

    padding: 35px;

    background: var(--card);

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

    border-radius: var(--radius);

    box-shadow:
        0 20px 50px
        rgba(0, 0, 0, 0.25);
}

.login h2 {
    margin-top: 0;

    margin-bottom: 25px;

    text-align: center;
}

.login form {
    display: flex;

    flex-direction: column;

    gap: 10px;
}

.login label {
    margin-top: 8px;

    color: var(--text-secondary);

    font-size: 14px;
}

.login input {
    padding: 13px 15px;

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

    border-radius: 10px;

    outline: none;

    background: var(--bg);

    color: var(--text);

    font-size: 16px;

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.login input::placeholder {
    color: var(--text-muted);
}

.login input:focus {
    border-color: var(--blue);

    box-shadow:
        0 0 0 3px
        rgba(36, 123, 255, 0.1);
}


/* ==================================================
   USER ACTIONS
================================================== */

.user-actions {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-top: 25px;
}

.user-actions button {
    width: auto;

    min-width: 120px;

    margin: 0;

    padding: 11px 20px;
}


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

#profileButton {
    background: var(--gradient);

    color: white;

    border: none;

    box-shadow: none;
}

#profileButton:hover {
    transform: translateY(-2px);

    box-shadow:
        0 8px 20px
        rgba(36, 123, 255, 0.25);
}


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

#logoutButton {
    background: transparent;

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

    color: var(--text-secondary);

    box-shadow: none;
}

#logoutButton:hover {
    transform: translateY(-2px);

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

    border-color: var(--blue);

    color: white;

    box-shadow: none;
}


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

#loginMessage {
    margin-top: 15px;

    text-align: center;

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


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

#welcomeMessage {
    text-align: center;

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


/* ==================================================
   COURSE MODAL
================================================== */

#courseInfo {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: none;

    align-items: center;

    justify-content: center;

    padding: 20px;

    background: rgba(5, 7, 14, 0.78);

    backdrop-filter: blur(8px);
}

.modal-content {
    width: min(600px, 100%);

    padding: 40px;

    background:
        linear-gradient(
            145deg,
            #151A2A,
            #101523
        );

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

    border-radius: 20px;

    text-align: center;

    box-shadow:
        0 30px 80px
        rgba(0, 0, 0, 0.5),

        0 0 40px
        rgba(36, 123, 255, 0.08);
}

.modal-content h2 {
    margin-top: 0;

    font-size: 32px;
}

.modal-content p {
    color: var(--text-secondary);

    line-height: 1.7;
}


/* ==================================================
   PROFILE MODAL
================================================== */

.profile {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: none;

    align-items: center;

    justify-content: center;

    padding: 20px;

    background: rgba(5, 7, 14, 0.75);

    backdrop-filter: blur(10px);
}

.profile-content {
    position: relative;

    width: min(500px, 100%);

    padding: 40px;

    background: var(--card);

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

    border-radius: var(--radius);

    box-shadow:
        0 30px 80px
        rgba(0, 0, 0, 0.5);

    animation: profileAppear 0.25s ease;
}

.profile-content h2 {
    margin: 0 0 15px;

    font-size: 30px;

    color: white;
}

.profile-content h3 {
    margin: 30px 0 15px;

    font-size: 20px;
}

#profileEmail {
    margin: 0;

    color: var(--text-secondary);

    font-size: 16px;
}

.close-profile {
    position: absolute;

    top: 15px;
    right: 15px;

    width: 36px;
    height: 36px;

    padding: 0;

    display: flex;

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

    background: transparent;

    color: var(--text-muted);

    font-size: 26px;

    line-height: 1;

    border-radius: 10px;

    box-shadow: none;
}

.close-profile:hover {
    transform: none;

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

    color: white;

    box-shadow: none;
}


/* ==================================================
   PROFILE PROGRESS
================================================== */

.progress-item {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-top: 12px;

    padding: 15px 18px;

    background: var(--bg-secondary);

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

    border-radius: 12px;

    color: white;
}

.progress-item span:last-child {
    color: var(--blue);

    font-weight: bold;
}


/* ==================================================
   BADGE
================================================== */

.badge {
    position: absolute;

    top: 15px;
    right: 15px;

    padding: 5px 10px;

    background: #19B36B;

    border-radius: 7px;

    font-size: 12px;

    font-weight: 600;
}


/* ==================================================
   ANIMATIONS
================================================== */

@keyframes appear {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes cardAppear {
    from {
        opacity: 0;

        transform: translateY(25px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }
}

@keyframes profileAppear {
    from {
        opacity: 0;

        transform:
            translateY(15px)
            scale(0.98);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}

.head {
    animation: appear 1s ease;
}

.course section {
    animation: cardAppear 0.5s ease;
}

.login {
    animation: appear 0.8s ease;
}


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

@media (max-width: 1024px) {

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

}


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

@media (max-width: 768px) {

    header {
        flex-direction: column;

        gap: 18px;

        padding: 20px;
    }

    nav {
        gap: 20px;
    }

    .head {
        min-height: 350px;

        padding: 60px 20px;
    }

    .head p {
        font-size: 17px;
    }

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

        gap: 18px;
    }

    main {
        padding: 30px 15px 60px;
    }

    .text h2 {
        font-size: 30px;
    }

    .login {
        padding: 25px;
    }

    .user-actions {
        flex-wrap: wrap;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .profile-content {
        padding: 30px 20px;
    }

}


/* ==================================================
   SMALL MOBILE
================================================== */

@media (max-width: 480px) {

    .logo img {
        width: 160px;
    }

    nav {
        flex-wrap: wrap;

        justify-content: center;
    }

    .head h1 {
        font-size: 44px;
    }

    .head p {
        font-size: 16px;
    }

    .course section {
        padding: 24px;
    }

    .user-actions {
        flex-direction: column;

        align-items: stretch;
    }

    .user-actions button {
        width: 100%;
    }

}

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

.header-login {
    display: inline-flex;

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

    padding: 11px 22px;

    border-radius: 10px;

    background: var(--gradient);

    color: white;

    font-size: 15px;
    font-weight: 600;

    text-decoration: none;

    cursor: pointer;

    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.header-login:hover {
    transform: translateY(-2px);

    box-shadow:
        0 8px 25px
        rgba(36, 123, 255, 0.25);
}

.header-login:active {
    transform: translateY(0);
}

.profile-link {
    color: var(--text-secondary);

    text-decoration: none;

    font-size: 16px;

    font-weight: 500;

    transition:
        color var(--transition),
        opacity var(--transition);
}


.profile-link:hover {
    color: white;

    text-decoration: none;
}

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

.profile-button {
    display: inline-flex;

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

    padding: 12px 28px;

    min-width: 120px;

    border: none;
    border-radius: 16px;

    background: linear-gradient(
        135deg,
        #247BFF,
        #5548E8
    );

    color: #ffffff;

    font-size: 16px;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;

    box-shadow:
        0 10px 25px
        rgba(36, 123, 255, 0.25);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}


.profile-button:hover {

    transform: translateY(-2px);

    filter: brightness(1.08);

    box-shadow:
        0 14px 32px
        rgba(36, 123, 255, 0.35);
}


.profile-button:active {

    transform: translateY(0);

}

/* ========================================
   ADMIN MODE
   ======================================== */

.admin-lesson-panel {
    position: fixed;

    top: 20px;
    right: 20px;

    width: 340px;

    z-index: 9999;

    background: #111827;
    color: #ffffff;

    border-radius: 16px;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.35);

    overflow: hidden;
}


.admin-panel-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 14px 16px;

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

}


.admin-panel-header button {

    border: none;

    background: transparent;

    color: #ffffff;

    font-size: 24px;

    cursor: pointer;

}


.admin-panel-body {

    padding: 16px;

}


.admin-lesson-info {

    display: flex;

    flex-direction: column;

    gap: 5px;

    margin-bottom: 16px;

}


.admin-lesson-info span {

    color: #9ca3af;

    font-size: 13px;

}


.admin-status {

    display: grid;

    gap: 8px;

    padding: 12px;

    margin-bottom: 16px;

    border-radius: 10px;

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

}


.admin-actions {

    display: grid;

    gap: 8px;

}


.admin-actions button {

    width: 100%;

    padding: 10px 12px;

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

    border-radius: 9px;

    background: #1f2937;

    color: #ffffff;

    cursor: pointer;

    font: inherit;

    text-align: left;

}


.admin-actions button:hover {

    background: #374151;

}


.admin-actions button:last-child {

    margin-top: 8px;

    background: rgba(239, 68, 68, 0.15);

}


@media (max-width: 600px) {

    .admin-lesson-panel {

        top: 10px;

        right: 10px;

        width: calc(100vw - 20px);

    }

}

/* ========================================
   Подсветка JavaScript-кода
   ======================================== */

.code-keyword {
    color: #c084fc;
    font-weight: 600;
}

.code-string {
    color: #86efac;
}

.code-number {
    color: #fbbf24;
}

.code-boolean {
    color: #60a5fa;
    font-weight: 600;
}

.code-operator {
    color: #fb923c;
}

.code-function {
    color: #67e8f9;
}

.code-comment {
    color: #64748b;
    font-style: italic;
}

.code-variable {
    color: #e2e8f0;
}


/* ========================================
   ПЕРЕКЛЮЧАТЕЛЬ ВХОД / РЕГИСТРАЦИЯ
======================================== */

.auth-switch {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 25px;
    padding: 4px;
    width: fit-content;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}


.auth-tab {
    padding: 9px 22px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.auth-tab:hover {
    color: #ffffff;
}


.auth-tab.active {
    background: #a78bfa;
    color: #ffffff;
}


/* ========================================
   СООБЩЕНИЯ АВТОРИЗАЦИИ
======================================== */

#loginMessage,
#registerMessage {
    min-height: 22px;
    margin-top: 12px;
}


#registerForm {
    width: 100%;
}

/* ==================================================
   AUTH MODAL
================================================== */

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

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

    padding: 24px;

    visibility: hidden;
    opacity: 0;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}


.auth-modal.active {
    visibility: visible;
    opacity: 1;
}


/* ==================================================
   ЗАТЕМНЕНИЕ
================================================== */

.auth-modal-overlay {
    position: absolute;
    inset: 0;

    background:
        rgba(7, 9, 18, 0.78);

    backdrop-filter:
        blur(10px);
}


/* ==================================================
   ОКНО
================================================== */

.auth-modal-window {
    position: relative;
    z-index: 1;

    width: min(460px, 100%);

    padding: 38px 38px 34px;

    border:
        1px solid rgba(139, 92, 246, 0.28);

    border-radius: 24px;

    background:
        #151927;

    box-shadow:
        0 30px 90px
        rgba(0, 0, 0, 0.55);

    transform:
        translateY(18px)
        scale(0.97);

    transition:
        transform 0.25s ease;
}


.auth-modal.active .auth-modal-window {
    transform:
        translateY(0)
        scale(1);
}


/* ==================================================
   ЗАКРЫТИЕ
================================================== */

.auth-close {
    position: absolute;

    top: 16px;
    right: 18px;

    width: 38px;
    height: 38px;

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

    padding: 0;

    border: none;
    border-radius: 50%;

    background:
        transparent;

    color:
        #8f96ab;

    font-size: 28px;
    line-height: 1;

    cursor: pointer;

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


.auth-close:hover {
    color: #ffffff;

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


/* ==================================================
   ЗАГОЛОВОК
================================================== */

.auth-header {
    text-align: center;

    margin-bottom: 26px;
}


.auth-label {
    display: block;

    margin-bottom: 10px;

    color:
        #a78bfa;

    font-size: 11px;

    font-weight: 800;

    letter-spacing:
        0.18em;
}


.auth-header h2 {
    margin: 0;

    color:
        #ffffff;

    font-size: 30px;

    font-weight: 700;
}


#welcomeMessage {
    margin: 8px 0 0;

    color:
        #9da4b8;

    font-size: 14px;
}


/* ==================================================
   ПЕРЕКЛЮЧАТЕЛЬ
================================================== */

.auth-switch {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 4px;

    margin-bottom: 26px;

    padding: 4px;

    border-radius: 13px;

    background:
        #1d2233;
}


.auth-tab {
    min-height: 44px;

    border: none;

    border-radius: 10px;

    background:
        transparent;

    color:
        #8f96ab;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

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


.auth-tab:hover {
    color:
        #ffffff;
}


.auth-tab.active {
    background:
        #a78bfa;

    color:
        #ffffff;

    box-shadow:
        0 6px 18px
        rgba(167, 139, 250, 0.22);
}


/* ==================================================
   ФОРМЫ
================================================== */

#loginForm,
#registerForm {
    margin: 0;
}


.auth-field {
    margin-bottom: 17px;
}


.auth-field label {
    display: block;

    margin-bottom: 7px;

    color:
        #b8bfd1;

    font-size: 14px;

    font-weight: 600;
}


.auth-field input {
    width: 100%;

    box-sizing: border-box;

    height: 50px;

    padding:
        0 15px;

    border:
        1px solid #2b3247;

    border-radius: 12px;

    outline: none;

    background:
        #0d111c;

    color:
        #ffffff;

    font-size: 15px;

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


.auth-field input::placeholder {
    color:
        #697187;
}


.auth-field input:focus {
    border-color:
        #a78bfa;

    background:
        #101523;

    box-shadow:
        0 0 0 3px
        rgba(167, 139, 250, 0.12);
}


/* ==================================================
   ПОДСКАЗКА ПАРОЛЯ
================================================== */

.password-hint {
    margin:
        -5px 0 18px;

    color:
        #747c91;

    font-size: 12px;

    line-height: 1.5;
}


/* ==================================================
   ОСНОВНАЯ КНОПКА
================================================== */

.auth-submit {
    width: 100%;

    min-height: 50px;

    margin-top: 4px;

    border: none;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #a78bfa,
            #7c5ce6
        );

    color:
        #ffffff;

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 8px 22px
        rgba(124, 92, 230, 0.22);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}


.auth-submit:hover {
    transform:
        translateY(-1px);

    filter:
        brightness(1.06);

    box-shadow:
        0 11px 28px
        rgba(124, 92, 230, 0.3);
}


.auth-submit:active {
    transform:
        translateY(0);
}


/* ==================================================
   СООБЩЕНИЯ
================================================== */

.auth-message {
    min-height: 20px;

    margin:
        12px 0 0;

    color:
        #f08c9a;

    font-size: 13px;

    line-height: 1.4;

    text-align: center;
}


/* ==================================================
   КНОПКИ ПРОФИЛЯ
================================================== */

.user-actions {
    display: flex;

    gap: 10px;

    justify-content: center;

    margin-top: 20px;
}


.user-actions button {
    min-height: 42px;

    padding:
        0 20px;

    border: none;

    border-radius: 10px;

    background:
        #252b3d;

    color:
        #ffffff;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

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


.user-actions button:hover {
    background:
        #30374d;

    transform:
        translateY(-1px);
}


/* ==================================================
   БЛОКИРОВКА ПРОКРУТКИ
================================================== */

body.auth-modal-open {
    overflow: hidden;
}


/* ==================================================
   АДАПТИВ
================================================== */

@media (max-width: 520px) {

    .auth-modal {
        padding: 14px;
    }


    .auth-modal-window {
        padding:
            32px 22px 26px;

        border-radius:
            20px;
    }


    .auth-header h2 {
        font-size: 26px;
    }


    .auth-close {
        top: 12px;
        right: 12px;
    }

}

/* ==================================================
   STARKCODE — НОВАЯ ГЛАВНАЯ СТРАНИЦА
================================================== */


/* ==================================================
   HEADER
================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;

    width: 100%;

    background: rgba(8, 11, 19, 0.82);

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

    backdrop-filter: blur(20px);
}

.site-header-inner {
    width: min(1200px, calc(100% - 40px));

    min-height: 72px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 30px;
}

.site-logo {
    display: flex;
    align-items: center;

    flex-shrink: 0;
}

.site-logo img {
    display: block;

    width: 150px;

    height: auto;
}

.site-nav {
    display: flex;

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

    gap: 34px;

    margin-left: auto;
}

.site-nav a {
    position: relative;

    color: var(--text-secondary);

    text-decoration: none;

    font-size: 14px;
    font-weight: 500;

    transition: color 0.25s ease;
}

.site-nav a:hover {
    color: #ffffff;
}

.site-nav a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -8px;

    width: 0;
    height: 2px;

    border-radius: 10px;

    background: #a78bfa;

    transition: width 0.25s ease;
}

.site-nav a:hover::after {
    width: 100%;
}

.site-header-actions {
    flex-shrink: 0;
}


/* ==================================================
   HERO
================================================== */

.home-hero {
    min-height: calc(100vh - 72px);

    display: flex;

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

    padding: 100px 20px 120px;

    text-align: center;

    background:
        radial-gradient(
            circle at 50% 35%,
            rgba(167, 139, 250, 0.16),
            transparent 34%
        ),
        radial-gradient(
            circle at 50% 80%,
            rgba(36, 123, 255, 0.08),
            transparent 38%
        );
}

.home-hero-content {
    width: min(900px, 100%);
}

.home-eyebrow,
.home-section-label {
    display: inline-block;

    color: #a78bfa;

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

    letter-spacing: 0.2em;
}

.home-hero h1 {
    max-width: 900px;

    margin: 22px auto 0;

    font-size: clamp(48px, 7vw, 82px);

    line-height: 1.02;

    letter-spacing: -0.045em;

    font-weight: 700;
}

.home-hero h1 span {
    display: block;

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

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

    color: transparent;
}

.home-hero p {
    max-width: 650px;

    margin: 28px auto 0;

    color: var(--text-secondary);

    font-size: clamp(17px, 2vw, 20px);

    line-height: 1.7;
}

.home-hero-actions {
    display: flex;

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

    gap: 12px;

    margin-top: 38px;
}


/* ==================================================
   HOME BUTTONS
================================================== */

.home-button {
    display: inline-flex;

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

    gap: 10px;

    min-height: 50px;

    padding: 0 24px;

    border-radius: 12px;

    text-decoration: none;

    font-size: 15px;
    font-weight: 600;

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

.home-button-primary {
    background: #a78bfa;

    color: #ffffff;

    box-shadow:
        0 10px 30px
        rgba(167, 139, 250, 0.18);
}

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

    background: #b79cff;

    color: #ffffff;

    box-shadow:
        0 14px 35px
        rgba(167, 139, 250, 0.28);
}

.home-button-secondary {
    background: rgba(255, 255, 255, 0.04);

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

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

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

    border-color: rgba(167, 139, 250, 0.4);

    color: #ffffff;

    background: rgba(167, 139, 250, 0.06);
}


/* ==================================================
   SECTION COMMON
================================================== */

.home-section-inner {
    width: min(1120px, calc(100% - 40px));

    margin: 0 auto;
}

.home-section-heading {
    margin-bottom: 55px;
}

.home-section-heading h2 {
    margin: 16px 0 0;

    font-size: clamp(36px, 5vw, 58px);

    line-height: 1.08;

    letter-spacing: -0.035em;
}


/* ==================================================
   COURSE
================================================== */

.home-course-section {
    padding: 110px 0;
}

.home-course-card {
    display: grid;

    grid-template-columns: 1fr 0.9fr;

    gap: 70px;

    align-items: center;

    padding: 70px;

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

    border-radius: 28px;

    background:
        linear-gradient(
            145deg,
            rgba(21, 26, 42, 0.96),
            rgba(13, 17, 28, 0.96)
        );

    box-shadow:
        0 30px 80px
        rgba(0, 0, 0, 0.25);
}

.home-course-content h2 {
    margin: 16px 0 18px;

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

    line-height: 1.08;

    letter-spacing: -0.035em;
}

.home-course-content p {
    max-width: 550px;

    margin: 0;

    color: var(--text-secondary);

    font-size: 17px;

    line-height: 1.7;
}

.home-course-meta {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin: 28px 0 32px;
}

.home-course-meta span {
    padding: 8px 13px;

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

    border-radius: 9px;

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

    color: var(--text-secondary);

    font-size: 13px;
}


/* ==================================================
   CODE WINDOW
================================================== */

.home-course-visual {
    display: flex;

    justify-content: center;
}

.code-window {
    width: min(430px, 100%);

    overflow: hidden;

    border: 1px solid #2a3042;

    border-radius: 18px;

    background: #0a0d15;

    box-shadow:
        0 25px 60px
        rgba(0, 0, 0, 0.45),

        0 0 50px
        rgba(167, 139, 250, 0.07);
}

.code-window-header {
    display: flex;

    align-items: center;

    gap: 7px;

    height: 42px;

    padding: 0 16px;

    background: #111522;

    border-bottom: 1px solid #202638;
}

.code-window-header span {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: #3a4153;
}

.code-window-body {
    padding: 28px;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 14px;

    line-height: 2;
}

.code-purple {
    color: #c084fc;
}

.code-green {
    color: #86efac;
}

.code-white {
    color: #e2e8f0;
}

.code-indent {
    padding-left: 24px;
}

.code-empty {
    height: 12px;
}


/* ==================================================
   FEATURES
================================================== */

.home-features {
    padding: 110px 0;
}

.home-feature-grid {
    display: grid;

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

    gap: 18px;
}

.home-feature-card {
    min-height: 270px;

    padding: 32px;

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

    border-radius: 20px;

    background: rgba(21, 26, 42, 0.55);

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

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

    border-color: #3a4260;

    background: rgba(26, 33, 53, 0.8);
}

.home-feature-number {
    color: #a78bfa;

    font-size: 13px;

    font-weight: 700;
}

.home-feature-card h3 {
    margin: 65px 0 12px;

    font-size: 25px;
}

.home-feature-card p {
    margin: 0;

    color: var(--text-secondary);

    line-height: 1.7;
}


/* ==================================================
   LEARNING PATH
================================================== */

.home-path {
    padding: 110px 0;
}

.home-path-list {
    border-top: 1px solid var(--border);
}

.home-path-item {
    display: grid;

    grid-template-columns: 100px 1fr;

    gap: 30px;

    align-items: start;

    padding: 32px 0;

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

    transition: padding 0.25s ease;
}

.home-path-item:hover {
    padding-left: 10px;
}

.home-path-number {
    color: #a78bfa;

    font-family: monospace;

    font-size: 14px;

    font-weight: 700;
}

.home-path-item h3 {
    margin: 0 0 7px;

    font-size: 25px;
}

.home-path-item p {
    max-width: 650px;

    margin: 0;

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


/* ==================================================
   PROJECT
================================================== */

.home-project {
    padding: 110px 0;
}

.home-project-card {
    position: relative;

    overflow: hidden;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 40px;

    padding: 70px;

    border: 1px solid rgba(167, 139, 250, 0.2);

    border-radius: 28px;

    background:
        radial-gradient(
            circle at 80% 50%,
            rgba(167, 139, 250, 0.14),
            transparent 35%
        ),
        #111522;
}

.home-project-card h2 {
    margin: 16px 0;

    font-size: clamp(35px, 5vw, 58px);

    line-height: 1.08;

    letter-spacing: -0.035em;
}

.home-project-card p {
    max-width: 600px;

    margin: 0;

    color: var(--text-secondary);

    font-size: 17px;

    line-height: 1.7;
}

.home-project-mark {
    flex-shrink: 0;

    color: rgba(167, 139, 250, 0.2);

    font-family: monospace;

    font-size: 130px;

    font-weight: 700;

    line-height: 1;
}


/* ==================================================
   FINAL CTA
================================================== */

.home-final {
    padding: 150px 20px;

    text-align: center;

    background:
        radial-gradient(
            circle at center,
            rgba(167, 139, 250, 0.12),
            transparent 38%
        );
}

.home-final-content {
    max-width: 800px;

    margin: 0 auto;
}

.home-final h2 {
    margin: 18px 0;

    font-size: clamp(40px, 6vw, 68px);

    line-height: 1.05;

    letter-spacing: -0.04em;
}

.home-final p {
    margin: 0 0 32px;

    color: var(--text-secondary);

    font-size: 18px;
}


/* ==================================================
   HOME — TABLET
================================================== */

@media (max-width: 900px) {

    .site-header-inner {
        width: min(100% - 30px, 700px);
    }

    .site-nav {
        gap: 18px;
    }

    .home-course-card {
        grid-template-columns: 1fr;

        padding: 45px;
    }

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

    .home-feature-card {
        min-height: auto;
    }

    .home-project-card {
        padding: 50px;
    }

    .home-project-mark {
        font-size: 90px;
    }

}


/* ==================================================
   HOME — MOBILE
================================================== */

@media (max-width: 700px) {

    .site-header-inner {
        min-height: 64px;

        gap: 15px;
    }

    .site-logo img {
        width: 125px;
    }

    .site-nav {
        display: none;
    }

    .header-login {
        padding: 9px 16px;

        font-size: 13px;
    }

    .home-hero {
        min-height: 650px;

        padding: 80px 20px;
    }

    .home-hero h1 {
        font-size: clamp(42px, 12vw, 62px);
    }

    .home-hero-actions {
        flex-direction: column;

        width: 100%;
    }

    .home-button {
        width: 100%;
    }

    .home-course-section,
    .home-features,
    .home-path,
    .home-project {
        padding: 75px 0;
    }

    .home-section-inner {
        width: min(100% - 30px, 600px);
    }

    .home-course-card {
        padding: 30px 24px;

        border-radius: 22px;
    }

    .home-course-meta {
        flex-direction: column;

        align-items: flex-start;
    }

    .home-project-card {
        flex-direction: column;

        align-items: flex-start;

        padding: 35px 25px;

        border-radius: 22px;
    }

    .home-project-mark {
        display: none;
    }

    .home-path-item {
        grid-template-columns: 45px 1fr;

        gap: 15px;
    }

    .home-final {
        padding: 100px 20px;
    }

}


/* ==================================================
   HOME — SMALL MOBILE
================================================== */

@media (max-width: 480px) {

    .home-hero {
        min-height: 600px;
    }

    .home-hero h1 {
        font-size: 42px;
    }

    .home-course-content h2 {
        font-size: 34px;
    }

    .home-section-heading h2 {
        font-size: 36px;
    }

    .home-feature-card {
        padding: 25px;
    }

    .home-feature-card h3 {
        margin-top: 45px;
    }

}

/* ==================================================
   ПОИСК В ШАПКЕ
================================================== */

.site-header {
    position: relative;
    z-index: 1000;
}


.site-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}


/* Кнопка поиска */

.header-search-button {
    width: 42px;
    height: 42px;

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

    padding: 0;

    border: 1px solid transparent;
    border-radius: 12px;

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

    cursor: pointer;

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


.header-search-button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}


/* (старые стили выпадающего поиска удалены — см. блок «APPLE STYLE» ниже) */

@media (max-width: 700px) {
    .header-search-button {
        width: 40px;
        height: 40px;
    }
}

/* ==================================================
   APPLE STYLE — ПОИСК
================================================== */


/* ==================================================
   ОСНОВНОЙ КОНТЕЙНЕР ПОИСКА
================================================== */

.header-search {

    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    z-index: 9999;

    display: none;

    min-height: 100vh;

    background:
        rgba(7, 10, 19, 0.98);

    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);

}


.header-search.active {

    display: block;

}


/* ==================================================
   СТРОКА ПОИСКА
================================================== */

.header-search-inner {

    width: min(
        820px,
        calc(100% - 40px)
    );

    margin: 90px auto 0;

    display: flex;

    align-items: center;

    height: 64px;

    padding: 0 14px 0 20px;

    border-radius: 18px;

    background:
        rgba(21, 26, 42, 0.95);

    border:
        1px solid rgba(
            167,
            139,
            250,
            0.45
        );

    box-shadow:
        0 0 0 1px rgba(
            167,
            139,
            250,
            0.08
        ),
        0 15px 50px rgba(
            0,
            0,
            0,
            0.35
        );

}


/* ==================================================
   ИКОНКА
================================================== */

.header-search-icon {

    display: flex;

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

    flex-shrink: 0;

    margin-right: 14px;

    color:
        var(--text-secondary);

}


/* ==================================================
   INPUT
================================================== */

.header-search-inner input {

    flex: 1;

    width: 100%;

    height: 100%;

    padding: 0;

    border: none;

    outline: none;

    background: transparent;

    color:
        var(--text);

    font-size: 20px;

    font-weight: 500;

}


.header-search-inner input::placeholder {

    color:
        var(--text-muted);

}


/* ==================================================
   КНОПКА ЗАКРЫТИЯ
================================================== */

.header-search-inner button {

    display: flex;

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

    width: 40px;
    height: 40px;

    padding: 0;

    border: none;

    border-radius: 12px;

    background:
        transparent;

    color:
        var(--text-secondary);

    font-size: 26px;

    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;

}


.header-search-inner button:hover {

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

    color:
        var(--text);

}


/* ==================================================
   ОБЛАСТЬ РЕЗУЛЬТАТОВ
================================================== */

.header-search-content {

    width: min(
        820px,
        calc(100% - 40px)
    );

    margin: 42px auto 0;

}


/* ==================================================
   РЕЗУЛЬТАТЫ
================================================== */

.header-search-results {

    display: none;

}


.header-search-results.visible {

    display: block;

}


/* ==================================================
   ЗАГОЛОВОК
================================================== */

.header-search-results-title {

    margin-bottom: 18px;

    color:
        var(--text-muted);

    font-size: 13px;

    font-weight: 600;

    letter-spacing: 0.08em;

    text-transform: uppercase;

}


/* ==================================================
   КАРТОЧКА КУРСА
================================================== */

.header-search-result {

    display: flex;

    align-items: center;

    width: 100%;

    min-height: 76px;

    margin-bottom: 8px;

    padding: 14px 18px;

    border: none;

    border-radius: 14px;

    background:
        transparent;

    color:
        var(--text);

    text-align: left;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;

}


.header-search-result:hover {

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

    transform:
        translateX(4px);

}


/* ==================================================
   ИКОНКА КУРСА
================================================== */

.header-search-result-icon {

    display: flex;

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

    width: 48px;
    height: 48px;

    flex-shrink: 0;

    margin-right: 16px;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            rgba(36, 123, 255, 0.20),
            rgba(85, 72, 232, 0.25)
        );

    color:
        #a78bfa;

    font-size: 14px;

    font-weight: 700;

}


/* ==================================================
   ТЕКСТ
================================================== */

.header-search-result-content {

    display: flex;

    flex-direction: column;

    gap: 5px;

    flex: 1;

}


.header-search-result-content strong {

    color:
        var(--text);

    font-size: 18px;

    font-weight: 600;

}


.header-search-result-content small {

    color:
        var(--text-secondary);

    font-size: 14px;

}


/* ==================================================
   СТРЕЛКА
================================================== */

.header-search-result-arrow {

    margin-left: 20px;

    color:
        var(--text-muted);

    font-size: 22px;

    transition:
        color 0.2s ease,
        transform 0.2s ease;

}


.header-search-result:hover
.header-search-result-arrow {

    color:
        #a78bfa;

    transform:
        translateX(5px);

}


/* ==================================================
   НИЧЕГО НЕ НАЙДЕНО
================================================== */

.header-search-empty {

    padding: 30px 0;

    color:
        var(--text-secondary);

    font-size: 16px;

}


/* ==================================================
   МОБИЛЬНАЯ ВЕРСИЯ
================================================== */

@media (max-width: 700px) {

    .header-search-inner {

        width:
            calc(100% - 24px);

        margin-top: 70px;

        height: 58px;

    }


    .header-search-content {

        width:
            calc(100% - 24px);

        margin-top: 30px;

    }


    .header-search-inner input {

        font-size: 17px;

    }


    .header-search-result {

        min-height: 68px;

        padding:
            10px;

    }


    .header-search-result-icon {

        width: 42px;
        height: 42px;

        margin-right: 12px;

    }


    .header-search-result-content strong {

        font-size: 16px;

    }


    .header-search-result-content small {

        font-size: 13px;

    }

}

/* ==================================================
   ПОИСК — ПОДСВЕТКА И КЛАВИАТУРА
================================================== */

.header-search-result mark {
    background: transparent;
    color: #ffffff;
    font-weight: 700;
}

.header-search-result:not(:hover) mark {
    color: #c4b5fd;
}

.header-search-result.is-active {
    background: rgba(167, 139, 250, 0.12);
    transform: translateX(4px);
}

.header-search-result:focus-visible {
    outline: 2px solid rgba(167, 139, 250, 0.7);
    outline-offset: 2px;
}


/* ==================================================
   ГЛАВНАЯ — МОДУЛИ КУРСА
================================================== */

.home-module-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.home-module-card {
    display: flex;
    flex-direction: column;
}

.home-module-topics {
    margin-top: 14px;

    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.home-module-xp {
    align-self: flex-start;

    margin-top: auto;
    padding: 6px 12px;

    color: var(--blue);
    font-size: 13px;
    font-weight: 700;

    background: rgba(36, 123, 255, 0.1);
    border-radius: 999px;
}

.home-module-topics + .home-module-xp {
    margin-top: 18px;
}


/* ==================================================
   ГЛАВНАЯ — ЧАСТЫЕ ВОПРОСЫ
================================================== */

.home-faq {
    padding: 100px 20px;
}

.home-faq-list {
    width: min(800px, 100%);
    margin: 40px auto 0;
}

.home-faq-item {
    margin-bottom: 12px;

    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;

    transition: border-color var(--transition);
}

.home-faq-item:hover,
.home-faq-item[open] {
    border-color: var(--border-hover);
}

.home-faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 20px 24px;

    color: var(--text);
    font-size: 17px;
    font-weight: 600;

    cursor: pointer;
    list-style: none;
}

.home-faq-item summary::-webkit-details-marker {
    display: none;
}

.home-faq-item summary::after {
    content: "+";

    flex-shrink: 0;

    color: var(--blue);
    font-size: 24px;
    line-height: 1;

    transition: transform var(--transition);
}

.home-faq-item[open] summary::after {
    transform: rotate(45deg);
}

.home-faq-item p {
    margin: 0;
    padding: 0 24px 22px;

    color: var(--text-secondary);
    line-height: 1.7;
}


/* ==================================================
   ГЛАВНАЯ — АДАПТИВ
================================================== */

@media (max-width: 768px) {

    .home-module-grid {
        grid-template-columns: 1fr;
    }

    .home-faq {
        padding: 70px 16px;
    }

    .home-faq-item summary {
        font-size: 16px;
        padding: 18px 18px;
    }

    .home-faq-item p {
        padding: 0 18px 18px;
    }

}