/* ============================================================
   CONTRA CITY — Landing
   Только HTML + CSS. Без JavaScript.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Oswald:wght@400;500;600;700&family=Russo+One&display=swap');

/* ---------- Variables ---------- */

:root {
    --black: #050505;
    --black-soft: #0a0a0a;
    --surface: #101010;
    --surface-light: #171717;

    --yellow: #ffc400;
    --yellow-dark: #d99f00;

    --white: #ffffff;
    --text: #d0d0d0;
    --muted: #777777;

    --green: #72d500;

    --header-h: 80px;
    --container: 1360px;

    --font-display: 'Russo One', 'Oswald', Arial, sans-serif;
    --font-head: 'Oswald', Arial, sans-serif;
    --font-body: 'Inter', Arial, 'Segoe UI', sans-serif;
}

/* ---------- Reset / Base ---------- */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 10px);
}

body {
    background: var(--black);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

/* лёгкая зернистая текстура по всему сайту */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    opacity: 0.05;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.10) 0 1px, transparent 1px 4px);
    mix-blend-mode: overlay;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
}

:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 3px;
}

/* ============================================================
   KEYFRAMES
   ============================================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

@keyframes charIn {
    from {
        opacity: 0;
        transform: translateX(-4%) translateY(1.5%);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

@keyframes dotPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(114, 213, 0, 0.55),
                    0 0 6px 1px rgba(114, 213, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(114, 213, 0, 0),
                    0 0 10px 2px rgba(114, 213, 0, 0.8);
    }
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(5, 5, 5, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #1a1a1a;
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Логотип */

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.85;
}

.logo-mark {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 0.92;
    font-family: var(--font-display);
    font-size: 24px;
    letter-spacing: 2px;
    color: var(--yellow);
    text-transform: uppercase;
}

.logo-line {
    white-space: nowrap;
}

.logo-love {
    margin-left: 2px;
}

.logo-line--soft {
    color: var(--yellow-dark);
}

/* Навигация */

.main-nav {
    display: flex;
    align-items: center;
    gap: 34px;
    margin: 0 auto;
}

.nav-link {
    position: relative;
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    color: #cfcfcf;
    padding: 10px 2px;
    transition: color 0.25s ease;
    white-space: nowrap;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--yellow);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--yellow);
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.nav-link.active {
    color: var(--yellow);
}

.nav-link.active::after {
    transform: scaleX(1);
}

/* Кнопка ВОЙТИ */

.btn-login {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 26px;
    border: 1px solid var(--yellow);
    background: transparent;
    color: var(--yellow);
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.btn-login:hover {
    background: var(--yellow);
    color: var(--black);
    box-shadow: 0 0 22px rgba(255, 196, 0, 0.45);
}

/* ---------- user chip (logged-in) ---------- */

.user-chip {
    position: relative;
    display: none;
    flex-shrink: 0;
}

.user-chip.on {
    display: block;
}

.user-chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 14px;
    background: transparent;
    border: 1px solid var(--yellow);
    border-radius: 2px;
    color: var(--yellow);
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.user-chip-btn:hover {
    background: rgba(255, 196, 0, 0.08);
    box-shadow: 0 0 18px rgba(255, 196, 0, 0.2);
}

.user-chip.open .user-chip-btn {
    background: var(--yellow);
    color: var(--black);
}

.user-chip-face {
    width: 26px;
    height: 26px;
    object-fit: contain;
    border-radius: 7px;
    background: #0a0a0a;
    border: 1px solid rgba(255, 196, 0, 0.4);
    padding: 1px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    filter: saturate(0.85);
}

.user-chip-btn:hover .user-chip-face,
.user-chip.open .user-chip-btn .user-chip-face {
    transform: scale(1.08);
    border-color: var(--yellow);
    box-shadow: 0 0 12px rgba(255, 196, 0, 0.35);
    filter: saturate(1);
}

.user-chip-face.spin {
    animation: faceSpin 0.45s ease;
}

@keyframes faceSpin {
    0%   { transform: rotate(0deg) scale(1); }
    50%  { transform: rotate(180deg) scale(1.25); }
    100% { transform: rotate(360deg) scale(1); }
}

.user-chip-nick {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-chip-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 2px;
    transition: transform 0.25s ease;
}

.user-chip.open .user-chip-caret {
    transform: rotate(180deg);
}

.user-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 210px;
    background: var(--surface-light);
    border: 1px solid #2c2c2c;
    border-top: 2px solid var(--yellow);
    border-radius: 6px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    padding: 8px;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 120;
}

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

