:root {
    color-scheme: dark;
    --bg-main: #070912;
    --bg-second: #0c1020;
    --panel: rgba(12, 16, 31, 0.76);
    --panel-strong: rgba(16, 21, 39, 0.92);
    --panel-soft: rgba(255, 255, 255, 0.055);
    --text: #f8fbff;
    --muted: #b9c4d8;
    --faint: #79869f;
    --accent: #00e5ff;
    --accent-2: #ff2bd6;
    --accent-3: #9cff3f;
    --warning: #ffd166;
    --danger: #ff3b5c;
    --border: rgba(255, 255, 255, 0.12);
    --border-hot: rgba(0, 229, 255, 0.42);
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.46);
    --glow-cyan: 0 0 28px rgba(0, 229, 255, 0.28);
    --glow-pink: 0 0 28px rgba(255, 43, 214, 0.24);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.12), transparent 24%),
        linear-gradient(315deg, rgba(255, 43, 214, 0.13), transparent 26%),
        radial-gradient(circle at 52% 18%, rgba(156, 255, 63, 0.08), transparent 18%),
        linear-gradient(180deg, #050611 0%, #090d1b 44%, #0a0f1e 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    z-index: -3;
    background:
        linear-gradient(rgba(0, 229, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 43, 214, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black 0%, transparent 82%);
}

body::after {
    z-index: -2;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.025) 0,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px,
            transparent 5px
        );
    opacity: 0.34;
    mix-blend-mode: screen;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
    color: #ffffff;
    text-shadow: 0 0 16px rgba(0, 229, 255, 0.65);
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 16px clamp(16px, 4vw, 44px);
    background: linear-gradient(180deg, rgba(5, 7, 18, 0.92), rgba(8, 12, 28, 0.78));
    border-bottom: 1px solid rgba(0, 229, 255, 0.22);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.34), inset 0 -1px rgba(255, 43, 214, 0.18);
    backdrop-filter: blur(16px);
    animation: navDrop 0.65s ease both;
}

.burger-menu {
    display: none;
    width: 46px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border-radius: 12px;
}

.burger-menu span {
    display: block;
    width: 21px;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.55);
    transition: transform 0.24s ease, opacity 0.24s ease;
}

header.menu-open .burger-menu span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

header.menu-open .burger-menu span:nth-child(2) {
    opacity: 0;
}

header.menu-open .burger-menu span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.logo {
    position: relative;
    flex: 0 0 auto;
    color: #ffffff;
    cursor: pointer;
    font-size: clamp(20px, 2vw, 27px);
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
    text-shadow:
        2px 0 0 rgba(255, 43, 214, 0.65),
        -2px 0 0 rgba(0, 229, 255, 0.65),
        0 0 24px rgba(0, 229, 255, 0.42);
    white-space: nowrap;
}

.logo::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent);
    box-shadow: var(--glow-cyan);
}

.nav-buttons {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.profile-nav-button {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border-color: rgba(0, 229, 255, 0.58);
    aspect-ratio: 1;
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.24), rgba(255, 43, 214, 0.28)),
        rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 24px rgba(0, 229, 255, 0.18), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.profile-nav-button::before {
    display: none;
}

.profile-nav-button img {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    margin: 0;
}

.profile-nav-button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    margin: 0;
    border-radius: 50%;
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.72), rgba(255, 43, 214, 0.72));
    text-shadow: 0 0 14px rgba(0, 229, 255, 0.82);
}

.account-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 250;
    display: grid;
    gap: 8px;
    width: min(210px, 82vw);
    padding: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    border: 1px solid rgba(0, 229, 255, 0.28);
    border-radius: 16px;
    background: rgba(8, 12, 28, 0.97);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.46), 0 0 28px rgba(255, 43, 214, 0.14);
    backdrop-filter: blur(16px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.account-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.account-menu button {
    width: 100%;
    min-height: 40px;
    justify-content: center;
    padding: 10px 12px;
}

button,
.nav-buttons button,
.card button,
.modal-btn {
    position: relative;
    isolation: isolate;
    min-height: 42px;
    border: 1px solid rgba(0, 229, 255, 0.35);
    border-radius: 10px;
    padding: 11px 18px;
    overflow: hidden;
    color: #ffffff;
    cursor: pointer;
    font: 800 13px/1 "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
    text-transform: uppercase;
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.92), rgba(255, 43, 214, 0.86)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
    box-shadow: 0 12px 28px rgba(0, 229, 255, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, filter 0.22s ease;
}

button::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: translateX(-120%) skewX(-22deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.36), transparent);
    transition: transform 0.55s ease;
}

button:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.46);
    box-shadow: 0 16px 34px rgba(255, 43, 214, 0.2), 0 0 28px rgba(0, 229, 255, 0.25);
    filter: saturate(1.12);
}

button:hover::before {
    transform: translateX(120%) skewX(-22deg);
}

button:active {
    transform: translateY(-1px) scale(0.98);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.08);
}

.logout,
.delete {
    background: linear-gradient(135deg, var(--danger), #9f1239);
    border-color: rgba(255, 59, 92, 0.58);
    box-shadow: 0 12px 28px rgba(255, 59, 92, 0.2);
}

#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050611;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

#loader.hide {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    color: #fff;
    font-size: clamp(34px, 6vw, 62px);
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
    animation: pulseGlow 1.25s infinite;
}

.particles span {
    position: fixed;
    bottom: -90px;
    z-index: -1;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.9), 0 0 40px rgba(255, 43, 214, 0.45);
    animation: floatParticle 12s linear infinite;
}

.particles span:nth-child(1) { left: 8%; animation-delay: 0s; }
.particles span:nth-child(2) { left: 27%; animation-delay: 2.2s; background: var(--accent-2); }
.particles span:nth-child(3) { left: 51%; animation-delay: 4.4s; }
.particles span:nth-child(4) { left: 72%; animation-delay: 1.2s; background: var(--accent-3); }
.particles span:nth-child(5) { left: 91%; animation-delay: 3.1s; background: var(--accent-2); }

.hero-wrap,
.section,
.search-wrap,
.footer {
    width: min(1200px, 92%);
    margin-inline: auto;
}

.hero-wrap {
    margin-top: 34px;
}

.hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    border: 1px solid rgba(0, 229, 255, 0.28);
    border-radius: 24px;
    background:
        linear-gradient(90deg, rgba(5, 7, 18, 0.96) 0%, rgba(7, 10, 22, 0.8) 46%, rgba(8, 12, 24, 0.22) 100%),
        url("https://images.unsplash.com/photo-1542751371-adc38448a05e?auto=format&fit=crop&w=1600&q=80") center/cover no-repeat;
    box-shadow: var(--shadow), var(--glow-cyan);
    animation: fadeUp 0.85s ease both;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, transparent 0 47%, rgba(0, 229, 255, 0.14) 47% 48%, transparent 48% 100%),
        linear-gradient(180deg, transparent 78%, rgba(255, 43, 214, 0.18));
}

.hero::after {
    content: "GAMESTUDY";
    position: absolute;
    right: -18px;
    bottom: 12px;
    color: rgba(255, 255, 255, 0.055);
    font-size: clamp(56px, 11vw, 145px);
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 620px;
    padding: clamp(42px, 7vw, 74px) clamp(24px, 5vw, 62px);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    padding: 9px 14px;
    border: 1px solid rgba(156, 255, 63, 0.45);
    border-radius: 999px;
    color: #eaffdc;
    background: rgba(156, 255, 63, 0.08);
    box-shadow: 0 0 18px rgba(156, 255, 63, 0.12);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    animation: fadeUp 0.7s ease both;
}

.hero-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent-3);
    box-shadow: 0 0 16px var(--accent-3);
}

