/* ============================================================
   ARC CHANGER — SITE THEME v3.1
   Полный CSS: тема синхронизирована с лаунчером.
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #050505;
    --bg-secondary: #08080a;
    --bg-tertiary: #0b0b0d;
    --bg-card: #0d0d10;
    --bg-card-hover: #121216;
    --bg-input: #0a0a0c;
    --bg-glass: rgba(13, 13, 16, 0.72);

    --accent-red: #dc2626;
    --accent-red-dark: #7f1d1d;
    --accent-red-light: #f87171;
    --accent-red-rgb: 220, 38, 38;
    --accent-red-glow: rgba(220, 38, 38, 0.35);

    --accent-purple: #6b7280;
    --accent-purple-dark: #374151;
    --accent-purple-light: #9ca3af;

    --accent-green: #22c55e;
    --accent-green-light: #4ade80;
    --accent-orange: #f59e0b;
    --accent-danger: #f87171;

    --text-primary: #f5f5f5;
    --text-secondary: #a3a3a3;
    --text-muted: #808089;
    --text-danger: #f87171;

    --border: rgba(220, 38, 38, 0.12);
    --border-hover: rgba(220, 38, 38, 0.32);
    --border-soft: rgba(255, 255, 255, 0.06);

    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-red); }

/* ============ BASE ============ */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

::selection { background: rgba(var(--accent-red-rgb), 0.35); color: #fff; }
svg { flex-shrink: 0; }

:focus-visible {
    outline: 2px solid rgba(var(--accent-red-rgb), 0.55);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ============================================================
   ANIMATED RAIN BACKGROUND
   ============================================================ */
#particles { display: none !important; }

body::before {
    content: "";
    position: fixed;
    inset: -10%;
    z-index: 0;
    pointer-events: none;
    --c: rgba(var(--accent-red-rgb), 0.55);
    background-image:
        radial-gradient(4px 100px at 0px 235px, var(--c), #0000),
        radial-gradient(4px 100px at 300px 235px, var(--c), #0000),
        radial-gradient(1.5px 1.5px at 150px 117.5px, var(--c) 100%, #0000 150%),
        radial-gradient(4px 100px at 0px 252px, var(--c), #0000),
        radial-gradient(4px 100px at 300px 252px, var(--c), #0000),
        radial-gradient(1.5px 1.5px at 150px 126px, var(--c) 100%, #0000 150%),
        radial-gradient(4px 100px at 0px 150px, var(--c), #0000),
        radial-gradient(4px 100px at 300px 150px, var(--c), #0000),
        radial-gradient(1.5px 1.5px at 150px 75px, var(--c) 100%, #0000 150%),
        radial-gradient(4px 100px at 0px 253px, var(--c), #0000),
        radial-gradient(4px 100px at 300px 253px, var(--c), #0000),
        radial-gradient(1.5px 1.5px at 150px 126.5px, var(--c) 100%, #0000 150%),
        radial-gradient(4px 100px at 0px 204px, var(--c), #0000),
        radial-gradient(4px 100px at 300px 204px, var(--c), #0000),
        radial-gradient(1.5px 1.5px at 150px 102px, var(--c) 100%, #0000 150%),
        radial-gradient(4px 100px at 0px 134px, var(--c), #0000),
        radial-gradient(4px 100px at 300px 134px, var(--c), #0000),
        radial-gradient(1.5px 1.5px at 150px 67px, var(--c) 100%, #0000 150%),
        radial-gradient(4px 100px at 0px 179px, var(--c), #0000),
        radial-gradient(4px 100px at 300px 179px, var(--c), #0000),
        radial-gradient(1.5px 1.5px at 150px 89.5px, var(--c) 100%, #0000 150%),
        radial-gradient(4px 100px at 0px 299px, var(--c), #0000),
        radial-gradient(4px 100px at 300px 299px, var(--c), #0000),
        radial-gradient(1.5px 1.5px at 150px 149.5px, var(--c) 100%, #0000 150%),
        radial-gradient(4px 100px at 0px 215px, var(--c), #0000),
        radial-gradient(4px 100px at 300px 215px, var(--c), #0000),
        radial-gradient(1.5px 1.5px at 150px 107.5px, var(--c) 100%, #0000 150%),
        radial-gradient(4px 100px at 0px 281px, var(--c), #0000),
        radial-gradient(4px 100px at 300px 281px, var(--c), #0000),
        radial-gradient(1.5px 1.5px at 150px 140.5px, var(--c) 100%, #0000 150%),
        radial-gradient(4px 100px at 0px 158px, var(--c), #0000),
        radial-gradient(4px 100px at 300px 158px, var(--c), #0000),
        radial-gradient(1.5px 1.5px at 150px 79px, var(--c) 100%, #0000 150%),
        radial-gradient(4px 100px at 0px 210px, var(--c), #0000),
        radial-gradient(4px 100px at 300px 210px, var(--c), #0000),
        radial-gradient(1.5px 1.5px at 150px 105px, var(--c) 100%, #0000 150%);
    background-size:
        300px 235px, 300px 235px, 300px 235px,
        300px 252px, 300px 252px, 300px 252px,
        300px 150px, 300px 150px, 300px 150px,
        300px 253px, 300px 253px, 300px 253px,
        300px 204px, 300px 204px, 300px 204px,
        300px 134px, 300px 134px, 300px 134px,
        300px 179px, 300px 179px, 300px 179px,
        300px 299px, 300px 299px, 300px 299px,
        300px 215px, 300px 215px, 300px 215px,
        300px 281px, 300px 281px, 300px 281px,
        300px 158px, 300px 158px, 300px 158px,
        300px 210px, 300px 210px, 300px 210px;
    animation: rainFall 140s linear infinite;
    opacity: 0.5;
    will-change: background-position;
}

@keyframes rainFall {
    0% {
        background-position:
            0px 220px, 3px 220px, 151.5px 337.5px,
            25px 24px, 28px 24px, 176.5px 150px,
            50px 16px, 53px 16px, 201.5px 91px,
            75px 224px, 78px 224px, 226.5px 350.5px,
            100px 19px, 103px 19px, 251.5px 121px,
            125px 120px, 128px 120px, 276.5px 187px,
            150px 31px, 153px 31px, 301.5px 120.5px,
            175px 235px, 178px 235px, 326.5px 384.5px,
            200px 121px, 203px 121px, 351.5px 228.5px,
            225px 224px, 228px 224px, 376.5px 364.5px,
            250px 26px, 253px 26px, 401.5px 105px,
            275px 75px, 278px 75px, 426.5px 180px;
    }
    to {
        background-position:
            0px 6800px, 3px 6800px, 151.5px 6917.5px,
            25px 13632px, 28px 13632px, 176.5px 13758px,
            50px 5416px, 53px 5416px, 201.5px 5491px,
            75px 17175px, 78px 17175px, 226.5px 17301.5px,
            100px 5119px, 103px 5119px, 251.5px 5221px,
            125px 8428px, 128px 8428px, 276.5px 8495px,
            150px 9876px, 153px 9876px, 301.5px 9965.5px,
            175px 13391px, 178px 13391px, 326.5px 13540.5px,
            200px 14741px, 203px 14741px, 351.5px 14848.5px,
            225px 18770px, 228px 18770px, 376.5px 18910.5px,
            250px 5082px, 253px 5082px, 401.5px 5161px,
            275px 6375px, 278px 6375px, 426.5px 6480px;
    }
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(120% 100% at 0% 0%, rgba(var(--accent-red-rgb), 0.06), transparent 55%),
        radial-gradient(100% 100% at 100% 100%, rgba(var(--accent-red-rgb), 0.05), transparent 60%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.75));
}

.navbar, section, .hero, .footer, .auth-page,
.dashboard, .admin-page, .donate-page,
.app-shell, #spa-main, .modal,
.legal-page {
    position: relative;
    z-index: 1;
}

.modal { z-index: 10000; }

/* ============ LAYOUT ============ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
section { padding: 100px 0; position: relative; }
section[id] { scroll-margin-top: 90px; }

.section-header { text-align: center; max-width: 640px; margin: 0 auto 60px; }
.section-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-red-light);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
    padding: 6px 16px;
    border: 1px solid rgba(var(--accent-red-rgb), 0.22);
    border-radius: 999px;
    background: rgba(var(--accent-red-rgb), 0.05);
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4.5vw, 2.7rem);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.15;
    letter-spacing: -0.5px;
}
.section-desc { color: var(--text-secondary); font-size: 1rem; line-height: 1.7; }

.gradient-text {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 45%, #991b1b 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 8s linear infinite;
}
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.3s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-red-dark) 100%);
    color: #fff;
    box-shadow: 0 6px 24px rgba(var(--accent-red-rgb), 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    transition: left 0.6s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(var(--accent-red-rgb), 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.btn-primary:hover::after { left: 150%; }

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--accent-red);
    color: var(--accent-red-light);
    background: rgba(var(--accent-red-rgb), 0.06);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--accent-red-rgb), 0.12);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-soft);
}
.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-red-dark), var(--accent-red));
    color: #fff;
    box-shadow: 0 4px 20px rgba(var(--accent-red-rgb), 0.3);
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(var(--accent-red-rgb), 0.5);
}

.btn-large { padding: 17px 40px; font-size: 1.02rem; }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn:disabled::after { display: none; }

.btn-glow {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    pointer-events: none;
}
.btn-primary:hover .btn-glow { transform: translateX(100%); }

/* ============================================================
   BUTTON FX — wrapper с размытым градиентным свечением
   ============================================================ */
.btn-fx {
    position: relative;
    display: inline-block;
    padding: 2px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    transition: transform 0.35s ease;
    isolation: isolate;
}
.btn-fx::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    z-index: -1;
    filter: blur(0);
    transition: filter 0.4s ease;
}
.btn-fx:hover::before { filter: blur(20px); }
.btn-fx:active::before { filter: blur(8px); }
.btn-fx > .btn {
    display: flex;
    border-radius: 12px !important;
    box-shadow: none !important;
    transform: none !important;
}
.btn-fx:hover { transform: translateY(-2px); }

.btn-fx.btn-fx-outline {
    background: linear-gradient(135deg, rgba(var(--accent-red-rgb), 0.35), rgba(var(--accent-red-rgb), 0.08));
}
.btn-fx.btn-fx-outline::before {
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
}
.btn-fx.btn-fx-outline > .btn {
    background: var(--bg-primary);
    border: none;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 14px 0;
    background: rgba(6, 6, 10, 0.72);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid var(--border-soft);
    transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
}
.navbar:hover { border-bottom-color: rgba(var(--accent-red-rgb), 0.15); }

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 1px;
}
.logo-img {
    width: 36px !important;
    height: 36px !important;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(var(--accent-red-rgb), 0.4));
}
.logo-text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 2px;
    text-transform: uppercase;

    /* Живой анимированный градиент вместо плоской заливки */
    background: linear-gradient(
        120deg,
        #f87171 0%,
        #dc2626 35%,
        #7f1d1d 55%,
        #ef4444 75%,
        #f87171 100%
    );
    background-size: 250% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    /* Свечение через drop-shadow — работает с background-clip:text */
    filter: drop-shadow(0 0 8px rgba(var(--accent-red-rgb), 0.35));
    transition: filter 0.35s ease, letter-spacing 0.35s ease;
    animation: logoShift 7s ease-in-out infinite;
}

/* На hover — усиливаем ореол и слегка разрежаем трекинг */
.logo:hover .logo-text {
    filter:
        drop-shadow(0 0 10px rgba(var(--accent-red-rgb), 0.7))
        drop-shadow(0 0 22px rgba(var(--accent-red-rgb), 0.35));
    letter-spacing: 3px;
}

@keyframes logoShift {
    0%, 100% { background-position:   0% 50%; }
    50%      { background-position: 100% 50%; }
}

.nav-links { display: flex; list-style: none; gap: 24px; align-items: center; }
.nav-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.25s ease;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 4px; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-red-dark));
    border-radius: 2px;
    transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark)) !important;
    padding: 10px 22px !important;
    border-radius: var(--radius-md) !important;
    color: #fff !important;
    font-weight: 600 !important;
    min-height: auto !important;
    box-shadow: 0 4px 20px rgba(var(--accent-red-rgb), 0.32);
    transition: transform 0.25s ease, box-shadow 0.3s ease !important;
}
.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(var(--accent-red-rgb), 0.5);
}
.nav-cta::after { display: none !important; }

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}
.mobile-menu-btn span {
    width: 22px; height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ============================================================
   HERO + NEON TITLE
   ============================================================ */
.hero-neon {
    min-height: 100vh;
    padding: 120px 24px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.hero-neon .hero-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 900px; height: 900px;
    background: radial-gradient(circle,
        rgba(var(--accent-red-rgb), 0.18) 0%,
        rgba(var(--accent-red-rgb), 0.06) 35%,
        transparent 70%);
    pointer-events: none;
    animation: heroGlowBreathe 6s ease-in-out infinite alternate;
    z-index: 0;
}
@keyframes heroGlowBreathe {
    0%   { opacity: 0.65; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 1;    transform: translate(-50%, -50%) scale(1.08); }
}

.hero-neon .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1000px;
    animation: fadeInUp 0.9s cubic-bezier(0.25, 0.8, 0.3, 1) both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(var(--accent-red-rgb), 0.08);
    border: 1px solid rgba(var(--accent-red-rgb), 0.22);
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--accent-red-light);
    margin-bottom: 26px;
    font-family: var(--font-display);
    letter-spacing: 2.5px;
    text-transform: uppercase;
}
.pulse-dot {
    width: 8px; height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
    box-shadow: 0 0 10px var(--accent-red-glow);
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.8); }
}

.neon-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 32px 0 42px;
    padding: 40px 0;
}
.neon-title {
    display: flex;
    justify-content: center;
    align-items: baseline;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4.6vw, 3.6rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    text-transform: uppercase;
    user-select: none;
    cursor: default;
}
.n-space { display: inline-block; width: 0.35em; flex-shrink: 0; }

.n-letter {
    position: relative;
    display: inline-block;
    color: transparent;
    pointer-events: none;
    -webkit-text-stroke: 2px var(--accent-red);
    text-shadow:
        0 0 5px rgba(var(--accent-red-rgb), 0.65),
        0 0 0px rgba(var(--accent-red-rgb), 0.35),
        0 0 32px rgba(var(--accent-red-rgb), 0.15);
    opacity: 0;
    filter: blur(12px);
    transform: translate(var(--x, 0), var(--y, 0)) rotate(var(--r, 0deg)) scale(1.4);
    transition:
        opacity   0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
        filter    0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, filter, transform;
}
.neon-title.ready .n-letter {
    opacity: 1;
    filter: blur(0);
    transform: translate(0, 0) rotate(0) scale(1);
}

.n-letter::before,
.n-letter::after {
    content: attr(data-char);
    position: absolute;
    top: 0; left: 0;
    color: transparent;
    pointer-events: none;
    -webkit-text-stroke: 1px rgba(var(--accent-red-rgb), 0.6);
}
.n-letter::before { transform: translate(2px, -2px) rotate(-1.2deg); z-index: -1; }
.n-letter::after {
    -webkit-text-stroke: 1px rgba(var(--accent-red-rgb), 0.35);
    transform: translate(-2px, 1.5px) rotate(1.2deg);
    z-index: -2;
}

.neon-line {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0%;
    height: 2px;
    transition: width 1.1s cubic-bezier(0.8, 0, 0.2, 1) 0.15s;
}
.neon-line.top-line    { margin-bottom: 30px; }
.neon-line.bottom-line { margin-top: 30px; }
.neon-title.ready ~ .neon-line { width: 100%; }

.neon-line-inner {
    display: block;
    width: 100%;
    height: 100%;
    border-top: 1px solid var(--accent-red);
    border-bottom: 1px solid var(--accent-red);
    box-shadow:
        0 0 6px rgba(var(--accent-red-rgb), 0.9),
        0 0 14px rgba(var(--accent-red-rgb), 0.6),
        0 0 28px rgba(var(--accent-red-rgb), 0.35),
        inset 0 0 3px rgba(var(--accent-red-rgb), 0.8);
}

.neon-subtitle {
    font-family: var(--font-display);
    font-size: clamp(0.8rem, 1.4vw, 1.05rem);
    color: var(--accent-red-light);
    letter-spacing: 8px;
    text-transform: uppercase;
    margin-top: 26px;
    text-shadow: 0 0 12px rgba(var(--accent-red-rgb), 0.6);
    opacity: 0;
    transition: opacity 0.9s ease 0.8s, letter-spacing 0.9s ease 0.8s;
}
.neon-title.ready ~ .neon-subtitle { opacity: 1; letter-spacing: 8px; }

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 42px;
    line-height: 1.7;
}
.hero-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}
.hero-stats { display: flex; justify-content: center; gap: 56px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--accent-red-light);
    text-shadow: 0 0 25px rgba(var(--accent-red-rgb), 0.45);
    line-height: 1;
}
.stat-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 8px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px; left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}
.mouse {
    width: 24px; height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
    opacity: 0.6;
}
.mouse::after {
    content: '';
    position: absolute;
    top: 8px; left: 50%;
    transform: translateX(-50%);
    width: 3px; height: 8px;
    background: var(--accent-red);
    border-radius: 2px;
    animation: scroll-wheel 2s ease-in-out infinite;
}
@keyframes scroll-wheel {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50%      { transform: translateX(-50%) translateY(12px); opacity: 0; }
}

/* ============================================================
   HERO NEON TITLE — двусторонняя анимация на transition
   (плавно разворачивается из любой точки, без перезапуска)
   ============================================================ */

.neon-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 32px 0 42px;
    padding: 40px 0;
}

.neon-title {
    display: flex;
    justify-content: center;
    align-items: baseline;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4.6vw, 3.6rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    text-transform: uppercase;
    user-select: none;
    cursor: default;
}

.n-space {
    display: inline-block;
    width: 0.35em;
    flex-shrink: 0;
}

.n-letter {
    position: relative;
    display: inline-block;
    color: transparent;
    pointer-events: none;               /* буквы не ловят курсор */
    -webkit-text-stroke: 2px var(--accent-red);
    text-shadow:
        0 0 5px rgba(var(--accent-red-rgb), 0.85),
        0 0 0px rgba(var(--accent-red-rgb), 0.55),
        0 0 32px rgba(var(--accent-red-rgb), 0.35);

    /* Разобранное (начальное) состояние */
    opacity: 0;
    filter: blur(12px);
    transform: translate(var(--x, 0), var(--y, 0)) rotate(var(--r, 0deg)) scale(1.4);

    /* Переход — работает в обе стороны и продолжается с текущего значения */
    transition:
        opacity   0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
        filter    0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: 0s;
    will-change: opacity, filter, transform;
}

/* Собранное состояние */
.neon-stage.ready .n-letter {
    opacity: 1;
    filter: blur(0);
    transform: translate(0, 0) rotate(0) scale(1);
}

.n-letter::before,
.n-letter::after {
    content: attr(data-char);
    position: absolute;
    top: 0; left: 0;
    color: transparent;
    pointer-events: none;
    -webkit-text-stroke: 1px rgba(var(--accent-red-rgb), 0.6);
}
.n-letter::before {
    transform: translate(2px, -2px) rotate(-1.2deg);
    z-index: -1;
}
.n-letter::after {
    -webkit-text-stroke: 1px rgba(var(--accent-red-rgb), 0.35);
    transform: translate(-2px, 1.5px) rotate(1.2deg);
    z-index: -2;
}

.neon-line {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0%;
    height: 2px;
    opacity: 0;
    transition:
        width   1.1s cubic-bezier(0.8, 0, 0.2, 1) 0.15s,
        opacity 0.5s ease 0.15s;
}
.neon-line.top-line    { margin-bottom: 30px; }
.neon-line.bottom-line { margin-top: 30px; }

.neon-stage.ready .neon-line {
    width: 100%;
    opacity: 1;
}

.neon-line-inner {
    display: block;
    width: 100%;
    height: 100%;
    border-top: 1px solid var(--accent-red);
    border-bottom: 1px solid var(--accent-red);
    box-shadow:
        0 0 6px rgba(var(--accent-red-rgb), 0.9),
        0 0 14px rgba(var(--accent-red-rgb), 0.6),
        0 0 28px rgba(var(--accent-red-rgb), 0.35),
        inset 0 0 3px rgba(var(--accent-red-rgb), 0.8);
}

.neon-subtitle {
    font-family: var(--font-display);
    font-size: clamp(0.8rem, 1.4vw, 1.05rem);
    color: var(--accent-red-light);
    letter-spacing: 8px;
    text-transform: uppercase;
    margin-top: 26px;
    text-shadow: 0 0 12px rgba(var(--accent-red-rgb), 0.6);
    opacity: 0;
    transition: opacity 0.9s ease;
}
.neon-stage.ready .neon-subtitle { opacity: 1; }

@media (max-width: 768px) {
    .neon-title { font-size: clamp(1.1rem, 6vw, 2.2rem); }
    .neon-subtitle { font-size: 0.68rem; letter-spacing: 4px; }
    .neon-stage { padding: 20px 0; margin: 20px 0 30px; }
    .n-letter { -webkit-text-stroke-width: 1.5px; }
}

/* ============================================================
   BUTTON FX — wrapper с размытым градиентным свечением
   ============================================================ */
.btn-fx {
    position: relative;
    display: inline-block;
    padding: 2px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    transition: transform 0.35s ease;
    isolation: isolate;
}
.btn-fx::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    z-index: -1;
    filter: blur(0);
    transition: filter 0.4s ease;
}
.btn-fx:hover::before { filter: blur(20px); }
.btn-fx:active::before { filter: blur(8px); }
.btn-fx > .btn {
    display: flex;
    border-radius: 12px !important;
    box-shadow: none !important;
    transform: none !important;
}
.btn-fx:hover { transform: translateY(-2px); }

.btn-fx.btn-fx-outline {
    background: linear-gradient(135deg, rgba(var(--accent-red-rgb), 0.35), rgba(var(--accent-red-rgb), 0.08));
}
.btn-fx.btn-fx-outline::before {
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
}
.btn-fx.btn-fx-outline > .btn {
    background: var(--bg-primary);
    border: none;
}

/* ============================================================
   CARD GRID BACKGROUND + DOT RUNNER → BORDER ON HOVER
   ============================================================ */
.feature-card {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 22px 22px;
    background-position: center center;
}
.pricing-card {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Угловой мягкий glow — оставляем */
.feature-card::after,
.pricing-card::after {
    content: '';
    position: absolute;
    top: -20px; left: -20px;
    width: 220px;
    height: 60px;
    border-radius: 100px;
    background: radial-gradient(circle, rgba(var(--accent-red-rgb), 0.35), transparent 70%);
    filter: blur(28px);
    opacity: 0.5;
    pointer-events: none;
    transform-origin: 0 0;
    transform: rotate(35deg);
    z-index: 0;
}

/* Точка/рамка вокруг карточки.
   .dot-runner — span внутри карточки с маской на border.
   ::before — бегающая точка (idle).
   ::after — полная рамка (hover, crossfade). */
.dot-runner {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 3;
    padding: 2px;
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    overflow: hidden;
}

.dot-runner::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 400%;
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%) rotate(0deg);
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        transparent 340deg,
        rgba(var(--accent-red-rgb), 0.9) 352deg,
        rgba(255, 255, 255, 1) 360deg
    );
    animation: dotSpin 8s linear infinite;
    pointer-events: none;
}

.dot-runner::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 400%;
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%) rotate(0deg);
    background: conic-gradient(
        from 0deg,
        rgba(var(--accent-red-rgb), 0.4) 0deg,
        rgba(255, 255, 255, 0.9) 45deg,
        rgba(var(--accent-red-rgb), 0.55) 90deg,
        rgba(255, 255, 255, 0.9) 135deg,
        rgba(var(--accent-red-rgb), 0.55) 180deg,
        rgba(255, 255, 255, 0.9) 225deg,
        rgba(var(--accent-red-rgb), 0.55) 270deg,
        rgba(255, 255, 255, 0.9) 315deg,
        rgba(var(--accent-red-rgb), 0.4) 360deg
    );
    animation: dotSpin 8s linear infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

@keyframes dotSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Hover: точка ускоряется и появляется полная рамка */
.feature-card:hover .dot-runner::before,
.pricing-card:hover .dot-runner::before {
    animation: dotSpinFast 1.2s linear infinite;
}
.feature-card:hover .dot-runner::after,
.pricing-card:hover .dot-runner::after {
    opacity: 1;
    animation: dotSpinFast 1.2s linear infinite;
}

@keyframes dotSpinFast {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================================
   FEATURES
   ============================================================ */
.features { background: linear-gradient(180deg, transparent 0%, var(--bg-secondary) 100%); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 22px;
}
.feature-card {
    background: var(--bg-glass);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 34px 28px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
    isolation: isolate;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 22px 22px, 22px 22px;
    background-position: center center, center center;
}
.feature-card::before {
    content: '';
    position: absolute; inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg,
        rgba(var(--accent-red-rgb), 0.5),
        transparent 40%,
        transparent 60%,
        rgba(var(--accent-red-rgb), 0.25));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 2;
}
.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(var(--accent-red-rgb), 0.15);
    background-color: var(--bg-card-hover);
}
.feature-card:hover::before { opacity: 1; }
.feature-card > * { z-index: 2; }
.feature-card > .dot-runner { z-index: 5; }

.feature-glow {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(var(--accent-red-rgb), 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}
.feature-card:hover .feature-glow { opacity: 1; }

.feature-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, rgba(var(--accent-red-rgb), 0.16), rgba(var(--accent-red-rgb), 0.04));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red-light);
    margin-bottom: 22px;
    border: 1px solid rgba(var(--accent-red-rgb), 0.18);
}
.feature-icon svg { width: 30px; height: 30px; }

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.feature-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.65;
}

/* ============================================================
   PRICING
   ============================================================ */
.pricing { background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-tertiary) 50%, var(--bg-secondary) 100%); }

.referral-banner {
    background:
        radial-gradient(120% 100% at 0% 0%, rgba(var(--accent-red-rgb), 0.1), transparent 55%),
        radial-gradient(120% 100% at 100% 100%, rgba(var(--accent-red-rgb), 0.06), transparent 60%),
        var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(var(--accent-red-rgb), 0.15);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    text-align: center;
    max-width: 820px;
    margin: 0 auto 52px;
    position: relative;
    overflow: hidden;
}
.referral-banner-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, rgba(var(--accent-red-rgb), 0.16), rgba(var(--accent-red-rgb), 0.05));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red-light);
    margin: 0 auto 18px;
    border: 1px solid rgba(var(--accent-red-rgb), 0.22);
    box-shadow: 0 0 24px -8px rgba(var(--accent-red-rgb), 0.5);
}
.referral-banner h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.referral-banner p { color: var(--text-secondary); margin-bottom: 22px; font-size: 0.95rem; }

.referral-stats {
    display: flex;
    justify-content: center;
    gap: 44px;
    margin-top: 26px;
    flex-wrap: wrap;
}
.referral-stat { text-align: center; }
.referral-stat-icon {
    width: 40px; height: 40px;
    background: rgba(var(--accent-red-rgb), 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red-light);
    margin: 0 auto 8px;
    border: 1px solid rgba(var(--accent-red-rgb), 0.18);
}
.referral-stat-num {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}
.referral-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.pricing-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 22px;
    max-width: 1080px;
    margin: 0 auto;
}

.pricing-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 300px;
    max-width: 340px;
    min-width: 260px;
    min-height: 480px;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 38px 30px 34px;
    text-align: center;
    transition: transform 0.4s ease, border-color 0.3s ease, box-shadow 0.35s ease, background-color 0.3s ease;
    isolation: isolate;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 20px 20px, 20px 20px;
}

.pricing-card > * {z-index: 2; }
.pricing-card > .dot-runner { z-index: 5; }

.pricing-card::before {
    content: '';
    position: absolute; inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg,
        rgba(var(--accent-red-rgb), 0.55),
        transparent 45%,
        transparent 55%,
        rgba(var(--accent-red-rgb), 0.3));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 1;
}
.pricing-card:hover {
    transform: translateY(-5px);
    border-color: rgba(var(--accent-red-rgb), 0.2);
    background-color: var(--bg-card-hover);
}
.pricing-card:hover::before { opacity: 1; }

.pricing-card.featured {
    border-color: rgba(var(--accent-red-rgb), 0.35);
    box-shadow: 0 0 50px -15px rgba(var(--accent-red-rgb), 0.4);
    transform: scale(1.03);
}
.pricing-card.featured:hover { transform: scale(1.03) translateY(-5px); }

.pricing-badge {
    position: absolute;
    top: -1px; left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    color: #fff;
    padding: 6px 22px;
    border-radius: 0 0 12px 12px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    box-shadow: 0 4px 20px -4px rgba(var(--accent-red-rgb), 0.5);
    z-index: 6;
    white-space: nowrap;
}

.pricing-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}
.pricing-price {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 6px;
    color: var(--text-primary);
    white-space: nowrap;
}
.pricing-currency {
    font-size: 1.15rem !important;
    color: var(--accent-red-light) !important;
    font-weight: 500;
}
.pricing-period {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 26px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.pricing-features {
    list-style: none;
    text-align: left;
    margin: 0 0 30px;
    padding: 0;
    flex: 1 1 auto;
}
.pricing-features li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li::before {
    content: '✓';
    color: var(--accent-red);
    font-weight: 700;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}
.pricing-features li.disabled {
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.45;
}
.pricing-features li.disabled::before { content: '×'; color: var(--text-muted); }

.pricing-card .btn,
.pricing-card .btn-fx { width: 100%; margin-top: auto; }
.pricing-card .btn-fx > .btn { width: 100%; justify-content: center; }

/* Extended pricing */
.pricing-extended { display: none; opacity: 0; transition: all 0.5s ease; margin-top: 42px; }
.pricing-extended.show { display: block; opacity: 1; }
.pricing-extended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
}
.pricing-extended-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.25s ease, box-shadow 0.3s ease;
}
.pricing-extended-card:hover {
    border-color: rgba(var(--accent-red-rgb), 0.35);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px -16px rgba(var(--accent-red-rgb), 0.4);
}
.pricing-extended-card.featured-extended {
    border-color: rgba(var(--accent-red-rgb), 0.32);
    box-shadow: 0 0 30px -10px rgba(var(--accent-red-rgb), 0.35);
}
.pricing-extended-name {
    font-family: var(--font-display);
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.pricing-extended-price {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 14px;
    line-height: 1;
}
.pricing-extended-price span {
    font-size: 0.95rem;
    color: var(--accent-red-light);
    font-weight: 500;
}

.show-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 44px auto 0;
    padding: 13px 30px;
    background: transparent;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.show-more-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red-light);
    background: rgba(var(--accent-red-rgb), 0.05);
    box-shadow: 0 0 22px -8px rgba(var(--accent-red-rgb), 0.5);
}
.show-more-btn svg { transition: transform 0.3s ease; }
.show-more-btn.active svg { transform: rotate(180deg); }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-it-works { background: var(--bg-primary); }
.steps { max-width: 820px; margin: 0 auto; }
.step {
    position: relative;
    display: flex;
    gap: 28px;
    padding-bottom: 40px;
}
.step:last-child { padding-bottom: 0; }

