/* ============================================================
   TexelRailway — Liquid Glass Design System
   Minimal · Apple-inspired · Unified
   ============================================================ */

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

/* ── Tokens ─────────────────────────────────────────────── */
:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;

    --bg: #050507;
    --bg-elevated: #0a0a0e;
    --surface: rgba(255, 255, 255, 0.045);
    --surface-2: rgba(255, 255, 255, 0.07);
    --surface-3: rgba(255, 255, 255, 0.1);
    --glass: rgba(18, 18, 22, 0.55);
    --glass-strong: rgba(14, 14, 18, 0.72);

    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --border-soft: rgba(255, 255, 255, 0.05);

    --text: #f5f5f7;
    --text-secondary: rgba(255, 255, 255, 0.62);
    --text-muted: rgba(255, 255, 255, 0.42);
    --text-faint: rgba(255, 255, 255, 0.28);

    --accent: #30d158;
    --accent-hover: #3be066;
    --accent-soft: rgba(48, 209, 88, 0.14);
    --accent-glow: rgba(48, 209, 88, 0.22);
    --discord: #5865F2;
    --danger: #ff453a;
    --warning: #ff9f0a;
    --info: #0a84ff;

    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --radius-full: 999px;

    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);

    --blur: 24px;
    --blur-strong: 40px;

    /* Шапка-остров: --navbar-h — полный резерв места (отступ + бар),
       --navbar-bar-h — высота самого острова, --navbar-gap — отступ от верха */
    --navbar-h: 56px;
    --navbar-bar-h: 44px;
    --navbar-gap: 12px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --t: 0.22s var(--ease);

    /* legacy aliases (pages still use these) */
    --font-base: var(--font);
    --font-heading: var(--font);
    --bg-black: var(--bg);
    --bg-dark: var(--bg-elevated);
    --bg-card: rgba(22, 22, 28, 0.85);
    --bg-hover: var(--surface-2);
    --text-main: var(--text);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

/* subtle ambient mesh */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 50% at 10% -10%, rgba(48, 209, 88, 0.07), transparent 55%),
        radial-gradient(ellipse 60% 40% at 90% 10%, rgba(10, 132, 255, 0.05), transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(48, 209, 88, 0.04), transparent 55%);
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; }
ul, ol { list-style: none; }

::selection {
    background: rgba(48, 209, 88, 0.28);
    color: #fff;
}

/* scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); background-clip: content-box; }

/* ── Type ───────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font);
    font-weight: 650;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--text);
}

h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.375rem); }
h4 { font-size: 1.05rem; }
p { color: var(--text-secondary); }

.text-muted { color: var(--text-muted); }
.text-small { font-size: 13px; }
.text-xs { font-size: 12px; color: var(--text-muted); }

/* ── Layout ─────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

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

main {
    min-height: calc(100vh - 200px);
}

/* ── Glass utility ──────────────────────────────────────── */
.glass {
    background: var(--glass);
    backdrop-filter: blur(var(--blur)) saturate(160%);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-glass);
}

.glass-strong {
    background: var(--glass-strong);
    backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-glass);
}

/* ── Buttons ────────────────────────────────────────────── */
.btn-primary,
.btn-login,
.btn-outline,
.hero-btn,
.btn-card,
.catalog-btn,
.settings-btn,
.btn-discord,
.btn-discord-join,
.btn-download-main,
.simple-news-btn,
.view-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform var(--t), background var(--t), border-color var(--t), box-shadow var(--t), color var(--t);
    white-space: nowrap;
    cursor: pointer;
    line-height: 1;
}

.btn-primary,
.btn-login,
.hero-btn--catalog,
.catalog-btn--primary,
.card-actions .btn-card:first-child,
.settings-btn--primary,
.btn-download-main {
    background: var(--text);
    color: #0a0a0a;
    border-color: transparent;
    box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 8px 24px rgba(0,0,0,0.25);
}