.hero h1 {
    margin: 0 0 18px;
    color: transparent;
    font-size: clamp(40px, 7vw, 74px);
    font-weight: 950;
    line-height: 0.96;
    letter-spacing: 0;
    text-transform: uppercase;
    background: linear-gradient(90deg, #ffffff, var(--accent) 44%, var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 22px rgba(0, 229, 255, 0.2));
}

.hero p,
.feature-card p,
.card p,
.step-card p,
.review-text,
.faq-item p,
.news-card p,
.stat-card p,
.cta-block p,
.footer-grid p,
.muted-text,
.leaderboard-info p,
.review-top p {
    color: var(--muted);
}

.hero p {
    margin: 0 0 30px;
    max-width: 55ch;
    font-size: clamp(16px, 2vw, 19px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-actions button {
    min-width: 190px;
    min-height: 48px;
    border-radius: 12px;
    letter-spacing: 0;
}

.hero-actions button:hover {
    transform: translateY(-4px) scale(1.02);
}

.search-wrap {
    margin-top: 22px;
}

input,
select,
#searchInput {
    width: 100%;
    min-height: 48px;
    margin: 8px 0;
    padding: 14px 16px;
    border: 1px solid rgba(0, 229, 255, 0.24);
    border-radius: 12px;
    outline: none;
    color: var(--text);
    background: rgba(5, 9, 20, 0.78);
    box-shadow: inset 0 0 0 1px rgba(255, 43, 214, 0.06), 0 0 0 rgba(0, 229, 255, 0);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

input::placeholder,
#searchInput::placeholder {
    color: #8391aa;
}

input:focus,
select:focus,
#searchInput:focus {
    border-color: rgba(0, 229, 255, 0.72);
    background: rgba(8, 13, 28, 0.92);
    box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.1), 0 0 30px rgba(0, 229, 255, 0.12);
}

.section {
    margin-top: 42px;
}

.section-title {
    position: relative;
    margin: 0 0 22px;
    color: #ffffff;
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
    text-shadow: -2px 0 rgba(0, 229, 255, 0.25), 2px 0 rgba(255, 43, 214, 0.2);
}

.section-title::after {
    content: "";
    display: block;
    width: 86px;
    height: 3px;
    margin-top: 10px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: var(--glow-cyan);
}

.about-project-panel {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 24px;
    padding: clamp(24px, 5vw, 42px);
    border: 1px solid rgba(0, 229, 255, 0.22);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.14), transparent 34%),
        linear-gradient(315deg, rgba(255, 43, 214, 0.14), transparent 38%),
        rgba(8, 12, 24, 0.84);
    box-shadow: var(--shadow), var(--glow-pink);
    backdrop-filter: blur(14px);
}

.about-project-panel::after {
    content: "GAMESTUDY";
    position: absolute;
    right: -8px;
    bottom: -12px;
    color: rgba(255, 255, 255, 0.045);
    font-size: clamp(48px, 9vw, 116px);
    font-weight: 950;
    line-height: 1;
    pointer-events: none;
}

.about-project-copy,
.about-project-grid {
    position: relative;
    z-index: 1;
}

.about-project-copy h2 {
    margin: 6px 0 14px;
    color: #ffffff;
    font-size: clamp(32px, 5vw, 58px);
    font-weight: 950;
    line-height: 0.98;
    text-transform: uppercase;
}

.about-project-copy p {
    max-width: 620px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 16px;
}

.about-project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.about-project-card {
    min-height: 170px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
        rgba(255, 255, 255, 0.045);
    box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.08);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.about-project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 229, 255, 0.4);
    box-shadow: var(--glow-cyan);
}

.about-project-card span {
    color: var(--accent-3);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}

.about-project-card h3 {
    margin: 10px 0 8px;
    color: #ffffff;
    font-size: 20px;
    text-transform: uppercase;
}

.about-project-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.features,
.stats-grid,
.steps-grid,
.reviews-grid,
.news-grid,
.faq-list,
.courses,
.my-courses,
.courses-grid {
    display: grid;
    gap: 20px;
}

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

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

.steps-grid,
.reviews-grid,
.news-grid,
.courses {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.faq-list,
.my-courses {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.courses-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 28px;
}

.feature-card,
.card,
.course-item,
.my-card,
.box,
.stat-card,
.step-card,
.review-card,
.faq-item,
.news-card,
.cta-block,
.auth-box,
.course-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.026)),
        var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.feature-card::before,
.card::before,
.course-item::before,
.my-card::before,
.box::before,
.stat-card::before,
.step-card::before,
.review-card::before,
.faq-item::before,
.news-card::before,
.cta-block::before,
.auth-box::before,
.course-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.16), transparent 34%),
        linear-gradient(315deg, rgba(255, 43, 214, 0.14), transparent 28%);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.feature-card:hover,
.card:hover,
.course-item:hover,
.my-card:hover,
.stat-card:hover,
.step-card:hover,
.review-card:hover,
.faq-item:hover,
.news-card:hover,
.course-card:hover {
    transform: translateY(-7px);
    border-color: var(--border-hot);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48), var(--glow-cyan), var(--glow-pink);
}

.feature-card:hover::before,
.card:hover::before,
.course-item:hover::before,
.my-card:hover::before,
.stat-card:hover::before,
.step-card:hover::before,
.review-card:hover::before,
.faq-item:hover::before,
.news-card:hover::before,
.course-card:hover::before {
    opacity: 1;
}

.feature-card,
.stat-card,
.step-card,
.review-card,
.faq-item,
.news-card,
.course-card {
    padding: 24px;
}

.feature-card h3,
.step-card h3,
.review-top h3,
.faq-item h3,
.news-card h3,
.course-card h3,
.card h3,
.box h2,
.box h3 {
    position: relative;
    z-index: 1;
}

.feature-card h3,
.step-card h3,
.faq-item h3,
.news-card h3,
.course-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

.feature-card p,
.step-card p,
.faq-item p,
.news-card p,
.course-card p {
    position: relative;
    z-index: 1;
    margin: 0;
}

.stat-card {
    text-align: center;
}

.stat-card h3,
.counter {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 48px);
    font-weight: 950;
    text-shadow: 0 0 22px rgba(0, 229, 255, 0.55), 0 0 34px rgba(255, 43, 214, 0.26);
}

.step-number {
    position: relative;
    z-index: 1;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 14px;
    color: #071019;
    font-weight: 950;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    box-shadow: 0 0 22px rgba(0, 229, 255, 0.25);
}

.card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
}

.card img,
.course-item img,
#modalImage {
    display: block;
    width: 100%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 14px;
    filter: saturate(1.08) contrast(1.04);
}

.card img {
    height: 190px;
    margin-bottom: 15px;
}

.card h3 {
    margin: 8px 0;
    font-size: 24px;
}

.card p {
    min-height: 48px;
    margin: 0 0 15px;
}

.card button {
    margin-top: auto;
}

.box {
    width: min(620px, 92%);
    margin: 44px auto 0;
    padding: clamp(22px, 4vw, 34px);
    text-align: center;
}

.leaderboard-box {
    width: min(820px, 92%);
}

.profile-page {
    width: min(1180px, 92%);
    margin: 38px auto 0;
}

.course-item,
.my-card {
    padding: 16px;
}

.course-item + .course-item {
    margin-top: 14px;
}

.hidden {
    display: none !important;
}

#courseModal,
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    overflow-y: auto;
    padding: 24px 0;
    background: rgba(3, 5, 12, 0.78);
    backdrop-filter: blur(12px);
    animation: fadeUp 0.28s ease;
}

.auth-modal {
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#courseModal .box {
    width: min(680px, 92%);
}

#modalImage {
    height: 275px;
    margin-bottom: 16px;
}