.step-num {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--accent-red);
    opacity: 0.22;
    line-height: 1;
    min-width: 78px;
    text-align: center;
    letter-spacing: -2px;
}
.step-content {
    flex: 1;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 28px 30px;
    position: relative;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.step-content:hover {
    border-color: rgba(var(--accent-red-rgb), 0.22);
    box-shadow: 0 16px 40px -22px rgba(var(--accent-red-rgb), 0.4);
    transform: translateX(4px);
}
.step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(var(--accent-red-rgb), 0.08);
    border-radius: 10px;
    border: 1px solid rgba(var(--accent-red-rgb), 0.18);
    color: var(--accent-red-light);
    margin-bottom: 14px;
}
.step-content h3 {
    font-family: var(--font-display);
    font-size: 1.08rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.step-content p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.65; }
.step-content code {
    background: rgba(var(--accent-red-rgb), 0.1);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.78rem;
    color: var(--accent-red-light);
    word-break: break-all;
    font-family: 'Consolas', 'Courier New', monospace;
}
.step-line {
    position: absolute;
    left: 38px; top: 70px; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(var(--accent-red-rgb), 0.35), transparent);
}
.step:last-child .step-line { display: none; }

/* ============================================================
   SAFETY
   ============================================================ */
.safety { background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%); }
.safety-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.safety-visual { position: relative; }
.safety-img-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-soft);
    box-shadow: 0 20px 60px -30px rgba(var(--accent-red-rgb), 0.4);
}
.safety-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
    filter: saturate(1.15) contrast(1.05);
}
.safety-img-wrapper:hover .safety-img { transform: scale(1.05); }
.safety-img-glow {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(var(--accent-red-rgb), 0.22) 100%);
    pointer-events: none;
}
.safety-content .section-tag { margin-bottom: 16px; }
.safety-content .section-title { margin-bottom: 36px; }
.safety-points { display: flex; flex-direction: column; gap: 22px; }
.safety-point { display: flex; gap: 16px; align-items: flex-start; }
.safety-check {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: 0 0 20px -4px rgba(var(--accent-red-rgb), 0.6);
}
.safety-point h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--text-primary);
}
.safety-point p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }

/* ============================================================
   DOWNLOAD CTA
   ============================================================ */
.download { padding: 60px 0 100px; }
.download-card {
    position: relative;
    background:
        radial-gradient(120% 100% at 0% 0%, rgba(var(--accent-red-rgb), 0.08), transparent 55%),
        radial-gradient(120% 100% at 100% 100%, rgba(var(--accent-red-rgb), 0.05), transparent 60%),
        var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(var(--accent-red-rgb), 0.15);
    border-radius: var(--radius-xl);
    padding: 56px 48px;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}
