:root {
            --bg:       #060C18;
            --bg1:      #0B1225;
            --bg2:      #0F1A30;
            --bg3:      #162038;
            --border:   rgba(255,255,255,0.07);
            --border2:  rgba(255,200,87,0.18);
            --gold:     #FFD166;
            --gold2:    #FFA726;
            --blue:     #4A9EFF;
            --blue2:    #1E5FAA;
            --text:     #D6E8FF;
            --text2:    #7A9AC0;
            --text3:    #3D5A80;
            --hot:      #FF4D4D;
            --radius:   20px;
            --radius-sm:12px;
            --topbar-bg: rgba(6,12,24,0.92);
            --shadow:   rgba(0,0,0,0.3);
        }

        /* ── LIGHT THEME ── */
        [data-theme="light"] {
            --bg:       #F0F4FA;
            --bg1:      #E4EAF5;
            --bg2:      #FFFFFF;
            --bg3:      #EDF1FB;
            --border:   rgba(30,60,120,0.10);
            --border2:  rgba(200,140,0,0.28);
            --gold:     #D4930A;
            --gold2:    #B87800;
            --blue:     #1A65C0;
            --blue2:    #1A65C0;
            --text:     #1A2540;
            --text2:    #4A6080;
            --text3:    #96AEC8;
            --hot:      #D93020;
            --topbar-bg: rgba(228,234,245,0.95);
            --shadow:   rgba(20,50,100,0.10);
        }
        [data-theme="light"] body::before {
            background:
                radial-gradient(ellipse 80% 50% at 20% 10%, rgba(100,160,255,0.10) 0%, transparent 60%),
                radial-gradient(ellipse 60% 40% at 80% 80%, rgba(74,120,220,0.07) 0%, transparent 55%),
                radial-gradient(ellipse 40% 30% at 60% 30%, rgba(212,147,10,0.06) 0%, transparent 50%);
        }
        [data-theme="light"] .top-bar { background: var(--topbar-bg); }
        [data-theme="light"] .logo-area h1 {
            background: linear-gradient(135deg, #1A2540 0%, var(--gold) 60%, var(--gold2) 100%);
            -webkit-background-clip: text; background-clip: text;
        }
        [data-theme="light"] .msg-bubble { background: var(--bg3); }
        [data-theme="light"] .section-card:hover { box-shadow: 0 16px 40px var(--shadow); }
        [data-theme="light"] .photo-card:hover   { box-shadow: 0 12px 32px var(--shadow); }
        [data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg1); }

        /* ── THEME TOGGLE ── */
        .theme-toggle {
            width: 36px; height: 36px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--bg3);
            color: var(--text2);
            font-size: 15px;
            cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: all 0.2s;
            flex-shrink: 0;
        }
        .theme-toggle:hover { color: var(--gold); border-color: var(--border2); }
        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            font-family: 'Space Grotesk', sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 1.6;
            min-height: 100vh;
            overflow-x: hidden;
        }


        /* ══ BURGER & DRAWER ══ */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px; height: 36px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg3);
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
    transition: border-color .2s;
}
.burger:hover { border-color: var(--border2); }
.burger span {
    display: block;
    height: 2px;
    background: var(--text2);
    border-radius: 2px;
    transition: all .3s ease;
    transform-origin: center;
}
/* анимация в крестик */
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* затемнение фона */
.drawer-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 200;
    opacity: 0;
    transition: opacity .3s;
}
.drawer-overlay.open { display: block; opacity: 1; }

/* сам drawer */
.drawer {
    position: fixed;
    top: 0; right: 0;
    width: 280px; height: 100%;
    background: var(--bg1);
    border-left: 1px solid var(--border);
    z-index: 201;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.drawer.open { transform: translateX(0); }

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.drawer-logo {
    font-family: 'Syne', sans-serif;
    font-size: 1rem; font-weight: 800;
    background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.drawer-close {
    width: 32px; height: 32px;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--bg3); color: var(--text2);
    font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s;
}
.drawer-close:hover { border-color: var(--border2); color: var(--gold); }

.drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 4px;
    flex: 1;
}
.drawer-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 11px;
    font-size: .9rem; font-weight: 600;
    color: var(--text2);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all .2s;
}
.drawer-nav a i {
    font-size: 14px;
    color: var(--text3);
    width: 18px; text-align: center;
    transition: color .2s;
}
.drawer-nav a:hover {
    background: var(--bg3);
    color: var(--text);
    border-color: var(--border);
}
.drawer-nav a:hover i { color: var(--gold); }
.drawer-nav a.active {
    background: rgba(255,209,102,.1);
    color: var(--gold);
    border-color: var(--border2);
}
.drawer-nav a.active i { color: var(--gold); }