.btn-primary:hover,
.btn-login:hover,
.hero-btn--catalog:hover,
.catalog-btn--primary:hover,
.card-actions .btn-card:first-child:hover,
.settings-btn--primary:hover,
.btn-download-main:hover {
    background: #fff;
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

.btn-primary:active,
.btn-login:active,
.hero-btn:active {
    transform: scale(0.98);
}

.btn-outline,
.hero-btn--discord,
.catalog-btn,
.card-actions .btn-card:last-child,
.settings-btn--ghost,
.simple-news-btn,
.view-all-btn {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.btn-outline:hover,
.hero-btn--discord:hover,
.catalog-btn:hover,
.card-actions .btn-card:last-child:hover,
.settings-btn--ghost:hover,
.simple-news-btn:hover,
.view-all-btn:hover {
    background: var(--surface-2);
    border-color: rgba(255,255,255,0.22);
    color: #fff;
    transform: translateY(-1px);
}

.btn-full { width: 100%; }

.btn-discord,
.btn-discord-join {
    background: linear-gradient(180deg, #6875f5 0%, #5865F2 100%);
    color: #fff;
    border: none;
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.28);
}

.btn-discord:hover,
.btn-discord-join:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    color: #fff;
}

.settings-btn--danger {
    background: rgba(255, 69, 58, 0.12);
    border: 1px solid rgba(255, 69, 58, 0.28);
    color: #ff8a84;
}
.settings-btn--danger:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

/* accent green variant when needed */
.btn-accent {
    background: var(--accent);
    color: #04140a;
    border-radius: var(--radius-full);
    font-weight: 700;
}
.btn-accent:hover { background: var(--accent-hover); color: #04140a; }

/* ── Navbar ─────────────────────────────────────────────── */
/* Плавающий остров: широкий, центрированный, компактный по высоте */
.navbar {
    height: var(--navbar-bar-h);
    position: fixed;
    top: var(--navbar-gap);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(1100px, calc(100% - 32px));
    z-index: 1000;
    display: flex;
    align-items: center;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(8, 8, 12, 0.42);
    backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.38);
    transition: background var(--t), border-color var(--t), box-shadow var(--t);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.78);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    position: relative;
    padding-left: 10px;
    padding-right: 10px;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    z-index: 2;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-logo {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: contain;
}

.logo {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a,
.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    transition: color var(--t), background var(--t);
    position: relative;
}

.nav-links a::after { display: none; }

.nav-links a:hover,
.nav-link:hover {
    color: var(--text);
}

.nav-item { position: relative; display: flex; align-items: center; }

.catalog-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.catalog-caret {
    font-size: 11px;
    opacity: 0.55;
    transition: transform 0.25s var(--ease), opacity var(--t);
}

.dropdown-catalog:hover .catalog-caret,
.dropdown-catalog:focus-within .catalog-caret {
    transform: rotate(-180deg);
    opacity: 1;
}

.catalog-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 240px;
    padding: 8px;
    border-radius: var(--radius-md);
    background: rgba(16, 16, 20, 0.82);
    backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.22s var(--ease);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.catalog-dropdown::after {
    content: "";
    position: absolute;
    left: 0; right: 0; top: -14px;
    height: 14px;
}

.dropdown-catalog:hover .catalog-dropdown,
.dropdown-catalog:focus-within .catalog-dropdown,
.catalog-dropdown:hover {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.catalog-link {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background var(--t), color var(--t);
}

.catalog-link:hover {
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

/* user menu */
.user-menu-wrapper { position: relative; }

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: var(--radius-full);
    cursor: pointer;
    border: 1px solid transparent;
    transition: background var(--t), border-color var(--t);
}

.user-menu-trigger:hover {
    background: var(--surface);
    border-color: var(--border);
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.user-name {
    font-size: 13px;
    font-weight: 550;
    color: var(--text);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(176px, calc(100vw - 24px));
    padding: 6px;
    border-radius: var(--radius-md);
    background: rgba(16, 16, 20, 0.88);
    backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.18s ease, transform 0.22s var(--ease), visibility 0.18s;
    display: flex;
    flex-direction: column;
    gap: 1px;
    z-index: 1300;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.dropdown-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px 9px;
    margin-bottom: 3px;
    border-bottom: 1px solid var(--border);
}

.dropdown-profile-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.dropdown-profile-name {
    font-size: 11.5px;
    font-weight: 650;
    color: var(--text);
}

.dropdown-profile-role {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 1px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 6px 9px;
    border-radius: 9px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    transition: background var(--t), color var(--t);
}

.dropdown-item:hover {
    background: var(--surface-2);
    color: var(--text);
}

.user-dropdown form .logout-link {
    background: none;
    border: none;
    width: 100%;
    font: inherit;
    cursor: pointer;
}

.logout-link { color: #ff8a84 !important; }
.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 3px;
}

.ddi {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}
/* Все иконки меню — единый нейтральный цвет */
.ddi--green,
.ddi--yellow,
.ddi--gray,
.ddi--red,
.ddi--orange {
    background: var(--surface-2);
    color: var(--text-secondary);
}

/* notifications bell */
.notif-wrapper { position: relative; }

.notif-bell {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    position: relative;
    transition: background var(--t), color var(--t), border-color var(--t);
}

.notif-bell:hover,
.notif-wrapper.open .notif-bell {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.notif-badge {
    position: absolute;
    top: 4px; right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--accent);
    color: #04140a;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg);
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(180px, calc(100vw - 24px));
    border-radius: var(--radius-md);
    background: rgba(16, 16, 20, 0.9);
    backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px) scale(0.98);
    transition: opacity 0.18s ease, transform 0.22s var(--ease), visibility 0.18s;
    overflow: hidden;
    z-index: 1300;
}

.notif-dropdown.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.notif-drop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    font-weight: 650;
}

.notif-read-all {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.notif-read-all:hover { color: var(--accent-hover); }

.notif-drop-list { max-height: 160px; overflow-y: auto; }

.notif-drop-item {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border-soft);
    transition: background var(--t);
}
.notif-drop-item:hover { background: var(--surface); }
.notif-drop-item--unread { background: rgba(48, 209, 88, 0.04); }
.notif-drop-item > i { font-size: 14px !important; }

.notif-drop-title { font-size: 11px; font-weight: 600; color: var(--text); margin-bottom: 1px; }
.notif-drop-msg { font-size: 10.5px; color: var(--text-muted); line-height: 1.35; }
.notif-drop-time { font-size: 9.5px; color: var(--text-faint); margin-top: 2px; }

.notif-drop-empty {
    padding: 20px 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.notif-drop-empty i { font-size: 16px; opacity: 0.5; }

.notif-drop-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-top: 1px solid var(--border);
    transition: background var(--t), color var(--t);
}
.notif-drop-footer:hover { background: var(--surface); color: var(--text); }

/* hamburger */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    padding: 10px;
    transition: background var(--t), border-color var(--t);
}
.hamburger-btn:hover {
    background: var(--surface);
    border-color: var(--border);
}
.hamburger-btn span {
    display: block;
    height: 1.5px;
    width: 100%;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s ease;
}

/* mobile drawer */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1400;
}
.mobile-overlay.active { opacity: 1; pointer-events: auto; }

.mobile-drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(340px, 88vw);
    background: rgba(12, 12, 16, 0.92);
    backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    border-left: 1px solid var(--border);
    transform: translateX(105%);
    transition: transform 0.32s var(--ease);
    z-index: 1500;
    display: flex;
    flex-direction: column;
}
.mobile-drawer.active { transform: translateX(0); }

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--border);
}

.mobile-drawer-close {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.mobile-drawer-close:hover { background: var(--surface-2); color: #fff; }

.mobile-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 550;
    transition: background var(--t), color var(--t);
}
.mobile-nav-link:hover,
.mobile-nav-link--active { background: var(--surface); color: var(--text); }
.mobile-nav-link i { font-size: 18px; opacity: 0.7; }

.mobile-nav-section-label {
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
    padding: 16px 14px 8px;
}

.mobile-nav-sub-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 10px 18px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    transition: background var(--t), color var(--t);
}
.mobile-nav-sub-link:hover { background: var(--surface); color: var(--text); }
.mobile-nav-sub-link i { font-size: 15px; }

.mobile-drawer-divider {
    height: 1px;
    background: var(--border);
    margin: 10px 8px;
}

.mobile-drawer-footer {
    padding: 14px;
    border-top: 1px solid var(--border);
}

.mobile-drawer-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 4px;
}
.mobile-drawer-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}
.mobile-drawer-username { font-size: 14px; font-weight: 650; }
.mobile-drawer-role { font-size: 12px; color: var(--text-muted); }

.mobile-drawer-login,
.mobile-drawer-cabinet {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: 14px;
    font-weight: 650;
    transition: background var(--t), color var(--t);
}
.mobile-drawer-login {
    background: var(--text);
    color: #0a0a0a;
}
.mobile-drawer-login:hover { background: #fff; color: #000; }
.mobile-drawer-cabinet {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}
.mobile-drawer-cabinet:hover { background: var(--surface-2); }

@media (max-width: 860px) {
    .nav-links { display: none; }
    .hamburger-btn { display: flex; }
    .user-name { display: none; }
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #030305;
    border-bottom: 1px solid var(--border-soft);
}

/* Основное фото героя: рендер справа, левый край растворяется в тёмном фоне.
   Тянет до самого верха: шапка-остров полупрозрачная и размытая,
   а верх рендера почти чёрный, поэтому швов не видно. */
.hero-visual {
    position: absolute;
    top: 0;
    right: 0; bottom: 0;
    width: 62%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}
/* Тёплое свечение поверх рендера (screen просвечивает чёрный фон картинки как свет) */
.hero-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(ellipse 52% 55% at 56% 52%, rgba(255,158,64,0.38) 0%, rgba(255,120,40,0.13) 45%, transparent 70%);
    mix-blend-mode: screen;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.65) 18%, #000 42%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.65) 18%, #000 42%);
    animation: heroGlow 7s ease-in-out infinite;
}
.hero-visual img {
    position: relative;
    z-index: 1;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: 64% center;
    filter: brightness(1.08) saturate(1.06);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.65) 18%, #000 42%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.65) 18%, #000 42%);
}

