:root {
    --bg: #060817;
    --text: #f8fbff;
    --muted: rgba(236, 244, 255, .68);
    --glass: rgba(255, 255, 255, .10);
    --glass-strong: rgba(255, 255, 255, .16);
    --stroke: rgba(255, 255, 255, .22);
    --stroke-soft: rgba(255, 255, 255, .12);
    --accent: #8bd3ff;
    --accent-2: #b394ff;
    --accent-3: #6ef4c5;
    --danger: #ff7c9b;
    --shadow: 0 24px 80px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }

body {
    margin: 0;
    color: var(--text);
    font-family: "Philosopher", sans-serif;
    background: var(--bg);
    overflow-x: hidden;
}

/* Свой фон сайта с плавным приближением и отдалением. */
body::before {
    content: "";
    position: fixed;
    inset: -6vmax;
    pointer-events: none;
    background-image: url("background.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: -5;
    transform: scale(1);
    animation: backgroundBreath 22s ease-in-out infinite alternate;
    will-change: transform;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.12);
    z-index: -4;
}

@keyframes backgroundBreath {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

.hero h1,
.hero p,
.brand-text,
.metric span,
.metric p,
.info-item h3,
.info-item p,
.mod-name,
.mod-file,
.accordion summary,
.accordion p,
.main-menu a,
.dropdown-button,
.filter-btn,
.download-btn,
.open-btn {
    text-shadow:
        0 2px 10px rgba(0,0,0,.55),
        0 1px 3px rgba(0,0,0,.45);
}

.aurora {
    position: fixed;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    filter: blur(58px);
    opacity: .18;
    z-index: -2;
    animation: floatGlow 14s ease-in-out infinite alternate;
}

.aurora-a {
    left: -180px;
    top: 120px;
    background: rgba(100, 194, 255, .48);
}

.aurora-b {
    right: -200px;
    bottom: -120px;
    background: rgba(176, 110, 255, .42);
    animation-delay: -5s;
}

.noise {
    display: none;
}

@keyframes floatGlow {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(55px, -45px, 0) scale(1.08); }
}

.glass-panel {
    position: relative;

    border: 1px solid rgba(255,255,255,.16);

    background: rgba(255,255,255,.01);

    box-shadow:
        0 8px 32px rgba(0,0,0,.18),
        inset 0 1px 0 rgba(255,255,255,.18),
        inset 0 -1px 0 rgba(255,255,255,.04);

    backdrop-filter: blur(2px) saturate(110%);
    -webkit-backdrop-filter: blur(5px) saturate(120%);

    overflow: hidden;
}

.glass-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.08),
            rgba(255,255,255,.01)
        );

    opacity: 1;
}

