/* ==========================================================================
   MOB-DEV — style.css (v3)
   Тёмная тема, акцент — градиент cyan → indigo, MAX — фиолетовый
   ========================================================================== */

/* ---------- Переменные ---------- */
:root {
    --bg: #070a10;
    --bg-soft: #0b1018;
    --card: #101725;
    --card-hover: #162034;
    --border: rgba(148, 163, 200, .12);
    --border-strong: rgba(148, 163, 200, .25);
    --text: #eef2f9;
    --text-muted: #9aa7bd;
    --text-dim: #647086;
    --accent: #22d3ee;
    --accent-soft: rgba(34, 211, 238, .12);
    --accent-border: rgba(34, 211, 238, .32);
    --indigo: #818cf8;
    --max: #a855f7;
    --max-2: #6366f1;
    --max-soft: rgba(139, 92, 246, .13);
    --max-border: rgba(139, 92, 246, .38);
    --max-text: #c4b5fd;
    --gradient: linear-gradient(120deg, #22d3ee, #818cf8);
    --gradient-max: linear-gradient(120deg, #a855f7, #6366f1);
    --success: #34d399;
    --danger: #f87171;
    --radius-lg: 20px;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 16px 44px rgba(2, 6, 16, .5);
    --container: 1160px;
    --header-h: 68px;
}

/* ---------- Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 18px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Мягкое цветное свечение на фоне */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(1100px 520px at 85% -10%, rgba(129, 140, 248, .10), transparent 60%),
        radial-gradient(900px 460px at -15% 5%, rgba(34, 211, 238, .07), transparent 55%);
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.015em; }
p { margin: 0 0 12px; }
img { max-width: 100%; }
a { color: var(--accent); }

::selection { background: rgba(34, 211, 238, .35); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1d2739; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2a3852; }

[hidden] { display: none !important; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 22px; }

.grad-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.btn:focus-visible, a:focus-visible, summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ---------- Шапка ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 10, 16, .8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 22px;
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--gradient);
    color: #05131c;
    font-weight: 800;
    font-size: 16px;
    display: grid;
    place-items: center;
}

.logo-text { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.logo-text em {
    font-style: normal;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.main-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }

.nav-link {
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
    transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--text); background: rgba(148, 163, 200, .09); }
.nav-link.active { color: var(--text); background: var(--accent-soft); }
.nav-link-dim { color: var(--text-dim); }