@keyframes heroGlow {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Пылинки-искры, медленно всплывающие сквозь герой */
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}
.hero-particles span {
    position: absolute;
    bottom: -8px;
    border-radius: 50%;
    background: rgba(255, 205, 150, 0.85);
    box-shadow: 0 0 6px rgba(255, 170, 90, 0.55);
    opacity: 0;
    animation: heroFloat linear infinite;
}
@keyframes heroFloat {
    0%   { transform: translate(0, 0); opacity: 0; }
    10%  { opacity: var(--o, 0.5); }
    85%  { opacity: var(--o, 0.5); }
    100% { transform: translate(var(--dx, 20px), -105vh); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-particles { display: none; }
    .hero-visual::before { animation: none; }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 75% at 24% 45%, rgba(5,5,7,0.55) 0%, transparent 70%),
        linear-gradient(180deg, rgba(5,5,7,0.65) 0%, rgba(5,5,7,0.12) 38%, rgba(5,5,7,0.92) 100%);
}

.hero-blob { display: none; } /* quieter */

.hero .container {
    position: relative;
    z-index: 3;
    text-align: left;
    padding-top: var(--navbar-h);
}

.hero-content {
    max-width: 620px;
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 4.4rem);
    font-weight: 720;
    letter-spacing: -0.04em;
    line-height: 1.0;
    margin-bottom: 16px;
    color: #fff;
    text-shadow: 0 4px 40px rgba(0,0,0,0.45);
}

.hero-subtitle {
    color: rgba(255,255,255,0.72);
    font-size: clamp(14px, 1.8vw, 16.5px);
    line-height: 1.55;
    margin: 0 0 28px;
    max-width: 450px;
    font-weight: 450;
}

.hero-actions {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-btn {
    min-height: 44px;
    padding: 0 20px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .hero { min-height: 88vh; }
    .hero-visual {
        top: 0;
        left: 0;
        width: 100%;
        opacity: 0.5;
    }
    .hero-visual img {
        object-position: center 30%;
        -webkit-mask-image: linear-gradient(to top, transparent 0%, rgba(0,0,0,0.75) 22%, #000 55%);
        mask-image: linear-gradient(to top, transparent 0%, rgba(0,0,0,0.75) 22%, #000 55%);
    }
    .hero-actions { flex-direction: column; align-items: flex-start; }
    .hero-btn { width: 100%; max-width: 280px; }
}

/* ── Stats bar ──────────────────────────────────────────── */
.stats-bar {
    padding: 10px 0 14px;
    border-bottom: 1px solid var(--border-soft);
}

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

/* Общие карточки-статы (используются на других страницах) */
.stats-bar .stat-item,
.stat-item {
    text-align: center;
    padding: 18px 12px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

/* На главной — компактные цифры без коробок */
.stats-bar .stat-item {
    padding: 0 8px;
    background: none;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.stats-bar .stat-value {
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.1;
}

.stats-bar .stat-label {
    margin-top: 2px;
    font-size: 10px;
    letter-spacing: 0.05em;
    color: var(--text-faint);
}

.stat-value {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 720;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.1;
}

.stat-label {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 550;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
}

/* ── Sections ───────────────────────────────────────────── */
.categories,
.simple-news-section,
.discord-section,
.news-section {
    padding: 88px 0;
    position: relative;
}

.categories h2,
.simple-news-header h2,
.discord-info h2,
.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    text-align: center;
    margin: 0 auto 12px;
    color: var(--text);
}

.section-desc {
    text-align: center;
    color: var(--text-muted);
    font-size: 15px;
    max-width: 480px;
    margin: 0 auto 40px;
}

.simple-news-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}
.simple-news-header h2 { margin: 0; text-align: left; }

/* ── Cards (catalog + packs) ────────────────────────────── */
.card-grid,
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.card,
.catalog-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 22px;
    min-height: 0;
    border-radius: var(--radius-lg);
    background: var(--glass);
    backdrop-filter: blur(var(--blur)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-glass);
    transition: transform var(--t), border-color var(--t), box-shadow var(--t), background var(--t);
    overflow: hidden;
}

.card::before,
.catalog-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(255,255,255,0.06) 0%, transparent 42%);
    pointer-events: none;
    border-radius: inherit;
}

.card:hover,
.catalog-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
}

.card h3,
.catalog-body h3 {
    font-size: 1.15rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--text);
    position: relative;
}

.card p,
.catalog-body p {
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalog-card {
    min-height: 260px;
    justify-content: space-between;
    isolation: isolate;
}

.catalog-body { position: relative; z-index: 1; }
.catalog-actions,
.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 22px;
    position: relative;
    z-index: 1;
}

.catalog-btn,
.btn-card {
    min-height: 40px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: var(--radius-full);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.card-icon i { font-size: 22px; color: var(--accent); }
.card-icon--voxel { background: rgba(10,132,255,0.1); border-color: rgba(10,132,255,0.2); }
.card-icon--voxel i { color: #64b5ff; }
.card-icon--real { background: var(--accent-soft); border-color: rgba(48,209,88,0.22); }
.card-icon--texel { background: rgba(255,159,10,0.1); border-color: rgba(255,159,10,0.22); }
.card-icon--texel i { color: #ffb340; }

/* pack cover cards */
.pack-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0a0a0c;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    position: relative;
    z-index: 1;
}
.pack-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}
.card:hover .pack-cover img { transform: scale(1.04); }

.pack-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}
.author-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}
.author-name {
    font-size: 13px;
    font-weight: 550;
    color: var(--text-secondary);
}

.pack-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 4px;
    position: relative;
    z-index: 1;
}

.pack-stats .stat-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-secondary);
    text-align: left;
}
.pack-stats .stat-item svg {
    width: 13px;
    height: 13px;
    fill: var(--text-muted);
}
.stat-item-body { display: flex; flex-direction: column; line-height: 1.15; }
.stat-item-val { color: var(--text); font-weight: 650; font-size: 12.5px; }
.stat-item-lbl {
    color: var(--text-faint);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 960px) {
    .card-grid,
    .catalog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .card-grid,
    .catalog-grid { grid-template-columns: 1fr; }
    .catalog-actions,
    .card-actions { grid-template-columns: 1fr; }
}

/* reveal */
.reveal-card {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal-card.active {
    opacity: 1;
    transform: translateY(0);
}

/* ── Page heroes / breadcrumbs ──────────────────────────── */
.hero-catalog,
.page-hero {
    padding: calc(var(--navbar-h) + 48px) 0 28px;
    text-align: center;
}

.hero-catalog h1,
.page-hero h1 {
    margin-bottom: 10px;
}

.hero-catalog .hero-subtitle,
.page-hero p {
    color: var(--text-muted);
    font-size: 15px;
    max-width: 520px;
    margin: 0 auto;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-faint);
}
.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--t);
}
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs span { color: var(--text-faint); }