.topbar {
    position: sticky;
    top: 18px;
    z-index: 50;
    width: min(1160px, calc(100% - 32px));
    margin: 18px auto 0;
    min-height: 72px;
    padding: 12px 14px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.speed-menu-link {
    position: relative;
    z-index: 1;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 900;
    letter-spacing: -.04em;
    flex-shrink: 0;
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #07101e;
    box-shadow: 0 12px 28px rgba(139, 211, 255, .28);
}

.brand-text { font-size: 20px; }

.main-menu {
    position: relative;
    z-index: 2;
}

.speed-menu {
    margin-left: auto;
    height: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.speed-menu-list {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.speed-menu-item {
    position: relative;
    width: 118px;
    height: 56px;
}

.speed-menu-link {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: rgba(255,255,255,.82);
    text-decoration: none;
    font-weight: 900;
    font-size: 14px;
    border-radius: 18px;
    transition: color .35s ease, background .35s ease, transform .35s ease;
}

.menu-icon {
    font-size: 18px;
    line-height: 1;
    opacity: .76;
    transform: translateY(3px);
    transition: transform .35s ease, opacity .35s ease, filter .35s ease;
}

.speed-menu-link span:last-child {
    opacity: .82;
    transform: translateY(2px);
    transition: transform .35s ease, opacity .35s ease;
}

.speed-menu-link:hover,
.speed-menu-link:focus-visible {
    color: #fff;
    background: rgba(255,255,255,.075);
    transform: translateY(-2px);
}

.speed-menu-link:hover .menu-icon,
.speed-menu-link:focus-visible .menu-icon {
    opacity: 1;
    transform: translateY(-2px) scale(1.08);
    filter: drop-shadow(0 0 10px rgba(139,211,255,.5));
}

.speed-menu-link:hover span:last-child,
.speed-menu-link:focus-visible span:last-child {
    opacity: 1;
    transform: translateY(0);
}

.speed-menu-item:last-child::before {
    content: "";
    position: absolute;
    left: -488px;
    bottom: -9px;
    width: 28px;
    height: 3px;
    border-radius: 99px;
    background: var(--accent);
    box-shadow:
        0 -7px 18px rgba(139,211,255,.85),
        32px 0 0 rgba(255,255,255,.16),
        64px 0 0 rgba(255,255,255,.14),
        96px 0 0 rgba(255,255,255,.12),
        128px 0 0 rgba(255,255,255,.10),
        -32px 0 0 rgba(255,255,255,.16),
        -64px 0 0 rgba(255,255,255,.14),
        -96px 0 0 rgba(255,255,255,.12),
        -128px 0 0 rgba(255,255,255,.10);
    transition: left .5s cubic-bezier(.22,1,.36,1), box-shadow .35s ease;
    pointer-events: none;
}

.speed-menu-item:nth-child(1):hover ~ .speed-menu-item:last-child::before,
.speed-menu-item:nth-child(1):focus-within ~ .speed-menu-item:last-child::before { left: -488px; }
.speed-menu-item:nth-child(2):hover ~ .speed-menu-item:last-child::before,
.speed-menu-item:nth-child(2):focus-within ~ .speed-menu-item:last-child::before { left: -366px; }
.speed-menu-item:nth-child(3):hover ~ .speed-menu-item:last-child::before,
.speed-menu-item:nth-child(3):focus-within ~ .speed-menu-item:last-child::before { left: -244px; }
.speed-menu-item:nth-child(4):hover ~ .speed-menu-item:last-child::before,
.speed-menu-item:nth-child(4):focus-within ~ .speed-menu-item:last-child::before { left: -122px; }
.speed-menu-item:last-child:hover::before,
.speed-menu-item:last-child:focus-within::before { left: 0; }

.menu-toggle {
    display: none;
    position: relative;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 16px;
    background: rgba(255,255,255,.07);
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 99px;
    background: #fff;
    transition: transform .25s ease, opacity .25s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.page-shell {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0 30px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: stretch;
    min-height: 520px;
}

.hero-content {
    border-radius: 42px;
    padding: clamp(34px, 6vw, 72px);
    overflow: hidden;
}

.liquid-card::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -80px;
    top: -100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139,211,255,.38), transparent 64%);
    filter: blur(12px);
    animation: bubble 9s ease-in-out infinite alternate;
}

@keyframes bubble {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-30px, 48px) scale(1.12); }
}

.status-pill, .hero h1, .hero p, .hero-actions { position: relative; z-index: 1; }
.status-pill {
    width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    margin-bottom: 26px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.78);
    font-size: 14px;
    font-weight: 700;
}

.status-pill span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent-3);
    box-shadow: 0 0 16px var(--accent-3);
}

.hero h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(42px, 7vw, 86px);
    line-height: .92;
    letter-spacing: -.08em;
}

.hero p {
    max-width: 680px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 36px;
}

.primary-btn, .ghost-btn, .download-btn, .open-btn, .refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 16px;
    min-height: 48px;
    padding: 0 20px;
    color: #06101e;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    text-decoration: none;
    font-weight: 900;
    cursor: pointer;
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}

.primary-btn:hover, .download-btn:hover, .refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(139,211,255,.24);
}

.ghost-btn, .open-btn {
    color: #fff;
    background: rgba(255,255,255,.11);
    border: 1px solid var(--stroke-soft);
}

.ghost-btn:hover, .open-btn:hover { background: rgba(255,255,255,.17); }

.hero-side {
    border-radius: 34px;
    padding: 24px;
    display: grid;
    align-content: end;
    gap: 14px;
}

.metric {
    position: relative;
    z-index: 1;
    min-height: 160px;
    border-radius: 28px;
    padding: 24px;
    background: rgba(255,255,255,.10);
    border: 1px solid var(--stroke-soft);
}

.metric.small { min-height: 120px; }
.metric span {
    display: block;
    font-size: 56px;
    font-weight: 900;
    letter-spacing: -.07em;
}
.metric p { margin: 8px 0 0; color: var(--muted); font-weight: 700; }

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