/* показываем бургер только на мобильных */
@media (max-width: 700px) {
    .burger { display: flex; }
    .main-nav { display: none; } /* скрываем горизонтальный nav */
}


        /* ── Starfield background ── */
        body::before {
            content: '';
            position: fixed;
            inset: 0;
            background:
                radial-gradient(ellipse 80% 50% at 20% 10%, rgba(30,95,170,0.18) 0%, transparent 60%),
                radial-gradient(ellipse 60% 40% at 80% 80%, rgba(74,158,255,0.10) 0%, transparent 55%),
                radial-gradient(ellipse 40% 30% at 60% 30%, rgba(255,209,102,0.06) 0%, transparent 50%);
            pointer-events: none;
            z-index: 0;
        }

        ::-webkit-scrollbar { width: 5px; }
        ::-webkit-scrollbar-track { background: var(--bg); }
        ::-webkit-scrollbar-thumb { background: var(--blue2); border-radius: 99px; }

        .container { max-width: 1280px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

        /* ── TOP BAR ── */
        .top-bar {
            background: var(--topbar-bg);
            border-bottom: 1px solid var(--border);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            position: sticky; top: 0; z-index: 100;
        }
        .top-bar-inner {
            display: flex; justify-content: space-between; align-items: center;
            height: 48px; gap: 12px;
        }
        .logo-link {
            font-family: 'Syne', sans-serif;
            font-size: 1.1rem; font-weight: 800;
            background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
            -webkit-background-clip: text; background-clip: text; color: transparent;
            text-decoration: none; white-space: nowrap;
        }
        .social-icons { display: flex; gap: 4px; }
        .social-icons a {
            width: 30px; height: 30px;
            display: flex; align-items: center; justify-content: center;
            border-radius: 8px; color: var(--text2); font-size: 13px;
            transition: all 0.2s; text-decoration: none;
        }
        .social-icons a:hover { background: var(--bg3); color: var(--gold); }
        .topbar-right { display: flex; align-items: center; gap: 6px; }
        .topbar-right a {
            color: var(--text2); text-decoration: none; font-size: 12px;
            font-weight: 500; padding: 5px 10px; border-radius: 8px;
            transition: all 0.2s; white-space: nowrap;
        }
        .topbar-right a:hover { color: var(--gold); background: rgba(255,209,102,0.08); }
        .topbar-right a.accent {
            background: var(--gold); color: var(--bg);
            font-weight: 700; margin-left: 2px;
        }
        .topbar-right a.accent:hover { background: var(--gold2); }

        /* ── MAIN NAV ── */
        .main-nav { border-bottom: 1px solid var(--border); background: var(--bg1); }
        .nav-inner {
            display: flex; gap: 2px;
            overflow-x: auto; scrollbar-width: none; padding: 8px 0;
        }
        .nav-inner::-webkit-scrollbar { display: none; }

        /* ── FOOTER ── */
        footer {
            background: var(--bg1);
            border-top: 1px solid var(--border);
            margin-top: 8px;
        }
        .footer-top {
            padding: 48px 0 36px;
        }
        .footer-grid {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr 1fr;
            gap: 40px;
        }
        .footer-brand .f-logo {
            font-family: 'Syne', sans-serif;
            font-size: 1.4rem;
            font-weight: 800;
            background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            margin-bottom: 10px;
        }
        .footer-brand p {
            font-size: 0.82rem;
            color: var(--text2);
            line-height: 1.7;
            max-width: 280px;
        }
        .footer-socials {
            display: flex;
            gap: 8px;
            margin-top: 18px;
            flex-wrap: wrap;
        }
        .footer-socials a {
            width: 36px; height: 36px;
            border-radius: 10px;
            border: 1px solid var(--border);
            background: var(--bg2);
            color: var(--text2);
            font-size: 14px;
            display: flex; align-items: center; justify-content: center;
            text-decoration: none;
            transition: all 0.2s;
        }
        .footer-socials a:hover { border-color: var(--border2); color: var(--gold); }
        .footer-stats {
            display: flex;
            gap: 16px;
            margin-top: 20px;
        }
        .f-stat {
            background: var(--bg2);
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            padding: 10px 14px;
            text-align: center;
        }
        .f-stat .num {
            font-family: 'Syne', sans-serif;
            font-size: 1.1rem;
            font-weight: 800;
            color: var(--gold);
        }
        .f-stat .lbl {
            font-size: 10px;
            color: var(--text3);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-top: 2px;
        }
        .footer-col h4 {
            font-size: 0.78rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1.2px;
            color: var(--text3);
            margin-bottom: 14px;
        }
        .footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
        .footer-col ul li a {
            font-size: 0.83rem;
            color: var(--text2);
            text-decoration: none;
            transition: color 0.15s;
            display: flex;
            align-items: center;
            gap: 7px;
        }
        .footer-col ul li a i { font-size: 11px; color: var(--text3); }
        .footer-col ul li a:hover { color: var(--gold); }
        .footer-col ul li a:hover i { color: var(--gold); }

        .footer-divider {
            border: none;
            border-top: 1px solid var(--border);
        }
        .footer-bottom {
            padding: 18px 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 12px;
        }
        .footer-bottom-left {
            font-size: 0.78rem;
            color: var(--text3);
        }
        .footer-bottom-left a { color: var(--text2); text-decoration: none; transition: color 0.15s; }
        .footer-bottom-left a:hover { color: var(--gold); }
        .footer-bottom-right {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.75rem;
            color: var(--text3);
        }
        .footer-bottom-right .heart { color: #FF6B6B; }

        @media (max-width: 1100px) {
            .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
            .footer-brand { grid-column: 1 / -1; }
            .footer-brand p { max-width: 100%; }
        }
        @media (max-width: 700px) {
            .footer-top { padding: 32px 0 24px; }
            .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
            .footer-brand { grid-column: 1 / -1; }
            .footer-stats { gap: 10px; }
            .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
        }
        @media (max-width: 420px) {
            .footer-grid { grid-template-columns: 1fr; }
        }

        /* ══════════════════════════════
           MOBILE FIRST — RESPONSIVE
        ══════════════════════════════ */

        /* Tablet: ≤ 1100px */
        @media (max-width: 1100px) {
            .forum-sections { grid-template-columns: repeat(2, 1fr); }
            .gallery-grid { grid-template-columns: repeat(2, 1fr); }
            .middle-grid { grid-template-columns: 1fr; }
        }

        /* Mobile: ≤ 700px */
        @media (max-width: 700px) {
            .container { padding: 0 14px; }

            /* top bar */
            .top-bar-inner { height: auto; padding: 8px 0; flex-wrap: wrap; gap: 6px; }
            .hide-mobile { display: none; }
            .social-icons { display: none; }

            /* header */
            .main-header { padding: 20px 0 16px; }
            .header-grid { grid-template-columns: 1fr; gap: 16px; }
            .header-widgets { justify-content: flex-start; }
            .widget-pill { min-width: 0; flex: 1; }

            /* alert */
            .alert-row { padding: 10px 14px; gap: 10px; }

            /* section cards */
            .forum-sections { grid-template-columns: 1fr; gap: 12px; }

            /* gallery */
            .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

            /* bottom */
            .bottom-bar { flex-direction: column; align-items: flex-start; padding: 16px; }
            .bottom-actions { width: 100%; }
            .bottom-actions a { flex: 1; justify-content: center; }

            /* general */
            .panel { padding: 16px; }
            .panel-title { font-size: 0.9rem; }
        }

        /* Small mobile: ≤ 420px */
        @media (max-width: 420px) {
            .widget-pill { min-width: 100%; }
            .gallery-grid { grid-template-columns: 1fr; }
            .quick-links { gap: 0; }
            .quick-links a { padding: 4px 8px; font-size: 11px; }
        }

        /* Fade-in animation */
        @keyframes fadeUp {
            from { opacity: 0; transform: translateY(16px); }
            to   { opacity: 1; transform: translateY(0); }
        }
        .forum-sections, .middle-grid, .gallery, .bottom-bar {
            animation: fadeUp 0.5s ease both;
        }
        .forum-sections { animation-delay: 0.05s; }
        .middle-grid    { animation-delay: 0.1s; }
        .gallery        { animation-delay: 0.15s; }
        .bottom-bar     { animation-delay: 0.2s; }