.user-menu-balance {
    font-family: var(--font-head);
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    padding: 8px 12px 10px;
    border-bottom: 1px solid #232323;
    margin-bottom: 6px;
}

.user-menu-item {
    display: block;
    padding: 10px 12px;
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--text);
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

.user-menu-item:hover {
    background: rgba(255, 196, 0, 0.08);
    color: var(--yellow);
}

.user-menu-item.danger {
    color: #b0a89a;
}

.user-menu-item.danger:hover {
    background: rgba(255, 92, 77, 0.08);
    color: #ff8b7e;
}

/* Мобильное меню (CSS-only, checkbox) */

.nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.nav-toggle-label {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 9px;
    cursor: pointer;
    border: 1px solid #2a2a2a;
    background: var(--surface);
    flex-shrink: 0;
}

.nav-toggle-label span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--yellow);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.hero {
    position: relative;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
    overflow: hidden;
    background: var(--black);
}

/* Слой 1 — фон */

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image: url("landing background.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.02);
    animation: fadeIn 1.6s ease both;
}

/* Слой 2/3/4 — overlay-ы */

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    /* сверху вниз */
    background: linear-gradient(180deg,
            rgba(5, 5, 5, 0.88) 0%,
            rgba(5, 5, 5, 0.18) 26%,
            rgba(5, 5, 5, 0.28) 62%,
            rgba(5, 5, 5, 0.92) 100%);
}

/* слева направо — затемняет правую половину под текст */
.hero-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0.05) 0%,
            rgba(0, 0, 0, 0.25) 40%,
            rgba(5, 5, 5, 0.80) 100%);
}

/* vignette по краям */
.hero-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 75% 70% at 50% 46%,
            transparent 52%,
            rgba(0, 0, 0, 0.55) 100%);
}

/* Слой 5 — персонаж */

.hero-character {
    position: absolute;
    z-index: 3;
    left: 0;
    bottom: 0;
    width: 44%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55));
    animation: charIn 1.4s ease 0.25s both;
}

/* Слой 6 — контент */

.hero-content {
    position: relative;
    z-index: 4;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: 40px;
    padding-bottom: 40px;
}

.hero-text {
    max-width: 620px;
    margin-right: 2%;
    padding: 48px 40px;
    text-align: center;
    border: 1px solid rgba(255, 196, 0, 0.14);
    background: linear-gradient(180deg,
            rgba(5, 5, 5, 0.38) 0%,
            rgba(5, 5, 5, 0.18) 100%);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.hero-eyebrow {
    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--yellow);
    animation: fadeInUp 0.9s ease 0.35s both;
}

.hero-title {
    margin: 18px 0 22px;
    font-family: var(--font-display);
    font-size: clamp(44px, 5vw, 64px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--white);
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.55);
    text-shadow:
        0 3px 0 #171717,
        0 8px 26px rgba(0, 0, 0, 0.85),
        0 0 60px rgba(255, 196, 0, 0.10);
    animation: fadeInUp 0.9s ease 0.5s both;
}

.hero-desc {
    margin: 0 auto 36px;
    max-width: 460px;
    font-size: 18px;
    line-height: 1.5;
    color: var(--text);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    animation: fadeInUp 0.9s ease 0.65s both;
}

/* CTA */