.info-item {
    border-radius: 28px;
    padding: 24px;
    overflow: hidden;
}
.info-item > * { position: relative; z-index: 1; }
.icon { font-size: 26px; }
.info-item h3 { margin: 15px 0 8px; font-size: 20px; }
.info-item p { margin: 0; color: var(--muted); line-height: 1.6; }

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 18px;
}
.section-head.compact { margin-top: 68px; }
.eyebrow {
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}
h2 { margin: 8px 0 0; font-size: clamp(30px, 5vw, 48px); letter-spacing: -.06em; }

.toolbar {
    border-radius: 28px;
    padding: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-bottom: 18px;
}
.toolbar > * { position: relative; z-index: 1; }
.search-box {
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 18px;
    padding: 0 18px;
    background: rgba(255,255,255,.09);
    border: 1px solid var(--stroke-soft);
}
.search-box span { color: var(--muted); font-size: 24px; }
.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    font: inherit;
    font-weight: 700;
}
.search-box input::placeholder { color: rgba(255,255,255,.46); }

.filters { display: flex; align-items: center; gap: 8px; }
.filter-btn {
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--stroke-soft);
    border-radius: 16px;
    color: rgba(255,255,255,.78);
    background: rgba(255,255,255,.08);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}
.filter-btn.active {
    color: #06101e;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

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

.mod-card {
    border-radius: 30px;
    padding: 22px;
    min-height: 245px;
    overflow: hidden;
    transition: transform .22s ease, border-color .22s ease, background .22s ease;
}
.mod-card:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 211, 255, .55);
    background: linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,.08));
}
.mod-card > * { position: relative; z-index: 1; }
.mod-card::after {
    content: "";
    position: absolute;
    right: -65px;
    bottom: -70px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139,211,255,.25), transparent 64%);
}

.mod-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.file-badge {
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    color: #06101e;
    background: var(--accent);
}
.file-badge.dll { background: var(--accent-2); }
.mod-date { color: rgba(255,255,255,.62); font-size: 12px; font-weight: 700; text-align: right; }
.mod-name {
    margin: 30px 0 10px;
    font-size: 22px;
    line-height: 1.18;
    letter-spacing: -.04em;
    word-break: break-word;
}
.mod-file {
    min-height: 44px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    word-break: break-word;
}
.mod-actions {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}
.download-btn, .open-btn { min-height: 44px; padding: 0 16px; border-radius: 14px; }
.single-btn { min-width: 160px; }


.loader-state {
    grid-column: 1 / -1;
    min-height: 320px;
    border-radius: 30px;
    padding: 38px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    text-align: center;
}

.loader-state > * {
    position: relative;
    z-index: 1;
}

.loader-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    font-size: 1.15em;
    font-weight: 800;
    color: white;
    border-radius: 50%;
    background-color: transparent;
    user-select: none;
    text-shadow:
        0 2px 10px rgba(0,0,0,.55),
        0 1px 3px rgba(0,0,0,.45);
}

.loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background-color: transparent;
    animation: loader-rotate 2s linear infinite;
    z-index: 0;
}

@keyframes loader-rotate {
    0% {
        transform: rotate(90deg);
        box-shadow:
            0 10px 20px 0 #fff inset,
            0 20px 30px 0 #8bd3ff inset,
            0 60px 60px 0 #471eec inset;
    }
    50% {
        transform: rotate(270deg);
        box-shadow:
            0 10px 20px 0 #fff inset,
            0 20px 10px 0 #6ef4c5 inset,
            0 40px 60px 0 #311e80 inset;
    }
    100% {
        transform: rotate(450deg);
        box-shadow:
            0 10px 20px 0 #fff inset,
            0 20px 30px 0 #8bd3ff inset,
            0 60px 60px 0 #471eec inset;
    }
}

.loader-letter {
    display: inline-block;
    opacity: 0.4;
    transform: translateY(0);
    animation: loader-letter-anim 2s infinite;
    z-index: 1;
    border-radius: 50ch;
    border: none;
}

.loader-letter:nth-child(1) { animation-delay: 0s; }
.loader-letter:nth-child(2) { animation-delay: 0.1s; }
.loader-letter:nth-child(3) { animation-delay: 0.2s; }
.loader-letter:nth-child(4) { animation-delay: 0.3s; }
.loader-letter:nth-child(5) { animation-delay: 0.4s; }
.loader-letter:nth-child(6) { animation-delay: 0.5s; }
.loader-letter:nth-child(7) { animation-delay: 0.6s; }
.loader-letter:nth-child(8) { animation-delay: 0.7s; }