.download-card::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg,
        rgba(var(--accent-red-rgb), 0.5),
        transparent 40%,
        transparent 60%,
        rgba(var(--accent-red-rgb), 0.3));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}
.download-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(var(--accent-red-rgb), 0.14) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.download-content { position: relative; z-index: 1; }
.download-content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 14px;
}
.download-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 540px;
    margin: 0 auto 36px;
    line-height: 1.7;
}
.download-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}
.download-meta { color: var(--text-muted); font-size: 0.82rem; }
.download-requirements {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: rgba(6, 6, 10, 0.85);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-soft);
    padding: 60px 0 28px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { color: var(--text-muted); font-size: 0.88rem; max-width: 300px; line-height: 1.65; }
.footer-links h4 {
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.25s ease;
}
.footer-links a:hover { color: var(--accent-red-light); }
.footer-bottom {
    border-top: 1px solid var(--border-soft);
    padding-top: 26px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* ============================================================
   AUTH PAGES v2 — анимированные формы
   ============================================================ */

@property --spin {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* ---------- Страница ---------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 110px 24px 60px;
    position: relative;
}
.auth-page::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 40%, rgba(var(--accent-red-rgb), 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 60%, rgba(var(--accent-red-rgb), 0.06) 0%, transparent 50%);
    pointer-events: none;
}

/* ---------- Карточка ---------- */
.auth-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-radius: var(--radius-xl);
    padding: 44px 38px;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.55),
        0 0 70px -35px rgba(var(--accent-red-rgb), 0.55);
    overflow: hidden;
    isolation: isolate;
    animation: authCardIn 0.85s cubic-bezier(0.25, 0.8, 0.3, 1) both;
}

/* Внутренняя сетка */
.auth-card::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: center center;
    pointer-events: none;
    z-index: 0;
}

/* Вращающаяся коническая рамка вокруг карточки */
.auth-card::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(
        from var(--spin, 0deg),
        transparent 0deg,
        transparent 210deg,
        rgba(var(--accent-red-rgb), 0.65) 265deg,
        rgba(255, 255, 255, 0.9) 300deg,
        rgba(var(--accent-red-rgb), 0.65) 335deg,
        transparent 360deg
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    animation: spinSlow 8s linear infinite;
    z-index: 1;
    opacity: 0.85;
}

.auth-card > * { position: relative; z-index: 2; }

@keyframes spinSlow   { to { --spin: 360deg; } }
@keyframes spinFast   { to { --spin: 360deg; } }

@keyframes authCardIn {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.97);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* ---------- Шапка карточки ---------- */
.auth-header { text-align: center; margin-bottom: 30px; }
.auth-header .logo {
    justify-content: center;
    margin-bottom: 22px;
    animation: fadeInUp 0.7s 0.1s cubic-bezier(0.25, 0.8, 0.3, 1) both;
}
.auth-header .logo .logo-img {
    filter:
        drop-shadow(0 0 12px rgba(var(--accent-red-rgb), 0.5))
        drop-shadow(0 0 26px rgba(var(--accent-red-rgb), 0.25));
}
.auth-header h1 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
    animation: fadeInUp 0.7s 0.15s cubic-bezier(0.25, 0.8, 0.3, 1) both;
}
.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    animation: fadeInUp 0.7s 0.2s cubic-bezier(0.25, 0.8, 0.3, 1) both;
}

/* ---------- Форма ---------- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.3px;
    transition: color 0.25s ease;
}
.form-group:focus-within label { color: var(--accent-red-light); }

/* Fallback-стили для «сырых» инпутов (страницы вне auth — workshop и т.п.) */
.form-group > input,
.form-group > select,
.form-group > textarea {
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 13px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    outline: none;
    width: 100%;
}
.form-group > input:focus,
.form-group > select:focus,
.form-group > textarea:focus {
    border-color: var(--accent-red);
    background: #0d0d12;
    box-shadow: 0 0 0 3px rgba(var(--accent-red-rgb), 0.1),
                0 0 22px -10px rgba(var(--accent-red-rgb), 0.5);
}
.form-group > input::placeholder,
.form-group > textarea::placeholder { color: var(--text-muted); }

/* ---------- Обёртка с анимированной рамкой ---------- */
.input-wrap {
    position: relative;
    border-radius: var(--radius-md);
    isolation: isolate;
    transition: box-shadow 0.35s ease;
}

/* Вращающийся блик (idle / hover / focus) */
.input-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(
        from var(--spin, 0deg),
        transparent 0deg,
        transparent 250deg,
        rgba(var(--accent-red-rgb), 0.85) 320deg,
        rgba(255, 255, 255, 0.95) 355deg,
        rgba(var(--accent-red-rgb), 0.85) 360deg
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: spinFast 4s linear infinite;
    pointer-events: none;
    z-index: 2;
}

.input-wrap:hover::before        { opacity: 0.55; }
.input-wrap:focus-within::before {
    opacity: 1;
    animation-duration: 1.6s;
}

/* Внешнее мягкое свечение на focus */
.input-wrap:focus-within {
    box-shadow:
        0 0 0 3px rgba(var(--accent-red-rgb), 0.07),
        0 10px 38px -14px rgba(var(--accent-red-rgb), 0.55);
}

.input-wrap input,
.input-wrap select,
.input-wrap textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: inherit;
    padding: 13px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: border-color 0.25s ease, background 0.25s ease;
    outline: none;
    position: relative;
    z-index: 1;
}
.input-wrap input:focus {
    background: #0d0d12;
    border-color: transparent;
}
.input-wrap input::placeholder,
.input-wrap textarea::placeholder { color: var(--text-muted); }

/* Пароль с кнопкой «глаз» */
.input-wrap.with-toggle input { padding-right: 48px; }

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.25s ease, background 0.25s ease;
    z-index: 3;
}
.password-toggle:hover {
    color: var(--accent-red-light);
    background: rgba(var(--accent-red-rgb), 0.08);
}
.password-toggle svg { width: 18px; height: 18px; }

/* Крупный код (2FA / verify) */
.input-code input {
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 10px;
    padding-left: 26px; /* компенсация letter-spacing */
    text-indent: 10px;
}

/* ---------- Прочее ---------- */
.form-error { color: var(--text-danger); font-size: 0.8rem; margin-top: 4px; }
.form-hint  { color: var(--text-muted); font-size: 0.78rem; margin-top: 4px; }

.auth-submit {
    width: 100%;
    margin-top: 8px;
    animation: fadeInUp 0.7s 0.25s cubic-bezier(0.25, 0.8, 0.3, 1) both;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 22px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-soft), transparent);
}

.auth-footer {
    text-align: center;
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--border-soft);
}
.auth-footer p { color: var(--text-secondary); font-size: 0.88rem; }
.auth-footer a {
    color: var(--accent-red-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.25s ease;
}
.auth-footer a:hover { color: var(--accent-red); text-decoration: underline; }

.auth-links {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    margin-top: 8px;
}
.auth-links a { color: var(--text-muted); text-decoration: none; transition: color 0.25s ease; }
.auth-links a:hover { color: var(--accent-red-light); }
/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(8px);
}
.alert-success {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: var(--accent-green-light);
}
.alert-error {
    background: rgba(var(--accent-red-rgb), 0.08);
    border: 1px solid rgba(var(--accent-red-rgb), 0.25);
    color: var(--accent-red-light);
}
.alert-info {
    background: rgba(var(--accent-red-rgb), 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard { padding-top: 110px; min-height: 100vh; }
.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 80px;
}
.sidebar {
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    height: fit-content;
    position: sticky;
    top: 100px;
}
.sidebar-user {
    text-align: center;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 22px;
}
.sidebar-avatar {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 0 auto 12px;
    box-shadow: 0 0 24px -6px rgba(var(--accent-red-rgb), 0.6);
}
.sidebar-user h3 { font-family: var(--font-display); font-size: 0.95rem; margin-bottom: 4px; }
.sidebar-user p { color: var(--text-muted); font-size: 0.78rem; }

.sidebar-nav { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.25s ease;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    background: rgba(var(--accent-red-rgb), 0.08);
    color: var(--text-primary);
}
.sidebar-nav a.active {
    border-left: 3px solid var(--accent-red);
    padding-left: 11px;
}
.sidebar-nav svg, .admin-nav svg { width: 20px; height: 20px; flex-shrink: 0; }

.main-content { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.content-card {
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 28px;
}
.content-card h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.stat-card {
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 22px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent-red), var(--accent-red-dark));
    opacity: 0.7;
}
.stat-card:hover {
    border-color: rgba(var(--accent-red-rgb), 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px -20px rgba(var(--accent-red-rgb), 0.5);
}
.stat-card-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
}
.stat-card-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-red-light);
    line-height: 1;
}

.referral-code-box {
    background: var(--bg-input);
    border: 1px dashed rgba(var(--accent-red-rgb), 0.4);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.referral-code {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 3px;
}
.copy-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.82rem;
    font-family: var(--font-body);
    transition: all 0.25s ease;
}
.copy-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red-light);
    background: rgba(var(--accent-red-rgb), 0.06);
}

/* ============================================================
   ADMIN
   ============================================================ */
.admin-page { min-height: 100vh; padding-top: 90px; background: transparent; }
.admin-login-card { max-width: 420px; margin: 80px auto; }

.admin-sidebar {
    width: 260px;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border-right: 1px solid var(--border-soft);
    min-height: calc(100vh - 65px);
    position: fixed;
    left: 0; top: 65px;
    padding: 22px 0;
    z-index: 100;
    overflow-y: auto;
    max-height: calc(100vh - 65px);
}
.admin-sidebar-header {
    padding: 0 22px 18px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 14px;
}
.admin-sidebar-header h3 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--accent-red-light);
    text-transform: uppercase;
    letter-spacing: 2px;
}
.admin-sidebar-header p { color: var(--text-muted); font-size: 0.75rem; margin-top: 4px; }

.admin-nav { list-style: none; padding: 0; }
.admin-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 22px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
}
.admin-nav li a:hover, .admin-nav li a.active {
    background: rgba(var(--accent-red-rgb), 0.08);
    color: var(--text-primary);
    border-left-color: var(--accent-red);
}
.admin-nav li a.active { color: var(--accent-red-light); }

.admin-main {
    margin-left: 260px;
    padding: 30px 32px 60px;
    min-height: calc(100vh - 90px);
    min-width: 0;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 16px;
    flex-wrap: wrap;
}
.admin-header h1 { font-family: var(--font-display); font-size: 1.65rem; }
.admin-badge {
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    color: #fff;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    box-shadow: 0 4px 16px -6px rgba(var(--accent-red-rgb), 0.6);
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}
.admin-stat-card {
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.25s ease;
}
.admin-stat-card:hover {
    border-color: rgba(var(--accent-red-rgb), 0.3);
    transform: translateY(-2px);
}
.admin-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-red-dark));
    opacity: 0.8;
}
.admin-stat-icon { font-size: 1.5rem; margin-bottom: 10px; color: var(--accent-red-light); }
.admin-stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1;
}
.admin-stat-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}
.admin-stat-change { font-size: 0.78rem; margin-top: 8px; font-weight: 500; }
.admin-stat-change.positive { color: var(--accent-green-light); }
.admin-stat-change.negative { color: var(--accent-red-light); }

.admin-table-wrapper {
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin-bottom: 30px;
}
.admin-table-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.admin-table-header h3 { font-family: var(--font-display); font-size: 1.02rem; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.admin-table th {
    text-align: left;
    padding: 13px 22px;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}
.admin-table td {
    padding: 13px 22px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.admin-table tr:hover td { background: rgba(var(--accent-red-rgb), 0.03); }
.admin-table tr:last-child td { border-bottom: none; }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}
.status-badge::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.status-badge.active { background: rgba(34, 197, 94, 0.1); color: var(--accent-green-light); border: 1px solid rgba(34, 197, 94, 0.22); }
.status-badge.inactive { background: rgba(100, 100, 100, 0.1); color: var(--text-muted); border: 1px solid rgba(100, 100, 100, 0.2); }
.status-badge.premium { background: rgba(var(--accent-red-rgb), 0.1); color: var(--accent-red-light); border: 1px solid rgba(var(--accent-red-rgb), 0.25); }
.status-badge.ultimate { background: rgba(var(--accent-red-rgb), 0.14); color: #fecaca; border: 1px solid rgba(var(--accent-red-rgb), 0.35); }
.status-badge.free { background: rgba(100, 100, 100, 0.1); color: var(--text-muted); border: 1px solid rgba(100, 100, 100, 0.2); }

.admin-chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-bottom: 30px;
}
.admin-chart-card {
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 22px;
}
.admin-chart-card h3 { font-family: var(--font-display); font-size: 0.95rem; margin-bottom: 18px; }

.progress-bar {
    width: 100%; height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}
.progress-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.progress-fill.red { background: linear-gradient(90deg, var(--accent-red), var(--accent-red-light)); }
.progress-fill.purple { background: linear-gradient(90deg, var(--accent-purple), var(--accent-purple-light)); }
.progress-fill.green { background: linear-gradient(90deg, #059669, var(--accent-green-light)); }

.log-entry {
    display: flex;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.82rem;
    flex-wrap: wrap;
}
.log-entry:last-child { border-bottom: none; }
.log-time { color: var(--text-muted); font-family: 'Consolas', monospace; font-size: 0.78rem; min-width: 150px; }
.log-action { color: var(--accent-red-light); font-weight: 600; min-width: 120px; }
.log-user { color: var(--accent-purple-light); min-width: 100px; }
.log-ip { color: var(--text-muted); font-size: 0.78rem; }
.log-details { color: var(--text-secondary); flex: 1; min-width: 0; word-break: break-word; }

/* ============================================================
   WORKSHOP / MODERATION / PROMOCODES
   ============================================================ */
.workshop-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.workshop-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.workshop-panel h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.workshop-panel h3 svg { color: var(--accent-red-light); }

.author-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 16px;
}
.author-status.approved { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.25); color: var(--accent-green-light); }
.author-status.pending { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.25); color: var(--accent-orange); }
.author-status.rejected { background: rgba(var(--accent-red-rgb), 0.1); border: 1px solid rgba(var(--accent-red-rgb), 0.25); color: var(--accent-red-light); }
.author-status.none { background: rgba(var(--accent-red-rgb), 0.06); border: 1px solid rgba(var(--accent-red-rgb), 0.18); color: var(--text-secondary); }

.workshop-skins {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}
.ws-skin-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.25s ease, box-shadow 0.3s ease;
}
.ws-skin-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--accent-red-rgb), 0.35);
    box-shadow: 0 14px 36px -22px rgba(var(--accent-red-rgb), 0.5);
}
.ws-skin-preview {
    position: relative;
    aspect-ratio: 16 / 10;
    background: radial-gradient(circle at 50% 60%, rgba(var(--accent-red-rgb), 0.15), transparent 70%), var(--bg-input);
    overflow: hidden;
}
.ws-skin-preview img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
    transition: transform 0.5s ease;
}
.ws-skin-card:hover .ws-skin-preview img { transform: scale(1.06); }
.ws-skin-body { padding: 14px 16px 16px; }
.ws-skin-name { font-weight: 700; font-size: 0.92rem; margin-bottom: 6px; }
.ws-skin-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.ws-skin-author { font-size: 0.75rem; color: var(--text-muted); }
.ws-skin-author strong { color: var(--text-secondary); }
.ws-skin-hero { font-size: 0.75rem; color: var(--text-muted); }