.auth-box {
    width: min(440px, 92%);
    padding: 30px;
    text-align: center;
}

.auth-close {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 2;
    cursor: pointer;
    color: #ffffff;
    font-size: 28px;
}

.answer-btn {
    width: 100%;
    min-height: 64px;
    justify-content: flex-start;
    padding: 18px 20px;
    border-radius: 16px;
    text-align: left;
    font-size: 16px;
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.14), rgba(255, 43, 214, 0.08)),
        rgba(255, 255, 255, 0.06);
}

.answer-btn:hover {
    transform: translateY(-3px) scale(1.01);
}

#questions p {
    padding: 16px;
    border: 1px solid rgba(0, 229, 255, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
}

.test-page {
    width: min(1120px, 92%);
    margin: 38px auto 0;
}

.test-hero,
.test-panel,
.game-select-card,
.question-card,
.test-result-card {
    position: relative;
    overflow: hidden;
}

.test-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 290px);
    gap: 22px;
    align-items: stretch;
    padding: clamp(24px, 5vw, 42px);
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.16), transparent 42%),
        linear-gradient(315deg, rgba(255, 43, 214, 0.16), transparent 38%),
        rgba(8, 12, 24, 0.84);
    box-shadow: var(--shadow), var(--glow-cyan);
    backdrop-filter: blur(14px);
}

.test-hero::after {
    content: "QUIZ ARENA";
    position: absolute;
    right: 18px;
    bottom: -10px;
    color: rgba(255, 255, 255, 0.045);
    font-size: clamp(42px, 8vw, 96px);
    font-weight: 950;
    line-height: 1;
    pointer-events: none;
}

.test-hero h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(38px, 6vw, 68px);
    font-weight: 950;
    line-height: 0.95;
    text-transform: uppercase;
}

.test-hero p {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.test-hero-score {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    min-height: 180px;
    padding: 24px;
    border: 1px solid rgba(0, 229, 255, 0.24);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.test-hero-score span,
.test-panel-head span,
.test-result-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.test-hero-score strong {
    color: #ffffff;
    font-size: clamp(48px, 8vw, 76px);
    font-weight: 950;
    line-height: 0.95;
    text-shadow: 0 0 28px rgba(0, 229, 255, 0.45);
}

.game-select-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 22px 0;
}

.game-select-card {
    display: grid;
    align-content: end;
    min-height: 180px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    color: #ffffff;
    text-align: left;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
        var(--panel);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.game-select-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(0, 229, 255, 0.46);
    box-shadow: var(--shadow), var(--glow-cyan);
}

.game-select-card span {
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 950;
    line-height: 1;
    text-transform: uppercase;
}

.game-select-card strong {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.cs2-card {
    background:
        linear-gradient(145deg, rgba(0, 229, 255, 0.2), transparent 56%),
        rgba(8, 12, 24, 0.86);
}

.dota-card {
    background:
        linear-gradient(145deg, rgba(255, 43, 214, 0.2), transparent 56%),
        rgba(8, 12, 24, 0.86);
}

.valorant-card {
    background:
        linear-gradient(145deg, rgba(156, 255, 63, 0.18), transparent 56%),
        rgba(8, 12, 24, 0.86);
}

.lol-card {
    background:
        linear-gradient(145deg, rgba(33, 255, 120, 0.2), rgba(0, 229, 255, 0.08) 56%),
        rgba(8, 12, 24, 0.86);
}

.test-panel {
    padding: clamp(20px, 4vw, 30px);
    border: 1px solid var(--border);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.026)),
        var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.test-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.test-panel-head h2 {
    margin: 8px 0 0;
    color: #ffffff;
    font-size: clamp(26px, 4vw, 42px);
    text-transform: uppercase;
}

#scorePreview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid rgba(156, 255, 63, 0.28);
    border-radius: 999px;
    color: var(--accent-3);
    background: rgba(156, 255, 63, 0.08);
}

.test-progress {
    height: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.075);
}

#testProgressFill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.42);
    transition: width 0.45s ease;
}

.question-card {
    margin-top: 18px;
    padding: clamp(18px, 4vw, 28px);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.045);
}

.question-card p {
    margin: 0 0 18px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #ffffff;
    font-size: clamp(20px, 3.5vw, 30px);
    font-weight: 850;
    line-height: 1.25;
    background: transparent;
}

.answer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.test-result-card {
    margin-top: 18px;
    padding: clamp(20px, 4vw, 30px);
    border: 1px solid rgba(156, 255, 63, 0.25);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(156, 255, 63, 0.12), rgba(0, 229, 255, 0.08)),
        rgba(255, 255, 255, 0.045);
}

.test-result-card h3 {
    margin: 8px 0 18px;
    color: #ffffff;
    font-size: clamp(32px, 6vw, 58px);
    font-weight: 950;
    text-transform: uppercase;
}

.test-result-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.test-result-stats div {
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
}

.test-result-stats strong {
    display: block;
    color: var(--accent-3);
    font-size: clamp(26px, 5vw, 42px);
    font-weight: 950;
}

.test-result-stats p {
    margin: 6px 0 0;
    color: var(--muted);
}

.test-result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.test-back-link {
    margin-top: 20px;
    text-align: center;
}

#result {
    color: var(--accent-3);
    font-size: 24px;
    font-weight: 950;
    text-shadow: 0 0 18px rgba(156, 255, 63, 0.36);
}

.cta-block {
    padding: clamp(30px, 6vw, 52px) 24px;
    text-align: center;
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.16), rgba(255, 43, 214, 0.14)),
        rgba(8, 12, 24, 0.76);
}

.cta-block h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 42px);
    text-transform: uppercase;
}

.cta-block p {
    max-width: 740px;
    margin: 0 auto 22px;
}

.review-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.review-avatar,
.profile-avatar-big {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #071019;
    font-weight: 950;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 28px rgba(0, 229, 255, 0.24);
}

.review-avatar {
    width: 52px;
    height: 52px;
    border-radius: 15px;
}

.review-top h3,
.review-top p {
    margin: 0;
}

.review-text {
    position: relative;
    z-index: 1;
    margin: 0;
}

.news-date {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--warning);
    font-size: 13px;
    font-weight: 800;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    text-align: left;
}

.profile-avatar-big {
    width: clamp(92px, 12vw, 138px);
    height: clamp(92px, 12vw, 138px);
    border-radius: 26px;
    font-size: clamp(34px, 6vw, 56px);
    overflow: hidden;
}

.profile-header h3,
.profile-header p {
    margin: 0;
}

.profile-avatar-big img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.profile-stat-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.08);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.profile-stat-card:hover,
.profile-panel:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 229, 255, 0.4);
    box-shadow: var(--shadow), var(--glow-cyan);
}

.profile-stat-card span {
    display: block;
    color: var(--accent-3);
    font-size: 38px;
    font-weight: 950;
    line-height: 1;
    text-shadow: 0 0 18px rgba(156, 255, 63, 0.34);
}

.profile-stat-card p {
    margin: 8px 0 0;
    color: var(--muted);
}

.profile-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.profile-dashboard-hero,
.profile-panel,
.profile-level-card,
.profile-stat-card {
    position: relative;
    overflow: hidden;
}

.profile-dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    align-items: stretch;
    gap: 22px;
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid var(--border);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.14), transparent 40%),
        linear-gradient(315deg, rgba(255, 43, 214, 0.13), transparent 34%),
        rgba(8, 12, 24, 0.82);
    box-shadow: var(--shadow), var(--glow-cyan);
    backdrop-filter: blur(14px);
}