/* ⭐ Ссылка на канал MAX в меню */
.nav-link-max { color: var(--max-text); font-weight: 600; }
.nav-link-max:hover { color: #ddd6fe; background: rgba(139, 92, 246, .14); }

.nav-burger {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    border-radius: 10px;
}
.nav-burger:hover { background: rgba(148, 163, 200, .08); }
.nav-burger span { width: 20px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .25s, opacity .2s; }
body.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
body.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Основной блок ---------- */
.site-main { display: block; padding-bottom: 76px; min-height: 55vh; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn svg { flex-shrink: 0; }
.btn:active { transform: translateY(1px) scale(.99); }

.btn-primary { background: var(--gradient); color: #05131c; box-shadow: 0 10px 26px rgba(34, 211, 238, .22); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(34, 211, 238, .32); }

/* ⭐ Кнопки, ведущие в MAX */
.btn-max {
    background: var(--gradient-max);
    color: #fff;
    box-shadow: 0 10px 26px rgba(139, 92, 246, .28);
}
.btn-max:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(139, 92, 246, .4); color: #fff; }

.btn-accent { background: var(--accent-soft); border-color: var(--accent-border); color: #7ce7f5; }
.btn-accent:hover { background: rgba(34, 211, 238, .2); }

.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(148, 163, 200, .08); border-color: rgba(148, 163, 200, .4); }

.btn-danger { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .35); color: #fca5a5; }
.btn-danger:hover { background: rgba(248, 113, 113, .18); }

.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 10px; gap: 6px; }
.btn-block { width: 100%; }

/* ---------- Бейджи и статусы ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge-max     { color: #67e8f9; background: rgba(34, 211, 238, .1); border-color: rgba(34, 211, 238, .28); }
.badge-android { color: #6ee7b7; background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .28); }
.badge-windows { color: #93c5fd; background: rgba(96, 165, 250, .1); border-color: rgba(96, 165, 250, .28); }
.badge-web     { color: #c4b5fd; background: rgba(167, 139, 250, .1); border-color: rgba(167, 139, 250, .28); }

.status { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.status-on  { color: #6ee7b7; background: rgba(52, 211, 153, .12); }
.status-off { color: #fcd34d; background: rgba(251, 191, 36, .12); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 76px 0 56px; overflow: hidden; }
.hero-glow { position: absolute; border-radius: 50%; filter: blur(100px); pointer-events: none; }
.hero-glow-1 { width: 520px; height: 520px; top: -200px; right: -100px; background: rgba(34, 211, 238, .17); }
.hero-glow-2 { width: 460px; height: 460px; bottom: -240px; left: -140px; background: rgba(129, 140, 248, .16); }
.hero-inner { position: relative; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 15px;
    border-radius: 999px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    color: #86e9f6;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2.2s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, .45); }
    70%  { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero-title { font-size: clamp(36px, 6.2vw, 62px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.06; margin: 0 0 18px; }
.hero-sub { color: var(--text-muted); font-size: clamp(15.5px, 2vw, 18px); line-height: 1.65; max-width: 620px; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 13px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 44px; margin-top: 52px; flex-wrap: wrap; }

.stat, .stat-card { display: flex; flex-direction: column; gap: 5px; }
.stat-value { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.stat-label { color: var(--text-dim); font-size: 12.5px; }

/* ---------- Секции ---------- */
.section { padding: 46px 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-title { font-size: 25px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 20px; }
.section-head .section-title { margin: 0; }
.section-link { color: var(--text-dim); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: color .2s; }
.section-link:hover { color: var(--accent); }

.page-head { padding: 54px 0 10px; }
.page-title { font-size: clamp(30px, 4.5vw, 44px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
.page-title-sm { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; }
.page-sub { color: var(--text-muted); font-size: 16.5px; max-width: 640px; margin: 0; }

.prose { color: var(--text-muted); font-size: 16px; line-height: 1.8; max-width: 780px; }
.prose p { margin: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Карточки ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 22px; }

.app-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.app-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }

.card-cover { position: relative; aspect-ratio: 16 / 10; background: #0a0f18; overflow: hidden; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.app-card:hover .card-cover img { transform: scale(1.05); }
.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 62%, rgba(6, 10, 17, .5));
    pointer-events: none;
}
.card-cover .badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: rgba(6, 10, 17, .62);
    color: var(--text);
    border-color: rgba(148, 163, 200, .28);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.cover-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #131b2b, #0c121e);
    color: var(--text-dim);
}

.card-body { display: flex; flex-direction: column; gap: 9px; padding: 18px 20px 20px; flex: 1; }
.card-title { font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; }
.card-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-footer { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-price { color: var(--success); font-size: 13.5px; font-weight: 700; }
.card-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: gap .2s ease;
}
.app-card:hover .card-cta, .work-card:hover .card-cta { gap: 9px; }

/* Оверлей «Играть» на карточках игр */
.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    background: rgba(5, 8, 14, .55);
    opacity: 0;
    transition: opacity .25s ease;
}
.game-card:hover .play-overlay, .game-card:focus-visible .play-overlay { opacity: 1; }
.play-circle {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--gradient-max);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 30px rgba(139, 92, 246, .35);
    transform: scale(.8);
    transition: transform .25s ease;
}
.game-card:hover .play-circle { transform: scale(1); }

/* ---------- Хлебные крошки ---------- */
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--text-dim); margin-bottom: 22px; }
.breadcrumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); text-decoration: none; transition: color .2s; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { opacity: .5; flex-shrink: 0; }
.breadcrumbs .current { color: var(--text-muted); font-weight: 500; }