/* ── Home news grid ─────────────────────────────────────── */
.simple-news-section {
    background: transparent;
    border-top: 1px solid var(--border-soft);
}

.simple-news-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: repeat(3, minmax(110px, 1fr));
    gap: 12px;
    min-height: 400px;
}

.news-grid-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    border: 1px solid var(--border);
    background: #0a0a0c;
    transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.news-grid-item--featured { grid-row: span 3; }
.news-grid-item:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.news-grid-bg {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.55s var(--ease);
}
.news-grid-item:hover .news-grid-bg { transform: scale(1.04); }

.news-grid-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 18px;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.35) 70%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.news-grid-item--featured .news-grid-overlay { padding: 24px; }

.news-date-label {
    color: var(--accent);
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.news-title-label {
    color: #fff;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -0.01em;
}
.news-grid-item--featured .news-title-label { font-size: 22px; }

@media (max-width: 900px) {
    .simple-news-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        min-height: 0;
    }
    .news-grid-item--featured {
        grid-column: span 2;
        grid-row: span 1;
        aspect-ratio: 16/9;
    }
    .news-grid-item { aspect-ratio: 16/9; }
}
@media (max-width: 600px) {
    .simple-news-grid { grid-template-columns: 1fr; }
    .news-grid-item,
    .news-grid-item--featured {
        grid-column: auto;
        aspect-ratio: 16/9;
    }
    .simple-news-header { flex-direction: column; align-items: flex-start; }
}

/* ── Discord section ────────────────────────────────────── */
.discord-section {
    border-top: 1px solid var(--border-soft);
    padding-bottom: 100px;
}

.discord-widget-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    padding: 36px;
    border-radius: var(--radius-xl);
    background: var(--glass);
    backdrop-filter: blur(var(--blur)) saturate(160%);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-glass);
}

.discord-info h2 {
    text-align: left;
    margin: 0 0 12px;
}

.discord-info p {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 22px;
    max-width: 440px;
}

.discord-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.discord-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}
.discord-feature i {
    width: 32px; height: 32px;
    border-radius: 10px;
    background: rgba(88, 101, 242, 0.12);
    color: #8b95f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.btn-discord-join {
    min-height: 46px;
    padding: 0 22px;
    border-radius: var(--radius-full);
}

.dcw {
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
}

.dcw-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.dcw-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(145deg, #6875f5, #5865F2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
}

.dcw-name { font-size: 15px; font-weight: 650; color: #fff; margin-bottom: 4px; }
.dcw-online {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}
.dcw-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.dcw-members-label {
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    margin-bottom: 10px;
}

.dcw-members {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.dcw-member { position: relative; width: 36px; height: 36px; }
.dcw-member img,
.dcw-avatar-ph {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.dcw-avatar-ph {
    background: var(--discord);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}
.dcw-status {
    position: absolute;
    bottom: 0; right: 0;
    width: 11px; height: 11px;
    border-radius: 50%;
    border: 2px solid #121218;
}
.dcw-status--online { background: var(--accent); }
.dcw-status--idle { background: var(--warning); }
.dcw-status--dnd { background: var(--danger); }

.dcw-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: linear-gradient(180deg, #6875f5, #5865F2);
    color: #fff;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 650;
    font-size: 14px;
    transition: transform var(--t), filter var(--t);
}
.dcw-btn:hover { transform: translateY(-1px); filter: brightness(1.06); color: #fff; }

@media (max-width: 860px) {
    .discord-widget-wrapper {
        grid-template-columns: 1fr;
        padding: 24px;
        gap: 28px;
    }
    .dcw { margin: 0 auto; }
    .discord-info h2 { text-align: center; }
    .discord-info p { margin-left: auto; margin-right: auto; text-align: center; }
    .discord-features { align-items: center; }
    .btn-discord-join { width: 100%; }
}

/* ── Footer ─────────────────────────────────────────────── */
footer {
    background: transparent;
    border-top: 1px solid var(--border-soft);
    padding: 72px 0 36px;
    margin-top: auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-info { max-width: 280px; }
.footer-info p {
    color: var(--text-muted);
    font-size: 13.5px;
    margin-top: 14px;
    line-height: 1.55;
}

.footer-nav {
    display: flex;
    gap: 56px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col h4 {
    font-size: 12px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text);
    margin-bottom: 6px;
}

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13.5px;
    transition: color var(--t);
}
.footer-col a:hover { color: var(--text); }
.footer-col a.footer-link--primary {
    color: var(--text-secondary);
    font-weight: 550;
}

.footer-bottom {
    border-top: 1px solid var(--border-soft);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--text-faint);
    font-size: 12.5px;
}

.legal { display: flex; gap: 20px; flex-wrap: wrap; }
.legal a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--t);
}
.legal a:hover { color: var(--text); }

@media (max-width: 768px) {
    .footer-top { flex-direction: column; gap: 36px; }
    .footer-nav { flex-wrap: wrap; gap: 28px 40px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .legal { justify-content: center; }
}

/* ── Modals ─────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}
.modal-overlay.active { display: flex; }

.modal-window {
    background: rgba(18, 18, 24, 0.88);
    backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(180%);
    border: 1px solid var(--border-strong);
    padding: 32px 28px;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.08);
}

.modal-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t), color var(--t);
}
.modal-close:hover { background: var(--surface-2); color: #fff; }

.modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 22px;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
    width: 100%;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--border);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--text);
    outline: none;
    font-size: 14px;
    transition: border-color var(--t), box-shadow var(--t), background var(--t);
}

.auth-input:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: rgba(255,255,255,0.28);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
    background: rgba(0, 0, 0, 0.4);
}

textarea { resize: vertical; min-height: 100px; }

.divider {
    text-align: center;
    margin: 16px 0;
    color: var(--text-faint);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
}
.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 38%;
    height: 1px;
    background: var(--border);
}
.divider::before { left: 0; }
.divider::after { right: 0; }

.switch-auth {
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-muted);
}
.switch-auth a {
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 1px;
}
.switch-auth a:hover { border-bottom-color: #fff; }

.captcha-field { display: flex; align-items: center; gap: 10px; }
.captcha-question {
    flex: 1;
    background: rgba(0,0,0,0.28);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    user-select: none;
}
.captcha-input { width: 80px !important; text-align: center; flex-shrink: 0; }

/* ── News page ──────────────────────────────────────────── */
.news-page {
    padding-top: calc(var(--navbar-h) + 40px);
    min-height: 100vh;
    padding-bottom: 80px;
}

.news-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 24px 60px;
}

.news-header {
    text-align: center;
    margin-bottom: 40px;
}
.news-header h1 { margin-bottom: 8px; }
.news-header p { color: var(--text-muted); font-size: 15px; }

.news-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-card-horizontal,
.news-card {
    display: flex;
    flex-direction: column;
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-glass);
    transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}