.profile-dashboard-hero::after {
    content: "PLAYER HUB";
    position: absolute;
    right: 18px;
    bottom: -8px;
    color: rgba(255, 255, 255, 0.045);
    font-size: clamp(42px, 8vw, 92px);
    font-weight: 950;
    line-height: 1;
    pointer-events: none;
}

.profile-identity,
.profile-level-card,
.profile-dashboard-hero .profile-header {
    position: relative;
    z-index: 1;
}

.profile-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--accent-3);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.profile-identity h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 950;
    line-height: 0.98;
    text-transform: uppercase;
}

.profile-identity p {
    margin: 4px 0;
    color: var(--muted);
}

.profile-level-card {
    display: grid;
    align-content: center;
    min-height: 210px;
    padding: 24px;
    border: 1px solid rgba(0, 229, 255, 0.24);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 43, 214, 0.08);
}

.profile-level-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.profile-level-card strong {
    color: #ffffff;
    font-size: clamp(58px, 10vw, 92px);
    font-weight: 950;
    line-height: 0.95;
    text-shadow: 0 0 28px rgba(0, 229, 255, 0.5);
}

.profile-level-card p {
    margin: 8px 0 12px;
    color: var(--muted);
}

.profile-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 22px;
}

.profile-panel {
    min-height: 230px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.024)),
        var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.profile-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.profile-panel-head h3 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    text-transform: uppercase;
}

.profile-panel #myCoursesContainer,
.profile-panel #resultsContainer {
    display: grid;
    gap: 12px;
}

.profile-panel .card {
    min-height: 0;
    padding: 14px;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 24px 0 0;
}

.xp-box {
    margin: 22px 0;
}

.xp-line {
    width: 100%;
    height: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.075);
}

#xpFill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.4);
    transition: width 0.75s ease;
}

#achievements,
#leaderboard {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

#achievements {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.achievement-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    align-items: start;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
        rgba(255, 255, 255, 0.055);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.achievement-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 229, 255, 0.4);
    box-shadow: var(--shadow), var(--glow-cyan);
}

.achievement-card.unlocked {
    border-color: rgba(156, 255, 63, 0.28);
    box-shadow: inset 0 0 0 1px rgba(156, 255, 63, 0.08);
}

.achievement-card.locked {
    opacity: 0.62;
    filter: grayscale(0.35);
}

.achievement-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.07);
}

.achievement-info h4 {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 16px;
    text-transform: uppercase;
}

.achievement-info p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.achievement-info strong {
    display: inline-flex;
    margin-top: 10px;
    color: var(--accent-3);
    font-size: 12px;
    text-transform: uppercase;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 58px 1fr 92px;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.leaderboard-item:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 229, 255, 0.46);
    box-shadow: var(--glow-cyan);
}

.leaderboard-place {
    font-size: 28px;
    text-align: center;
}

.leaderboard-info {
    min-width: 0;
    text-align: left;
}

.leaderboard-info h3 {
    margin: 0 0 4px;
}

.leaderboard-info p {
    margin: 0;
    font-size: 14px;
}

.leaderboard-score {
    color: var(--accent-3);
    font-size: 28px;
    font-weight: 950;
    text-align: right;
    text-shadow: 0 0 18px rgba(156, 255, 63, 0.35);
}

.rating-page {
    width: min(1180px, 92%);
    margin: 38px auto 0;
}

.rating-hero,
.top-player-card,
.leaderboard-table-panel,
.leaderboard-row {
    position: relative;
    overflow: hidden;
}

.rating-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 22px;
    align-items: stretch;
    padding: clamp(24px, 5vw, 42px);
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(255, 207, 64, 0.16), transparent 38%),
        linear-gradient(315deg, rgba(0, 229, 255, 0.15), transparent 42%),
        rgba(8, 12, 24, 0.84);
    box-shadow: var(--shadow), var(--glow-cyan);
    backdrop-filter: blur(14px);
}

.rating-hero::after {
    content: "LEADERBOARD";
    position: absolute;
    right: 18px;
    bottom: -10px;
    color: rgba(255, 255, 255, 0.045);
    font-size: clamp(38px, 8vw, 92px);
    font-weight: 950;
    line-height: 1;
    pointer-events: none;
}

.rating-hero h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(38px, 6vw, 68px);
    font-weight: 950;
    line-height: 0.95;
    text-transform: uppercase;
}

.rating-hero p {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.rating-hero-score {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    min-height: 180px;
    padding: 24px;
    border: 1px solid rgba(255, 207, 64, 0.28);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.rating-hero-score span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.rating-hero-score strong {
    color: #ffffff;
    font-size: clamp(52px, 8vw, 84px);
    font-weight: 950;
    line-height: 0.95;
    text-shadow: 0 0 28px rgba(255, 207, 64, 0.42);
}

.rating-hero-score p {
    margin-top: 8px;
}

.top-players-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 22px 0;
}

.top-player-card {
    min-height: 260px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
        rgba(8, 12, 24, 0.86);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.top-player-card:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: var(--shadow), var(--glow-cyan);
}

.top-player-card.gold {
    border-color: rgba(255, 207, 64, 0.58);
    background:
        linear-gradient(145deg, rgba(255, 207, 64, 0.24), transparent 58%),
        rgba(8, 12, 24, 0.9);
}

.top-player-card.silver {
    border-color: rgba(210, 222, 236, 0.52);
    background:
        linear-gradient(145deg, rgba(210, 222, 236, 0.2), transparent 58%),
        rgba(8, 12, 24, 0.9);
}

.top-player-card.bronze {
    border-color: rgba(205, 127, 50, 0.58);
    background:
        linear-gradient(145deg, rgba(205, 127, 50, 0.24), transparent 58%),
        rgba(8, 12, 24, 0.9);
}

.top-player-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: var(--accent-3);
    font-weight: 950;
    background: rgba(255, 255, 255, 0.07);
}

.top-player-card h2 {
    margin: 22px 0 8px;
    color: #ffffff;
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 950;
    text-transform: uppercase;
}

.top-player-card > strong {
    display: block;
    color: #ffffff;
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 950;
    line-height: 0.95;
    text-shadow: 0 0 24px rgba(0, 229, 255, 0.38);
}

.top-player-scores {
    display: grid;
    gap: 8px;
    margin-top: 20px;
}

.top-player-scores span {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.055);
}

.leaderboard-table-panel {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.024)),
        var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.leaderboard-table {
    display: grid;
    gap: 10px;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 86px minmax(150px, 1.2fr) repeat(5, minmax(96px, 1fr));
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 14px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.055);
}

.leaderboard-head {
    color: #ffffff;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    background: rgba(0, 229, 255, 0.08);
}

.leaderboard-rank,
.leaderboard-login,
.leaderboard-total {
    color: #ffffff;
    font-weight: 950;
}

.leaderboard-total {
    color: var(--accent-3);
    text-shadow: 0 0 16px rgba(156, 255, 63, 0.34);
}

.empty-leaderboard {
    grid-column: 1 / -1;
    padding: 18px;
    text-align: center;
}

.lessons-page {
    width: min(1180px, 92%);
    margin: 38px auto 0;
}

.lessons-hero,
.lesson-game-card,
.lesson-detail-panel {
    position: relative;
    overflow: hidden;
}

.lessons-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 22px;
    align-items: stretch;
    padding: clamp(24px, 5vw, 42px);
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.16), transparent 40%),
        linear-gradient(315deg, rgba(156, 255, 63, 0.13), transparent 38%),
        rgba(8, 12, 24, 0.84);
    box-shadow: var(--shadow), var(--glow-cyan);
    backdrop-filter: blur(14px);
}

.lessons-hero::after {
    content: "ACADEMY";
    position: absolute;
    right: 18px;
    bottom: -10px;
    color: rgba(255, 255, 255, 0.045);
    font-size: clamp(44px, 8vw, 96px);
    font-weight: 950;
    line-height: 1;
    pointer-events: none;
}