@keyframes loader-letter-anim {
    0%, 100% {
        opacity: 0.4;
        transform: translateY(0);
    }
    20% {
        opacity: 1;
        transform: scale(1.15);
    }
    40% {
        opacity: 0.7;
        transform: translateY(0);
    }
}

.loader-caption {
    margin: 0;
    color: var(--muted);
    font-weight: 900;
    text-shadow:
        0 2px 10px rgba(0,0,0,.55),
        0 1px 3px rgba(0,0,0,.45);
}

.loading-card {
    grid-column: 1 / -1;
    border-radius: 28px;
    padding: 32px;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}
.loading-card.error { color: var(--danger); }

.accordion {
    border-radius: 32px;
    padding: 12px;
    overflow: hidden;
}
.accordion details {
    position: relative;
    z-index: 1;
    border-radius: 22px;
    padding: 0 18px;
    background: rgba(255,255,255,.07);
    border: 1px solid transparent;
    transition: .22s ease;
}
.accordion details + details { margin-top: 10px; }
.accordion details[open] { border-color: var(--stroke-soft); background: rgba(255,255,255,.11); }
.accordion summary {
    list-style: none;
    padding: 18px 0;
    cursor: pointer;
    font-weight: 900;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
    content: "+";
    float: right;
    color: var(--accent);
    font-size: 22px;
}
.accordion details[open] summary::after { content: "−"; }
.accordion p {
    margin: 0;
    padding: 0 0 18px;
    color: var(--muted);
    line-height: 1.7;
}

.footer {
    width: min(1160px, calc(100% - 32px));
    margin: 28px auto 36px;
    display: flex;
    justify-content: center;
    gap: 10px;
    color: rgba(255,255,255,.52);
    font-weight: 700;
}

@media (max-width: 980px) {
    .hero { grid-template-columns: 1fr; min-height: auto; }
    .hero-side { grid-template-columns: repeat(3, 1fr); align-content: stretch; }
    .metric, .metric.small { min-height: 120px; }
    .metric span { font-size: 42px; }
    .info-strip, .mods-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .toolbar { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .loader-wrapper { width: 150px; height: 150px; font-size: 1em; }
    .loader-state { min-height: 260px; }
    .topbar { top: 10px; width: calc(100% - 20px); border-radius: 24px; }
    .brand-text { font-size: 16px; }
    .menu-toggle { display: block; }
    .speed-menu {
        position: absolute;
        left: 12px;
        right: 12px;
        top: calc(100% + 10px);
        height: auto;
        display: block;
        padding: 10px;
        border-radius: 24px;
        border: 1px solid rgba(255,255,255,.16);
        background: rgba(8, 12, 26, .64);
        box-shadow: 0 18px 50px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.12);
        backdrop-filter: blur(10px) saturate(130%);
        -webkit-backdrop-filter: blur(10px) saturate(130%);
        opacity: 0;
        transform: translateY(-8px) scale(.98);
        pointer-events: none;
        transition: .25s ease;
        overflow: hidden;
    }
    .speed-menu.open {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }
    .speed-menu-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .speed-menu-item {
        width: 100%;
        height: 54px;
    }
    .speed-menu-link {
        flex-direction: row;
        justify-content: flex-start;
        padding: 0 16px;
        gap: 12px;
        background: rgba(255,255,255,.045);
    }
    .speed-menu-item:last-child::before {
        display: none;
    }
    .menu-icon {
        transform: none;
    }
    .page-shell { width: calc(100% - 20px); padding-top: 48px; }
    .hero-content { border-radius: 32px; }
    .hero-side, .info-strip, .mods-grid { grid-template-columns: 1fr; }
    .section-head { align-items: start; flex-direction: column; }
    .filters { flex-wrap: wrap; }
    .filter-btn { flex: 1; }
}


/* === Верхнее меню полностью заменено на стиль CodePen / OneDiv, но в glassmorphism-стиле сайта === */
.site-header {
    --link-width: 8.6rem;

    position: sticky;
    top: 18px;
    z-index: 80;

    width: min(1160px, calc(100% - 32px));
    min-height: 88px;
    margin: 18px auto 0;
    padding: 0 18px;

    display: flex;
    align-items: center;
    gap: 2rem;

    color: #fff;
    border-radius: 32px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.035);

    box-shadow:
        0 10px 34px rgba(0,0,0,.18),
        inset 0 1px 0 rgba(255,255,255,.22),
        inset 0 -1px 0 rgba(255,255,255,.06);

    backdrop-filter: blur(5px) saturate(118%);
    -webkit-backdrop-filter: blur(5px) saturate(118%);

    overflow: hidden;
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.02) 42%, transparent 72%);
    opacity: .9;
}