.tag {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 9px;
    border-radius: 999px;
}
.tag.rarity-common { color: #b0c3d9; background: rgba(176, 195, 217, 0.12); }
.tag.rarity-uncommon { color: #5e98d9; background: rgba(94, 152, 217, 0.12); }
.tag.rarity-rare { color: #6c85ff; background: rgba(75, 105, 255, 0.14); }
.tag.rarity-mythical { color: #a06bff; background: rgba(136, 71, 255, 0.14); }
.tag.rarity-legendary { color: #e05ce8; background: rgba(211, 44, 230, 0.13); }
.tag.rarity-immortal { color: #e4ae39; background: rgba(228, 174, 57, 0.13); }
.tag.rarity-arcana { color: #ade55a; background: rgba(173, 229, 90, 0.12); }
.tag.tier-free { color: var(--text-muted); background: rgba(255, 255, 255, 0.06); }
.tag.tier-premium { color: var(--accent-red-light); background: rgba(var(--accent-red-rgb), 0.14); }
.tag.tier-ultimate { color: #fecaca; background: rgba(var(--accent-red-rgb), 0.22); }
.tag.status-pending { color: var(--accent-orange); background: rgba(245, 158, 11, 0.12); }
.tag.status-approved { color: var(--accent-green-light); background: rgba(34, 197, 94, 0.12); }
.tag.status-rejected { color: var(--accent-red-light); background: rgba(var(--accent-red-rgb), 0.12); }

.upload-form .form-group { margin-bottom: 14px; }
.upload-form input,
.upload-form select,
.upload-form textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 11px 14px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.upload-form input:focus,
.upload-form select:focus,
.upload-form textarea:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(var(--accent-red-rgb), 0.1);
}
.upload-form label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.file-hint { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }

.moderation-card {
    display: grid;
    grid-template-columns: 130px 1fr auto;
    gap: 18px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 14px;
    align-items: center;
}
.moderation-card img.mod-thumb {
    width: 130px; height: 82px;
    object-fit: cover;
    object-position: center 20%;
    border-radius: var(--radius-md);
    background: var(--bg-input);
    display: block;
}
.mod-info h4 { font-family: var(--font-display); font-size: 0.95rem; margin-bottom: 4px; }
.mod-info p { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 6px; }
.mod-actions { display: flex; flex-direction: column; gap: 8px; min-width: 170px; }
.mod-actions textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 8px 10px;
    font-size: 0.78rem;
    font-family: var(--font-body);
    resize: vertical;
    outline: none;
}
.author-request {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 8px 0;
    white-space: pre-wrap;
    border: 1px solid var(--border-soft);
}

.promo-type-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.promo-type-badge.subscription { color: var(--accent-red-light); background: rgba(var(--accent-red-rgb), 0.14); }
.promo-type-badge.donate { color: var(--text-secondary); background: rgba(255, 255, 255, 0.06); }

.promo-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}
.promo-form-grid .form-group { margin-bottom: 0; }
.code-chip {
    font-family: 'Consolas', monospace;
    font-weight: 700;
    color: #fff;
    background: var(--bg-input);
    border: 1px dashed rgba(var(--accent-red-rgb), 0.4);
    padding: 4px 12px;
    border-radius: 8px;
    letter-spacing: 1px;
}

/* ============================================================
   DONATE
   ============================================================ */
.donate-page { max-width: 1100px; margin: 0 auto; padding: 112px 20px 80px; }
.donate-hero { text-align: center; margin-bottom: 34px; }
.donate-hero h1 {
    font-family: var(--font-display);
    font-size: 2.1rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff, var(--accent-red-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.donate-hero p { color: var(--text-secondary); }

.donate-layout { display: grid; grid-template-columns: 1fr 380px; gap: 22px; align-items: start; }
.donate-card {
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 26px;
}
.donate-card h3 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 16px; }

.amount-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.amount-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-weight: 600;
    padding: 14px 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.92rem;
}
.amount-btn:hover {
    border-color: rgba(var(--accent-red-rgb), 0.4);
    color: #fff;
    transform: translateY(-1px);
}
.amount-btn.active {
    border-color: var(--accent-red);
    color: #fff;
    background: rgba(var(--accent-red-rgb), 0.12);
    box-shadow: 0 0 16px -4px rgba(var(--accent-red-rgb), 0.5);
}

.donate-summary {
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 16px 0;
    font-size: 0.88rem;
}
.donate-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    color: var(--text-secondary);
}
.donate-summary-row.total {
    border-top: 1px solid var(--border-soft);
    margin-top: 6px;
    padding-top: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
}
.donate-summary-row .discount { color: var(--accent-green-light); }
.bonus-badge {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--accent-green-light);
    background: rgba(34, 197, 94, 0.12);
    border-radius: 999px;
    padding: 2px 8px;
    margin-left: 6px;
}

.donate-steps { display: grid; gap: 10px; }
.donate-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}
.donate-step-num {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    color: #fff;
}
.donate-step p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.55; }
.donate-step p strong { color: var(--text-primary); }

.demo-pay-banner {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 0.78rem;
    margin-bottom: 18px;
}

.form-step-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    margin: 18px 0 10px;
}
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 6px;
}
.service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--svc-accent) 16%, transparent), transparent 75%);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.service-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--svc-accent) 45%, transparent);
}
.service-card:hover::before { opacity: 1; }
.service-card.active {
    border-color: var(--svc-accent);
    box-shadow: 0 0 0 1px var(--svc-accent), 0 0 18px -4px var(--svc-accent);
}
.service-card.active::before { opacity: 1; }
.service-glyph {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--svc-accent) 30%, var(--svc-color)), var(--svc-color));
    border: 1px solid color-mix(in srgb, var(--svc-accent) 45%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    position: relative;
    z-index: 1;
}
.service-name { font-size: 0.76rem; font-weight: 600; text-align: center; position: relative; z-index: 1; }
.service-bonus {
    position: absolute;
    top: 6px; right: 6px;
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--accent-green-light);
    background: rgba(34, 197, 94, 0.12);
    padding: 1px 7px;
    border-radius: 999px;
    z-index: 1;
}
.donate-services-mini { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.svc-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--svc-accent, var(--accent-red));
    box-shadow: 0 0 8px -2px var(--svc-accent, var(--accent-red));
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .safety-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .admin-sidebar {
        display: block;
        position: static;
        width: auto;
        min-height: 0;
        max-height: none;
        padding: 12px;
        border-right: none;
        border-bottom: 1px solid var(--border-soft);
    }
    .admin-sidebar-header { display: none; }
    .admin-nav { display: flex; flex-wrap: wrap; gap: 4px; }
    .admin-nav li a { padding: 10px 12px; border-radius: 8px; border-left: none; }
    .admin-nav li a.active { border-left: none; }
    .admin-main { margin-left: 0; }
    .admin-chart-row { grid-template-columns: 1fr; }
    .workshop-grid { grid-template-columns: 1fr; }
    .donate-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    section { padding: 70px 0; }
    .section-header { margin-bottom: 44px; }
    .navbar { position: sticky; top: 0; }
    .nav-container { flex-wrap: wrap; gap: 12px; }

    .mobile-menu-btn { display: flex; }
    .nav-links { display: none; }
    .nav-links.active {
        display: flex;
        flex-direction: column;
        order: 3;
        width: 100%;
        max-height: 70vh;
        overflow-y: auto;
        padding: 14px;
        gap: 8px;
        background: var(--bg-glass);
        backdrop-filter: blur(20px);
        border: 1px solid var(--border-soft);
        border-radius: var(--radius-md);
    }
    .nav-links.active li { width: 100%; }
    .nav-links.active a { width: 100%; padding: 10px 14px; justify-content: flex-start; }
    .nav-links.active .nav-cta { text-align: center; justify-content: center; }

    .hero-neon { padding: 100px 20px 60px; }
    .neon-title { font-size: clamp(1.1rem, 6vw, 2.2rem); }
    .neon-subtitle { font-size: 0.68rem; letter-spacing: 4px; }
    .neon-stage { padding: 20px 0; margin: 20px 0 30px; }
    .n-letter { -webkit-text-stroke-width: 1.5px; }

    .hero-stats { gap: 28px; }
    .stat-num { font-size: 1.9rem; }

    .features-grid { grid-template-columns: 1fr; }
    .step { flex-direction: column; gap: 14px; }
    .step-num { min-width: auto; text-align: left; font-size: 2rem; }
    .step-line { left: 20px; top: 56px; }

    .referral-stats { flex-direction: column; gap: 18px; }
    .pricing-grid { flex-direction: column; align-items: stretch; }
    .pricing-card { max-width: 100%; min-height: auto; }
    .pricing-card.featured { transform: none; }
    .pricing-card.featured:hover { transform: translateY(-5px); }
    .pricing-extended-grid { grid-template-columns: repeat(2, 1fr); }

    .download-card { padding: 40px 24px; }
    .footer-grid { grid-template-columns: 1fr; gap: 26px; }

    .dashboard-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .admin-main { padding: 22px 16px 60px; }
    .admin-header h1 { font-size: 1.35rem; }
    .admin-stats-grid { grid-template-columns: 1fr 1fr; }
    .donate-hero h1 { font-size: 1.6rem; }
    .donate-card, .workshop-panel { padding: 20px; }
    .moderation-card { grid-template-columns: 1fr; }
    .mod-actions { min-width: 0; }
    .promo-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn-fx { width: 100%; }
    .hero-buttons .btn-fx > .btn { width: 100%; }
    .auth-card { padding: 32px 24px; }
    .stats-row { grid-template-columns: 1fr; }
    .admin-stats-grid { grid-template-columns: 1fr; }
    .pricing-extended-grid { grid-template-columns: 1fr; }
    .amount-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    body::before { animation: none; opacity: 0.3; }
}

/* ============================================================
   V4 ADDITIONS — card, catalog, modal, magic-link
   ============================================================ */

/* ---------- Универсальная карточка ---------- */
.card {
    position: relative;
    background: var(--bg-glass);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 26px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
    isolation: isolate;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: -60%; left: -60%;
    width: 220%; height: 220%;
    background: radial-gradient(circle, rgba(var(--accent-red-rgb), 0.09) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
    z-index: 0;
}
.card:hover::before { opacity: 1; }
.card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--accent-red-rgb), 0.25);
    box-shadow: 0 20px 44px -22px rgba(var(--accent-red-rgb), 0.45);
}
.card > * { position: relative; z-index: 1; }
.card h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

/* ---------- Кнопка с бликом ---------- */
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::before {
    content: "";
    position: absolute;
    top: 0; left: -100px;
    width: 100px; height: 100%;
    background: linear-gradient(120deg,
        rgba(255,255,255,0) 30%,
        rgba(255,255,255,0.75),
        rgba(255,255,255,0) 70%);
    opacity: 0.5;
    transition: left 0.6s ease;
    pointer-events: none;
}
.btn-shine:hover::before { left: 100%; }

/* ---------- Инпут с анимированной рамкой ---------- */
.input-animated {
    position: relative;
    border-radius: var(--radius-md);
    background: var(--bg-input);
    transition: box-shadow 0.3s ease;
}
.input-animated::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(
        from var(--spin, 0deg),
        transparent 0deg,
        transparent 260deg,
        var(--accent-red) 300deg,
        #fff 340deg,
        var(--accent-red) 360deg
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: spinSlow 5s linear infinite;
    pointer-events: none;
    z-index: 2;
}
.input-animated:focus-within::after { opacity: 1; }
.input-animated input,
.input-animated select,
.input-animated textarea {
    background: transparent;
    border: 1px solid var(--border-soft);
    border-radius: inherit;
    color: var(--text-primary);
    padding: 11px 14px;
    width: 100%;
    outline: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
    transition: background 0.25s ease, border-color 0.25s ease;
}
.input-animated:focus-within input,
.input-animated:focus-within select,
.input-animated:focus-within textarea { background: #0d0d12; border-color: transparent; }

/* ---------- Workshop layout ---------- */
.workshop-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}
.workshop-main { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.workshop-sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 100px; }

/* Фильтры каталога */
.catalog-filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 18px;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
}
.catalog-filters .input-animated input,
.catalog-filters .input-animated select { font-size: 0.85rem; padding: 10px 12px; }

/* Сетка каталога */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

/* Карточка скина */
.skin-card { padding: 0; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.skin-card .skin-preview {
    position: relative;
    aspect-ratio: 16 / 10;
    background: radial-gradient(circle at 50% 60%, rgba(var(--accent-red-rgb), 0.14), transparent 70%), var(--bg-input);
    overflow: hidden;
}
.skin-card .skin-preview img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transition: transform 0.5s ease;
    display: block;
}
.skin-card:hover .skin-preview img { transform: scale(1.06); }
.skin-card .skin-preview .tag {
    position: absolute;
    top: 8px; left: 8px;
    backdrop-filter: blur(6px);
}
.skin-card .skin-preview .status-float {
    position: absolute;
    top: 8px; right: 8px;
}
.skin-card .skin-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.skin-card .skin-name {
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}
.skin-card .skin-hero { font-size: 0.78rem; color: var(--text-muted); }
.skin-card .skin-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: 8px;
}
.skin-card .skin-author { font-size: 0.75rem; color: var(--text-secondary); }
.skin-card .skin-author strong { color: var(--accent-red-light); font-weight: 600; }
.skin-card .skin-downloads { font-size: 0.72rem; color: var(--text-muted); }

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ---------- Модальное окно ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal.active { opacity: 1; pointer-events: auto; }
.modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(var(--accent-red-rgb), 0.2);
    border-radius: var(--radius-xl);
    max-width: 820px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.3, 1);
    box-shadow: 0 30px 80px -20px rgba(var(--accent-red-rgb), 0.4);
}
.modal.active .modal-content { transform: translateY(0) scale(1); }
.modal-close {
    position: absolute;
    top: 14px; right: 18px;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 2;
}
.modal-close:hover {
    color: var(--accent-red-light);
    border-color: var(--accent-red);
    transform: rotate(90deg);
}
.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
.modal-gallery img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
}
.modal-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 6px;
}
.modal-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.modal-desc {
    color: var(--text-secondary);
    line-height: 1.65;
    font-size: 0.92rem;
    margin-bottom: 20px;
}
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Magic Link success ---------- */
.magic-success {
    text-align: center;
    padding: 30px 10px;
}
.magic-success-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--accent-red-rgb), 0.2), rgba(var(--accent-red-rgb), 0.05));
    border: 1px solid rgba(var(--accent-red-rgb), 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red-light);
    margin: 0 auto 18px;
    animation: pulse-dot 2.5s ease-in-out infinite;
}
.magic-success h2 { margin-bottom: 10px; }
.magic-success p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }

/* ---------- 2FA / QR ---------- */
.qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 22px;
    background: #fff;
    border-radius: var(--radius-lg);
    max-width: 240px;
    margin: 20px auto;
    box-shadow: 0 12px 40px -12px rgba(var(--accent-red-rgb), 0.5);
}
.qr-wrapper img { width: 100%; display: block; }
.qr-wrapper small { color: #333; font-size: 0.72rem; text-align: center; }

.totp-secret {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg-input);
    border: 1px dashed rgba(var(--accent-red-rgb), 0.4);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin: 14px 0;
    font-family: 'Consolas', monospace;
    font-size: 0.82rem;
    color: var(--text-primary);
    word-break: break-all;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .workshop-layout { grid-template-columns: 1fr; }
    .workshop-sidebar { position: static; }
    .catalog-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .catalog-filters { grid-template-columns: 1fr; }
    .catalog-grid { grid-template-columns: 1fr; }
    .modal-content { padding: 22px; }
    .modal-gallery { grid-template-columns: 1fr 1fr; }
}
/* ============================================================
   PAGE TRANSITIONS + STABLE LAYOUT
   ============================================================ */

/* --- Плавное появление страницы --- */
@keyframes pageFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes contentRiseIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

body {
    animation: pageFadeIn 0.28s ease both;
}