.lessons-hero h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(38px, 6vw, 68px);
    font-weight: 950;
    line-height: 0.95;
    text-transform: uppercase;
}

.lessons-hero p {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.lessons-hero-stat {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    min-height: 180px;
    padding: 24px;
    border: 1px solid rgba(156, 255, 63, 0.26);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.lessons-hero-stat span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.lessons-hero-stat strong {
    color: #ffffff;
    font-size: clamp(52px, 8vw, 84px);
    font-weight: 950;
    line-height: 0.95;
    text-shadow: 0 0 28px rgba(156, 255, 63, 0.42);
}

.lessons-hero-stat p {
    margin-top: 8px;
}

.lesson-controls {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin: 22px 0;
}

#lessonSearch {
    width: 100%;
}

.lesson-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.lesson-filter button {
    min-height: 46px;
    padding: 12px 16px;
}

.lesson-filter button.active {
    border-color: rgba(156, 255, 63, 0.44);
    color: #071018;
    background: linear-gradient(135deg, var(--accent-3), var(--accent));
    box-shadow: var(--glow-cyan);
}

.lesson-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.lesson-game-card {
    display: grid;
    align-content: start;
    min-height: 360px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
        rgba(8, 12, 24, 0.86);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.lesson-game-card:hover {
    transform: translateY(-7px) scale(1.015);
    border-color: rgba(0, 229, 255, 0.46);
    box-shadow: var(--shadow), var(--glow-cyan);
}

.cs2-lesson {
    background:
        linear-gradient(145deg, rgba(0, 229, 255, 0.18), transparent 58%),
        rgba(8, 12, 24, 0.9);
}

.dota2-lesson {
    background:
        linear-gradient(145deg, rgba(255, 43, 214, 0.18), transparent 58%),
        rgba(8, 12, 24, 0.9);
}

.valorant-lesson {
    background:
        linear-gradient(145deg, rgba(156, 255, 63, 0.16), transparent 58%),
        rgba(8, 12, 24, 0.9);
}

.lol-lesson {
    background:
        linear-gradient(145deg, rgba(33, 255, 120, 0.18), rgba(0, 229, 255, 0.08) 58%),
        rgba(8, 12, 24, 0.9);
}

.lesson-game {
    display: inline-flex;
    width: max-content;
    margin-bottom: 18px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: var(--accent-3);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.07);
}

.lesson-game-card h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 950;
    line-height: 1.05;
    text-transform: uppercase;
}

.lesson-game-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.lesson-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.lesson-meta span {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #ffffff;
    font-weight: 850;
    text-align: center;
    background: rgba(255, 255, 255, 0.055);
}

.lesson-game-card button {
    margin-top: auto;
}

.lesson-detail-panel {
    margin-top: 22px;
    padding: clamp(20px, 4vw, 30px);
    border: 1px solid var(--border);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.024)),
        var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.lesson-detail-panel h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(26px, 4vw, 42px);
    text-transform: uppercase;
}

.lesson-detail-panel p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.wiki-page {
    width: min(1240px, 92%);
}

.wiki-hero::after {
    content: "WIKI";
}

.wiki-nav {
    position: sticky;
    top: 92px;
    z-index: 8;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0 24px;
    padding: 10px;
    border: 1px solid rgba(0, 229, 255, 0.18);
    border-radius: 18px;
    background: rgba(5, 8, 18, 0.9);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

.wiki-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 950;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.18), rgba(255, 43, 214, 0.14));
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.wiki-nav a:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 229, 255, 0.5);
    box-shadow: var(--glow-cyan);
}

.wiki-sections {
    display: grid;
    gap: 28px;
}

.wiki-game-section {
    scroll-margin-top: 170px;
    padding: clamp(18px, 3vw, 26px);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.wiki-game-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.wiki-game-media {
    min-height: 280px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.wiki-game-media img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
    transition: transform 0.35s ease;
}

.wiki-game-section:hover .wiki-game-media img {
    transform: scale(1.045);
}

.wiki-game-intro {
    display: grid;
    align-content: center;
}

.wiki-game-intro h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(30px, 5vw, 58px);
    line-height: 0.98;
    text-transform: uppercase;
}

.wiki-game-intro p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.wiki-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.wiki-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.wiki-info-block {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.055);
}

.wiki-info-block h3 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
    text-transform: uppercase;
}

.wiki-info-block ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 18px;
}

.wiki-info-block li,
.wiki-info-block p {
    color: var(--muted);
    line-height: 1.62;
}

.wiki-video a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 12px;
    color: #ffffff;
    font-weight: 950;
    text-decoration: none;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 30px rgba(0, 229, 255, 0.18);
}

.wiki-guide {
    margin-top: 18px;
}

.wiki-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.wiki-guide-grid article {
    padding: 16px;
    border: 1px solid rgba(0, 229, 255, 0.14);
    border-radius: 14px;
    background: rgba(5, 8, 18, 0.48);
}

.wiki-guide-grid strong {
    display: block;
    margin-bottom: 8px;
    color: var(--accent-3);
    font-size: 14px;
    text-transform: uppercase;
}

.wiki-guide-grid p {
    margin: 0;
}

.companion-body {
    min-height: 100vh;
    padding-bottom: 86px;
    background:
        radial-gradient(circle at 20% 0%, rgba(0, 229, 255, 0.18), transparent 34%),
        radial-gradient(circle at 92% 18%, rgba(255, 43, 214, 0.18), transparent 28%),
        #050711;
}

.companion-app {
    width: min(100%, 520px);
    margin: 0 auto;
    padding: 16px 14px 110px;
}

.companion-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    gap: 12px;
    align-items: center;
    margin: -16px -14px 14px;
    padding: 16px 14px 12px;
    border-bottom: 1px solid rgba(0, 229, 255, 0.18);
    background: rgba(5, 7, 17, 0.92);
    backdrop-filter: blur(18px);
}

.companion-header span {
    color: var(--accent);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}

.companion-header h1 {
    margin: 2px 0 0;
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
}

.companion-back,
.companion-avatar {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
}

.companion-avatar {
    font-size: 13px;
}

.companion-games {
    display: flex;
    gap: 10px;
    margin: 12px -14px 14px;
    padding: 0 14px 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.companion-games::-webkit-scrollbar {
    display: none;
}

.companion-games button {
    flex: 0 0 96px;
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 108px;
    padding: 12px 10px;
    scroll-snap-align: start;
    border-radius: 20px;
    white-space: normal;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)),
        rgba(8, 12, 24, 0.88);
}

.companion-games button small {
    color: #ffffff;
    font-size: 11px;
    font-weight: 950;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
}

.game-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 26px rgba(0, 0, 0, 0.32);
}

.game-icon i,
.game-icon::before,
.game-icon::after {
    content: "";
    position: absolute;
}

.game-icon-all {
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.8), transparent 12%),
        linear-gradient(135deg, #00e5ff, #ff2bd6 58%, #9cff3f);
}

.game-icon-all::before {
    inset: 13px;
    border: 2px solid rgba(5, 8, 18, 0.78);
    border-radius: 50%;
}

.game-icon-cs2 {
    background:
        radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.78), transparent 12%),
        linear-gradient(135deg, #ffb21c, #ff6a00 58%, #2c1200);
}

.game-icon-cs2::before {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.92);
    border-radius: 50%;
}

.game-icon-cs2::after {
    width: 38px;
    height: 3px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 999px transparent, 0 0 0 0 rgba(255, 255, 255, 0.92);
}

.game-icon-cs2 i {
    width: 3px;
    height: 38px;
    background: rgba(255, 255, 255, 0.92);
}