.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 300px;
    max-width: 100%;
    height: 55px;
    background: var(--yellow);
    color: #050505;
    border: none;
    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
    transition: background 0.3s ease,
                transform 0.3s ease,
                box-shadow 0.3s ease;
    animation: fadeInUp 0.9s ease 0.8s both;
}

.btn-cta-arrow {
    display: inline-block;
    font-size: 20px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.btn-cta:hover {
    background: #ffd43d;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 10px 34px rgba(255, 196, 0, 0.45);
}

.btn-cta:hover .btn-cta-arrow {
    transform: translateX(6px);
}

/* Статус сервера */

.server-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--muted);
    animation: fadeIn 1s ease 1.1s both;
}

.pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    animation: dotPulse 2.4s ease-in-out infinite;
}

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

.features {
    background: var(--surface);
    border-top: 1px solid #1d1d1d;
    border-bottom: 1px solid #1d1d1d;
    padding: 84px 0;
}

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

.feature {
    position: relative;
    padding: 8px 34px;
    text-align: center;
    animation: fadeInUp 0.9s ease both;
}

.feature:nth-child(2) { animation-delay: 0.12s; }
.feature:nth-child(3) { animation-delay: 0.24s; }
.feature:nth-child(4) { animation-delay: 0.36s; }

/* тонкие вертикальные разделители */
.feature:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 12%;
    bottom: 12%;
    right: 0;
    width: 1px;
    background: linear-gradient(180deg,
            transparent,
            rgba(255, 255, 255, 0.10),
            transparent);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border: 1px solid rgba(255, 196, 0, 0.35);
    color: var(--yellow);
    background:
        radial-gradient(circle at 50% 40%, rgba(255, 196, 0, 0.10), transparent 70%);
    transition: background 0.35s ease,
                transform 0.35s ease,
                box-shadow 0.35s ease;
}

.feature-icon svg {
    width: 38px;
    height: 38px;
}

.feature:hover .feature-icon {
    transform: translateY(-4px);
    background: rgba(255, 196, 0, 0.12);
    box-shadow: 0 12px 30px rgba(255, 196, 0, 0.18);
}

.feature-title {
    margin: 22px 0 12px;
    font-family: var(--font-head);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--white);
}

.feature-text {
    font-size: 14.5px;
    line-height: 1.55;
    color: #9a9a9a;
}

/* ============================================================
   GAME MODES
   ============================================================ */

.modes {
    background:
        radial-gradient(ellipse 60% 90% at 50% 0%, rgba(255, 196, 0, 0.04), transparent 60%),
        var(--black-soft);
    padding: 96px 0 110px;
}

.section-title {
    position: relative;
    margin-bottom: 56px;
    text-align: center;
    font-family: var(--font-display);
    font-size: clamp(34px, 3.6vw, 46px);
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--white);
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
}

.section-title::after {
    content: "";
    display: block;
    width: 86px;
    height: 3px;
    margin: 18px auto 0;
    background: linear-gradient(90deg, transparent, var(--yellow), transparent);
}

.modes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}

.mode-card {
    position: relative;
    min-height: 165px;
    border: 1px solid #282828;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease;
    animation: fadeInUp 0.9s ease both;
}

.mode-card:nth-child(2) { animation-delay: 0.12s; }
.mode-card:nth-child(3) { animation-delay: 0.24s; }
.mode-card:nth-child(4) { animation-delay: 0.36s; }