.news-card-horizontal:hover,
.news-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.news-image-col,
.news-image-link {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0a0a0c;
    position: relative;
    overflow: hidden;
}
.news-image-col img,
.news-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}
.news-card-horizontal:hover .news-image-col img,
.news-card:hover .news-image-link img { transform: scale(1.03); }

.news-content-col,
.news-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-date,
.news-meta {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.3;
    margin: 0;
}
.news-title a {
    color: inherit;
    text-decoration: none;
}
.news-title a:hover { opacity: 0.85; }

.news-text-content,
.news-excerpt {
    color: var(--text-secondary);
    font-size: 14.5px;
    line-height: 1.6;
    white-space: pre-line;
}

.news-text-content.collapsed {
    max-height: 150px;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.btn-expand {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background var(--t), color var(--t);
}
.btn-expand:hover {
    background: var(--surface-2);
    color: var(--text);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 900px) {
    .news-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .news-grid { grid-template-columns: 1fr; }
}

/* ── Pack info ──────────────────────────────────────────── */
.pack-hero {
    padding: calc(var(--navbar-h) + 40px) 0 48px;
    text-align: center;
    position: relative;
    background-size: cover !important;
    background-position: center !important;
    border-bottom: 1px solid var(--border-soft);
}
.pack-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5,5,7,0.75), rgba(5,5,7,0.92));
}
.pack-hero .container { position: relative; z-index: 1; }
.pack-hero h1 { margin-bottom: 8px; }

.pack-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 28px;
    padding: 40px 24px 60px;
}

.gallery-main {
    width: 100%;
    aspect-ratio: 16/9;
    background: #0a0a0c;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.gallery-thumb {
    width: 72px;
    height: 52px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    object-fit: cover;
    opacity: 0.55;
    transition: opacity var(--t), border-color var(--t);
    flex-shrink: 0;
}
.gallery-thumb:hover,
.gallery-thumb.active {
    opacity: 1;
    border-color: rgba(255,255,255,0.5);
}

.pack-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border);
    box-shadow: var(--shadow-glass);
    height: fit-content;
    position: sticky;
    top: calc(var(--navbar-h) + 20px);
}

.pack-meta { color: var(--text-muted); font-size: 13px; }
.pack-desc { color: var(--text-secondary); line-height: 1.6; font-size: 14.5px; }

.authors { display: flex; flex-wrap: wrap; gap: 8px; }
.author-badge {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12.5px;
    font-weight: 550;
    color: var(--text-secondary);
}

.pack-stats:not(.pack-cover ~ *) {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}
.pack-container .pack-stats {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-top: 16px;
}
.pack-container .stat { flex: 1; text-align: center; }
.pack-container .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}
.pack-container .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
}

.btn-download-main {
    width: 100%;
    min-height: 48px;
    border-radius: var(--radius-full);
}

.comments-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
}
.comments-header {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.comment,
.comment-form {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-glass);
}

.comment-author { font-weight: 650; color: var(--text); font-size: 14px; }
.comment-date { font-size: 12px; color: var(--text-faint); }
.comment-text { color: var(--text-secondary); margin-top: 10px; line-height: 1.55; font-size: 14px; }

.comment-form textarea {
    margin-bottom: 10px;
}
.comment-form button {
    background: var(--text);
    color: #0a0a0a;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 650;
    font-size: 13.5px;
    cursor: pointer;
    transition: transform var(--t), background var(--t);
}
.comment-form button:hover { background: #fff; transform: translateY(-1px); }

@media (max-width: 900px) {
    .pack-container { grid-template-columns: 1fr; }
    .pack-info { position: static; }
}

/* ── Dashboard / cabinet ────────────────────────────────── */
.dashboard-page,
.dashboard-main,
.settings-main,
.notif-page {
    min-height: 100vh;
    padding-top: calc(var(--navbar-h) + 32px);
    padding-bottom: 80px;
    background: transparent;
}

.dash-logo-row {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-faint);
}
.dash-logo-row a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--t);
}
.dash-logo-row a:hover { color: var(--text); }
.dash-logo-row .sep { color: var(--text-faint); }
.dash-logo-row .cur { color: var(--text); font-weight: 600; }

.dash-page {
    display: flex;
    justify-content: center;
    padding: 0 20px 40px;
}

.dash-dialog {
    width: 100%;
    max-width: 800px;
    background: var(--glass);
    backdrop-filter: blur(var(--blur)) saturate(160%);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-glass);
    overflow: hidden;
}

.dash-dialog-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
}

.dash-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--border);
    object-fit: cover;
    flex-shrink: 0;
}

.dash-titles { flex: 1; min-width: 0; }
.dash-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}
.dash-subtitle {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 3px;
}

.dash-close {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    text-decoration: none;
    transition: background var(--t), color var(--t);
    flex-shrink: 0;
}
.dash-close:hover { background: var(--surface-2); color: #fff; }

.dash-dialog-body { padding: 24px; }

.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.dash-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    text-align: center;
}
.dash-stat-val {
    font-size: 1.4rem;
    font-weight: 720;
    letter-spacing: -0.03em;
    color: var(--text);
}
.dash-stat-lbl {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: 6px;
}

.dash-section + .dash-section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--border-soft);
}

.dash-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 650;
}

.dash-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.dash-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 550;
    transition: border-color var(--t), background var(--t), color var(--t), transform var(--t);
}
.dash-action:hover {
    border-color: var(--border-strong);
    background: var(--surface-2);
    color: var(--text);
    transform: translateY(-1px);
}
.dash-action i { font-size: 18px; color: var(--text-muted); }
.dash-action:hover i { color: var(--text); }

.dash-empty,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 36px 20px;
    text-align: center;
    color: var(--text-muted);
}
.dash-empty i,
.empty-state i {
    font-size: 28px;
    opacity: 0.4;
}
.dash-empty p,
.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 560px) {
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-actions { grid-template-columns: 1fr; }
}

/* legacy dashboard classes */
.dashboard-header { margin-bottom: 28px; }
.dashboard-user-info { display: flex; align-items: center; gap: 16px; }
.dashboard-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    backdrop-filter: blur(12px);
    transition: transform var(--t), border-color var(--t);
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
}
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.dashboard-section,
.dashboard-content .dashboard-section {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(var(--blur));
}
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}
.action-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    transition: background var(--t), border-color var(--t), transform var(--t);
}
.action-card:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}
.action-card i { font-size: 24px; color: var(--text-secondary); }

/* ── Settings ───────────────────────────────────────────── */
.settings-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

.settings-sidebar {
    border: 1px solid var(--border);
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: sticky;
    top: calc(var(--navbar-h) + 20px);
    height: fit-content;
}

.settings-sidebar-title {
    padding: 14px 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    font-weight: 650;
}