.game-icon-dota2 {
    background:
        linear-gradient(135deg, #4b1114, #c42c2c 52%, #120709);
}

.game-icon-dota2::before {
    inset: 12px;
    border: 3px solid rgba(255, 204, 176, 0.9);
    transform: rotate(45deg);
}

.game-icon-dota2::after {
    width: 30px;
    height: 5px;
    background: rgba(255, 204, 176, 0.9);
    transform: rotate(-35deg);
}

.game-icon-valorant {
    background:
        linear-gradient(135deg, #fff4f0, #ff384e 55%, #21070a);
}

.game-icon-valorant::before {
    width: 30px;
    height: 34px;
    clip-path: polygon(0 0, 38% 0, 50% 58%, 62% 0, 100% 0, 58% 100%, 42% 100%);
    background: #ffffff;
    filter: drop-shadow(0 3px 0 rgba(50, 0, 0, 0.45));
}

.game-icon-lol {
    background:
        radial-gradient(circle at 50% 32%, rgba(255, 238, 150, 0.76), transparent 22%),
        linear-gradient(135deg, #082452, #0b5d8e 48%, #d6a83a);
}

.game-icon-lol::before {
    width: 34px;
    height: 34px;
    border: 3px solid #f4d36b;
    border-radius: 50%;
}

.game-icon-lol::after {
    width: 16px;
    height: 28px;
    border-left: 4px solid #f4d36b;
    border-bottom: 4px solid #f4d36b;
    transform: translateX(3px);
}

.companion-games button.active {
    border-color: rgba(156, 255, 63, 0.52);
    box-shadow: var(--glow-cyan);
}

.companion-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.055);
}

.companion-tabs button {
    min-height: 40px;
    padding: 10px 8px;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
}

.companion-tabs button.active {
    color: #06101c;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
}

.companion-feed {
    display: grid;
    gap: 14px;
}

.companion-card {
    overflow: hidden;
    border: 1px solid rgba(0, 229, 255, 0.18);
    border-radius: 22px;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
        rgba(8, 12, 24, 0.92);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.companion-card.cs2 {
    border-color: rgba(255, 178, 28, 0.38);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32), 0 0 24px rgba(255, 106, 0, 0.14);
}

.companion-card.dota2 {
    border-color: rgba(196, 44, 44, 0.42);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32), 0 0 24px rgba(196, 44, 44, 0.16);
}

.companion-card.valorant {
    border-color: rgba(255, 56, 78, 0.44);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32), 0 0 24px rgba(255, 56, 78, 0.16);
}

.companion-card.lol {
    border-color: rgba(214, 168, 58, 0.48);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32), 0 0 24px rgba(214, 168, 58, 0.16);
}

.companion-card img {
    width: 100%;
    height: 168px;
    object-fit: cover;
    display: block;
    background: rgba(255, 255, 255, 0.06);
}

.companion-card-content {
    padding: 16px;
}

.companion-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.companion-game-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 42px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: #071018;
    font-size: 12px;
    font-weight: 950;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
}

.companion-game-badge b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 10px;
    background: rgba(5, 8, 18, 0.72);
}

.companion-game-badge.cs2 {
    background: linear-gradient(135deg, #ffb21c, #ff6a00);
}

.companion-game-badge.dota2 {
    color: #ffffff;
    background: linear-gradient(135deg, #c42c2c, #4b1114);
}

.companion-game-badge.valorant {
    color: #ffffff;
    background: linear-gradient(135deg, #ff384e, #ffffff);
}

.companion-game-badge.lol {
    color: #081a34;
    background: linear-gradient(135deg, #d6a83a, #0b5d8e);
}

.companion-card-meta time {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.companion-card h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 22px;
    line-height: 1.08;
}

.companion-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.companion-card-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 14px;
}

.companion-card-actions button {
    min-height: 42px;
}

.companion-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 10px;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    width: min(100% - 20px, 500px);
    padding: 8px;
    border: 1px solid rgba(0, 229, 255, 0.22);
    border-radius: 22px;
    background: rgba(5, 7, 17, 0.94);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.42), var(--glow-cyan);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
}

.companion-bottom-nav button {
    min-height: 46px;
    padding: 9px 6px;
    border-radius: 16px;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.055);
    box-shadow: none;
}

.companion-bottom-nav button.active {
    color: #06101c;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
}

.admin-page {
    width: min(1180px, 92%);
    margin: 38px auto 0;
}

.admin-hero,
.admin-hero-card,
.admin-stat-card,
.admin-form-panel,
.admin-courses-panel,
.admin-course-card {
    position: relative;
    overflow: hidden;
}

.admin-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 22px;
    align-items: stretch;
    padding: clamp(24px, 5vw, 42px);
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(255, 43, 214, 0.16), transparent 40%),
        linear-gradient(315deg, rgba(0, 229, 255, 0.15), transparent 42%),
        rgba(8, 12, 24, 0.84);
    box-shadow: var(--shadow), var(--glow-cyan);
    backdrop-filter: blur(14px);
}

.admin-hero::after {
    content: "CONTROL";
    position: absolute;
    right: 18px;
    bottom: -10px;
    color: rgba(255, 255, 255, 0.045);
    font-size: clamp(44px, 8vw, 96px);
    font-weight: 950;
    line-height: 1;
    pointer-events: none;
}

.admin-hero h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(38px, 6vw, 68px);
    font-weight: 950;
    line-height: 0.95;
    text-transform: uppercase;
}

.admin-hero p {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.admin-hero-card {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    min-height: 180px;
    padding: 24px;
    border: 1px solid rgba(255, 43, 214, 0.28);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.admin-hero-card span,
.admin-course-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-hero-card strong {
    color: #ffffff;
    font-size: clamp(42px, 7vw, 72px);
    font-weight: 950;
    line-height: 0.95;
    text-shadow: 0 0 28px rgba(255, 43, 214, 0.42);
}

.admin-hero-card p {
    margin-top: 8px;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 22px 0;
}

.admin-stat-card {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.08);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.admin-stat-card:hover,
.admin-course-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 229, 255, 0.4);
    box-shadow: var(--shadow), var(--glow-cyan);
}

.admin-stat-card span {
    display: block;
    color: var(--accent-3);
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 950;
    line-height: 1;
    text-shadow: 0 0 18px rgba(156, 255, 63, 0.34);
}

.admin-stat-card p {
    margin: 8px 0 0;
    color: var(--muted);
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.4fr);
    gap: 20px;
    align-items: start;
}

.admin-content-grid,
.admin-reset-panel {
    margin-top: 22px;
}

.admin-form-panel,
.admin-courses-panel,
.admin-users-panel {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.024)),
        var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.admin-form-panel {
    display: grid;
    gap: 10px;
}

.admin-form-panel label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-form-panel textarea {
    min-height: 120px;
    resize: vertical;
}

.form-error {
    margin: 0;
    color: #ff7b7b;
    font-weight: 850;
}

.admin-course-list {
    display: grid;
    gap: 14px;
}

.lesson-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.lesson-library-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 360px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.055);
    box-shadow: var(--shadow);
}

.lesson-library-card img {
    width: 100%;
    height: 155px;
    object-fit: cover;
    border-radius: 12px;
}

.lesson-library-card p {
    color: var(--muted);
}

.lesson-library-card .wiki-actions {
    margin-top: auto;
}

.admin-course-card {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.055);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.admin-course-card img {
    width: 100%;
    height: 132px;
    border-radius: 14px;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.admin-course-card h3 {
    margin: 8px 0;
    color: #ffffff;
    font-size: 22px;
    text-transform: uppercase;
}

.admin-course-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.admin-card-actions {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-users-panel {
    margin-top: 22px;
}

.admin-users-head {
    align-items: center;
    gap: 16px;
}

.admin-users-head input {
    width: min(360px, 100%);
    margin: 0;
}

.admin-users-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(0, 229, 255, 0.16);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.08), transparent 34%),
        rgba(255, 255, 255, 0.035);
}