/* "изображение" карточки (отдельный псевдоэлемент, чтобы его масштабировать) */
.mode-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.mode-card--team::before {
    background-image:
        radial-gradient(circle at 30% 20%, rgba(255, 196, 0, 0.16), transparent 55%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 26px),
        linear-gradient(160deg, #232323 0%, #101010 55%, #0a0a0a 100%);
}

.mode-card--flag::before {
    background-image:
        radial-gradient(circle at 70% 25%, rgba(255, 196, 0, 0.13), transparent 55%),
        repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 26px),
        linear-gradient(200deg, #26221a 0%, #14120e 55%, #0a0a0a 100%);
}

.mode-card--ffa::before {
    background-image:
        radial-gradient(circle at 50% 90%, rgba(255, 90, 40, 0.14), transparent 60%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.028) 0 2px, transparent 2px 22px),
        linear-gradient(180deg, #1f1e22 0%, #121113 55%, #0a0a0a 100%);
}

.mode-card--zombie::before {
    background-image:
        radial-gradient(circle at 50% 15%, rgba(114, 213, 0, 0.13), transparent 58%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 20px),
        linear-gradient(170deg, #1a201a 0%, #101310 55%, #0a0a0a 100%);
}

/* затемняющий градиент поверх */
.mode-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.18) 0%,
            rgba(0, 0, 0, 0.55) 100%);
    transition: background 0.3s ease;
}

.mode-body {
    position: relative;
    z-index: 2;
    height: 100%;
    min-height: 165px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 26px 18px;
    text-align: center;
}

.mode-icon {
    color: var(--white);
    transition: color 0.3s ease, transform 0.3s ease;
}

.mode-icon svg {
    width: 44px;
    height: 44px;
}

.mode-title {
    margin-top: 4px;
    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2.6px;
    text-transform: uppercase;
    color: var(--white);
}

.mode-text {
    font-size: 13.5px;
    line-height: 1.5;
    color: #a5a5a5;
}

/* hover — только CSS */
.mode-card:hover {
    transform: translateY(-4px);
    border-color: var(--yellow);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6),
                0 0 24px rgba(255, 196, 0, 0.12);
}

.mode-card:hover::before {
    transform: scale(1.05);
}

.mode-card:hover::after {
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.08) 0%,
            rgba(0, 0, 0, 0.42) 100%);
}

.mode-card:hover .mode-icon {
    color: var(--yellow);
    transform: scale(1.08);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background: #070707;
    border-top: 1px solid #1d1d1d;
    padding: 44px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-brand {
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--white);
}

.footer-brand span {
    color: var(--yellow);
}

.footer-rights {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--muted);
}

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

.soc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #2c2c2c;
    background: var(--surface-light);
    color: #b5b5b5;
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s ease,
                border-color 0.3s ease,
                background 0.3s ease,
                transform 0.3s ease;
}

.soc-btn svg {
    width: 20px;
    height: 20px;
}