/* ---------- Страница приложения ---------- */
.detail-hero { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 40px; align-items: start; padding-top: 26px; }
.detail-cover { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: #0a0f18; box-shadow: var(--shadow); }
.detail-cover img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.detail-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-title { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -0.025em; margin: 0 0 12px; }
.detail-lead { color: var(--text-muted); font-size: 17px; line-height: 1.6; margin: 0 0 26px; max-width: 640px; }

.meta-chips { display: flex; gap: 12px; flex-wrap: wrap; }
.chip { display: flex; flex-direction: column; gap: 3px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 16px; min-width: 86px; }
.chip-label { font-size: 10.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.chip-value { font-size: 15px; font-weight: 600; }

.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.detail-back { margin-top: 46px; padding-bottom: 10px; }

/* ---------- Скриншоты и лайтбокс ---------- */
.shots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.shot { position: relative; display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #0a0f18; }
.shot img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .35s ease; }
.shot:hover img { transform: scale(1.04); }
.shot-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 26px 14px 10px;
    background: linear-gradient(180deg, transparent, rgba(5, 8, 14, .85));
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
}
[data-lightbox] { cursor: zoom-in; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(4, 7, 12, .93);
    backdrop-filter: blur(10px);
    cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lightbox-close {
    position: absolute;
    top: 18px; right: 26px;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: rgba(148, 163, 200, .08);
    color: var(--text);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.lightbox-close:hover { background: rgba(248, 113, 113, .15); border-color: rgba(248, 113, 113, .4); color: #fca5a5; }

/* ---------- О студии / CTA ---------- */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.about-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; transition: border-color .25s, transform .25s; }
.about-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.about-card h3 { font-size: 17px; margin-bottom: 8px; }
.about-card p { color: var(--text-muted); font-size: 14.5px; margin: 0; }
.about-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    color: var(--accent);
    margin-bottom: 16px;
}
.about-icon svg { width: 24px; height: 24px; }

.cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    background: linear-gradient(120deg, rgba(34, 211, 238, .09), rgba(129, 140, 248, .09));
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
}
.cta-text h2 { font-size: 23px; margin-bottom: 6px; }
.cta-text p { color: var(--text-muted); margin: 0; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Фриланс ---------- */
.works-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.work-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.work-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.work-cover { aspect-ratio: 16 / 10; overflow: hidden; background: #0a0f18; }
.work-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.work-card:hover .work-cover img { transform: scale(1.04); }

/* ---------- ⭐ Промо-блок канала MAX ---------- */
.max-mark {
    flex-shrink: 0;
    width: 58px; height: 58px;
    border-radius: 16px;
    background: var(--gradient-max);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: .05em;
    box-shadow: 0 10px 30px rgba(139, 92, 246, .35);
}

.max-promo {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    background: linear-gradient(120deg, var(--max-soft), rgba(99, 102, 241, .1));
    border: 1px solid var(--max-border);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
}
.max-promo-text { flex: 1; min-width: 240px; }
.max-promo-text h2 { font-size: 23px; margin-bottom: 6px; }
.max-promo-text p { color: var(--text-muted); margin: 0; max-width: 560px; }
.max-promo .btn { margin-left: auto; }

/* ---------- Пустые состояния и флеш-сообщения ---------- */
.empty-state {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    background: rgba(148, 163, 200, .03);
    padding: 56px 24px;
    text-align: center;
    color: var(--text-dim);
    font-size: 15px;
}
.empty-state a { color: var(--accent); }

.flash-stack { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; }
.flash { display: flex; align-items: flex-start; gap: 11px; padding: 13px 17px; border-radius: var(--radius-sm); font-size: 14.5px; border: 1px solid; line-height: 1.5; }
.flash-icon { font-weight: 800; }
.flash-ok { color: #a7f3d0; background: rgba(52, 211, 153, .09); border-color: rgba(52, 211, 153, .35); }
.flash-error { color: #fecaca; background: rgba(248, 113, 113, .09); border-color: rgba(248, 113, 113, .35); }

/* ---------- ⭐ Модальные окна (почта / выбор где играть) ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 250;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(4, 7, 12, .82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
}
.modal-overlay[hidden] { display: none; }

.modal {
    position: relative;
    width: 100%;
    max-width: 430px;
    background: var(--card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 34px 30px 28px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    cursor: default;
    animation: modalIn .25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(16px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

.modal-close {
    position: absolute;
    top: 14px; right: 16px;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--text-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.modal-close:hover { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .4); color: #fca5a5; }

.modal-icon {
    width: 64px; height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    color: var(--accent);
}
.modal-icon.violet { background: rgba(139, 92, 246, .14); border-color: rgba(139, 92, 246, .4); color: var(--max-text); }

.modal-game { color: var(--text-dim); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 5px; }
.modal-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.modal-text { color: var(--text-muted); font-size: 14.5px; line-height: 1.55; margin: 0 0 20px; }
.modal-actions { display: flex; flex-direction: column; gap: 11px; }
.modal-hint { color: var(--text-dim); font-size: 12.5px; margin: 16px 0 0; }
.modal-hint a { color: var(--max-text); }

.mail-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--bg-soft);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text);
    word-break: break-all;
}

/* ---------- Формы ---------- */
.form-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px 32px; max-width: 880px; }
.form-card-mt { margin-top: 18px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

.form-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.form-group-inline { flex-direction: row; align-items: center; gap: 10px; margin-bottom: 24px; }

.form-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.form-label-inline { margin: 0; cursor: pointer; }
.form-hint { display: block; margin-top: 6px; color: var(--text-dim); font-size: 12.5px; line-height: 1.5; }

.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.meta-collapse { border: 1px solid var(--border); border-radius: var(--radius); background: rgba(148, 163, 200, .03); padding: 6px 18px; margin: 8px 0 22px; }
.meta-collapse summary { cursor: pointer; padding: 10px 0; color: var(--text-muted); font-size: 14px; font-weight: 600; }
.meta-collapse .form-group { margin-top: 14px; }

.current-file { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--text-dim); font-size: 13px; }
.preview-thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); }

input, select, textarea {
    width: 100%;
    background: var(--bg-soft);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    font-size: 14.5px;
    padding: 11px 14px;
    transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, .14);
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }
textarea { resize: vertical; min-height: 100px; }

select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa7bd' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}
option { background: var(--bg-soft); color: var(--text); }

input[type="file"] { padding: 9px 12px; font-size: 13.5px; color: var(--text-muted); cursor: pointer; }
input[type="file"]::file-selector-button {
    background: var(--bg);
    border: 1px solid var(--border-strong);
    color: var(--text);
    border-radius: 8px;
    padding: 7px 13px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 12px;
    transition: background .2s;
}
input[type="file"]::file-selector-button:hover { background: var(--card-hover); }

input[type="checkbox"] { width: 18px; height: 18px; padding: 0; accent-color: var(--accent); cursor: pointer; }

/* ---------- Вход в админку ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 70px 0 30px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; margin-bottom: 24px; }
.auth-head .logo-mark { width: 48px; height: 48px; border-radius: 15px; font-size: 21px; }
.auth-title { font-size: 22px; font-weight: 800; margin: 6px 0 0; }
.auth-sub { color: var(--text-muted); font-size: 14px; margin: 0; }

/* ---------- Админка ---------- */
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 46px 0 26px; }
.admin-head .page-sub { margin: 6px 0 0; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }

.dash-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 26px; }
.dash-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    text-decoration: none;
    color: var(--text);
    transition: border-color .2s, transform .2s;
}
.dash-link:hover { border-color: var(--accent-border); transform: translateY(-2px); }
.dash-link span { color: var(--text-muted); font-size: 13.5px; }

.table-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
thead th {
    text-align: left;
    padding: 14px 18px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    background: rgba(148, 163, 200, .03);
    white-space: nowrap;
}
tbody td { padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(148, 163, 200, .04); }

.cell-app { display: flex; align-items: center; gap: 14px; }
.row-icon { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; background: #0a0f18; }
.row-title { color: var(--text); font-weight: 600; text-decoration: none; font-size: 14.5px; }
.row-title:hover { color: var(--accent); }
.row-sub { display: block; color: var(--text-dim); font-size: 12.5px; margin-top: 2px; word-break: break-all; }
.cell-muted { color: var(--text-muted); }
.th-actions, .cell-actions { text-align: right; }
.cell-actions .btn { margin-left: 8px; }
.inline-form { display: inline; }

.admin-row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.shot-manage { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.shot-manage img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shot-manage-form { display: flex; justify-content: flex-end; padding: 10px 12px; }

/* ---------- Страницы ошибок ---------- */
.error-page { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 110px 22px 80px; }
.error-code {
    font-size: clamp(72px, 14vw, 120px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.error-title { font-size: 26px; font-weight: 700; margin: 18px 0 10px; }
.error-text { color: var(--text-muted); max-width: 460px; margin: 0 0 30px; }

/* ---------- Подвал ---------- */
.site-footer { margin-top: 90px; border-top: 1px solid var(--border); background: #05080d; }
.footer-inner { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; padding-top: 44px; padding-bottom: 36px; }
.footer-brand { max-width: 300px; }
.footer-tagline { color: var(--text-dim); font-size: 13.5px; margin: 12px 0 0; line-height: 1.55; }
.footer-nav { display: flex; flex-direction: column; gap: 9px; }
.footer-nav a { color: var(--text-muted); font-size: 14px; text-decoration: none; transition: color .2s; }
.footer-nav a:hover { color: var(--accent); }
.footer-contacts-label { color: var(--text-dim); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 9px; font-weight: 600; }
.footer-mail { color: var(--text); font-weight: 600; font-size: 14.5px; text-decoration: none; }
.footer-mail:hover { color: var(--accent); }

/* ⭐ Ссылка «Мы в MAX» в подвале */
.footer-max {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(139, 92, 246, .14);
    border: 1px solid rgba(139, 92, 246, .35);
    color: var(--max-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.footer-max:hover { background: rgba(139, 92, 246, .25); color: #ddd6fe; }

.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 26px; border-top: 1px solid var(--border); }
.footer-bottom p { margin: 0; color: var(--text-dim); font-size: 13px; }
.footer-bottom a { color: var(--text-dim); font-size: 13px; text-decoration: none; }
.footer-bottom a:hover { color: var(--accent); }

/* ---------- Анимации ---------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}
.hero-inner { animation: fadeUp .55s ease both; }
.page-head { animation: fadeUp .45s ease both; }
.cards-grid > *, .works-grid > *, .stats-grid > *, .about-grid > * { animation: fadeUp .45s ease backwards; }
.cards-grid > *:nth-child(2), .works-grid > *:nth-child(2), .stats-grid > *:nth-child(2) { animation-delay: .05s; }
.cards-grid > *:nth-child(3), .works-grid > *:nth-child(3), .stats-grid > *:nth-child(3) { animation-delay: .1s; }
.cards-grid > *:nth-child(4), .works-grid > *:nth-child(4), .stats-grid > *:nth-child(4) { animation-delay: .15s; }
.cards-grid > *:nth-child(5), .stats-grid > *:nth-child(5) { animation-delay: .2s; }
.cards-grid > *:nth-child(6), .stats-grid > *:nth-child(6) { animation-delay: .25s; }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
    .detail-hero { grid-template-columns: 1fr; }
    .detail-cover { max-width: 340px; }
}

@media (max-width: 860px) {
    .nav-burger { display: flex; }
    .main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 14px 22px 22px;
        background: rgba(6, 9, 15, .97);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-bottom: 1px solid var(--border);
        display: none;
    }
    body.nav-open .main-nav { display: flex; }
    .nav-link { padding: 12px 16px; font-size: 15px; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .cards-grid, .works-grid { grid-template-columns: 1fr; }
    .hero { padding: 52px 0 40px; }
    .hero-stats { gap: 28px; }
    .section { padding: 36px 0 0; }
    .site-footer { margin-top: 60px; }
    .form-card { padding: 22px 18px; }
    .cta-card { padding: 26px 22px; }
    .max-promo { padding: 26px 22px; }
    .max-promo .btn { margin-left: 0; width: 100%; }
    .modal { padding: 26px 20px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    html { scroll-behavior: auto; }
}