.admin-users-table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

.admin-users-table th,
.admin-users-table td {
    padding: 15px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.admin-users-table th {
    color: var(--accent);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    background: rgba(0, 229, 255, 0.07);
}

.admin-users-table td {
    color: var(--muted);
}

.admin-users-table tbody tr {
    transition: background 0.22s ease, box-shadow 0.22s ease;
}

.admin-users-table tbody tr:hover {
    background: rgba(255, 43, 214, 0.08);
    box-shadow: inset 3px 0 0 rgba(0, 229, 255, 0.72);
}

.admin-users-table strong {
    color: #ffffff;
}

.admin-role-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 6px 10px;
    border: 1px solid rgba(156, 255, 63, 0.28);
    border-radius: 999px;
    color: var(--accent-3);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    background: rgba(156, 255, 63, 0.08);
}

.admin-user-delete {
    min-height: 36px;
    padding: 9px 12px;
}

.admin-user-delete:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    filter: grayscale(0.4);
}

.admin-empty-users {
    padding: 24px !important;
    text-align: center !important;
    color: var(--muted);
}

.footer {
    margin-top: 72px;
    padding: 0 0 26px;
    color: var(--muted);
}

.footer-grid {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(150px, 1fr));
    gap: 28px;
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid rgba(0, 229, 255, 0.24);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.13), transparent 34%),
        linear-gradient(315deg, rgba(255, 43, 214, 0.13), transparent 36%),
        rgba(5, 8, 18, 0.88);
    box-shadow: var(--shadow), 0 0 34px rgba(0, 229, 255, 0.13);
    backdrop-filter: blur(14px);
}

.footer-grid::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.045) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: 0.28;
}

.footer-brand,
.footer-column {
    position: relative;
    z-index: 1;
}

.footer-kicker {
    color: var(--accent-3);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}

.footer-grid h3,
.footer-grid h4 {
    margin-top: 0;
    color: #ffffff;
    text-transform: uppercase;
}

.footer-grid h3 {
    margin-bottom: 10px;
    font-size: 30px;
    font-weight: 950;
    text-shadow: 2px 0 rgba(255, 43, 214, 0.42), -2px 0 rgba(0, 229, 255, 0.42);
}

.footer-grid h4 {
    margin-bottom: 12px;
    font-size: 14px;
    letter-spacing: 0;
}

.footer-grid p {
    margin: 8px 0;
}

.footer-grid a {
    color: var(--muted);
}

.footer-grid a:hover {
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 4px 0;
    color: var(--faint);
    font-size: 13px;
}

.feature-card,
.stat-card,
.step-card,
.card,
.review-card,
.faq-item,
.news-card,
.cta-block,
.box,
.course-card {
    animation: fadeUp 0.72s ease both;
}

.feature-card:nth-child(1),
.stat-card:nth-child(1),
.step-card:nth-child(1),
.card:nth-child(1),
.review-card:nth-child(1),
.faq-item:nth-child(1),
.news-card:nth-child(1) { animation-delay: 0.04s; }

.feature-card:nth-child(2),
.stat-card:nth-child(2),
.step-card:nth-child(2),
.card:nth-child(2),
.review-card:nth-child(2),
.faq-item:nth-child(2),
.news-card:nth-child(2) { animation-delay: 0.1s; }

.feature-card:nth-child(3),
.stat-card:nth-child(3),
.step-card:nth-child(3),
.card:nth-child(3),
.review-card:nth-child(3),
.faq-item:nth-child(3),
.news-card:nth-child(3) { animation-delay: 0.16s; }

.feature-card:nth-child(4),
.stat-card:nth-child(4),
.step-card:nth-child(4),
.card:nth-child(4),
.review-card:nth-child(4),
.faq-item:nth-child(4),
.news-card:nth-child(4) { animation-delay: 0.22s; }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes navDrop {
    from {
        opacity: 0;
        transform: translateY(-18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        text-shadow: -3px 0 rgba(0, 229, 255, 0.7), 3px 0 rgba(255, 43, 214, 0.72), 0 0 16px rgba(0, 229, 255, 0.58);
    }
    50% {
        transform: scale(1.045);
        text-shadow: -5px 0 rgba(0, 229, 255, 0.92), 5px 0 rgba(255, 43, 214, 0.9), 0 0 32px rgba(255, 43, 214, 0.55);
    }
}

@keyframes floatParticle {
    from {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }
    18% {
        opacity: 0.95;
    }
    to {
        transform: translateY(-112vh) scale(1.9);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 1100px) {
    header {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-buttons {
        justify-content: flex-start;
        width: 100%;
    }

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

    .steps-grid,
    .reviews-grid,
    .news-grid,
    .courses {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .about-project-panel,
    .test-hero,
    .game-select-grid,
    .rating-hero,
    .top-players-grid,
    .lessons-hero,
    .lesson-controls,
    .lesson-cards-grid,
    .admin-hero,
    .admin-stats-grid,
    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .game-select-card {
        min-height: 150px;
    }
}

@media (max-width: 720px) {
    header {
        gap: 14px;
        padding: 14px;
    }

    .logo {
        max-width: 100%;
        white-space: normal;
    }

    .nav-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .nav-buttons button,
    button {
        width: 100%;
        min-height: 40px;
        padding: 10px 12px;
        font-size: 12px;
    }

    .hero-wrap,
    .section,
    .search-wrap,
    .footer {
        width: min(100% - 28px, 1200px);
    }

    .hero-wrap {
        margin-top: 20px;
    }

    .hero {
        min-height: auto;
        border-radius: 18px;
        background-position: 62% center;
    }

    .hero::after {
        display: none;
    }

    .hero-content {
        padding: 38px 20px;
    }

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

    .features,
    .stats-grid,
    .steps-grid,
    .reviews-grid,
    .news-grid,
    .faq-list,
    .courses,
    .my-courses,
    .courses-grid {
        grid-template-columns: 1fr;
    }

    .box {
        width: min(100% - 28px, 620px);
        margin-top: 24px;
        padding: 20px;
    }

    .profile-header {
        align-items: center;
        flex-direction: column;
        text-align: center;
    }

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

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

    .profile-dashboard-hero,
    .profile-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .profile-dashboard-hero {
        padding: 20px;
    }

    .profile-level-card {
        min-height: 190px;
    }

    .profile-panel {
        min-height: auto;
        padding: 18px;
    }

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

    .test-page {
        width: min(100% - 28px, 620px);
        margin-top: 24px;
    }

    .test-hero,
    .test-panel {
        border-radius: 18px;
    }

    .test-hero {
        padding: 22px;
    }

    .test-hero-score {
        min-height: 130px;
    }

    .test-panel-head,
    .test-result-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    #scorePreview {
        width: 100%;
    }

    .answer-grid,
    .test-result-stats {
        grid-template-columns: 1fr;
    }

    .answer-btn {
        min-height: 58px;
        text-align: center;
        justify-content: center;
    }

    .rating-page {
        width: min(100% - 28px, 620px);
        margin-top: 24px;
    }

    .rating-hero,
    .leaderboard-table-panel {
        border-radius: 18px;
    }

    .rating-hero {
        padding: 22px;
    }

    .rating-hero-score {
        min-height: 130px;
    }

    .top-player-card {
        min-height: auto;
        padding: 20px;
    }

    .leaderboard-table-panel {
        padding: 16px;
    }

    .leaderboard-table {
        gap: 12px;
    }

    .leaderboard-head {
        display: none;
    }

    .leaderboard-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 14px;
    }

    .leaderboard-row span {
        display: grid;
        gap: 4px;
        padding: 10px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.045);
    }

    .leaderboard-row span::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 10px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .leaderboard-rank,
    .leaderboard-login,
    .leaderboard-total {
        grid-column: span 1;
    }

    .lessons-page {
        width: min(100% - 28px, 620px);
        margin-top: 24px;
    }

    .lessons-hero,
    .lesson-detail-panel {
        border-radius: 18px;
    }

    .lessons-hero {
        padding: 22px;
    }

    .lessons-hero-stat {
        min-height: 130px;
    }

    .lesson-filter,
    .lesson-filter button {
        width: 100%;
    }

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

    .lesson-game-card {
        min-height: auto;
        padding: 20px;
    }

    .wiki-nav {
        position: static;
        grid-template-columns: 1fr;
    }

    .wiki-game-card,
    .wiki-content-grid,
    .wiki-guide-grid {
        grid-template-columns: 1fr;
    }

    .wiki-game-media,
    .wiki-game-media img {
        min-height: 210px;
    }

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

    .wiki-game-section {
        scroll-margin-top: 94px;
        padding: 16px;
        border-radius: 18px;
    }

    .admin-page {
        width: min(100% - 28px, 620px);
        margin-top: 24px;
    }

    .admin-hero,
    .admin-form-panel,
    .admin-courses-panel,
    .admin-users-panel {
        border-radius: 18px;
    }

    .admin-hero {
        padding: 22px;
    }

    .admin-hero-card {
        min-height: 130px;
    }

    .admin-form-panel,
    .admin-courses-panel,
    .admin-users-panel {
        padding: 18px;
    }

    .admin-users-head {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-users-table {
        min-width: 0;
    }

    .admin-users-table thead {
        display: none;
    }

    .admin-users-table,
    .admin-users-table tbody,
    .admin-users-table tr,
    .admin-users-table td {
        display: block;
        width: 100%;
    }

    .admin-users-table tr {
        padding: 12px;
        border-bottom: 1px solid rgba(0, 229, 255, 0.14);
    }

    .admin-users-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        text-align: right;
    }

    .admin-users-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 11px;
        font-weight: 950;
        text-align: left;
        text-transform: uppercase;
    }

    .admin-users-table td:last-child {
        border-bottom: 0;
    }

    .admin-user-delete {
        width: auto;
        min-width: 130px;
    }

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

    .admin-course-card img {
        height: 180px;
    }

    .admin-card-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .leaderboard-item {
        grid-template-columns: 42px 1fr;
    }

    .leaderboard-score {
        grid-column: 1 / -1;
        text-align: left;
    }

    #modalImage {
        height: 210px;
    }
}