/* Контент внутри main-content появляется каскадом */
.main-content > * {
    animation: contentRiseIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.main-content > *:nth-child(1) { animation-delay: 0.02s; }
.main-content > *:nth-child(2) { animation-delay: 0.07s; }
.main-content > *:nth-child(3) { animation-delay: 0.12s; }
.main-content > *:nth-child(4) { animation-delay: 0.16s; }
.main-content > *:nth-child(5) { animation-delay: 0.20s; }

/* --- View Transitions API: кросс-страничная анимация (Chrome 111+, Safari 18+, Edge 111+) --- */
@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.3s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

::view-transition-old(sidebar),
::view-transition-new(sidebar) {
    animation: none;
    mix-blend-mode: normal;
}
::view-transition-old(main),
::view-transition-new(main) {
    animation-duration: 0.32s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Фиксируем сайдбар и main как именованные области — тогда при навигации 
   сайдбар НЕ будет двигаться, а main-content плавно проявится */
.sidebar    { view-transition-name: sidebar; }
.main-content { view-transition-name: main; }

/* --- Стабильный сайдбар: не дёргается при смене активной страницы --- */
.sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }

/* Пункты меню: активный индикатор через псевдоэлемент,
   а не через border-left — это исключает сдвиг padding на 3px */
.sidebar-nav a {
    position: relative;
    padding: 11px 14px 11px 14px;
    border-left: 3px solid transparent;  /* держим место, но не показываем */
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.sidebar-nav a.active {
    border-left-color: var(--accent-red);
    padding-left: 11px;                   /* компенсируем 3px border */
}

/* Аватар/юзер всегда одной высоты, чтобы сайдбар не прыгал */
.sidebar-user {
    min-height: 132px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Иконки в сайдбаре — единый размер вне зависимости от страницы */
.sidebar-nav svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* --- Кнопки, ссылки: мгновенный отклик без резких transition --- */
.btn, .nav-links a, .sidebar-nav a, .copy-btn, .show-more-btn {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Прелоадер сверху: невидимая полоска, появляется при навигации --- */
#page-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-red-light));
    box-shadow: 0 0 12px rgba(var(--accent-red-rgb), 0.8);
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}
#page-progress.active {
    opacity: 1;
    width: 80%;
    transition: width 2s cubic-bezier(0.2, 0.8, 0.3, 1), opacity 0.15s ease;
}
#page-progress.done {
    width: 100%;
    opacity: 0;
    transition: width 0.25s ease-out, opacity 0.35s ease 0.1s;
}
/* ============================================================
   V5 — APP SHELL, AVATAR, SPA, CATALOG V2, SETTINGS
   ============================================================ */

:root {
    --app-sidebar-w: 260px;
    --app-radius: 16px;
    --glass-bg: rgba(13, 13, 16, 0.72);
    --glass-border: rgba(255, 255, 255, 0.06);
}

/* Тёмная/цветные темы */
[data-theme="red"]    { --accent-red: #dc2626; --accent-red-dark: #7f1d1d; --accent-red-light: #f87171; --accent-red-rgb: 220, 38, 38; }
[data-theme="crimson"] { --accent-red: #e11d48; --accent-red-dark: #881337; --accent-red-light: #fb7185; --accent-red-rgb: 225, 29, 72; }
[data-theme="purple"] { --accent-red: #a855f7; --accent-red-dark: #6b21a8; --accent-red-light: #c084fc; --accent-red-rgb: 168, 85, 247; }
[data-theme="cyan"]   { --accent-red: #06b6d4; --accent-red-dark: #0e7490; --accent-red-light: #22d3ee; --accent-red-rgb: 6, 182, 212; }
[data-theme="emerald"] { --accent-red: #10b981; --accent-red-dark: #065f46; --accent-red-light: #34d399; --accent-red-rgb: 16, 185, 129; }
[data-theme="amber"]  { --accent-red: #f59e0b; --accent-red-dark: #92400e; --accent-red-light: #fbbf24; --accent-red-rgb: 245, 158, 11; }
[data-theme="gold"]   { --accent-red: #f59e0b; --accent-red-dark: #b45309; --accent-red-light: #fbbf24; --accent-red-rgb: 245, 158, 11; }
[data-theme="mono"]   { --accent-red: #9ca3af; --accent-red-dark: #374151; --accent-red-light: #d1d5db; --accent-red-rgb: 156, 163, 175; }

/* ---------- App shell ---------- */
.app-shell {
    display: grid;
    grid-template-columns: var(--app-sidebar-w) minmax(0, 1fr);
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 96px 24px 80px;
    min-height: 100vh;
}

/* ---------- SPA main ---------- */
#spa-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
#spa-main.is-leaving { opacity: 0.35; transform: translateY(8px); }
#spa-main.is-entering { animation: spaEnter 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes spaEnter {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Прогресс-бар сверху */
#page-progress {
    position: fixed; top: 0; left: 0;
    height: 2px; width: 0;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-red-light));
    box-shadow: 0 0 14px rgba(var(--accent-red-rgb), 0.85);
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: width 1.8s cubic-bezier(0.2, 0.8, 0.3, 1), opacity 0.2s ease;
}
#page-progress.active { opacity: 1; width: 82%; }
#page-progress.done   { width: 100%; opacity: 0; transition: width 0.25s ease, opacity 0.3s ease 0.1s; }

/* ---------- Сайдбар v2 ---------- */
.sidebar {
    position: sticky;
    top: 92px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid var(--glass-border);
    border-radius: var(--app-radius);
    padding: 22px 18px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }

/* Юзер-блок */
.sidebar-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 8px 0 22px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 16px;
}
.sidebar-user h3 {
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}
.sidebar-user p {
    color: var(--text-muted);
    font-size: 0.76rem;
    margin: 0;
    word-break: break-all;
    max-width: 100%;
}

/* Аватар */
.avatar {
    position: relative;
    width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow:
        0 0 0 2px rgba(0,0,0,0.6),
        0 0 0 3px rgba(var(--accent-red-rgb), 0.35),
        0 8px 24px -8px rgba(var(--accent-red-rgb), 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.avatar.sm { width: 36px; height: 36px; font-size: 0.9rem; box-shadow: 0 0 0 2px rgba(0,0,0,0.5), 0 0 0 3px rgba(var(--accent-red-rgb),0.3); }
.avatar.lg { width: 120px; height: 120px; font-size: 2.6rem; }

/* Аватар с загрузкой */
.avatar-editable {
    position: relative;
    cursor: pointer;
    display: inline-block;
}
.avatar-editable .avatar-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0,0,0,0.65);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.avatar-editable:hover .avatar-overlay { opacity: 1; }
.avatar-editable:hover .avatar { transform: scale(1.02); }
.avatar-editable input[type="file"] { display: none; }

/* ---------- Навигация в сайдбаре ---------- */
.sidebar-nav { list-style: none; display: flex; flex-direction: column; gap: 2px; padding: 0; }
.sidebar-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}
.sidebar-nav a::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    width: 3px; height: 0;
    background: var(--accent-red);
    border-radius: 0 3px 3px 0;
    transform: translateY(-50%);
    transition: height 0.25s ease;
}
.sidebar-nav a:hover { background: rgba(var(--accent-red-rgb), 0.06); color: var(--text-primary); }
.sidebar-nav a.active {
    background: linear-gradient(90deg, rgba(var(--accent-red-rgb), 0.14), rgba(var(--accent-red-rgb), 0.04));
    color: #fff;
}
.sidebar-nav a.active::before { height: 60%; }
.sidebar-nav svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Карточки ---------- */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid var(--glass-border);
    border-radius: var(--app-radius);
    padding: 24px;
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.card-hover:hover {
    border-color: rgba(var(--accent-red-rgb), 0.25);
    box-shadow: 0 16px 40px -22px rgba(var(--accent-red-rgb), 0.45);
    transform: translateY(-2px);
}

/* Заголовки карточек */
.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text-primary);
}
.card-title svg { color: var(--accent-red-light); width: 20px; height: 20px; }

/* ---------- Stats ---------- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.stat-card {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease;
}
.stat-card:hover { border-color: rgba(var(--accent-red-rgb), 0.3); transform: translateY(-2px); }
.stat-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent-red), transparent);
}
.stat-card-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
}
.stat-card-value {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.05;
}

/* ---------- Кнопки (унификация) ---------- */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
}
.btn-icon:hover {
    color: var(--accent-red-light);
    border-color: rgba(var(--accent-red-rgb), 0.4);
    background: rgba(var(--accent-red-rgb), 0.08);
}

/* ---------- Toasts ---------- */
#toasts {
    position: fixed;
    top: 82px; right: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 340px;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    background: rgba(15, 15, 18, 0.95);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(var(--accent-red-rgb), 0.25);
    border-left: 3px solid var(--accent-red);
    border-radius: 12px;
    padding: 13px 16px;
    color: var(--text-primary);
    font-size: 0.88rem;
    box-shadow: 0 16px 40px -18px rgba(0,0,0,0.75);
    transform: translateX(120%);
    animation: toastIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.toast.success { border-left-color: #22c55e; }
.toast.error   { border-left-color: var(--accent-red); }
.toast.info    { border-left-color: #60a5fa; }
@keyframes toastIn { to { transform: translateX(0); } }
.toast.hide { animation: toastOut 0.3s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(120%); } }

/* ---------- Алерты (для тех что были) ---------- */
.alert {
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.25); color: var(--accent-green-light); }
.alert-error   { background: rgba(var(--accent-red-rgb),0.08); border: 1px solid rgba(var(--accent-red-rgb),0.25); color: var(--accent-red-light); }
.alert-info    { background: rgba(96,165,250,0.08); border: 1px solid rgba(96,165,250,0.25); color: #93c5fd; }

/* ---------- Модалка ---------- */
.modal {
    position: fixed; inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.modal.active { opacity: 1; pointer-events: auto; }
.modal-content {
    background: #0b0b0f;
    border: 1px solid rgba(var(--accent-red-rgb), 0.25);
    border-radius: 20px;
    max-width: 900px; width: 100%;
    max-height: 90vh; overflow-y: auto;
    padding: 28px;
    position: relative;
    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 40px 100px -30px rgba(var(--accent-red-rgb), 0.5);
}
.modal.active .modal-content { transform: translateY(0) scale(1); }
.modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; line-height: 1;
    transition: all 0.25s ease;
    z-index: 3;
}
.modal-close:hover { color: var(--accent-red-light); border-color: var(--accent-red); transform: rotate(90deg); }

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}
.modal-gallery img {
    width: 100%; aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    transition: transform 0.3s ease;
}
.modal-gallery img:hover { transform: scale(1.02); }

/* ---------- Каталог v2 ---------- */
.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 14px;
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: var(--app-radius);
    position: sticky;
    top: 76px;
    z-index: 50;
}
.catalog-search {
    flex: 1 1 220px;
    position: relative;
}
.catalog-search input {
    width: 100%;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 11px 14px 11px 40px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.catalog-search input:focus {
    border-color: rgba(var(--accent-red-rgb), 0.5);
    box-shadow: 0 0 0 3px rgba(var(--accent-red-rgb), 0.1);
}
.catalog-search svg {
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}
.catalog-select {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 10px 30px 10px 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    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='%23808089' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.25s ease;
}
.catalog-select:hover, .catalog-select:focus { border-color: rgba(var(--accent-red-rgb), 0.4); }

.catalog-view-toggle {
    display: flex;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 3px;
}
.catalog-view-toggle button {
    width: 34px; height: 30px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
}
.catalog-view-toggle button.active { background: rgba(var(--accent-red-rgb), 0.15); color: var(--accent-red-light); }

/* Чипсы быстрых фильтров */
.catalog-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.chip:hover { border-color: rgba(var(--accent-red-rgb), 0.35); color: var(--text-primary); }
.chip.active {
    background: rgba(var(--accent-red-rgb), 0.14);
    border-color: rgba(var(--accent-red-rgb), 0.5);
    color: var(--accent-red-light);
}

/* Сетка карточек */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}
.catalog-grid.list-view {
    grid-template-columns: 1fr;
}

/* Карточка скина */
.skin-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.25s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.skin-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--accent-red-rgb), 0.35);
    box-shadow: 0 20px 44px -22px rgba(var(--accent-red-rgb), 0.55);
}
.skin-card .skin-preview {
    position: relative;
    aspect-ratio: 16/10;
    background: radial-gradient(circle at 50% 60%, rgba(var(--accent-red-rgb), 0.12), transparent 70%), #050505;
    overflow: hidden;
}
.skin-card .skin-preview img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center 20%;
    transition: transform 0.5s ease;
    display: block;
}
.skin-card:hover .skin-preview img { transform: scale(1.06); }
.skin-card .skin-preview .rarity-tag {
    position: absolute;
    top: 10px; left: 10px;
    backdrop-filter: blur(6px);
    background: rgba(0,0,0,0.6);
}
.skin-card .skin-preview .tier-tag {
    position: absolute;
    top: 10px; right: 10px;
    backdrop-filter: blur(6px);
    background: rgba(0,0,0,0.6);
}
.skin-card .skin-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.skin-card .skin-name {
    font-family: var(--font-display);
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.skin-card .skin-hero {
    font-size: 0.78rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.skin-card .skin-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.74rem;
    color: var(--text-secondary);
}
.skin-card .skin-foot strong { color: var(--accent-red-light); font-weight: 600; }

/* Вид списка */
.catalog-grid.list-view .skin-card {
    flex-direction: row;
    align-items: stretch;
}
.catalog-grid.list-view .skin-card .skin-preview {
    width: 220px; flex-shrink: 0;
    aspect-ratio: auto;
    min-height: 130px;
}
.catalog-grid.list-view .skin-card .skin-body {
    padding: 18px 22px;
    justify-content: center;
}

/* Пустое состояние */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}
.empty-state svg {
    width: 54px; height: 54px;
    color: rgba(var(--accent-red-rgb), 0.35);
    margin-bottom: 16px;
}

/* ---------- Скелетон загрузки ---------- */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 100%);
    background-size: 200% 100%;
    animation: skeleton 1.5s linear infinite;
    border-radius: 8px;
}
@keyframes skeleton { to { background-position: -200% 0; } }

/* ---------- Settings ---------- */
.settings-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
}
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tab {
    background: transparent;
    border: none;
    padding: 12px 18px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color 0.25s ease;
}
.settings-tab:hover { color: var(--text-primary); }
.settings-tab.active { color: var(--accent-red-light); }
.settings-tab.active::after {
    content: '';
    position: absolute;
    left: 12px; right: 12px;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
    border-radius: 2px;
}
.settings-panel { display: none; }
.settings-panel.active { display: block; animation: spaEnter 0.3s ease both; }

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-label { font-size: 0.9rem; font-weight: 500; color: var(--text-primary); }
.settings-row-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px; height: 24px;
    flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 24px;
    transition: background 0.25s ease;
}
.switch-slider::before {
    content: '';
    position: absolute;
    height: 18px; width: 18px;
    left: 3px; top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.switch input:checked + .switch-slider {
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    box-shadow: 0 0 14px -2px rgba(var(--accent-red-rgb), 0.6);
}
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* Выбор темы */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}
.theme-option {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.35);
    text-align: center;
    transition: all 0.25s ease;
}
.theme-option:hover { border-color: rgba(255,255,255,0.2); }
.theme-option.active {
    border-color: var(--theme-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-color) 18%, transparent);
}
.theme-swatch {
    width: 44px; height: 44px;
    border-radius: 12px;
    margin: 0 auto 10px;
    background: linear-gradient(135deg, var(--theme-color), var(--theme-color-dark));
    box-shadow: 0 0 20px -4px var(--theme-color);
}
.theme-name {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
}
.theme-option.active .theme-name { color: var(--text-primary); }

/* ---------- Профиль - hero ---------- */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 26px;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(var(--accent-red-rgb), 0.15), transparent 55%),
        var(--glass-bg);
    border: 1px solid rgba(var(--accent-red-rgb), 0.15);
    border-radius: var(--app-radius);
    flex-wrap: wrap;
}
.profile-hero-info { flex: 1; min-width: 0; }
.profile-hero-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-hero-email {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 12px;
    word-break: break-all;
}
.profile-hero-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.badge-pill.red    { background: rgba(var(--accent-red-rgb), 0.12); color: var(--accent-red-light); border: 1px solid rgba(var(--accent-red-rgb), 0.3); }
.badge-pill.green  { background: rgba(34,197,94,0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.badge-pill.yellow { background: rgba(245,158,11,0.12); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
    .app-shell { grid-template-columns: 1fr; padding-top: 88px; }
    .sidebar {
        position: static;
        max-height: none;
        display: flex;
        gap: 12px;
        padding: 14px;
        overflow-x: auto;
        overflow-y: hidden;
        align-items: center;
    }
    .sidebar-user {
        flex-direction: row;
        gap: 12px;
        padding: 0;
        border-bottom: none;
        margin-bottom: 0;
        min-width: max-content;
        border-right: 1px solid rgba(255,255,255,0.05);
        padding-right: 12px;
    }
    .sidebar-user h3, .sidebar-user p { text-align: left; }
    .sidebar-nav { flex-direction: row; gap: 4px; }
    .sidebar-nav a { padding: 8px 12px; min-width: max-content; }
    .sidebar-nav a::before { display: none; }
}
@media (max-width: 640px) {
    .app-shell { padding: 84px 16px 60px; }
    .catalog-toolbar { padding: 10px; top: 70px; }
    .catalog-grid { grid-template-columns: 1fr; }
    .profile-hero { flex-direction: column; text-align: center; }
    .profile-hero-info { text-align: center; }
    .profile-hero-badges { justify-content: center; }
    #toasts { left: 16px; right: 16px; max-width: none; }
}
/* ============================================================
   ADMIN PANEL V2
   ============================================================ */

/* --- Быстрый блок выдачи дней --- */
.grant-days-card {
    background: linear-gradient(135deg, rgba(var(--accent-red-rgb), 0.1), rgba(var(--accent-red-rgb), 0.02));
    border: 1px solid rgba(var(--accent-red-rgb), 0.3);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 22px;
}
.grant-days-card .card-title { margin-bottom: 14px; }
.grant-days-form {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr auto;
    gap: 12px;
    align-items: end;
}
@media (max-width: 900px) {
    .grant-days-form { grid-template-columns: 1fr; }
}

/* --- Moderation tabs --- */
.mod-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 22px;
    overflow-x: auto;
    scrollbar-width: none;
}
.mod-tabs::-webkit-scrollbar { display: none; }
.mod-tab {
    background: transparent;
    border: none;
    padding: 12px 18px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.mod-tab:hover { color: var(--text-primary); }
.mod-tab.active { color: var(--accent-red-light); }
.mod-tab.active::after {
    content: '';
    position: absolute;
    left: 12px; right: 12px; bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
    border-radius: 2px;
}
.mod-tab-count {
    background: rgba(var(--accent-red-rgb), 0.15);
    color: var(--accent-red-light);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    min-width: 20px;
    text-align: center;
}
.mod-panel { display: none; }
.mod-panel.active { display: block; animation: spaEnter 0.3s ease both; }

/* --- Moderation card --- */
.mod-card {
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 14px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.mod-card:hover {
    border-color: rgba(var(--accent-red-rgb), 0.3);
    box-shadow: 0 12px 32px -18px rgba(var(--accent-red-rgb), 0.4);
}
.mod-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.mod-card-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-word;
}
.mod-card-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-left: auto;
}
.mod-card-body {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    margin-bottom: 4px;
}
@media (max-width: 640px) {
    .mod-card-body { grid-template-columns: 1fr; }
}
.mod-thumb-lg {
    width: 150px;
    height: 96px;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: var(--bg-input);
    display: block;
}
.mod-author-avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 0 24px -6px rgba(var(--accent-red-rgb), 0.6);
    overflow: hidden;
}
.mod-author-avatar img {
    width: 100%; height: 100%; object-fit: cover;
}
.mod-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}
.mod-info-row strong { color: var(--text-primary); }
.mod-info-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.65;
    margin-bottom: 10px;
}
.mod-contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.1);
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.3);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Consolas', monospace;
}
.mod-contact.discord { background: rgba(88, 101, 242, 0.12); color: #818cf8; border-color: rgba(88, 101, 242, 0.35); }
.mod-contact.telegram { background: rgba(41, 172, 229, 0.12); color: #38bdf8; border-color: rgba(41, 172, 229, 0.35); }

.mod-works-gallery {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.mod-works-gallery a {
    display: block;
    width: 100px;
    height: 66px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    transition: transform 0.25s ease, border-color 0.25s ease;
    cursor: zoom-in;
}
.mod-works-gallery a:hover {
    transform: scale(1.05);
    border-color: var(--accent-red);
}
.mod-works-gallery img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

.mod-actions-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.04);
    margin-top: 14px;
    align-items: center;
}
.mod-actions-row input[type="text"] {
    flex: 1;
    min-width: 200px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.25s ease;
}
.mod-actions-row input[type="text"]:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(var(--accent-red-rgb), 0.1);
}
.mod-actions-row .btn { white-space: nowrap; }