.header__logo,
.navbar {
    position: relative;
    z-index: 1;
}

.header__logo {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
    text-decoration: none;
    text-shadow: none;
}

.header__logo strong {
    font-family: "Cinzel Decorative", serif;

    font-size: clamp(1.05rem, 1.45vw, 1.34rem);
    font-weight: 700;

    letter-spacing: .04em;
    line-height: 1;

    color: rgba(255,255,255,.96);

    text-shadow:
        0 1px 2px rgba(0,0,0,.45);

    transform: none;

    display: block;
    max-width: 100%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar {
    height: 100%;
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    overflow: hidden;
}

.navbar__menu {
    position: relative;
    height: 100%;
    min-height: 88px;
    display: flex;
    align-items: stretch;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navbar__item {
    position: relative;
    width: var(--link-width);
    height: 100%;
}

.navbar__link {
    position: relative;
    z-index: 2;

    height: 100%;
    width: 100%;

    display: flex;
    flex-direction: column;

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

    gap: .55rem;

    padding-top: 14px;

    color: rgba(255,255,255,.88);
    text-decoration: none;
    text-transform: uppercase;

    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .08em;

    text-shadow:
        0 2px 10px rgba(0,0,0,.72),
        0 1px 3px rgba(0,0,0,.58);

    transition: 500ms ease all;
}

.navbar__icon {
    width: 30px;
    height: 30px;

    display: grid;
    place-items: center;

    transform: translateY(8px);

    transition: 500ms ease all;
}

.navbar__icon svg {
    width: 100%;
    height: 100%;

    fill: currentColor;

    color: rgba(255,255,255,.92);

    filter:
        drop-shadow(0 3px 8px rgba(0,0,0,.55))
        drop-shadow(0 0 10px rgba(139,211,255,.22));
}

.navbar__link span:last-child {
    opacity: 0;
    transform: translateY(12px);
    transition: 500ms ease all;
}

.navbar:not(:hover) .navbar__item:first-child .navbar__link span:last-child,
.navbar__link:hover span:last-child,
.navbar__link:focus-visible span:last-child {
    opacity: 1;
    transform: translateY(0);
}

.navbar__link:hover,
.navbar__link:focus-visible {
    color: #fff;
}

.navbar__link:hover .navbar__icon,
.navbar__link:focus-visible .navbar__icon {
    transform: translateY(2px) scale(1.12);
}

.navbar__indicator {
    position: absolute;
    left: 0;
    bottom: 0;
    width: var(--link-width);
    height: 100%;
    pointer-events: none;
    transition: left 500ms ease;
}

.navbar__indicator::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 2px;
    height: .55rem;
    border-radius: 999px;
    background: var(--accent);
    box-shadow:
        0 -0.45rem 0 var(--accent),
        0 0 1.7rem .35rem var(--accent),
        2rem 0 0 rgba(255,255,255,.22),
        -2rem 0 0 rgba(255,255,255,.22),
        4rem 0 0 rgba(255,255,255,.18),
        -4rem 0 0 rgba(255,255,255,.18),
        6rem 0 0 rgba(255,255,255,.14),
        -6rem 0 0 rgba(255,255,255,.14),
        8rem 0 0 rgba(255,255,255,.10),
        -8rem 0 0 rgba(255,255,255,.10),
        10rem 0 0 rgba(255,255,255,.08),
        -10rem 0 0 rgba(255,255,255,.08),
        12rem 0 0 rgba(255,255,255,.06),
        -12rem 0 0 rgba(255,255,255,.06);
}

.navbar__item:nth-child(1):hover ~ .navbar__indicator { left: calc(var(--link-width) * 0); }
.navbar__item:nth-child(2):hover ~ .navbar__indicator { left: calc(var(--link-width) * 1); }
.navbar__item:nth-child(3):hover ~ .navbar__indicator { left: calc(var(--link-width) * 2); }
.navbar__item:nth-child(4):hover ~ .navbar__indicator { left: calc(var(--link-width) * 3); }
.navbar__item:nth-child(5):hover ~ .navbar__indicator { left: calc(var(--link-width) * 4); }
.navbar__item:nth-child(6):hover ~ .navbar__indicator { left: calc(var(--link-width) * 5); }

/* Старое верхнее меню отключено полностью */
.topbar,
.menu-toggle,
.main-menu,
.speed-menu,
.dropdown,
.dropdown-list,
.dropdown-button {
    display: none !important;
}

@media (max-width: 980px) {
    .site-header {
        --link-width: 5.9rem;
        width: calc(100% - 20px);
        min-height: 82px;
        margin-top: 10px;
        top: 10px;
        padding: 0 12px;
        gap: 1rem;
        border-radius: 26px;
    }

    .header__logo strong {
    font-family: "Cinzel Decorative", serif;

    font-size: clamp(1.05rem, 1.45vw, 1.34rem);
    font-weight: 700;

    letter-spacing: .04em;
    line-height: 1;

    color: rgba(255,255,255,.96);

    text-shadow:
        0 1px 2px rgba(0,0,0,.45);

    transform: none;

    display: block;
    max-width: 100%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .navbar {
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .navbar::-webkit-scrollbar { display: none; }

    .navbar__menu {
        min-height: 82px;
    }

    .navbar__link {
        font-size: .62rem;
        letter-spacing: .04em;
    }
}

@media (max-width: 520px) {
    .site-header {
        --link-width: 4.8rem;
        min-height: 76px;
        padding: 0 10px;
    }

    .navbar__menu {
        min-height: 76px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .navbar__icon {
        font-size: 1.15rem;
    }
}



#info,
#mods,
#faq,
#updates {
    scroll-margin-top: 130px;
}



/* === Forgotten Legends logo === */
.logo-mark {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    display: grid;
    place-items: center;

    color: #07101e;

    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,.78), transparent 28%),
        linear-gradient(
            135deg,
            rgba(139,211,255,.96),
            rgba(179,148,255,.95) 58%,
            rgba(110,244,197,.82)
        );

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.62),
        inset 0 -1px 0 rgba(0,0,0,.16);

    overflow: hidden;
}