.soc-btn:hover {
    color: var(--yellow);
    border-color: var(--yellow);
    background: rgba(255, 196, 0, 0.08);
    transform: translateY(-2px);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.footer-link {
    font-family: var(--font-head);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #9a9a9a;
    transition: color 0.25s ease;
    white-space: nowrap;
}

.footer-link:hover {
    color: var(--yellow);
}

/* ============================================================
   RESPONSIVE — TABLET (768–1199)
   ============================================================ */

@media (max-width: 1199px) {
    .container {
        padding: 0 24px;
    }

    .main-nav {
        gap: 16px;
    }

    .nav-link {
        font-size: 12px;
        letter-spacing: 1.2px;
    }

    .btn-login {
        padding: 0 18px;
        font-size: 12.5px;
        letter-spacing: 1.8px;
    }

    .hero-character {
        width: 46%;
    }

    .hero-text {
        margin-right: 0;
        padding: 40px 30px;
    }

    .hero-title {
        font-size: clamp(42px, 5.4vw, 60px);
    }

    .hero-desc {
        font-size: 17px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 56px;
    }

    .feature {
        padding: 8px 26px;
    }

    .feature:nth-child(2)::after {
        display: none;
    }

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

/* ============================================================
   RESPONSIVE — MOBILE (до 767)
   ============================================================ */

@media (max-width: 1023px) {
    .nav-toggle-label {
        display: flex;
        order: 3;
    }

    .btn-login {
        order: 2;
        margin-left: auto;
    }

    .user-chip {
        order: 2;
        margin-left: auto;
    }

    .user-chip-nick {
        max-width: 110px;
    }

    .main-nav {
        order: 4;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        background: rgba(5, 5, 5, 0.98);
        border-bottom: 1px solid #1d1d1d;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.45s ease;
    }

    .nav-toggle:checked ~ .main-nav {
        max-height: 340px;
    }

    .nav-link {
        padding: 15px 32px;
        border-top: 1px solid #171717;
    }

    .nav-link::after {
        left: 32px;
        right: auto;
        width: 34px;
    }

    .nav-toggle:checked + .nav-toggle-label span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle:checked + .nav-toggle-label span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle:checked + .nav-toggle-label span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

@media (max-width: 767px) {
    .container {
        padding: 0 20px;
    }

    .logo-mark {
        width: 34px;
        height: 34px;
    }

    .logo-text {
        font-size: 19px;
    }

    /* Hero: персонаж сверху, текст поверх нижней части */
    .hero {
        min-height: 0;
        padding-top: 96px;
    }

    .hero-character {
        left: 50%;
        transform: translateX(-50%);
        width: 78%;
        bottom: auto;
        top: 70px;
        animation: fadeIn 1.4s ease 0.15s both;
    }

    .hero-content {
        min-height: 0;
        justify-content: center;
        padding: 42% 0 64px;
    }

    .hero-text {
        padding: 34px 18px;
        background: linear-gradient(180deg,
                rgba(5, 5, 5, 0.62) 0%,
                rgba(5, 5, 5, 0.52) 100%);
    }

    .hero-eyebrow {
        font-size: 12.5px;
        letter-spacing: 3.5px;
    }

    .hero-title {
        font-size: clamp(42px, 12vw, 52px);
        letter-spacing: 2px;
        margin: 12px 0 18px;
    }

    .hero-desc {
        font-size: 15.5px;
        margin-bottom: 28px;
    }

    .btn-cta {
        width: 100%;
        max-width: 320px;
    }

    .server-status {
        font-size: 10.5px;
        letter-spacing: 1.6px;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Features — 1 колонка */
    .features {
        padding: 60px 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .feature {
        padding: 0 10px;
    }

    .feature:not(:last-child)::after {
        top: auto;
        bottom: -24px;
        left: 25%;
        right: 25%;
        width: auto;
        height: 1px;
        background: linear-gradient(90deg,
                transparent,
                rgba(255, 255, 255, 0.10),
                transparent);
    }

    /* Режимы — 1 колонка */
    .modes {
        padding: 70px 0 84px;
    }

    .section-title {
        margin-bottom: 40px;
        letter-spacing: 2.5px;
    }

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

    /* Footer — вертикально */
    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 26px;
    }

    .footer-links {
        flex-direction: column;
        gap: 14px;
    }

    .auth-window {
        width: 100%;
    }

    .auth-window iframe {
        height: calc(100vh - 44px);
        height: calc(100dvh - 44px);
    }
}

/* ============================================================
   AUTH MODALS (CSS-only, :target)
   ============================================================ */

.auth-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 150;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-modal:target {
    display: flex;
    animation: modalIn 0.35s ease both;
}

@keyframes modalIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.auth-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 3, 3, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: default;
}

.auth-window {
    position: relative;
    width: min(480px, 94vw);
    max-width: 100%;
    animation: fadeInUp 0.4s ease both;
}

.auth-window iframe {
    display: block;
    width: 100%;
    height: min(720px, calc(100vh - 40px));
    background: #0d0d0d;
    border: 1px solid #2c2c2c;
    border-top: 2px solid var(--yellow);
    border-radius: 10px;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

.auth-close {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #141414;
    border: 1px solid #3a3a3a;
    color: #bdbdbd;
    font-size: 22px;
    line-height: 1;
    transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.auth-close:hover {
    color: var(--yellow);
    border-color: var(--yellow);
    transform: rotate(90deg);
}