.mod-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}
.mod-actions-stack .btn { width: 100%; justify-content: center; }

/* --- Admin toolbar --- */
.admin-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
}
.admin-toolbar .catalog-search { flex: 1; min-width: 220px; }

/* --- Admin user row with avatar --- */
.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-cell .avatar.sm { flex-shrink: 0; }

/* --- Empty state --- */
.admin-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.admin-empty svg {
    width: 48px; height: 48px;
    color: rgba(var(--accent-red-rgb), 0.3);
    margin-bottom: 14px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
/* ============================================================
   WORKSHOP PROMO (главная)
   ============================================================ */
.workshop-promo {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}
.workshop-promo::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 80%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-red-rgb), 0.3), transparent);
}

.workshop-promo-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
}
@media (max-width: 900px) {
    .workshop-promo-grid { grid-template-columns: 1fr; gap: 40px; }
}

.workshop-promo-content .section-tag { margin-bottom: 16px; }
.workshop-promo-content .section-title {
    text-align: left;
    margin-bottom: 18px;
}

.workshop-benefits {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 28px;
}
.workshop-benefit {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.workshop-benefit-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(var(--accent-red-rgb), 0.16), rgba(var(--accent-red-rgb), 0.04));
    border: 1px solid rgba(var(--accent-red-rgb), 0.22);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red-light);
    box-shadow: 0 0 20px -8px rgba(var(--accent-red-rgb), 0.6);
}
.workshop-benefit-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}
.workshop-benefit h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.workshop-benefit p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.65;
    margin: 0;
}

/* Визуал-превью */
/* === Визуал-превью мастерской === */
.workshop-promo-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 420px;
    perspective: 1200px;
}

/* Контейнер сцены — реагирует на курсор */
.workshop-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Карточки */
.workshop-preview-card {
    position: absolute;
    width: 260px;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(var(--accent-red-rgb), 0.25);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px -22px rgba(var(--accent-red-rgb), 0.55);
    transition:
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.4s ease,
        border-color 0.4s ease;
    will-change: transform;
}

/* Передняя карточка (главная) */
.workshop-preview-card.primary {
    z-index: 3;
    transform: translateY(-12px) rotate(-4deg);
}

/* Задняя карточка (декор) */
.workshop-preview-card.secondary {
    z-index: 1;
    transform: rotate(-10deg) translate(-40px, 40px) scale(0.92);
    opacity: 0.55;
    filter: saturate(0.7);
}

/* --- Ховер: сцена наклоняется, карточки разъезжаются --- */
.workshop-promo-visual:hover .workshop-stage {
    transform: rotateX(2deg) rotateY(-3deg);
}

.workshop-promo-visual:hover .workshop-preview-card.primary {
    transform: translateY(-24px) rotate(-2deg) translateZ(40px);
    border-color: rgba(var(--accent-red-rgb), 0.55);
    box-shadow:
        0 40px 80px -30px rgba(var(--accent-red-rgb), 0.8),
        0 0 60px -20px rgba(var(--accent-red-rgb), 0.5);
}

.workshop-promo-visual:hover .workshop-preview-card.secondary {
    transform: rotate(-6deg) translate(-70px, 60px) scale(0.96);
    opacity: 0.85;
    filter: saturate(1);
}

/* Внутренняя подсветка карточки при ховере */
.workshop-preview-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
        rgba(var(--accent-red-rgb), 0.18),
        transparent 55%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.workshop-promo-visual:hover .workshop-preview-card.primary::after {
    opacity: 1;
}

/* Превью картинки */
.workshop-preview-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: radial-gradient(circle at 50% 60%, rgba(var(--accent-red-rgb), 0.18), transparent 70%), var(--bg-input);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.workshop-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.workshop-promo-visual:hover .workshop-preview-card.primary .workshop-preview-image img {
    transform: scale(1.08);
}
.workshop-preview-body {
    padding: 14px 16px 16px;
}
.workshop-preview-name {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.workshop-preview-author {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.workshop-preview-author strong { color: var(--accent-red-light); }

/* Свечение позади карточек */
.workshop-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(var(--accent-red-rgb), 0.2) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
    animation: heroGlowBreathe 6s ease-in-out infinite alternate;
    transition: opacity 0.5s ease;
}
.workshop-promo-visual:hover .workshop-glow {
    opacity: 1.3;
}

/* Адаптив */
@media (max-width: 900px) {
    .workshop-promo-visual { min-height: 360px; }
    .workshop-preview-card { width: 220px; }
}
@media (max-width: 640px) {
    .workshop-promo-visual { min-height: auto; }
    .workshop-preview-card { position: relative; width: 100%; max-width: 320px; margin: 0 auto; }
    .workshop-preview-card.secondary { display: none; }
    .workshop-promo-visual:hover .workshop-stage { transform: none; }
}

@media (max-width: 640px) {
    .workshop-preview-card { position: relative; }
    .workshop-promo-visual { min-height: auto; flex-direction: column; gap: 16px; }
    .workshop-promo-visual .workshop-preview-card:nth-child(2) { display: none; }
}

/* ============================================================
   MODAL FIX — гарантируем что SVG центрируется
   ============================================================ */
.modal-content svg { display: block; }
.modal-content a.btn,
.modal-content button.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* Кнопки-модалки на всю ширину */
.modal-content .btn[style*="width:100%"] { display: flex; }
/* ============================================================
   AC MODALS (главная) — изолированные, без пересечений
   ============================================================ */
.ac-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.ac-modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}
.ac-modal {
    background: #0b0b0f;
    border: 1px solid rgba(var(--accent-red-rgb), 0.3);
    border-radius: 20px;
    max-width: 460px;
    width: 100%;
    padding: 40px 28px 28px;
    text-align: center;
    position: relative;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow:
        0 30px 80px -20px rgba(var(--accent-red-rgb), 0.5),
        0 0 0 1px rgba(var(--accent-red-rgb), 0.08);
}
.ac-modal-backdrop.open .ac-modal {
    transform: scale(1) translateY(0);
}
.ac-modal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--accent-red-rgb), 0.22), rgba(var(--accent-red-rgb), 0.05));
    border: 1px solid rgba(var(--accent-red-rgb), 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red-light);
    box-shadow: 0 0 40px -12px rgba(var(--accent-red-rgb), 0.75);
}
.ac-modal-icon svg {
    width: 32px;
    height: 32px;
    display: block;
}
.ac-modal h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 12px;
    letter-spacing: -0.3px;
}
.ac-modal p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.65;
    margin: 0 0 24px;
}
.ac-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0;
    font-family: Arial, sans-serif;
    transition: all 0.25s ease;
    z-index: 2;
}
.ac-modal-close:hover {
    color: var(--accent-red-light);
    border-color: var(--accent-red);
    background: rgba(var(--accent-red-rgb), 0.12);
    transform: rotate(90deg);
}
.ac-modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.ac-modal-actions .btn {
    flex: 1;
    min-width: 130px;
    justify-content: center;
    display: inline-flex;
    align-items: center;
}
/* ============================================================
   RESPONSIVE / MOBILE / TABLET — финальная адаптация
   ============================================================ */

/* ---------- Общие правила: тач-таргеты ---------- */
@media (hover: none) {
    .btn,
    .sidebar-nav a,
    .nav-links a,
    .catalog-select,
    .catalog-search input,
    .copy-btn,
    .show-more-btn,
    .mod-tab,
    .settings-tab,
    .chip {
        min-height: 40px;
    }
    .btn-sm { min-height: 34px; }
    .btn-icon { min-height: 36px; min-width: 36px; }
}

/* ============================================================
   TABLET — 1024px и меньше
   ============================================================ */
@media (max-width: 1024px) {

    /* --- APP SHELL (кабинет и админка) --- */
    .app-shell {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 84px 16px 60px;
    }

    /* Сайдбар сверху — горизонтальная полоса */
    .sidebar {
        position: sticky;
        top: 68px;
        z-index: 40;
        max-height: none;
        padding: 12px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        border-radius: 14px;
        background: rgba(10, 10, 14, 0.85);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
    .sidebar-user {
        flex-direction: row;
        gap: 12px;
        padding: 0 0 10px;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        min-height: 0;
        text-align: left;
        align-items: center;
    }
    .sidebar-user > div:last-child { flex: 1; min-width: 0; }
    .sidebar-user h3, .sidebar-user p { text-align: left; margin: 0; }
    .sidebar-user h3 { font-size: 0.9rem; }
    .sidebar-user p { font-size: 0.72rem; }
    .sidebar-user .avatar { width: 44px; height: 44px; font-size: 1rem; }

    .sidebar-nav {
        flex-direction: row;
        gap: 4px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
        margin: 0 -4px;
        padding-left: 4px;
        padding-right: 4px;
    }
    .sidebar-nav::-webkit-scrollbar { display: none; }
    .sidebar-nav li { flex-shrink: 0; }
    .sidebar-nav a {
        padding: 8px 12px;
        font-size: 0.82rem;
        gap: 6px;
        white-space: nowrap;
        border-radius: 10px;
    }
    .sidebar-nav a::before { display: none; }
    .sidebar-nav a.active { padding-left: 12px; }
    .sidebar-nav svg { width: 16px; height: 16px; }

    /* --- WORKSHOP LAYOUT --- */
    .workshop-layout { grid-template-columns: 1fr; gap: 18px; }
    .workshop-sidebar { position: static; }

    /* --- Каталог: тулбар --- */
    .catalog-toolbar {
        padding: 12px;
        gap: 8px;
        top: 68px;
        flex-wrap: wrap;
    }
    .catalog-search { flex: 1 1 100%; }
    .catalog-select { flex: 1 1 calc(50% - 4px); min-width: 0; }
    .catalog-view-toggle { margin-left: auto; }

    .catalog-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        margin: 0 -4px;
        padding-left: 4px;
        padding-right: 4px;
    }
    .catalog-chips::-webkit-scrollbar { display: none; }
    .chip { flex-shrink: 0; }

    /* --- admin charts --- */
    .admin-charts-row { grid-template-columns: 1fr !important; }
    .days-forms-row { grid-template-columns: 1fr !important; }
    .grant-days-form { grid-template-columns: 1fr; }

    /* --- Moderation --- */
    .mod-card-body { grid-template-columns: 1fr; }
    .mod-actions-row { flex-direction: column; align-items: stretch; }
    .mod-actions-row > form {
        flex: 0 0 auto !important;
        width: 100%;
        flex-direction: column;
    }
    .mod-actions-row input[type="text"] {
        width: 100%;
        min-width: 0;
    }
    .mod-actions-row .btn {
        width: 100%;
        justify-content: center;
    }

    /* --- Settings / Tabs --- */
    .settings-tabs { -webkit-overflow-scrolling: touch; }

    /* --- Модалки --- */
    .ac-modal-backdrop { padding: 16px; }
    .ac-modal { padding: 34px 20px 22px; }

    /* --- Профиль hero --- */
    .profile-hero { gap: 16px; padding: 20px; }
    .profile-hero .avatar.lg { width: 88px; height: 88px; font-size: 2rem; }
    .profile-hero-name { font-size: 1.25rem; }
}

/* ============================================================
   МОБИЛЬНЫЙ — 768px и меньше
   ============================================================ */
@media (max-width: 768px) {

    /* --- Общие отступы --- */
    .container { padding: 0 16px; }
    section { padding: 60px 0; }
    .section-header { margin-bottom: 36px; }
    .section-title { font-size: clamp(1.6rem, 6vw, 2.2rem); }

    /* --- Навбар --- */
    .navbar { padding: 10px 0; }
    .nav-container { padding: 0 16px; gap: 12px; }
    .logo-text { font-size: 1rem; }
    .logo-img { width: 32px !important; height: 32px !important; }

    /* --- HERO --- */
    .hero-neon { padding: 88px 16px 60px; min-height: auto; }
    .hero-badge { font-size: 0.65rem; letter-spacing: 1.5px; padding: 6px 14px; }
    .neon-title { font-size: clamp(1.1rem, 7.5vw, 2rem); letter-spacing: 0; }
    .neon-subtitle { font-size: 0.62rem; letter-spacing: 3px; }
    .neon-line.top-line { margin-bottom: 18px; }
    .neon-line.bottom-line { margin-top: 18px; }
    .neon-stage { padding: 16px 0; margin: 18px 0 24px; }

    .hero-desc { font-size: 0.92rem; margin-bottom: 28px; padding: 0 4px; }
    .hero-buttons { flex-direction: column; width: 100%; gap: 10px; margin-bottom: 40px; }
    .hero-buttons .btn-fx,
    .hero-buttons .btn { width: 100%; justify-content: center; }

    .hero-stats { gap: 24px; }
    .stat-num { font-size: 1.6rem; }
    .stat-label { font-size: 0.62rem; letter-spacing: 1.5px; }

    .scroll-indicator { display: none; }

    /* --- Features --- */
    .features-grid { grid-template-columns: 1fr; gap: 14px; }
    .feature-card { padding: 24px 20px; }

    /* --- Workshop promo --- */
    .workshop-promo { padding: 60px 0; }
    .workshop-promo-grid { gap: 32px; }
    .workshop-promo-content .section-title { text-align: center; }
    .workshop-promo-content .section-tag { display: block; text-align: center; }
    .workshop-promo-content .section-desc { text-align: center !important; }
    .workshop-benefit-icon { width: 42px; height: 42px; }
    .workshop-promo-visual { min-height: auto; }
    .workshop-preview-card { position: relative; width: 100%; max-width: 320px; margin: 0 auto; transform: none !important; }
    .workshop-preview-card.secondary { display: none; }

    /* --- Referral banner --- */
    .referral-banner { padding: 26px 20px; }
    .referral-banner h3 { font-size: 1.15rem; }
    .referral-stats { gap: 22px; }
    .referral-stat-num { font-size: 1.5rem; }
    .referral-stat-label { font-size: 0.65rem; }

    /* --- Pricing --- */
    .pricing-grid { flex-direction: column; align-items: stretch; gap: 16px; }
    .pricing-card {
        max-width: 100%;
        min-height: auto;
        padding: 30px 22px 26px;
    }
    .pricing-card.featured { transform: none; }
    .pricing-card.featured:hover { transform: translateY(-4px); }
    .pricing-price { font-size: 2.3rem; }
    .pricing-extended-grid { grid-template-columns: repeat(2, 1fr); }

    /* --- How it works --- */
    .step { flex-direction: column; gap: 12px; padding-bottom: 28px; }
    .step-num { min-width: auto; text-align: left; font-size: 1.7rem; }
    .step-line { left: 20px; top: 50px; }
    .step-content { padding: 20px 22px; }

    /* --- Safety --- */
    .safety-grid { gap: 28px; }

    /* --- Download --- */
    .download { padding: 40px 0 60px; }
    .download-card { padding: 32px 20px; border-radius: 16px; }
    .download-buttons { gap: 10px; }

    /* --- Footer --- */
    .footer { padding: 40px 0 22px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-brand p { max-width: none; }
    .footer-bottom { font-size: 0.7rem; padding-top: 20px; }

    /* --- Модалки --- */
    .ac-modal { max-width: 100%; padding: 34px 18px 20px; }
    .ac-modal h2 { font-size: 1.2rem; }
    .ac-modal p { font-size: 0.88rem; }
    .ac-modal-actions { flex-direction: column; }
    .ac-modal-actions .btn { width: 100%; }

    .modal-content { padding: 22px; border-radius: 16px; }
    .modal-gallery { grid-template-columns: 1fr 1fr; gap: 8px; }

    /* --- Кабинет: dashboard --- */
    .stats-row { grid-template-columns: 1fr 1fr; }
    .stat-card { padding: 16px 18px; }
    .stat-card-value { font-size: 1.4rem; }
    .stat-card-label { font-size: 0.65rem; }

    .profile-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
        padding: 22px 18px;
    }
    .profile-hero-info { text-align: center; width: 100%; }
    .profile-hero-name { font-size: 1.15rem; }
    .profile-hero-email { font-size: 0.8rem; }
    .profile-hero-badges { justify-content: center; }
    .profile-hero .btn { width: 100%; justify-content: center; }

    /* --- Формы --- */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* предотвращает зум на iOS */
    }

    /* --- Каталог workshop --- */
    .catalog-grid { grid-template-columns: 1fr; }
    .catalog-grid.list-view .skin-card { flex-direction: column; }
    .catalog-grid.list-view .skin-card .skin-preview {
        width: 100%;
        aspect-ratio: 16/10;
        min-height: auto;
    }
    .catalog-grid.list-view .skin-card .skin-body { padding: 14px 16px 16px; }

    .catalog-toolbar { padding: 10px; }
    .catalog-search input { padding: 10px 12px 10px 36px; font-size: 16px; }
    .catalog-select { font-size: 16px; padding: 9px 28px 9px 10px; }

    /* --- Сайдбар над контентом → ещё компактнее --- */
    .sidebar { top: 60px; padding: 10px; border-radius: 12px; }
    .sidebar-user { padding-bottom: 8px; }
    .sidebar-user .avatar { width: 38px; height: 38px; font-size: 0.9rem; }
    .sidebar-nav a { padding: 7px 10px; font-size: 0.76rem; }
    .sidebar-nav svg { width: 14px; height: 14px; }

    /* --- Settings --- */
    .settings-tabs { gap: 0; }
    .settings-tab { padding: 10px 14px; font-size: 0.82rem; }
    .settings-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .settings-row .switch { align-self: flex-start; }
    .settings-row .btn { align-self: stretch; width: 100%; justify-content: center; }
    .theme-grid { grid-template-columns: repeat(2, 1fr); }

    /* --- Subscription --- */
    .freeze-info-grid,
    .stats-row { grid-template-columns: 1fr 1fr; }

    /* --- Admin --- */
    .admin-header h1 { font-size: 1.3rem; }
    .admin-toolbar { padding: 12px; flex-direction: column; align-items: stretch; }
    .admin-toolbar .catalog-search { width: 100%; }
    .admin-toolbar .catalog-select { width: 100%; }
    .admin-toolbar .btn { width: 100%; justify-content: center; }

    /* Таблицы админки — горизонтальный скролл */
    .admin-table { min-width: 640px; font-size: 0.82rem; }
    .admin-table th,
    .admin-table td { padding: 10px 12px; }

    /* Промокоды — форма */
    .promo-form-grid { grid-template-columns: 1fr; }

    /* Модерация tabs */
    .mod-tabs { margin-bottom: 16px; }
    .mod-tab { padding: 10px 14px; font-size: 0.85rem; }

    /* Grant days */
    .grant-days-card { padding: 18px; }
    .grant-days-form { gap: 10px; }
    .grant-days-form button { width: 100%; justify-content: center; }

    /* Модерация: карточка */
    .mod-card { padding: 16px; }
    .mod-card-header { gap: 10px; }
    .mod-card-meta { margin-left: 0; flex: 1 1 100%; font-size: 0.72rem; }
    .mod-thumb-lg { width: 100%; height: 180px; }
    .mod-author-avatar { width: 52px; height: 52px; font-size: 1.2rem; }
    .mod-works-gallery a { width: 80px; height: 54px; }

    /* Toasts */
    #toasts {
        top: 64px;
        left: 12px;
        right: 12px;
        max-width: none;
    }
    .toast { font-size: 0.85rem; padding: 11px 14px; }
}