.logo-mark::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 1px solid rgba(255,255,255,.36);
    background:
        linear-gradient(135deg, rgba(255,255,255,.30), transparent 42%),
        radial-gradient(circle at 75% 85%, rgba(255,255,255,.18), transparent 38%);
    pointer-events: none;
}

.logo-mark::after {
    content: "";
    position: absolute;
    width: 86px;
    height: 22px;
    top: -24px;
    left: -34px;
    background: rgba(255,255,255,.42);
    transform: rotate(-35deg);
    animation: logoShine 5.5s ease-in-out infinite;
    pointer-events: none;
}

.logo-svg {
    position: relative;
    z-index: 1;

    width: 37px;
    height: 37px;

    filter: none;
}

.logo-castle {
    fill: rgba(6,16,30,.88);
}

.logo-gate {
    fill: rgba(139,211,255,.85);
}

.logo-spark {
    fill: rgba(255,255,255,.92);
}

.logo-line {
    fill: none;
    stroke: rgba(255,255,255,.42);
    stroke-width: 2;
    stroke-linecap: round;
}

@keyframes logoShine {
    0%, 58% {
        transform: translateX(0) rotate(-35deg);
        opacity: 0;
    }
    68% {
        opacity: .75;
    }
    86%, 100% {
        transform: translateX(135px) rotate(-35deg);
        opacity: 0;
    }
}








/* === Header spacing fix === */
.site-header {
    justify-content: space-between;
    padding-left: 22px;
    padding-right: 22px;
}

.header__logo {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
    text-decoration: none;
    text-shadow: none;
}

.navbar {
    min-width: 0;
}

.navbar__menu {
    justify-content: flex-end;
}