.settings-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 16px;
    border-left: 2px solid transparent;
    font-size: 13.5px;
    font-weight: 500;
    transition: background var(--t), color var(--t), border-color var(--t);
}
.settings-sidebar-link:hover {
    background: var(--surface);
    color: var(--text);
}
.settings-sidebar-link.active {
    background: var(--surface-2);
    border-left-color: var(--accent);
    color: var(--text);
}

.settings-content { display: flex; flex-direction: column; gap: 14px; }

.settings-card {
    border: 1px solid var(--border);
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-glass);
}
.settings-card h2 {
    font-size: 1.2rem;
    margin-bottom: 6px;
}
.settings-card p {
    color: var(--text-muted);
    font-size: 13.5px;
    margin-bottom: 16px;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.settings-field label {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 650;
}

.settings-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.settings-avatar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}
.settings-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.settings-note { color: var(--text-muted); font-size: 12px; }

.settings-alert {
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 14px;
}
.settings-alert--success {
    background: var(--accent-soft);
    border-color: rgba(48, 209, 88, 0.28);
    color: #8ef0ad;
}
.settings-alert--error {
    background: rgba(255, 69, 58, 0.12);
    border-color: rgba(255, 69, 58, 0.28);
    color: #ffb0ab;
}

.settings-devices { width: 100%; border-collapse: collapse; }
.settings-devices th,
.settings-devices td {
    border-bottom: 1px solid var(--border-soft);
    padding: 12px 6px;
    text-align: left;
    vertical-align: top;
}
.settings-devices th {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.settings-devices td {
    color: var(--text-secondary);
    font-size: 13px;
}

@media (max-width: 980px) {
    .settings-layout { grid-template-columns: 1fr; }
    .settings-sidebar { position: static; }
}
@media (max-width: 700px) {
    .settings-form-grid { grid-template-columns: 1fr; }
}

/* ── Paint / repaint pages ──────────────────────────────── */
.paint-page main,
body.paint-page main {
    padding-top: calc(var(--navbar-h) + 28px);
    padding-bottom: 80px;
}

.paint-toolbar {
    max-width: 1160px;
    margin: 0 auto 24px;
    padding: 0 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.paint-toolbar h1 { margin-bottom: 6px; }
.paint-toolbar p {
    color: var(--text-muted);
    font-size: 14px;
}

.paint-search {
    min-width: min(320px, 100%);
}
.paint-search input {
    border-radius: var(--radius-full);
    padding-left: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

/* ── Notifications page ─────────────────────────────────── */
.notif-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}
.notif-page-header h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}
.notif-page-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 6px;
}

.notif-feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 700px;
}

.notif-entry {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--t), background var(--t), transform var(--t);
}
.notif-entry:hover {
    border-color: var(--border-strong);
    background: rgba(255,255,255,0.06);
    transform: translateY(-1px);
}

.notif-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}
.notif-icon--approved { background: var(--accent-soft); color: var(--accent); }
.notif-icon--rejected { background: rgba(255,69,58,0.12); color: #ff8a84; }
.notif-icon--comment  { background: rgba(88,101,242,0.12); color: #8b95f7; }
.notif-icon--system   { background: var(--surface-2); color: var(--text-muted); }

.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 14px; font-weight: 650; color: var(--text); margin-bottom: 4px; }
.notif-msg { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.notif-time { font-size: 11px; color: var(--text-faint); margin-top: 6px; }
.notif-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 80px 0;
}
.notif-empty i {
    font-size: 48px;
    display: block;
    margin-bottom: 14px;
    opacity: 0.35;
}

/* ── Legal pages ────────────────────────────────────────── */
.legal-page,
.privacy-page,
.terms-page {
    padding: calc(var(--navbar-h) + 48px) 0 80px;
}
.legal-page .container,
.privacy-page .container,
.terms-page .container {
    max-width: 760px;
}

/* ── Misc / utilities ───────────────────────────────────── */
.success-toast {
    position: fixed;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 18, 24, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(48, 209, 88, 0.35);
    color: #8ef0ad;
    padding: 12px 22px;
    border-radius: var(--radius-full);
    font-weight: 550;
    font-size: 13.5px;
    box-shadow: var(--shadow-md);
    z-index: 9999;
    transition: top 0.4s var(--ease);
    pointer-events: none;
}
.success-toast.show { top: 24px; }

.modal-error-text {
    color: #ff8a84;
    font-size: 13px;
    text-align: center;
    margin-top: 10px;
    display: none;
}
.modal-error-text.active { display: block; }

/* your-adds / content management leftovers */
.content-card,
.upload-card,
.item-card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
}

/* avatar edit buttons */
.btn-avatar-edit,
.btn-avatar-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 550;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--t), color var(--t), border-color var(--t);
    border: 1px solid var(--border);
}
.btn-avatar-edit {
    background: var(--surface);
    color: var(--text);
}
.btn-avatar-edit:hover { background: var(--surface-2); }
.btn-avatar-delete {
    background: rgba(255, 69, 58, 0.1);
    color: #ff8a84;
    border-color: rgba(255, 69, 58, 0.25);
}
.btn-avatar-delete:hover {
    background: var(--danger);
    color: #fff;
}

.input-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* info modal */
.info-modal-window {
    background: rgba(16, 16, 22, 0.92);
    backdrop-filter: blur(var(--blur-strong));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 1100px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* final mobile tweaks */
@media (max-width: 576px) {
    :root { --navbar-h: 50px; --navbar-bar-h: 42px; --navbar-gap: 8px; }
    .navbar { border-radius: 14px; }
    .hamburger-btn { width: 34px; height: 34px; padding: 8px; }
    .notif-bell { width: 34px; height: 34px; font-size: 16px; }
    .categories,
    .simple-news-section,
    .discord-section { padding: 56px 0; }
    .hero h1 { font-size: 2.1rem; }
}

/* ── Extra helpers after redesign ───────────────────────── */
.btn-card--primary,
.card-actions .btn-card.btn-card--primary,
a.btn-card.btn-card--primary {
    background: var(--text) !important;
    color: #0a0a0a !important;
    border-color: transparent !important;
}
.btn-card--primary:hover {
    background: #fff !important;
    color: #000 !important;
}

.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-glass);
}

.comment-head {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

/* ensure first card action is primary look when unmarked */
.card-actions .btn-card:first-child:not(.btn-card--ghost) {
    background: var(--text);
    color: #0a0a0a;
    border-color: transparent;
}
.card-actions .btn-card:first-child:not(.btn-card--ghost):hover {
    background: #fff;
    color: #000;
}
.card-actions .btn-card:last-child {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text);
}

/* pack page sections spacing */
main > .categories {
    padding-top: 24px;
    padding-bottom: 80px;
    background: transparent;
    border-top: none;
}