/* ============================================================
   МАЛЕНЬКИЕ ТЕЛЕФОНЫ — 480px и меньше
   ============================================================ */
@media (max-width: 480px) {

    .hero-badge { font-size: 0.6rem; padding: 5px 12px; letter-spacing: 1px; }
    .neon-title { font-size: clamp(1rem, 8vw, 1.6rem); }
    .n-letter { -webkit-text-stroke-width: 1.2px; }
    .neon-subtitle { font-size: 0.55rem; letter-spacing: 2px; }

    .hero-stats { gap: 16px; }
    .stat-num { font-size: 1.4rem; }

    /* --- Тарифы --- */
    .pricing-extended-grid { grid-template-columns: 1fr; }
    .pricing-price { font-size: 2rem; }
    .pricing-features li { font-size: 0.85rem; }

    /* --- Кабинет --- */
    .stats-row { grid-template-columns: 1fr; }
    .stat-card-value { font-size: 1.6rem; }

    .sidebar-nav a {
        padding: 8px 12px;
        font-size: 0.78rem;
    }
    .sidebar-user .avatar { width: 42px; height: 42px; }

    /* --- Формы --- */
    .auth-card { padding: 30px 20px; }
    .form-group label { font-size: 0.68rem; }

    /* --- Модалки --- */
    .modal-content { padding: 18px; }
    .modal-gallery { grid-template-columns: 1fr; }
    .ac-modal { padding: 30px 16px 18px; }
    .ac-modal-icon { width: 60px; height: 60px; margin-bottom: 16px; }
    .ac-modal-icon svg { width: 26px; height: 26px; }

    /* --- Footer --- */
    .footer-grid { grid-template-columns: 1fr; gap: 22px; }

    /* --- Admin --- */
    .admin-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .mod-tab { font-size: 0.78rem; padding: 9px 12px; }

    /* --- Каталог --- */
    .catalog-view-toggle { display: none; } /* на маленьких экранах вид один — сетка */

    /* --- Settings --- */
    .theme-grid { grid-template-columns: 1fr; }

    /* --- Referral banner --- */
    .referral-stats { flex-direction: column; gap: 16px; }
    .referral-stat-num { font-size: 1.4rem; }

    /* --- Steps --- */
    .step-content { padding: 18px; }
    .step-content h3 { font-size: 1rem; }
    .step-content p { font-size: 0.85rem; }
}

/* ============================================================
   ЛАНДШАФТ НА МАЛЕНЬКИХ ЭКРАНАХ
   ============================================================ */
@media (max-width: 900px) and (orientation: landscape) {
    .hero-neon { min-height: auto; padding: 70px 20px 40px; }
    .neon-stage { padding: 12px 0; margin: 14px 0 18px; }
    .neon-title { font-size: clamp(1rem, 6vw, 1.8rem); }
    .scroll-indicator { display: none; }
}

/* ============================================================
   PREFERS-REDUCED-MOTION — уважаем настройки ОС
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .workshop-promo-visual:hover .workshop-stage { transform: none; }
    .workshop-promo-visual:hover .workshop-preview-card.primary { transform: translateY(-12px) rotate(-4deg); }
    .workshop-promo-visual:hover .workshop-preview-card.secondary { transform: rotate(-10deg) translate(-40px, 40px) scale(0.92); }
    #page-progress { display: none; }
}
/* ============================================================
   WORKSHOP PROMO — фикс структуры
   ============================================================ */
.workshop-promo-content {
    display: flex;
    flex-direction: column;
}
.workshop-promo-content .section-title { text-align: left; }
.workshop-promo-content .section-desc {
    text-align: left;
    max-width: none;
    margin: 0 0 26px;
}
.workshop-promo-content .btn { align-self: flex-start; }

@media (max-width: 900px) {
    .workshop-promo-content { align-items: center; text-align: center; }
    .workshop-promo-content .section-title,
    .workshop-promo-content .section-desc { text-align: center; }
    .workshop-promo-content .btn { align-self: center; }
}

/* ============================================================
   SOCIAL LINKS — круги с иконками
   ============================================================ */
.social-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 32px 20px 8px;
    margin-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.social-block-title {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 3px;
}
.social-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(0,0,0,0.4));
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-secondary);
    cursor: pointer;
    overflow: hidden;
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.3s ease,
        background 0.3s ease,
        box-shadow 0.35s ease,
        color 0.3s ease;
    text-decoration: none;
}
.social-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    display: block;
    position: relative;
    z-index: 2;
    transition: transform 0.35s ease;
}

/* Блик при наведении */
.social-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 20%,
        rgba(255,255,255,0.15) 45%,
        transparent 70%
    );
    transform: translateX(-150%);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    z-index: 1;
}
.social-btn:hover::before { transform: translateX(150%); }

/* Свечение позади иконки при ховере */
.social-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at center, var(--hover-glow, rgba(220,38,38,0.3)), transparent 70%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 0;
}
.social-btn:hover::after { opacity: 0.7; }

/* Общий ховер */
.social-btn:hover {
    transform: translateY(-4px) scale(1.08) rotate(3deg);
    color: #fff;
    border-color: var(--hover-border, rgba(255,255,255,0.3));
    background: linear-gradient(135deg, var(--hover-bg-1, rgba(255,255,255,0.1)), var(--hover-bg-2, rgba(0,0,0,0.4)));
    box-shadow:
        0 12px 30px -10px var(--hover-shadow, rgba(220,38,38,0.5)),
        inset 0 1px 0 rgba(255,255,255,0.12);
}
.social-btn:hover svg { transform: scale(1.05); }
.social-btn:active {
    transform: translateY(-1px) scale(0.98) rotate(0);
    transition-duration: 0.1s;
}

/* --- Индивидуальные цвета --- */
.social-btn.telegram {
    --hover-border: rgba(34, 158, 217, 0.6);
    --hover-bg-1: rgba(34, 158, 217, 0.22);
    --hover-bg-2: rgba(0, 0, 0, 0.5);
    --hover-shadow: rgba(34, 158, 217, 0.55);
    --hover-glow: rgba(34, 158, 217, 0.35);
}
.social-btn.telegram:hover { color: #48b6ec; }

.social-btn.vk {
    --hover-border: rgba(0, 119, 255, 0.6);
    --hover-bg-1: rgba(0, 119, 255, 0.22);
    --hover-bg-2: rgba(0, 0, 0, 0.5);
    --hover-shadow: rgba(0, 119, 255, 0.55);
    --hover-glow: rgba(0, 119, 255, 0.35);
}
.social-btn.vk:hover { color: #3d9aff; }

.social-btn.youtube {
    --hover-border: rgba(255, 0, 0, 0.6);
    --hover-bg-1: rgba(255, 0, 0, 0.22);
    --hover-bg-2: rgba(0, 0, 0, 0.5);
    --hover-shadow: rgba(255, 0, 0, 0.55);
    --hover-glow: rgba(255, 0, 0, 0.35);
}
.social-btn.youtube:hover { color: #ff4545; }

.social-btn.discord {
    --hover-border: rgba(88, 101, 242, 0.6);
    --hover-bg-1: rgba(88, 101, 242, 0.22);
    --hover-bg-2: rgba(0, 0, 0, 0.5);
    --hover-shadow: rgba(88, 101, 242, 0.55);
    --hover-glow: rgba(88, 101, 242, 0.35);
}
.social-btn.discord:hover { color: #7983ff; }

.social-btn.instagram {
    --hover-border: rgba(225, 48, 108, 0.6);
    --hover-bg-1: rgba(225, 48, 108, 0.22);
    --hover-bg-2: rgba(0, 0, 0, 0.5);
    --hover-shadow: rgba(225, 48, 108, 0.55);
    --hover-glow: rgba(225, 48, 108, 0.35);
}
.social-btn.instagram:hover { color: #ff5e87; }
.social-btn.tiktok {
    --hover-border: rgba(254, 44, 85, 0.6);
    --hover-bg-1: rgba(37, 244, 238, 0.2);
    --hover-bg-2: rgba(254, 44, 85, 0.25);
    --hover-shadow: rgba(254, 44, 85, 0.55);
    --hover-glow: rgba(37, 244, 238, 0.4);
}
.social-btn.tiktok:hover {
    color: #fff;
    border-color: rgba(254, 44, 85, 0.7);
    background: linear-gradient(135deg, rgba(37, 244, 238, 0.22), rgba(254, 44, 85, 0.28));
    box-shadow:
        0 12px 30px -10px rgba(254, 44, 85, 0.6),
        -6px 0 20px -8px rgba(37, 244, 238, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.social-btn.tiktok:hover svg {
    filter: drop-shadow(-1.5px 0 0 #25f4ee) drop-shadow(1.5px 0 0 #fe2c55);
}
@media (max-width: 480px) {
    .social-btn { width: 46px; height: 46px; }
    .social-btn svg { width: 20px; height: 20px; }
    .social-row { gap: 10px; }
}

/* ============================================================
   ПОДДЕРЖКА — чат с Arc Warden
   ============================================================ */
.support-page { display: flex; flex-direction: column; gap: 18px; }

.support-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, rgba(var(--accent-red-rgb), 0.14), rgba(124, 58, 237, 0.08) 60%, transparent);
}
.support-agent { display: flex; align-items: center; gap: 14px; min-width: 0; }
.support-avatar {
    position: relative;
    width: 58px; height: 58px;
    border-radius: 50%;
    overflow: visible;
    flex-shrink: 0;
    border: 2px solid rgba(var(--accent-red-rgb), 0.55);
    box-shadow: 0 0 26px -6px rgba(var(--accent-red-rgb), 0.65);
}
.support-avatar img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #1a1a22;
}
.support-online-dot {
    position: absolute;
    right: 0; bottom: 1px;
    width: 13px; height: 13px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #0b0b10;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
}
.support-agent-info { min-width: 0; }
.support-agent-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.12rem;
    color: var(--text-primary);
}
.support-agent-status {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 3px;
}
.support-agent-status .pulse-dot { width: 7px; height: 7px; }

.support-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 18px;
    align-items: stretch;
}

/* --- Список обращений --- */
.support-tickets { padding: 18px 14px; display: flex; flex-direction: column; min-height: 320px; }
.support-tickets-title {
    font-family: var(--font-display);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--text-muted);
    padding: 0 8px 12px;
}
.support-ticket-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.support-ticket-item {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 11px 12px;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: var(--font-body);
    transition: background 0.2s ease, border-color 0.2s ease;
}
.support-ticket-item:hover { background: rgba(255, 255, 255, 0.04); }
.support-ticket-item.active {
    background: rgba(var(--accent-red-rgb), 0.1);
    border-color: rgba(var(--accent-red-rgb), 0.35);
}
.sti-top { display: flex; align-items: center; gap: 8px; }
.sti-subject {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sti-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.sti-dot.st-open { background: var(--accent-red); box-shadow: 0 0 8px rgba(var(--accent-red-rgb), 0.8); }
.sti-dot.st-answered { background: #22c55e; }
.sti-dot.st-closed { background: #6b7280; }
.sti-preview {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sti-time { font-size: 0.68rem; color: var(--text-muted); margin-top: 4px; opacity: 0.8; }
.support-list-empty { color: var(--text-muted); font-size: 0.85rem; padding: 14px 8px; }

/* --- Пустое состояние чата --- */
.support-empty { text-align: center; padding: 60px 24px; color: var(--text-secondary); }
.support-empty-avatar {
    width: 92px; height: 92px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(var(--accent-red-rgb), 0.5);
    box-shadow: 0 0 40px -8px rgba(var(--accent-red-rgb), 0.6);
}
.support-empty-avatar img { width: 100%; height: 100%; object-fit: cover; background: #1a1a22; }
.support-empty h3 { font-family: var(--font-display); color: var(--text-primary); margin-bottom: 8px; font-size: 1.1rem; }
.support-empty p { font-size: 0.9rem; max-width: 380px; margin: 0 auto; line-height: 1.6; }

/* --- Активный чат --- */
.support-chat { display: flex; flex-direction: column; padding: 0; overflow: hidden; min-height: 460px; }
.support-chat-active { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.support-chat-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-soft);
}
.support-back-btn { display: none; flex-shrink: 0; }
.support-chat-head-info { flex: 1; min-width: 0; }
.support-chat-subject {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.support-chat-status { font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; }
.st-text-open { color: var(--accent-red-light) !important; }
.st-text-answered { color: #4ade80 !important; }
.st-text-closed { color: var(--text-muted) !important; }
.support-close-ticket { padding: 7px 14px; font-size: 0.8rem; flex-shrink: 0; }

.support-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 200px;
    -webkit-overflow-scrolling: touch;
}
.smsg { display: flex; align-items: flex-end; gap: 10px; max-width: 82%; }
.smsg-user { align-self: flex-end; flex-direction: row-reverse; }
.smsg-support { align-self: flex-start; }
.smsg-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(var(--accent-red-rgb), 0.4);
    background: #1a1a22;
}
.smsg-wrap {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 10px 14px 8px;
    min-width: 0;
}
.smsg-user .smsg-wrap {
    background: linear-gradient(135deg, rgba(var(--accent-red-rgb), 0.28), rgba(var(--accent-red-rgb), 0.14));
    border-color: rgba(var(--accent-red-rgb), 0.35);
    border-bottom-right-radius: 4px;
}
.smsg-support .smsg-wrap { border-bottom-left-radius: 4px; }
.smsg-author { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px; color: var(--accent-red-light); margin-bottom: 4px; font-weight: 700; }
.smsg-user .smsg-author { text-align: right; color: var(--text-muted); }
.smsg-text { font-size: 0.9rem; line-height: 1.55; color: var(--text-primary); white-space: pre-wrap; word-break: break-word; }
.smsg-time { font-size: 0.64rem; color: var(--text-muted); margin-top: 5px; text-align: right; }

.support-composer {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--border-soft);
    background: rgba(0, 0, 0, 0.25);
}
.support-composer textarea {
    flex: 1;
    resize: none;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.92rem;
    padding: 11px 14px;
    line-height: 1.45;
    max-height: 140px;
    outline: none;
    transition: border-color 0.2s ease;
}
.support-composer textarea:focus { border-color: rgba(var(--accent-red-rgb), 0.5); }
.support-send {
    width: 46px; height: 46px;
    padding: 0;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    flex-shrink: 0;
}
.support-closed-note {
    padding: 14px 18px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    border-top: 1px solid var(--border-soft);
}

/* --- Форма нового обращения --- */
.support-new-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }

/* --- Админская мини-подпись --- */
.support-agent-mini { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.85rem; }
.support-agent-mini img {
    width: 34px; height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(var(--accent-red-rgb), 0.45);
    background: #1a1a22;
}

/* ============================================================
   ОФОРМЛЕНИЕ ОПЛАТЫ (checkout)
   ============================================================ */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 18px;
    align-items: start;
}
.checkout-plan {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(var(--accent-red-rgb), 0.3);
    border-radius: 14px;
    padding: 16px 18px;
    flex-wrap: wrap;
}
.checkout-plan-name { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--text-primary); }
.checkout-plan-meta { color: var(--text-muted); font-size: 0.8rem; margin-top: 4px; }
.checkout-plan-price { font-family: var(--font-display); font-weight: 900; font-size: 1.6rem; color: var(--accent-red-light); }
.checkout-divider { height: 1px; background: var(--border-soft); margin: 18px 0; }
.checkout-promo-row { display: flex; gap: 10px; }
.checkout-promo-row input { flex: 1; min-width: 0; }
.checkout-promo-result { font-size: 0.8rem; margin-top: 8px; min-height: 1.2em; color: var(--text-muted); }
.checkout-promo-result.ok { color: #4ade80; }
.checkout-promo-result.error { color: var(--accent-red-light); }
.checkout-summary { margin: 6px 0 16px; }
.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}
.checkout-summary-row.total {
    border-bottom: none;
    padding-top: 14px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-primary);
}
.checkout-legal { font-size: 0.76rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.checkout-legal a { color: var(--accent-red-light); text-decoration: none; }
.checkout-legal a:hover { text-decoration: underline; }
.checkout-steps { display: flex; flex-direction: column; gap: 16px; margin-bottom: 22px; }
.checkout-step { display: flex; gap: 14px; align-items: flex-start; }
.checkout-step-num {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(var(--accent-red-rgb), 0.16);
    border: 1px solid rgba(var(--accent-red-rgb), 0.4);
    color: var(--accent-red-light);
    font-family: var(--font-display);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}
.checkout-step h4 { font-size: 0.92rem; color: var(--text-primary); margin-bottom: 3px; }
.checkout-step p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }
.checkout-back-link {
    display: block;
    text-align: center;
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-decoration: none;
}
.checkout-back-link:hover { color: var(--text-secondary); }
.donate-soon-icon {
    width: 84px; height: 84px;
    margin: 0 auto;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red-light);
    background: rgba(var(--accent-red-rgb), 0.12);
    border: 1px solid rgba(var(--accent-red-rgb), 0.35);
    box-shadow: 0 0 34px -10px rgba(var(--accent-red-rgb), 0.6);
}