@media (max-width: 1180px) {
    .header__logo strong {
    font-family: "Cinzel Decorative", serif;

    font-size: clamp(1.05rem, 1.45vw, 1.34rem);
    font-weight: 700;

    letter-spacing: .04em;
    line-height: 1;

    color: rgba(255,255,255,.96);

    text-shadow:
        0 1px 2px rgba(0,0,0,.45);

    transform: none;

    display: block;
    max-width: 100%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .site-header {
        gap: 1rem;
    }
}

@media (max-width: 980px) {
    .header__logo strong {
    font-family: "Cinzel Decorative", serif;

    font-size: clamp(1.05rem, 1.45vw, 1.34rem);
    font-weight: 700;

    letter-spacing: .04em;
    line-height: 1;

    color: rgba(255,255,255,.96);

    text-shadow:
        0 1px 2px rgba(0,0,0,.45);

    transform: none;

    display: block;
    max-width: 100%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
}


/* === FINAL header overlap fix === */
.site-header {
    --link-width: 5.85rem;

    display: grid;
    grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
    align-items: center;

    gap: 18px;
    padding-left: 22px;
    padding-right: 22px;
}

.header__logo {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
    text-decoration: none;
    text-shadow: none;
}

.header__logo strong {
    font-family: "Cinzel Decorative", serif;

    font-size: clamp(1.05rem, 1.45vw, 1.34rem);
    font-weight: 700;

    letter-spacing: .04em;
    line-height: 1;

    color: rgba(255,255,255,.96);

    text-shadow:
        0 1px 2px rgba(0,0,0,.45);

    transform: none;

    display: block;
    max-width: 100%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar {
    width: 100%;
    min-width: 0;
    justify-content: flex-end;
    overflow: hidden;
}

.navbar__menu {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
}

.navbar__item {
    width: var(--link-width);
}

.navbar__icon {
    width: 26px;
    height: 26px;
}

.navbar__link {
    font-size: .62rem;
    letter-spacing: .045em;
}

@media (max-width: 1100px) {
    .site-header {
        grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
        --link-width: 5.15rem;
    }

    .header__logo strong {
    font-family: "Cinzel Decorative", serif;

    font-size: clamp(1.05rem, 1.45vw, 1.34rem);
    font-weight: 700;

    letter-spacing: .04em;
    line-height: 1;

    color: rgba(255,255,255,.96);

    text-shadow:
        0 1px 2px rgba(0,0,0,.45);

    transform: none;

    display: block;
    max-width: 100%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .navbar__icon {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 900px) {
    .site-header {
        grid-template-columns: auto minmax(0, 1fr);
        --link-width: 4.8rem;
    }

    .header__logo strong {
    font-family: "Cinzel Decorative", serif;

    font-size: clamp(1.05rem, 1.45vw, 1.34rem);
    font-weight: 700;

    letter-spacing: .04em;
    line-height: 1;

    color: rgba(255,255,255,.96);

    text-shadow:
        0 1px 2px rgba(0,0,0,.45);

    transform: none;

    display: block;
    max-width: 100%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
}

@media (max-width: 560px) {
    .site-header {
        --link-width: 4.45rem;
        padding-left: 10px;
        padding-right: 10px;
        gap: 8px;
    }
}


/* === Clean logo final fix === */
.header__logo {
    text-shadow: none !important;
}

.header__logo strong {
    text-shadow: 0 1px 2px rgba(0,0,0,.45) !important;
    transform: none !important;
}

.logo-mark {
    transform: none !important;
    transition: none !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.62),
        inset 0 -1px 0 rgba(0,0,0,.16) !important;
}

.logo-svg {
    transform: none !important;
    transition: none !important;
    filter: none !important;
}

.header__logo:hover .logo-mark,



/* === Absolute logo size lock === */
.header__logo .logo-mark {
    flex: 0 0 58px !important;
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;

    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;

    transform: none !important;
    scale: 1 !important;
    transition: none !important;
    animation: none !important;

    box-sizing: border-box !important;
}

.header__logo .logo-svg {
    width: 37px !important;
    min-width: 37px !important;
    max-width: 37px !important;

    height: 37px !important;
    min-height: 37px !important;
    max-height: 37px !important;

    transform: none !important;
    scale: 1 !important;
    transition: none !important;
    animation: none !important;

    filter: none !important;
}

.header__logo:hover .logo-mark,
.header__logo:focus .logo-mark,
.header__logo:focus-visible .logo-mark,
.header__logo:hover .logo-svg,
.header__logo:focus .logo-svg,
.header__logo:focus-visible .logo-svg {
    width: inherit;
    height: inherit;
    transform: none !important;
    scale: 1 !important;
    transition: none !important;
    animation: none !important;
}

.header__logo:hover .logo-mark {
    width: 58px !important;
    height: 58px !important;
}

.header__logo:hover .logo-svg {
    width: 37px !important;
    height: 37px !important;
}