/* legal pages content */
.legal-content,
.privacy-content,
.terms-content {
    max-width: 760px;
    margin: 0 auto;
    padding: calc(var(--navbar-h) + 48px) 24px 80px;
}
.legal-content h1,
.privacy-content h1,
.terms-content h1 { margin-bottom: 16px; }
.legal-content p,
.privacy-content p,
.terms-content p,
.legal-content li,
.privacy-content li {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.65;
}

/* ── Paint catalog ──────────────────────────────────────── */
.paints-grid {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px 80px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.paint-card {
    display: flex;
    flex-direction: column;
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-glass);
    transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.paint-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}
.paint-card.hidden { display: none; }
.paint-preview {
    aspect-ratio: 16/10;
    background: #0a0a0c;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}
.paint-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}
.paint-card:hover .paint-preview img { transform: scale(1.04); }
.paint-content {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.paint-title {
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0;
}
.paint-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 11.5px;
    font-weight: 550;
    color: var(--text-muted);
}
.paint-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}
.paint-author {
    font-size: 12.5px;
    color: var(--text-faint);
}
.paint-actions { margin-top: auto; padding-top: 6px; }
.btn-install {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    border-radius: var(--radius-full);
    background: var(--text);
    color: #0a0a0a;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 650;
    transition: transform var(--t), background var(--t);
}
.btn-install:hover {
    background: #fff;
    color: #000;
    transform: translateY(-1px);
}
#noResults {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 48px 16px;
    font-size: 14px;
}
@media (max-width: 960px) {
    .paints-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .paints-grid { grid-template-columns: 1fr; }
    .paint-toolbar { padding: 0 16px; }
}

/* ── Legal pages ────────────────────────────────────────── */
.legal-container {
    max-width: 760px;
    margin: 0 auto;
    padding: calc(var(--navbar-h) + 48px) 24px 80px;
}
.legal-container .update-date {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.legal-container h1 {
    margin-bottom: 20px;
}
.legal-content h2 {
    font-size: 1.15rem;
    margin: 28px 0 10px;
}
.legal-content p,
.legal-content li {
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 10px;
    font-size: 14.5px;
}
.legal-content ul {
    padding-left: 18px;
    list-style: disc;
    margin-bottom: 12px;
}
.legal-content strong { color: var(--text); font-weight: 650; }

/* profile settings page shell */
.settings-main,
body:has(.settings-layout) main {
    padding-top: calc(var(--navbar-h) + 32px);
    padding-bottom: 80px;
}

/* your-adds page soft defaults */
.ya-page,
.your-adds-page {
    padding-top: calc(var(--navbar-h) + 32px);
    padding-bottom: 80px;
}

/* ============================================================
   Profile settings (ps-*) — liquid glass
   ============================================================ */
.profile-settings-page {
    min-height: 100vh;
    padding-bottom: 80px;
    background: transparent;
}
.ps-logo-row {
    max-width: 800px;
    margin: 0 auto;
    padding: calc(var(--navbar-h) + 28px) 20px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-faint);
}
.ps-logo-row a { color: var(--text-muted); text-decoration: none; transition: color var(--t); }
.ps-logo-row a:hover { color: var(--text); }
.ps-logo-row .sep { color: var(--text-faint); }
.ps-logo-row .cur { color: var(--text); font-weight: 600; }

.ps-page { display: flex; justify-content: center; padding: 0 20px 40px; }

.ps-dialog {
    width: 100%;
    max-width: 800px;
    background: var(--glass);
    backdrop-filter: blur(var(--blur)) saturate(160%);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-glass);
    overflow: hidden;
}

.ps-dialog-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.ps-dialog-icon img,
.ps-dialog-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
    display: block;
}
.ps-dialog-titles { flex: 1; min-width: 120px; }
.ps-dialog-title { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
.ps-dialog-subtitle { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }

.ps-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: var(--accent-soft);
    border: 1px solid rgba(48,209,88,0.25);
    color: #8ef0ad;
    font-size: 12px;
    font-weight: 600;
}
.ps-status.is-off {
    background: rgba(255,255,255,0.04);
    border-color: var(--border);
    color: var(--text-muted);
}
.ps-status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.ps-close {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    transition: background var(--t), color var(--t);
}
.ps-close:hover { background: var(--surface-2); color: #fff; }

.ps-dialog-body { padding: 22px; }

.ps-section + .ps-section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--border-soft);
}
.ps-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 650;
    margin-bottom: 14px;
}
.ps-section-title {
    font-size: 15px;
    font-weight: 650;
    color: var(--text);
    margin-bottom: 4px;
}
.ps-section-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.5;
}

.ps-avatar-block {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.ps-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}
.ps-avatar-info {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
}
.ps-avatar-info b { color: var(--text); font-weight: 650; }

.ps-field { margin-bottom: 12px; }
.ps-field-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 650;
    margin-bottom: 6px;
}
.ps-field-hint { color: var(--text-faint); text-transform: none; letter-spacing: 0; font-weight: 500; }
.ps-input-wrap { position: relative; }
.ps-input {
    width: 100%;
    background: rgba(0,0,0,0.28);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color var(--t), box-shadow var(--t);
}
.ps-input:focus {
    border-color: rgba(255,255,255,0.28);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}

.ps-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.ps-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: var(--radius-full);
    font-size: 13.5px;
    font-weight: 650;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform var(--t), background var(--t), color var(--t), border-color var(--t);
    text-decoration: none;
}
.ps-btn-primary { background: var(--text); color: #0a0a0a; }
.ps-btn-primary:hover { background: #fff; transform: translateY(-1px); }
.ps-btn-ghost {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text-secondary);
}
.ps-btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.ps-btn-danger {
    background: rgba(255,69,58,0.12);
    border-color: rgba(255,69,58,0.28);
    color: #ff8a84;
}
.ps-btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.ps-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 550;
    cursor: pointer;
    padding: 6px 0;
    transition: color var(--t);
}
.ps-expand-btn:hover { color: var(--text); }
.ps-expand-btn i { transition: transform 0.2s var(--ease); }
.ps-expand-btn.is-open i { transform: rotate(90deg); }

.ps-reveal { display: none; }
.ps-reveal.is-open { display: block; }

.ps-grid3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
@media (max-width: 700px) {
    .ps-grid3 { grid-template-columns: 1fr; }
}

.ps-settings-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px 14px;
}

.ps-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-soft);
}
.ps-toggle-row:last-child { border-bottom: none; }
.ps-toggle-info { flex: 1; min-width: 0; }
.ps-toggle-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.ps-toggle-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }

.ps-toggle {
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    border: 1px solid var(--border);
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--t);
}
.ps-toggle::after {
    content: "";
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s var(--ease);
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.ps-toggle.is-on {
    background: var(--accent);
    border-color: transparent;
}
.ps-toggle.is-on::after { transform: translateX(18px); }

.ps-discord-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.ps-codebox {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 12px 0;
}
.ps-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text);
    margin: 8px 0;
}
.ps-code-help {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
}
.ps-code-help code {
    background: rgba(255,255,255,0.06);
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.ps-alert {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 14px;
    border: 1px solid transparent;
}
.ps-alert--success {
    background: var(--accent-soft);
    border-color: rgba(48,209,88,0.28);
    color: #8ef0ad;
}
.ps-alert--error {
    background: rgba(255,69,58,0.12);
    border-color: rgba(255,69,58,0.28);
    color: #ffb0ab;
}

.ps-device-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 20px;
}
.ps-device {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    overflow: hidden;
}
.ps-device-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
    align-items: center;
}
.ps-device-row:last-child { border-bottom: none; }
.ps-device-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.ps-device-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.ps-device-date { font-size: 12px; color: var(--text-faint); text-align: right; }
@media (max-width: 640px) {
    .ps-device-row { grid-template-columns: 1fr; }
    .ps-device-date { text-align: left; }
}

/* ============================================================
   Your uploads (adds-*) — liquid glass
   ============================================================ */
.adds-page {
    padding: calc(var(--navbar-h) + 36px) 0 80px;
    min-height: 100vh;
}

.adds-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.adds-header h1 { margin-bottom: 6px; }
.adds-header p { color: var(--text-muted); font-size: 14px; }

.adds-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}
.adds-stat {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-glass);
}
.adds-stat-val {
    display: block;
    font-size: 1.5rem;
    font-weight: 720;
    letter-spacing: -0.03em;
    color: var(--text);
}
.adds-stat-val--approved { color: var(--accent); }
.adds-stat-val--pending { color: var(--warning); }
.adds-stat-val--rejected { color: #ff8a84; }
.adds-stat-lbl {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

.adds-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    width: fit-content;
    max-width: 100%;
}
.adds-tab {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 550;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--t), color var(--t);
}
.adds-tab:hover { color: var(--text); }
.adds-tab.active {
    background: var(--text);
    color: #0a0a0a;
}

.adds-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.adds-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 64px 20px;
    color: var(--text-muted);
    text-align: center;
}
.adds-empty i { font-size: 40px; opacity: 0.35; }

.adds-card {
    background: var(--glass);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-glass);
    display: flex;
    flex-direction: column;
    transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.adds-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}
.adds-card.is-hidden { display: none; }

.adds-card-img {
    position: relative;
    aspect-ratio: 16/10;
    background: #0a0a0c;
    overflow: hidden;
}
.adds-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.adds-status {
    position: absolute;
    top: 10px; left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 650;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
}
.adds-status--approved { background: rgba(48,209,88,0.2); color: #8ef0ad; }
.adds-status--pending { background: rgba(255,159,10,0.2); color: #ffc46b; }
.adds-status--rejected { background: rgba(255,69,58,0.2); color: #ffb0ab; }

.adds-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.adds-card-title {
    font-size: 15px;
    font-weight: 650;
    color: var(--text);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.adds-card-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--text-faint);
}
.adds-card-rejection,
.adds-card-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    line-height: 1.4;
}
.adds-card-rejection {
    background: rgba(255,69,58,0.1);
    border: 1px solid rgba(255,69,58,0.22);
    color: #ffb0ab;
}
.adds-card-note {
    background: rgba(10,132,255,0.1);
    border: 1px solid rgba(10,132,255,0.22);
    color: #9ec9ff;
}
.adds-note-label {
    display: block;
    font-size: 11px;
    font-weight: 650;
    margin-bottom: 2px;
    opacity: 0.85;
}
.adds-note-text { color: inherit; }

.adds-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 6px;
}
.adds-card-btn,
.adds-card-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: var(--radius-full);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--t), color var(--t), border-color var(--t);
}
.adds-card-btn:hover,
.adds-card-btn-icon:hover {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border-strong);
}
.adds-card-btn--dl {
    background: var(--text);
    color: #0a0a0a;
    border-color: transparent;
}
.adds-card-btn--dl:hover { background: #fff; color: #000; }
.adds-card-btn-icon {
    width: 34px;
    padding: 0;
}
.adds-card-btn-icon--del {
    color: #ff8a84;
    border-color: rgba(255,69,58,0.25);
}
.adds-card-btn-icon--del:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

@media (max-width: 960px) {
    .adds-grid { grid-template-columns: repeat(2, 1fr); }
    .adds-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .adds-grid { grid-template-columns: 1fr; }
    .adds-tabs { width: 100%; overflow-x: auto; }
}

/* upload / edit / delete modals for your-adds */
.upload-modal-overlay,
.edit-modal-overlay,
.del-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.62);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2100;
    padding: 16px;
}
.upload-modal-overlay.active,
.edit-modal-overlay.active,
.del-overlay.active { display: flex; }

.upload-modal,
.edit-modal,
.del-box {
    width: 100%;
    max-width: 520px;
    background: rgba(16,16,22,0.92);
    backdrop-filter: blur(var(--blur-strong));
    -webkit-backdrop-filter: blur(var(--blur-strong));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.upload-modal-close,
.edit-modal-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.upload-modal-close:hover,
.edit-modal-close:hover { background: var(--surface-2); color: #fff; }

.form-group { margin-bottom: 14px; }
.form-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 650;
    margin-bottom: 6px;
}
.form-label .required { color: #ff8a84; }
.form-input,
.form-textarea,
.form-file {
    width: 100%;
    background: rgba(0,0,0,0.28);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    color: var(--text);
    font-size: 14px;
    outline: none;
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-input:focus,
.form-textarea:focus {
    border-color: rgba(255,255,255,0.28);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}
.btn-cancel,
.btn-submit,
.del-btn-cancel,
.del-btn-confirm {
    min-height: 40px;
    padding: 0 16px;
    border-radius: var(--radius-full);
    font-size: 13.5px;
    font-weight: 650;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn-cancel,
.del-btn-cancel {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text-secondary);
}
.btn-submit {
    background: var(--text);
    color: #0a0a0a;
}
.del-btn-confirm {
    background: var(--danger);
    color: #fff;
}
.del-box { max-width: 400px; text-align: center; }
.del-icon { font-size: 36px; color: #ff8a84; margin-bottom: 10px; }
.del-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.del-msg, .del-note { color: var(--text-muted); font-size: 13.5px; margin-bottom: 8px; }
.del-btns { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }

.upload-arch-icon,
.upload-arch-fname,
.upload-arch-clear { /* keep harmless defaults */
    font-size: 13px;
    color: var(--text-secondary);
}

/* ── Final liquid-glass polish ──────────────────────────── */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main { flex: 1 0 auto; }
footer { flex-shrink: 0; }

.pack-hero {
    background-color: #050507 !important;
    background-size: cover !important;
    background-position: center !important;
}
.pack-hero::before { content: none !important; }

/* quieter catalog card first-child button when only one */
.card-actions:has(> :only-child) {
    grid-template-columns: 1fr;
}

/* ensure white primary buttons on dark glass cards */
a.btn-card.btn-card--primary,
.btn-card.btn-card--primary {
    background: #f5f5f7 !important;
    color: #0a0a0a !important;
    border: none !important;
}