/* ============================================================
   ПРАВОВЫЕ СТРАНИЦЫ (/terms, /privacy)
   ============================================================ */
.legal-page { min-height: 100vh; padding: 110px 16px 60px; }
.legal-doc {
    max-width: 820px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px 44px;
}
.legal-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.1rem);
    font-weight: 900;
    margin: 12px 0 14px;
}
.legal-note {
    background: rgba(var(--accent-red-rgb), 0.08);
    border: 1px solid rgba(var(--accent-red-rgb), 0.25);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 26px;
}
.legal-doc h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    letter-spacing: 1px;
    color: var(--text-primary);
    margin: 26px 0 14px;
}
.legal-doc h3 {
    font-family: var(--font-display);
    font-size: 0.98rem;
    color: var(--accent-red-light);
    margin: 22px 0 10px;
}
.legal-doc p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 10px;
}
.legal-footer-nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
}
.legal-footer-nav a { color: var(--accent-red-light); font-size: 0.88rem; text-decoration: none; }
.legal-footer-nav a:hover { text-decoration: underline; }

/* ============================================================
   БЕЙДЖ В НАВИГАЦИИ
   ============================================================ */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    color: #fff;
    font-size: 0.66rem;
    font-weight: 800;
    margin-left: auto;
    box-shadow: 0 4px 14px -4px rgba(var(--accent-red-rgb), 0.8);
}
.sidebar-nav a { display: flex; align-items: center; gap: 12px; }
.sidebar-nav a .nav-badge { margin-left: auto; }

/* ============================================================
   МОБИЛЬНЫЙ ПАТЧ v2
   ============================================================ */

/* --- Кабинет ≤1024px: убираем блок пользователя из сайдбара,
       он дублирует карточку профиля (визуальное «двойное открытие») --- */
@media (max-width: 1024px) {
    .sidebar-user { display: none; }
    .sidebar { gap: 0; padding: 8px; }
    .support-layout { grid-template-columns: 1fr; }

    /* Список обращений / чат переключаются классом chat-open */
    .support-layout .support-chat { display: none; }
    .support-layout.chat-open .support-chat { display: flex; }
    .support-layout.chat-open .support-tickets { display: none; }
    .support-back-btn { display: inline-flex; }
    .support-chat { min-height: 380px; }
}

@media (max-width: 768px) {
    /* Кнопки и код реферальной программы больше не вылезают за экран */
    .referral-code-box {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 12px;
    }
    .referral-code { font-size: 1rem; letter-spacing: 2.5px; word-break: break-all; }
    .copy-btn { width: 100%; }

    /* Чекбокс-ряды и общие сетки */
    .checkout-grid { grid-template-columns: 1fr; }
    .checkout-plan { align-items: flex-start; flex-direction: column; }
    .checkout-promo-row { flex-direction: column; }
    .checkout-promo-row .btn { width: 100%; justify-content: center; }

    /* Чат поддержки */
    .support-header { padding: 18px; }
    .support-header .support-new-btn { width: 100%; justify-content: center; }
    .support-messages { padding: 14px; }
    .smsg { max-width: 94%; }
    .support-composer { padding: 12px; gap: 8px; }
    .support-chat-head { padding: 12px 14px; flex-wrap: wrap; }
    .support-close-ticket { width: 100%; justify-content: center; order: 3; }

    /* Правовые страницы */
    .legal-page { padding: 96px 12px 40px; }
    .legal-doc { padding: 26px 20px; border-radius: 16px; }

    /* Кнопки внутри карточек не должны вылезать */
    .card .btn { max-width: 100%; }

    /* Таблица админки: строки-карточки не нужны, но шапки узкие */
    .support-agent-mini span { display: none; }
}

@media (max-width: 480px) {
    .support-agent-name { font-size: 1rem; }
    .support-empty { padding: 44px 16px; }
    .support-empty-avatar { width: 76px; height: 76px; }
    .smsg-text { font-size: 0.88rem; }
    .legal-doc h2 { font-size: 1.05rem; }
    .legal-note { font-size: 0.84rem; }
}

/* ---------- Заметка о согласии на регистрации ---------- */
.auth-terms-note {
    margin-top: 14px;
    font-size: 0.72rem;
    line-height: 1.6;
    color: var(--text-muted);
    text-align: center;
}
.auth-terms-note a { color: var(--accent-red-light); text-decoration: none; }
.auth-terms-note a:hover { text-decoration: underline; }

/* ---------- hidden всегда скрывает, даже при display в классе ---------- */
[hidden] { display: none !important; }

/* ---------- Шапка поддержки не должна быть скролл-контейнером
   (scrollIntoView/якоря браузера сдвигали контент внутри карточки) ---------- */
.support-header { overflow: clip; }
.support-tickets { overflow: clip; }

/* ---------- Горизонтальное переполнение кабинета на телефоне:
   grid-трек 1fr без minmax(0,1fr) раздувается длинным содержимым
   (полоса навигации сайдбара), страница уезжает вбок ---------- */
@media (max-width: 1024px) {
    .app-shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar { min-width: 0; max-width: 100%; }
    .sidebar-nav { max-width: 100%; }
    #spa-main { max-width: 100%; }
}

/* ---------- Поле промокода в чекауте (не прямой ребёнок .form-group) ---------- */
.checkout-promo-row input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.92rem;
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 1px;
}
.checkout-promo-row input:focus {
    border-color: rgba(var(--accent-red-rgb), 0.5);
    box-shadow: 0 0 0 3px rgba(var(--accent-red-rgb), 0.1);
}
.checkout-promo-row input::placeholder { color: var(--text-muted); text-transform: none; }

/* ============================================================
   ПОЛИРОВКА V5 — навбар, формы, загрузка файлов, чекаут-заглушка
   ============================================================ */

/* ---------- Чекаут-заглушка ---------- */
.checkout-soon-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.checkout-soon-icon {
    width: 84px; height: 84px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red-light);
    background: rgba(var(--accent-red-rgb), 0.1);
    border: 1px solid rgba(var(--accent-red-rgb), 0.3);
    animation: soonPulse 2.6s ease-in-out infinite;
}
@keyframes soonPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-red-rgb), 0.28); }
    50%      { box-shadow: 0 0 0 16px rgba(var(--accent-red-rgb), 0); }
}
.checkout-soon-alt { margin-top: 14px; font-size: 0.8rem; color: var(--text-muted); }
.checkout-soon-alt a { color: var(--accent-red-light); text-decoration: none; }
.checkout-soon-alt a:hover { text-decoration: underline; }

/* ---------- Навбар: живая полоса-хайрлайн снизу ---------- */
.navbar::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(var(--accent-red-rgb), 0.65) 50%,
        transparent 100%);
    background-size: 220% 100%;
    opacity: 0.5;
    animation: navSheen 7s linear infinite;
    pointer-events: none;
}
@keyframes navSheen {
    0%   { background-position: 220% 0; }
    100% { background-position: -220% 0; }
}

/* ---------- Появление навбара при загрузке ---------- */
@keyframes navItemIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.navbar .logo,
.navbar .nav-links li,
.navbar .mobile-menu-btn {
    animation: navItemIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.navbar .logo { animation-delay: 0.02s; }
.navbar .nav-links li:nth-child(1) { animation-delay: 0.08s; }
.navbar .nav-links li:nth-child(2) { animation-delay: 0.14s; }
.navbar .nav-links li:nth-child(3) { animation-delay: 0.20s; }
.navbar .nav-links li:nth-child(4) { animation-delay: 0.26s; }
.navbar .nav-links li:nth-child(5) { animation-delay: 0.32s; }
.navbar .nav-links li:nth-child(6) { animation-delay: 0.38s; }
.navbar .mobile-menu-btn { animation-delay: 0.1s; }

/* ---------- Логотип: наклон и усиление свечения ---------- */
.logo-img {
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
}
.logo:hover .logo-img {
    transform: rotate(-8deg) scale(1.12);
    filter: drop-shadow(0 0 16px rgba(var(--accent-red-rgb), 0.75));
}

/* ---------- Ссылки навбара: подъём, свечение подчёркивания, активный пункт ---------- */
.nav-links a { transition: color 0.25s ease, transform 0.25s ease; }
.nav-links a:hover { transform: translateY(-1px); }
.nav-links a::after {
    box-shadow: 0 0 0 rgba(var(--accent-red-rgb), 0);
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.nav-links a:hover::after {
    box-shadow: 0 2px 14px rgba(var(--accent-red-rgb), 0.8);
}
.nav-links a.active { color: var(--text-primary); }
.nav-links a.active::after { width: 100%; box-shadow: 0 2px 14px rgba(var(--accent-red-rgb), 0.55); }

/* ---------- CTA: периодический блик ---------- */
.nav-cta { position: relative; overflow: hidden; }
.nav-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
    transform: translateX(-130%);
    animation: ctaSheen 5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes ctaSheen {
    0%, 55%  { transform: translateX(-130%); }
    80%, 100% { transform: translateX(130%); }
}

/* ---------- Бургер → крестик ---------- */
.mobile-menu-btn span { background: var(--text-secondary); }
.mobile-menu-btn:hover span { background: var(--accent-red-light); }
.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--accent-red-light);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.4);
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--accent-red-light);
}

/* ---------- Мобильное меню: выезд + каскад пунктов ---------- */
.nav-links.active { animation: menuIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes menuIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.nav-links.active li { animation: menuItemIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
.nav-links.active li:nth-child(1) { animation-delay: 0.03s; }
.nav-links.active li:nth-child(2) { animation-delay: 0.07s; }
.nav-links.active li:nth-child(3) { animation-delay: 0.11s; }
.nav-links.active li:nth-child(4) { animation-delay: 0.15s; }
.nav-links.active li:nth-child(5) { animation-delay: 0.19s; }
.nav-links.active li:nth-child(6) { animation-delay: 0.23s; }
@keyframes menuItemIn {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   ГЛОБАЛЬНЫЕ ЭЛЕМЕНТЫ ФОРМ
   ============================================================ */

/* ---------- Выпадающие списки ---------- */
select {
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--bg-input, rgba(255, 255, 255, 0.04));
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 15px;
    border: 1px solid var(--border-soft, rgba(255, 255, 255, 0.08));
    border-radius: 10px;
    color: var(--text-primary, #eee);
    font-family: var(--font-body, Inter, sans-serif);
    font-size: 0.9rem;
    padding: 11px 38px 11px 14px;
    cursor: pointer;
    color-scheme: dark;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    max-width: 100%;
}
select:hover { border-color: rgba(var(--accent-red-rgb), 0.35); }
select:focus {
    outline: none;
    border-color: rgba(var(--accent-red-rgb), 0.55);
    box-shadow: 0 0 0 3px rgba(var(--accent-red-rgb), 0.12);
}
select option { background: #121218; color: #eee; }

/* ---------- Чекбоксы и радио ---------- */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--accent-red, #dc2626);
    width: 17px;
    height: 17px;
    cursor: pointer;
}
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
    outline: 2px solid rgba(var(--accent-red-rgb), 0.6);
    outline-offset: 2px;
}

/* ---------- Загрузка файлов: дропзона + фирменная кнопка ---------- */
input[type="file"] {
    color: var(--text-secondary, #aaa);
    font-family: var(--font-body, Inter, sans-serif);
    font-size: 0.85rem;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(var(--accent-red-rgb), 0.35);
    border-radius: 12px;
    padding: 13px 14px;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
input[type="file"]:hover {
    border-color: rgba(var(--accent-red-rgb), 0.65);
    background: rgba(var(--accent-red-rgb), 0.05);
}
input[type="file"]:focus-visible {
    outline: none;
    border-color: rgba(var(--accent-red-rgb), 0.7);
    box-shadow: 0 0 0 3px rgba(var(--accent-red-rgb), 0.12);
}
input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, var(--accent-red, #dc2626), var(--accent-red-dark, #7f1d1d));
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 9px 16px;
    margin-right: 12px;
    font-family: var(--font-body, Inter, sans-serif);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.25s ease;
}
input[type="file"]::file-selector-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px -6px rgba(var(--accent-red-rgb), 0.7);
}

/* ---------- Превью выбранных файлов ---------- */
.file-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.file-previews .fp-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-soft, rgba(255, 255, 255, 0.08));
    background: #0d0d13;
    aspect-ratio: 1;
    animation: fpIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes fpIn {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}
.fp-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.fp-item .fp-name {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 16px 8px 6px;
    font-size: 0.62rem;
    color: #fff;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}
.fp-item .fp-remove {
    position: absolute;
    top: 6px; right: 6px;
    width: 23px; height: 23px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.2s ease, transform 0.2s ease;
}
.fp-item .fp-remove:hover { background: var(--accent-red, #dc2626); transform: scale(1.1); }
.fp-item.fp-archive {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--text-muted, #888);
    font-size: 0.66rem;
    padding: 8px;
    text-align: center;
    word-break: break-all;
}
.fp-item.fp-archive svg { width: 26px; height: 26px; color: var(--accent-red-light, #f87171); }

/* ---------- Нативные пикеры в тёмной теме ---------- */
input[type="date"],
input[type="datetime-local"],
input[type="number"] { color-scheme: dark; }


/* ---------- Защита от растягивания полей за границы контейнера ---------- */
input, select, textarea { max-width: 100%; }
textarea { resize: vertical; min-height: 84px; max-height: 60vh; width: 100%; overflow: auto; }