.pwa-install-section {
    margin-top: 30px;
}

.pwa-install-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
    padding: 28px;
    overflow: hidden;
    border: 1px solid rgba(0, 229, 255, 0.28);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.16), rgba(255, 31, 113, 0.10)),
        rgba(8, 12, 28, 0.9);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34), 0 0 34px rgba(0, 229, 255, 0.12);
}

.pwa-install-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.12), transparent);
    transform: translateX(-100%);
    animation: pwaScan 5s linear infinite;
}

.pwa-install-card h2 {
    margin: 8px 0 10px;
    color: #ffffff;
    font-size: clamp(24px, 4vw, 36px);
}

.pwa-install-card p {
    max-width: 680px;
    margin: 0;
    color: rgba(238, 245, 255, 0.78);
    line-height: 1.65;
}

.pwa-install-btn {
    position: relative;
    z-index: 1;
    min-width: 260px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: linear-gradient(135deg, #00e5ff, #ff1f71);
    box-shadow: 0 14px 34px rgba(0, 229, 255, 0.2);
}

.pwa-install-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 18px 42px rgba(255, 31, 113, 0.28);
}

@keyframes pwaScan {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@media (display-mode: standalone) {
    body {
        min-height: 100vh;
    }

    header {
        padding-top: max(14px, env(safe-area-inset-top));
    }
}

.course-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 420px;
    border-color: rgba(0, 229, 255, 0.22);
}

.course-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.course-card h3,
.course-card p {
    position: relative;
    z-index: 1;
}

.course-card button {
    margin-top: auto;
}

.course-card::before {
    content: "";
    position: absolute;
    inset: -40% -25% auto auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.24), transparent 68%);
    pointer-events: none;
}

.course-game-tag {
    width: max-content;
    padding: 7px 10px;
    border: 1px solid rgba(0, 229, 255, 0.24);
    border-radius: 999px;
    background: rgba(0, 229, 255, 0.1);
    color: #8ff4ff;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.cs2-course-card {
    box-shadow: 0 18px 48px rgba(255, 159, 28, 0.1);
}

.dota2-course-card {
    box-shadow: 0 18px 48px rgba(255, 51, 71, 0.1);
}

.valorant-course-card {
    box-shadow: 0 18px 48px rgba(255, 70, 85, 0.1);
}

.lol-course-card {
    box-shadow: 0 18px 48px rgba(200, 155, 60, 0.12);
}

@media (max-width: 767px) {
    html {
        scroll-padding-top: 86px;
    }

    body {
        -webkit-tap-highlight-color: transparent;
    }

    input,
    textarea,
    button {
        font-size: 16px;
    }

    header {
        position: sticky;
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .burger-menu {
        display: flex;
        flex: 0 0 auto;
        margin-left: auto;
    }

    header .nav-buttons {
        position: absolute;
        left: 14px;
        right: 14px;
        top: calc(100% + 10px);
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        width: auto;
        max-height: 0;
        padding: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        border: 1px solid rgba(0, 229, 255, 0);
        border-radius: 16px;
        background: rgba(5, 8, 18, 0.96);
        box-shadow: 0 22px 55px rgba(0, 0, 0, 0.46);
        backdrop-filter: blur(16px);
        transition: max-height 0.28s ease, opacity 0.24s ease, padding 0.24s ease, border-color 0.24s ease;
    }

    header.menu-open .nav-buttons {
        max-height: 520px;
        padding: 12px;
        opacity: 1;
        pointer-events: auto;
        border-color: rgba(0, 229, 255, 0.24);
    }

    header .profile-nav-button {
        flex: 0 0 44px;
        width: 44px;
        min-width: 44px;
        max-width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
    }

    header .profile-nav-button img,
    header .profile-nav-button span {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        border-radius: 50%;
    }

    header .account-menu {
        position: static;
        width: 100%;
        max-height: 0;
        padding: 0;
        overflow: hidden;
        opacity: 0;
        border-color: transparent;
        transform: none;
        transition: max-height 0.24s ease, opacity 0.22s ease, padding 0.22s ease, border-color 0.22s ease;
    }

    header .account-menu.open {
        max-height: 190px;
        padding: 10px;
        opacity: 1;
        border-color: rgba(0, 229, 255, 0.22);
    }

    .hero-content {
        padding: 44px 20px 38px;
    }

    .hero-actions button {
        min-width: 0;
    }

    .pwa-install-card {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .pwa-install-btn {
        width: 100%;
        min-width: 0;
    }

    .profile-page,
    .lessons-page,
    .test-page,
    .rating-page,
    .admin-page {
        width: min(100% - 24px, 620px);
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }

    .card {
        min-height: 250px;
    }
}

@media (max-width: 420px) {
    .nav-buttons {
        grid-template-columns: 1fr;
    }

    .section {
        margin-top: 32px;
    }

    .feature-card,
    .stat-card,
    .step-card,
    .review-card,
    .faq-item,
    .news-card,
    .course-card {
        padding: 18px;
    }
}
