:root {
    --bg: #1e1f22;
    --bg-2: #151619;
    --panel: #2b2d31;
    --panel2: #313338;
    --panel3: #383a40;
    --border: #3f4147;
    --border-soft: rgba(255, 255, 255, 0.06);
    --text: #e3e5e8;
    --muted: #949ba4;
    --muted-2: #6d6f78;
    --accent: #5865f2;
    --accent-2: #7c3aed;
    --accent-3: #eb459e;
    --accent-soft: rgba(88, 101, 242, 0.14);
    --accent-hover: #4752c4;
    --ok: #23a55a;
    --ok-soft: rgba(35, 165, 90, 0.15);
    --warn: #f0b232;
    --danger: #f23f43;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
    --shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 34px rgba(88, 101, 242, 0.4);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- topbar ---------- */

.topbar {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 10px 26px;
    background: rgba(30, 31, 34, 0.72);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo {
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 800;
    font-size: 19px;
    letter-spacing: 0.2px;
    color: var(--text);
    text-decoration: none;
}
.logo:hover { text-decoration: none; }

.logo-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
    box-shadow: var(--shadow-glow);
}
.logo-mark svg { width: 20px; height: 20px; }

.logo-text {
    background: linear-gradient(90deg, #fff, #c7ccfb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* совместимость со старыми шаблонами */
.logo-dot {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
    box-shadow: var(--shadow-glow);
}

.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 38px;
    padding: 0 10px;
    background: var(--panel2);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    margin-left: auto;
}
.nav-burger span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: transform 0.2s, opacity 0.2s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.topnav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.nav-link {
    position: relative;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
    padding: 9px 14px;
    border-radius: 10px;
    transition: background 0.15s, color 0.15s;
}
.nav-link:hover {
    color: var(--text);
    background: var(--panel2);
    text-decoration: none;
}
.nav-link.active {
    color: #fff;
    background: var(--accent-soft);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 2px;
    transform: translateX(-50%);
    width: 18px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.usermenu {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
    padding-left: 14px;
    border-left: 1px solid var(--border);
    color: var(--text);
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--panel2);
    border: 2px solid var(--border);
}

.user-name { font-size: 14px; font-weight: 600; }

.btn-mini {
    background: var(--panel2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 7px 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.btn-mini:hover {
    border-color: var(--accent);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

@media (max-width: 780px) {
    .nav-burger { display: flex; }
    .topnav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 10px 18px 16px;
        background: rgba(30, 31, 34, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border);
        display: none;
    }
    .topnav.open { display: flex; }
    .usermenu {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        padding-top: 10px;
        margin-top: 6px;
        border-top: 1px solid var(--border);
    }
}

/* ---------- main ---------- */

main {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ---------- hero / landing ---------- */

.hero {
    text-align: center;
    padding: clamp(64px, 12vw, 140px) 0 clamp(44px, 10vw, 96px);
    position: relative;
    overflow: hidden;
}
.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.hero-avatar-wrap {
    margin-top: 6px;
}
.hero-title {
    margin: 10px 0 0;
}

.bot-avatar {
    width: 110px;
    height: 110px;
    border-radius: 30%;
    box-shadow: var(--shadow-glow);
}

.hero h1 {
    margin: 18px 0 6px;
    font-size: 42px;
}

.hero-sub { color: var(--muted); font-size: clamp(16px, 2vw, 19px); margin: 6px 0 0; max-width: 640px; }

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    color: #fff;
    transition: background 0.15s;
}

.btn-primary {
    background: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-hover);
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-block { width: 100%; text-align: center; }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin: 30px 0;
}

.stat {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
}

.stat b {
    display: block;
    font-size: 26px;
    color: var(--accent);
}

.stat span { color: var(--muted); font-size: 13px; }

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.feature-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.feature-icon { font-size: 28px; }
.feature-card h3 { margin: 10px 0 6px; font-size: 17px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- cards / auth ---------- */

.center-card {
    max-width: 460px;
    margin: 40px auto;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
}

.center-card h2 { margin-top: 0; }

.muted { color: var(--muted); }

.alert {
    background: rgba(240, 178, 50, 0.12);
    border: 1px solid var(--warn);
    color: #ffd37a;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 14px 0;
    font-size: 14px;
    text-align: left;
}

.alert-ok {
    background: rgba(35, 165, 90, 0.12);
    border: 1px solid var(--ok);
    color: #7ddfa8;
}

/* ---------- server grid ---------- */

.page-head { margin-bottom: 22px; }
.page-head h1 { margin: 0 0 6px; }

.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.server-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: border-color 0.15s, transform 0.15s;
}

.server-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    text-decoration: none;
}

.server-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--panel2);
    object-fit: cover;
    flex-shrink: 0;
}

.server-icon.small { width: 34px; height: 34px; }

.server-icon.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--muted);
    background: var(--panel2);
}

.server-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}
.server-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.manage-tag { color: var(--accent); font-size: 13px; font-weight: 600; }

/* ---------- guild page ---------- */

.guild-layout {
    display: grid;
    grid-template-columns: 262px 1fr;
    gap: 22px;
    align-items: start;
}

.guild-sidebar {
    background: linear-gradient(180deg, var(--panel), #26282c);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px;
    position: sticky;
    top: 82px;
    box-shadow: var(--shadow-sm);
    max-height: calc(100vh - 104px);
    overflow-y: auto;
}

.sidebar-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 6px 14px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 12px;
}
.sidebar-head-info { min-width: 0; display: flex; flex-direction: column; }
.sidebar-head-info b {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}
.sidebar-head-info small { color: var(--muted); font-size: 12px; }

.guild-sidebar-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

.tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 6px;
}
.tag-warn { background: rgba(240, 178, 50, 0.15); color: var(--warn); }

.module-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-group {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--muted-2);
    padding: 12px 10px 5px;
}

.module-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s, color 0.15s, transform 0.12s;
}
.module-link .mi {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 14px;
    background: var(--panel2);
    border: 1px solid var(--border-soft);
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}
.module-link .ml {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.module-link:hover {
    background: var(--panel2);
    color: var(--text);
    text-decoration: none;
    transform: translateX(2px);
}
.module-link:hover .mi { border-color: var(--accent); }
.module-link.active {
    background: linear-gradient(90deg, var(--accent-soft), transparent);
    color: #fff;
}
.module-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.module-link.active .mi {
    background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}
.module-link.is-soon { color: var(--muted); pointer-events: none; }
.module-link small { color: var(--muted); }

.mstate {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.mstate.on {
    background: var(--ok);
    box-shadow: 0 0 8px var(--ok);
}
.mstate.off {
    background: var(--muted-2);
    opacity: 0.55;
}

.guild-content { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.module {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}

.module h2 { margin: 0 0 6px; }
.module .muted { margin-top: 0; }

.switch-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.switch-row:last-of-type { border-bottom: none; }

.switch-row input { display: none; }

.switch {
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: 20px;
    position: relative;
    flex-shrink: 0;
    transition: background 0.15s;
}

.switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: left 0.15s;
}

.switch-row input:checked + .switch {
    background: var(--ok);
}
.switch-row input:checked + .switch::after {
    left: 23px;
}

.switch-row span:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.switch-row small { color: var(--muted); }

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
}

.field > label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.field select,
.field input[type="text"],
.field textarea {
    width: 100%;
    box-sizing: border-box;
    background: var(--panel2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.field textarea {
    resize: vertical;
    line-height: 1.5;
}

.field select:focus,
.field input[type="text"]:focus,
.field textarea:focus {
    border-color: var(--accent);
}

.field small { font-size: 12px; }

.readonly-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.readonly-row span { color: var(--muted); }
.readonly-row b { text-align: right; }

.welcome-text {
    text-align: right;
    white-space: pre-wrap;
    font-size: 13px;
    color: var(--text);
    background: var(--panel2);
    padding: 8px 12px;
    border-radius: 8px;
}

/* ---------- footer ---------- */

.footer {
    margin-top: 40px;
    padding: 26px 24px 30px;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--border-soft);
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.22));
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    color: var(--text);
    font-size: 15px;
}
.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.footer-links a { color: var(--muted); font-weight: 500; }
.footer-links a:hover { color: var(--accent); text-decoration: none; }
.footer-note {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    color: var(--muted-2);
    font-size: 12px;
}

/* ============================================================
   РАСШИРЕННАЯ ПАНЕЛЬ СЕРВЕРА (визуал)
============================================================ */

.guild-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #2b2d31 0%, #313338 55%, #3b3d8f 165%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 18px;
}

.guild-hero-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.guild-hero .server-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
}

.guild-hero-info { min-width: 0; }

.breadcrumb {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    gap: 6px;
    align-items: center;
}
.breadcrumb a { color: var(--muted); }

.guild-hero h1 { margin: 4px 0 8px; font-size: 24px; }

.guild-badges { display: flex; gap: 8px; flex-wrap: wrap; }

.badge {
    background: var(--panel2);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
}
.badge-on { color: #3ba55d; }
.badge-ok { color: #57f287; }
.badge-warn { color: var(--warn); }

.mini-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 14px 0;
}

.mini-stat {
    background: var(--panel2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}
.mini-stat b { display: block; font-size: 22px; }
.mini-stat span { color: var(--muted); font-size: 12px; }

.status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--panel2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--muted);
}
.status-item b { color: var(--text); }

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 8px var(--ok);
    flex-shrink: 0;
}

.module-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}
.module-grid-col { display: flex; flex-direction: column; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field input[type="number"] {
    width: 100%;
    background: var(--panel2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    outline: none;
}
.field input[type="number"]:focus { border-color: var(--accent); }

.field input[type="color"] {
    width: 100%;
    height: 42px;
    padding: 4px;
    background: var(--panel2);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}

.field input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
}

.discord-preview {
    background: #1e1f22;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
}

.dp-embed {
    background: #2b2d31;
    border-left: 4px solid var(--accent);
    border-radius: 6px;
    padding: 12px 14px;
    max-width: 360px;
}
.dp-title { font-weight: 700; margin-bottom: 6px; }
.dp-desc {
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    color: #dbdee1;
}
.dp-image { max-width: 100%; border-radius: 6px; margin-top: 8px; }
.dp-footer { margin-top: 8px; font-size: 12px; color: var(--muted); }

@media (max-width: 860px) {
    .module-grid { grid-template-columns: 1fr; }
    .status-grid { grid-template-columns: 1fr; }
    .mini-stats { grid-template-columns: repeat(2, 1fr); }
    .guild-hero { flex-direction: column; align-items: flex-start; }
}

/* ---------- юридические страницы ---------- */

.legal {
    max-width: 880px;
    margin: 0 auto;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 38px 42px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}
.legal-head {
    border-bottom: 1px solid var(--border);
    padding-bottom: 18px;
    margin-bottom: 8px;
}
.legal h1 { margin-top: 0; line-height: 1.25; }
.legal h2 {
    margin-top: 34px;
    padding-top: 6px;
    font-size: 19px;
    color: #fff;
}
.legal h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    margin-right: 10px;
    vertical-align: -2px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--accent), #7c3aed);
}
.legal p, .legal li { line-height: 1.7; color: #cdd0d5; }
.legal ul { padding-left: 22px; }
.legal li { margin: 7px 0; }
.legal b { color: #fff; }
.legal .lead {
    font-size: 17px;
    color: var(--text);
    line-height: 1.7;
}
.legal a { color: var(--accent); }
.legal code {
    background: var(--panel2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1px 6px;
    font-size: 13px;
}
.legal-meta {
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.7;
    margin: 10px 0 0;
}
.legal-foot {
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 14px;
    font-style: italic;
}
.toc {
    margin: 26px 0 8px;
    padding: 18px 22px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel2);
}
.toc b { display: block; margin-bottom: 8px; color: #fff; }
.toc ol {
    margin: 0;
    padding-left: 20px;
    columns: 2;
    column-gap: 30px;
}
.toc li { margin: 5px 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

@media (max-width: 760px) {
    .guild-layout { grid-template-columns: 1fr; }
    .guild-sidebar { position: static; }
    .legal { padding: 24px 18px; }
    .toc ol { columns: 1; }
}

/* ============================================================
   ВИЗУАЛЬНЫЕ АКЦЕНТЫ (лендинг + панель)
============================================================ */

.hero { position: relative; }

.hero::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -70px;
    transform: translateX(-50%);
    width: min(860px, 94vw);
    height: 340px;
    background: radial-gradient(
        closest-side,
        color-mix(in srgb, var(--accent) 42%, transparent),
        transparent
    );
    pointer-events: none;
    z-index: -1;
    filter: blur(10px);
}

.bot-avatar {
    box-shadow: 0 0 60px rgba(88, 101, 242, 0.55);
    animation: floaty 5s ease-in-out infinite;
}

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.stat {
    background: linear-gradient(160deg, var(--panel2), var(--panel));
    transition: transform 0.15s, border-color 0.15s;
}
.stat:hover { transform: translateY(-3px); border-color: var(--accent); }

.feature-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(280px 160px at 50% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
    opacity: 0;
    transition: opacity 0.18s;
    pointer-events: none;
}
.feature-card > * {
    position: relative;
    z-index: 1;
}
.feature-card:hover {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--accent) 70%, transparent);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38), 0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent);
}
.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    font-size: 24px;
    border-radius: 14px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.22), transparent 60%),
        linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 16px 34px color-mix(in srgb, var(--accent) 24%, transparent);
}

.logo-dot {
    box-shadow: 0 0 18px rgba(88, 101, 242, 0.7);
}

.btn { transition: transform 0.12s, background 0.15s; }
.btn-primary:hover { transform: translateY(-1px); }

.logo-dot {
    box-shadow: 0 0 18px rgba(88, 101, 242, 0.7);
}

/* ============================================================
   ФИНАЛЬНАЯ ПОЛИРОВКА
============================================================ */

html { scroll-behavior: smooth; }

body {
    background:
        radial-gradient(900px 420px at 12% -5%, rgba(88, 101, 242, 0.16), transparent 60%),
        radial-gradient(700px 400px at 100% 0%, rgba(124, 58, 237, 0.14), transparent 55%),
        var(--bg);
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: #4a4d55;
    border-radius: 10px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.topbar {
    background: rgba(43, 45, 49, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.module { scroll-margin-top: 88px; }

.section-title {
    text-align: center;
    font-size: 26px;
    margin: 0 0 6px;
}
.section-sub {
    text-align: center;
    color: var(--muted);
    margin: 0 0 22px;
}

/* --- showcase --- */
.showcase { margin-top: 44px; }

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.showcase-card {
    position: relative;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.showcase-card::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    opacity: 0;
    transition: opacity 0.18s;
}
.showcase-card:hover {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--accent) 70%, transparent);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4), 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}
.showcase-card:hover::after { opacity: 1; }

.showcase-ico {
    font-size: 30px;
    display: inline-block;
}
.showcase-card h3 { margin: 10px 0 6px; font-size: 17px; }
.showcase-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* --- steps --- */
.steps { margin-top: 44px; }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.step {
    background: linear-gradient(160deg, var(--panel2), var(--panel));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
}
.step-num {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.5);
}
.step h3 { margin: 12px 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

/* --- CTA --- */
.cta-band {
    margin: 56px 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: clamp(26px, 4vw, 38px) clamp(24px, 6vw, 48px);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 320px at 10% -10%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 70%),
        radial-gradient(700px 280px at 100% 120%, color-mix(in srgb, var(--accent-2) 36%, transparent), transparent 70%),
        linear-gradient(120deg, color-mix(in srgb, var(--accent) 68%, #15162a) 0%, var(--accent) 48%, var(--accent-2) 100%);
    box-shadow: 0 26px 70px color-mix(in srgb, var(--accent) 28%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 48%, transparent);
}
.cta-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 200px at 50% 0%, rgba(255, 255, 255, 0.16), transparent 70%);
    pointer-events: none;
}
.cta-band > * {
    position: relative;
    z-index: 1;
}
.cta-band h2 { margin: 0 0 6px; color: #fff; font-size: clamp(24px, 4vw, 36px); letter-spacing: -0.02em; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, 0.88); font-size: clamp(14px, 2vw, 17px); }
.cta-band .btn-primary {
    background: #fff;
    color: color-mix(in srgb, var(--accent) 70%, #1b1c2b);
    box-shadow: 0 18px 40px rgba(15, 16, 36, 0.28);
}
.cta-band .btn-primary:hover {
    filter: none;
    box-shadow: 0 22px 48px rgba(15, 16, 36, 0.34);
}

/* --- reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.in {
    opacity: 1;
    transform: none;
}

/* --- scrollbar & misc --- */
html { scroll-behavior: smooth; }
.module { scroll-margin-top: 90px; }

.server-card {
    transition: transform 0.15s, border-color 0.15s,
        box-shadow 0.15s;
}
.server-card:hover {
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

@media (max-width: 700px) {
    .cta-band {
        flex-direction: column;
        align-items: flex-start;
    }
}


.module {
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
}

.module-link { transition: background 0.15s, color 0.15s, padding-left 0.15s; }
.module-link:hover { padding-left: 16px; }

.badge { transition: transform 0.12s; }
.badge:hover { transform: translateY(-1px); }

/* ---------- рекламные слоты (AdSense) ---------- */

.ad-slot {
    position: relative;
    max-width: 880px;
    margin: 34px auto;
    padding: 14px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: rgba(43, 45, 49, 0.5);
    text-align: center;
    overflow: hidden;
}
.ad-label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}
.ad-slot ins { display: block; }

/* ============================================================
   РЕДИЗАЙН 2.0 — глубина, свечение, объём
============================================================ */

main { max-width: 1180px; }

/* фон с живыми градиентными пятнами */
body {
    background:
        radial-gradient(1000px 520px at 8% -8%, rgba(88, 101, 242, 0.20), transparent 60%),
        radial-gradient(820px 460px at 102% -2%, rgba(124, 58, 237, 0.18), transparent 58%),
        radial-gradient(720px 520px at 50% 118%, rgba(235, 69, 158, 0.10), transparent 60%),
        var(--bg);
    background-attachment: fixed;
}

/* ---------- WebGL-шейдер (анимированный фон) ---------- */
.bg-shader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
    pointer-events: none;
    opacity: 0.82;
    filter: saturate(118%);
}

/* контент всегда поверх шейдера */
main,
.footer {
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .bg-shader { opacity: 0.62; }
}

/* заголовки страниц */
.page-head h1 {
    font-size: 30px;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #fff, #b9c0ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.page-head p { margin: 0; }

/* кнопки */
.btn {
    border-radius: 11px;
    font-weight: 700;
    transition: transform 0.12s, box-shadow 0.2s, filter 0.2s, background 0.15s;
}
.btn-primary {
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 55%),
        linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 38%, transparent);
    position: relative;
    overflow: hidden;
}
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(200px 60px at 50% -40%, rgba(255, 255, 255, 0.22), transparent 70%);
    pointer-events: none;
}
.btn-primary > * {
    position: relative;
    z-index: 1;
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 38px color-mix(in srgb, var(--accent) 48%, transparent);
    filter: brightness(1.08);
}
.btn-ghost:hover { background: var(--panel2); }

/* карточки модулей */
.module {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
    scroll-margin-top: 90px;
    transition: border-color 0.2s, box-shadow 0.2s;
    animation: module-in 0.4s ease both;
}
.module:hover { border-color: rgba(88, 101, 242, 0.4); }
.module h2 {
    font-size: 19px;
    letter-spacing: -0.01em;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 14px;
}

@keyframes module-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* герой сервера */
.guild-hero {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow);
    background:
        radial-gradient(600px 200px at 0% 0%, rgba(88, 101, 242, 0.22), transparent 70%),
        linear-gradient(135deg, #2b2d31 0%, #313338 55%, #363a52 165%);
}
.guild-hero .server-icon { border-radius: 16px; box-shadow: var(--shadow-sm); }
.guild-hero h1 { letter-spacing: -0.02em; }

/* мини-статистика и статусы */
.mini-stat {
    border-radius: 14px;
    background: linear-gradient(160deg, var(--panel2), var(--panel));
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.mini-stat:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
}
.mini-stat b { font-size: 26px; }

.status-item {
    border-radius: 12px;
    transition: border-color 0.15s, transform 0.15s;
}
.status-item:hover { border-color: var(--accent); transform: translateY(-1px); }
.status-item b { font-weight: 700; }

/* карточки серверов */
.server-grid { gap: 16px; }
.server-card {
    position: relative;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    padding: 18px;
    overflow: hidden;
    background: linear-gradient(160deg, var(--panel), #26282c);
    box-shadow: var(--shadow-sm);
}
.server-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
    opacity: 0;
    transition: opacity 0.2s;
}
.server-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
    text-decoration: none;
}
.server-card:hover::before { opacity: 1; }
.server-card .server-icon { width: 54px; height: 54px; border-radius: 16px; }
.manage-tag {
    color: var(--accent);
    background: var(--accent-soft);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.server-card:hover .manage-tag { background: var(--accent); color: #fff; }

/* формы */
.field select,
.field input[type="text"],
.field input[type="number"],
.field textarea {
    border-radius: 10px;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.field select:hover,
.field input[type="text"]:hover,
.field input[type="number"]:hover,
.field textarea:hover { border-color: var(--muted-2); }
.field select:focus,
.field input[type="text"]:focus,
.field input[type="number"]:focus,
.field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* тумблеры */
.switch-row { border-color: var(--border-soft); }
.switch { width: 46px; height: 26px; }
.switch::after { width: 20px; height: 20px; }
.switch-row input:checked + .switch {
    background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
    box-shadow: 0 0 14px rgba(88, 101, 242, 0.5);
}
.switch-row input:checked + .switch::after { left: 23px; }

/* предпросмотр embed */
.discord-preview {
    background: #1a1b1e;
    box-shadow: inset 0 0 0 1px var(--border-soft);
}
.dp-embed { box-shadow: var(--shadow-sm); }

.alert { border-radius: 12px; }
.readonly-row { border-color: var(--border-soft); }

/* бейджи */
.badge { border-radius: 20px; font-weight: 600; }

/* всплывающее уведомление */
.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1f7a44, #23a55a);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 16px 40px rgba(35, 165, 90, 0.45);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.toast.show { transform: none; opacity: 1; }
.toast-ico { font-size: 17px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

@media (max-width: 780px) {
    main { padding: 22px 16px; }
    .server-icon.small { width: 32px; height: 32px; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- герой лендинга ---------- */

.hero { position: relative; padding-top: 54px; }

.hero > *:not(.hero-glow):not(.hero-orb):not(.hero-banner):not(.hero-noise) { position: relative; z-index: 1; }

.hero-banner {
    position: absolute;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1000px, 100vw);
    height: 340px;
    max-width: 96vw;
    background-size: cover;
    background-position: center;
    border-radius: 24px;
    opacity: 0.22;
    filter: blur(2px) saturate(1.2);
    -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.hero-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: min(920px, 100vw);
    height: 560px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 58%, transparent) 0%, color-mix(in srgb, var(--accent-2) 38%, transparent) 32%, color-mix(in srgb, var(--accent-3) 24%, transparent) 54%, transparent 82%);
    filter: blur(42px);
    z-index: 0;
    pointer-events: none;
    animation: hero-pulse 9s ease-in-out infinite;
    mix-blend-mode: screen;
}
@keyframes hero-pulse {
    0%, 100% { opacity: 0.75; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: color-mix(in srgb, var(--accent) 26%, #f7f8ff);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%),
        linear-gradient(90deg, color-mix(in srgb, var(--accent) 32%, transparent), color-mix(in srgb, var(--accent-2) 28%, transparent));
    border: 1px solid color-mix(in srgb, var(--accent) 52%, transparent);
    box-shadow: 0 18px 40px color-mix(in srgb, var(--accent) 18%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.hero-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #57f287;
    box-shadow: 0 0 14px #57f287, 0 0 28px rgba(87, 242, 135, 0.4);
}

.avatar-ring {
    display: inline-grid;
    place-items: center;
    padding: 5px;
    border-radius: 32%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
    box-shadow: var(--shadow-glow);
}
.avatar-ring .bot-avatar { display: block; box-shadow: none; }

.hero h1 {
    font-size: clamp(38px, 8vw, 64px);
    letter-spacing: -0.04em;
    background: radial-gradient(circle at 50% 10%, #ffffff 0%, color-mix(in srgb, var(--accent) 26%, #f6f7ff) 48%, color-mix(in srgb, var(--accent-2) 24%, #c9c9ff) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 40px 80px color-mix(in srgb, var(--accent) 14%, transparent);
}

/* ============================================================
   ЗАГОЛОВКИ МОДУЛЕЙ, ЧИПЫ, ЗАГРУЗКА
============================================================ */

.module h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 19px;
    letter-spacing: -0.01em;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 16px;
}
.module-ico {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    font-size: 19px;
    background: linear-gradient(135deg, var(--accent-soft), transparent);
    border: 1px solid var(--border-soft);
    box-shadow: inset 0 0 12px rgba(88, 101, 242, 0.12);
}
.module-title { min-width: 0; }

.mini-ico {
    display: block;
    font-size: 17px;
    margin-bottom: 4px;
    opacity: 0.9;
}

/* быстрые действия */
.quick-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    background: var(--panel2);
    border: 1px solid var(--border-soft);
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.12s, color 0.15s, border-color 0.15s, background 0.15s;
}
.chip:hover {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent-soft);
    text-decoration: none;
    transform: translateY(-1px);
}
.chip span { font-size: 14px; }
.chip-top { margin-left: auto; }

/* индикатор загрузки */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    z-index: 200;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
    box-shadow: 0 0 12px rgba(88, 101, 242, 0.8);
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease;
}
.progress-bar.active { width: 88%; opacity: 1; }
.progress-bar.done { width: 100%; opacity: 0; }

.btn.loading { pointer-events: none; opacity: 0.85; }
.btn.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 9px;
    vertical-align: -2px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* скелетон */
.skeleton {
    background: linear-gradient(90deg, var(--panel2) 25%, var(--panel3) 37%, var(--panel2) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: 8px;
    color: transparent !important;
}
@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

/* подсветка модуля при переходе по якорю */
.module:target {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow);
}

/* ============================================================
   ЛЕНТА КОМАНД И МОКАП ПАНЕЛИ (лендинг)
============================================================ */

.commands { margin-top: 46px; }

.marquee {
    position: relative;
    margin-top: 16px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
    display: flex;
    gap: 12px;
    width: max-content;
    animation: marquee 26s linear infinite;
}
.marquee-rev .marquee-track {
    animation-direction: reverse;
    animation-duration: 32s;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.cmd {
    flex-shrink: 0;
    padding: 10px 16px;
    border-radius: 12px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #c9cdfb;
    background: linear-gradient(160deg, var(--panel2), var(--panel));
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s, border-color 0.15s, color 0.15s;
}
.cmd:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    color: #fff;
}

/* мокап панели */
.mockup { margin-top: 50px; }

.window {
    max-width: 880px;
    margin: 22px auto 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-2);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.window-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    background: var(--panel2);
    border-bottom: 1px solid var(--border);
}
.wd { width: 12px; height: 12px; border-radius: 50%; }
.wd-r { background: #ff5f57; }
.wd-y { background: #febc2e; }
.wd-g { background: #28c840; }
.window-url {
    margin-left: 12px;
    font-size: 12px;
    color: var(--muted-2);
    background: var(--panel);
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
}
.window-body {
    display: grid;
    grid-template-columns: 200px 1fr;
    min-height: 300px;
}
.mock-side {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 16px 12px;
    background: var(--panel);
    border-right: 1px solid var(--border-soft);
}
.mock-nav {
    padding: 9px 11px;
    border-radius: 9px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}
.mock-nav.active {
    color: #fff;
    background: linear-gradient(90deg, var(--accent-soft), transparent);
    border-left: 3px solid var(--accent);
}
.mock-main { padding: 18px; }
.mock-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.mock-card {
    background: var(--panel2);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}
.mock-card b { display: block; font-size: 20px; color: var(--accent); }
.mock-card span { font-size: 11px; color: var(--muted); }
.mock-embed {
    margin-top: 14px;
    background: var(--panel2);
    border-left: 4px solid var(--accent);
    border-radius: 6px;
    padding: 14px;
}
.mock-embed-title { font-weight: 700; margin-bottom: 12px; }
.mock-embed-line {
    height: 8px;
    border-radius: 4px;
    margin-top: 8px;
    background: var(--panel3);
}
.mock-embed-line.short { width: 60%; }
.mock-badges { display: flex; gap: 8px; margin-top: 14px; }
.mock-badge {
    width: 26px;
    height: 8px;
    border-radius: 4px;
    background: var(--muted-2);
}
.mock-badge.on { background: var(--ok); box-shadow: 0 0 8px rgba(35, 165, 90, 0.7); }

/* усиленные ховеры статистики */
.stat {
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.stat:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
    background: linear-gradient(160deg, var(--panel2), var(--panel));
}

@media (max-width: 700px) {
    .window-body { grid-template-columns: 1fr; }
    .mock-side {
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-soft);
    }
    .mock-nav { white-space: nowrap; }
    .mock-nav.active {
        border-left: none;
        border-bottom: 3px solid var(--accent);
    }
}

/* ============================================================
   ЛЕНДИНГ 3.0 — орбы, «почему мы», FAQ
============================================================ */

/* плавающие орбы в герое */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}
.hero-orb-a {
    top: -90px;
    left: -14%;
    width: clamp(340px, 40vw, 500px);
    height: clamp(340px, 40vw, 500px);
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 80%, transparent), transparent 76%);
    animation: orb-a 18s ease-in-out infinite;
    mix-blend-mode: screen;
}
.hero-orb-b {
    top: 4%;
    right: -16%;
    width: clamp(380px, 44vw, 560px);
    height: clamp(380px, 44vw, 560px);
    background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 76%, transparent), transparent 78%);
    animation: orb-b 22s ease-in-out infinite;
    mix-blend-mode: screen;
}
@keyframes orb-a {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 24px) scale(1.12); }
}
@keyframes orb-b {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-34px, 18px) scale(1.1); }
}

/* индикатор прокрутки */
.hero-cue {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-top: 26px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--muted);
    transition: color 0.15s, border-color 0.15s, transform 0.15s;
}
.hero-cue span {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
    animation: cue 1.6s ease-in-out infinite;
}
.hero-cue:hover {
    color: #fff;
    border-color: var(--accent);
    transform: translateY(2px);
    text-decoration: none;
}
@keyframes cue {
    0%, 100% { transform: rotate(45deg) translate(-1px, -1px); opacity: 0.5; }
    50% { transform: rotate(45deg) translate(0, 0); opacity: 1; }
}

/* иконки в статистике */
.stat-ico {
    display: block;
    font-size: 20px;
    margin-bottom: 8px;
    opacity: 0.9;
}

/* «почему выбирают» */
.trust { margin-top: 46px; }
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}
.trust-item {
    position: relative;
    overflow: hidden;
    padding: 22px;
    background: linear-gradient(160deg, var(--panel2), var(--panel));
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.trust-item::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-soft), transparent 70%);
}
.trust-item:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}
.trust-ico {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    font-size: 22px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    box-shadow: 0 8px 20px rgba(88, 101, 242, 0.35);
}
.trust-item b { display: block; margin: 14px 0 6px; font-size: 16px; }
.trust-item p { margin: 0; color: var(--muted); font-size: 14px; }

/* FAQ */
.faq { margin-top: 48px; }
.faq-list {
    max-width: 820px;
    margin: 0 auto;
    display: grid;
    gap: 10px;
}
.faq-item {
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.faq-item[open] {
    border-color: var(--accent);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}
.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-size: 20px;
    line-height: 1;
    color: var(--accent);
    transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: #fff; }
.faq-body {
    padding: 0 18px 16px;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.6;
    animation: faq-open 0.2s ease;
}
.faq-body p { margin: 0; }
@keyframes faq-open {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
    .hero-orb { display: none; }
    .hero-cue { margin-top: 18px; }
}

/* ============================================================
   ЛЕНДИНГ 4.0 — аватар/баннер, вкладки команд, вход, переходы
============================================================ */

/* аватар бота + статус */
.avatar-ring { position: relative; }

.avatar-status {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ok);
    border: 4px solid var(--bg);
    box-shadow: 0 0 12px rgba(35, 165, 90, 0.8);
}

.bot-avatar-fallback {
    display: grid;
    place-items: center;
    font-size: 46px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
}

/* вкладки команд */
.cmdtabs { margin-top: 46px; }

.tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 6px 0 20px;
}
.tab {
    padding: 10px 18px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    background: var(--panel);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.12s;
}
.tab:hover {
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-1px);
}
.tab.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    box-shadow: 0 8px 22px rgba(88, 101, 242, 0.4);
}

.tab-panel { display: none; }
.tab-panel.active {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 8px;
    animation: faq-open 0.25s ease;
}

.cmd-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    transition: border-color 0.15s, transform 0.12s;
}
.cmd-row:hover {
    border-color: var(--accent);
    transform: translateX(3px);
}
.cmd-row code {
    flex-shrink: 0;
    padding: 4px 9px;
    border-radius: 8px;
    font-size: 13px;
    color: #c9cdfb;
    background: var(--accent-soft);
    border: 1px solid rgba(88, 101, 242, 0.3);
}
.cmd-row span { color: var(--muted); font-size: 13.5px; }

/* страница входа */
.login-card {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 34px 28px;
}
.login-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(88, 101, 242, 0.45), transparent 70%);
    filter: blur(14px);
    pointer-events: none;
}
.login-card > *:not(.login-glow) { position: relative; z-index: 1; }
.login-logo {
    display: inline-grid;
    place-items: center;
    width: 66px;
    height: 66px;
    margin: 0 auto 16px;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    box-shadow: 0 12px 30px rgba(88, 101, 242, 0.45);
}
.login-card h2 { margin: 0 0 6px; }
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
}
.login-points {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    gap: 9px;
    text-align: left;
}
.login-points li { color: var(--muted); font-size: 13.5px; }

/* заголовок страницы + бейдж */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.page-head-text h1 { margin: 0 0 6px; }
.count-badge {
    padding: 7px 15px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #c9cdfb;
    background: var(--accent-soft);
    border: 1px solid rgba(88, 101, 242, 0.3);
    white-space: nowrap;
}

/* ============================================================
   ПЛАВНЫЕ ПЕРЕХОДЫ МЕЖДУ СТРАНИЦАМИ
============================================================ */

@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.28s;
}

@supports not (view-transition-name: none) {
    @keyframes page-in {
        from { opacity: 0; transform: translateY(8px); }
        to { opacity: 1; transform: none; }
    }
    main,
    .footer {
        animation: page-in 0.45s ease both;
    }
    body.leaving {
        opacity: 0;
        transition: opacity 0.18s ease;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   NEXORA · REDESIGN 3.0
   Типографика · тёмная/светлая тема · глубина · интерактив
   ============================================================ */

:root {
    --font-sans: 'Manrope', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;

    --ring: 0 0 0 3px rgba(88, 101, 242, 0.38);
    --grad: linear-gradient(115deg, #5865f2 0%, #7c3aed 52%, #eb459e 100%);
    --grad-soft: linear-gradient(115deg, rgba(88, 101, 242, 0.20), rgba(124, 58, 237, 0.16) 55%, rgba(235, 69, 158, 0.14));
    --glass: rgba(22, 23, 28, 0.68);
    --glass-strong: rgba(20, 21, 26, 0.94);
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.5);
}

html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.004em;
}

code, kbd, pre, .cmd, .window-url, .legal code {
    font-family: var(--font-mono);
}

::selection { background: rgba(124, 58, 237, 0.45); color: #fff; }
html[data-theme="light"] ::selection { background: rgba(88, 101, 242, 0.22); color: #14152b; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 2px solid #8b6cff;
    outline-offset: 2px;
    border-radius: 10px;
}

/* ---------- верхняя панель ---------- */

.topbar {
    background: var(--glass);
    border-bottom: 1px solid var(--border-soft);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.28);
}

.logo-mark { border-radius: 12px; }
.logo-text { font-weight: 800; letter-spacing: -0.01em; }

.nav-link {
    padding: 9px 15px;
    border-radius: 11px;
    transition: background 0.15s, color 0.15s, transform 0.12s;
}
.nav-link:hover { transform: translateY(-1px); }
.nav-link.active {
    color: #fff;
    background: var(--grad-soft);
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.35);
}

.nav-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
}

.nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    min-width: 38px;
    padding: 0 11px;
    border-radius: 11px;
    border: 1px solid var(--border-soft);
    background: var(--panel2);
    color: var(--muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.14s, color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.nav-icon-btn svg { width: 18px; height: 18px; }
.nav-icon-btn:hover {
    color: #fff;
    border-color: rgba(124, 58, 237, 0.6);
    background: var(--accent-soft);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(88, 101, 242, 0.25);
}
.nav-icon-btn .kbd {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border-soft);
    color: var(--muted);
}

.theme-toggle .ico-sun { display: none; }
html[data-theme="light"] .theme-toggle .ico-sun { display: block; }
html[data-theme="light"] .theme-toggle .ico-moon { display: none; }

/* ---------- кнопки ---------- */

.btn {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    padding: 12px 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.btn-primary {
    background: var(--grad);
    background-size: 170% 160%;
    box-shadow: 0 10px 26px rgba(88, 101, 242, 0.4);
}
.btn-primary:hover { animation: grad-shift 3.4s ease infinite; }
.btn-ghost { backdrop-filter: blur(6px); }

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.30) 50%, transparent 70%);
    transform: translateX(-130%);
    transition: transform 0.65s ease;
    pointer-events: none;
}
.btn:hover::before { transform: translateX(120%); }

@keyframes grad-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ---------- герой ---------- */

.hero { padding: clamp(40px, 6vw, 84px) 0 30px; }

.hero h1 {
    font-size: clamp(34px, 6.4vw, 60px);
    font-weight: 800;
    line-height: 1.03;
    letter-spacing: -0.03em;
    background: linear-gradient(100deg, #ffffff 8%, #c3c8ff 42%, #e7b9ff 72%, #ffffff 100%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shine-text 9s linear infinite;
}
@keyframes shine-text { to { background-position: 220% center; } }

.hero-sub {
    font-size: clamp(15px, 2vw, 19px);
    max-width: 660px;
    margin: 0 auto 26px;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: var(--grad-soft);
    border: 1px solid rgba(124, 58, 237, 0.35);
    color: #d7daff;
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.18);
}
.hero-pill::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #57f287;
    box-shadow: 0 0 10px #57f287;
    animation: pulse-dot 1.7s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.72); }
}

.avatar-ring {
    padding: 4px;
    border-radius: 34%;
    background: conic-gradient(from 140deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
    box-shadow: var(--shadow-glow);
}

.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    justify-content: center;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 14px;
}
.hero-proof span { display: inline-flex; align-items: center; gap: 8px; }
.hero-proof b { color: var(--text); }

/* ---------- бейджи, счётчики, чипы ---------- */

.count-badge {
    background: var(--grad-soft);
    border: 1px solid rgba(124, 58, 237, 0.3);
    color: #c9cdfb;
}
.cmd { color: #c9cdfb; }
.chip {
    backdrop-filter: blur(6px);
}
.chip:hover { box-shadow: 0 8px 22px rgba(88, 101, 242, 0.22); }

/* ---------- карточки с градиентной рамкой ---------- */

.feature-card,
.showcase-card,
.trust-item,
.mini-stat,
.step {
    border: 1px solid transparent;
    background:
        linear-gradient(var(--panel), var(--panel)) padding-box,
        linear-gradient(150deg, rgba(88, 101, 242, 0.42), rgba(124, 58, 237, 0.16) 55%, rgba(235, 69, 158, 0.36)) border-box;
}

.feature-card:hover,
.showcase-card:hover,
.trust-item:hover,
.mini-stat:hover,
.step:hover {
    background:
        linear-gradient(var(--panel), var(--panel)) padding-box,
        linear-gradient(150deg, #5865f2, #7c3aed 55%, #eb459e) border-box;
}

.feature-icon {
    background: var(--grad);
    box-shadow: 0 10px 24px rgba(88, 101, 242, 0.35);
}
.trust-ico { background: var(--grad); }

.stat {
    background: linear-gradient(160deg, var(--panel2), var(--panel));
}
.stat b {
    font-weight: 800;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.step-num {
    background: var(--grad);
    box-shadow: 0 0 22px rgba(124, 58, 237, 0.55);
}

/* ---------- заголовки секций ---------- */

.section-title {
    font-size: clamp(22px, 3.4vw, 32px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ---------- модули панели ---------- */

.module {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
}
.module h2 { font-size: 20px; letter-spacing: -0.015em; }
.module-ico {
    width: 44px;
    height: 44px;
    font-size: 20px;
    border-radius: 13px;
    background: var(--grad-soft);
    border: 1px solid var(--border-soft);
}

.module.dirty h2::after {
    content: 'не сохранено';
    margin-left: auto;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--warn);
    background: rgba(240, 178, 50, 0.14);
    border: 1px solid rgba(240, 178, 50, 0.4);
}

/* ---------- тумблеры и поля ---------- */

.switch {
    width: 48px;
    height: 27px;
    border-radius: 16px;
    background: var(--panel3);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}
.switch::after {
    width: 21px;
    height: 21px;
    top: 3px;
    left: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.switch-row input:checked + .switch {
    background: var(--grad);
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.switch-row input:checked + .switch::after { left: 24px; }
.switch-row { transition: background 0.15s; border-radius: 10px; }

.field > label { letter-spacing: 0.06em; }

.field select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23949ba4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 15px;
}
.field input[type="color"] {
    border-radius: 10px;
}
.field input[type="range"] { height: 6px; }

/* ---------- серверные карточки ---------- */

.server-card { border-radius: var(--radius-lg); }

/* ---------- страница сервера ---------- */

.guild-hero {
    background:
        radial-gradient(600px 220px at 0% 0%, rgba(88, 101, 242, 0.28), transparent 70%),
        linear-gradient(135deg, #2b2d31 0%, #313338 55%, #3a3f66 170%);
}

.module-search {
    width: 100%;
    margin: 4px 0 10px;
    padding: 9px 12px 9px 34px;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    background-color: var(--panel2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23949ba4' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.6-3.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 11px center;
    background-size: 15px;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.module-search::placeholder { color: var(--muted-2); }
.module-search:focus {
    border-color: var(--accent);
    box-shadow: var(--ring);
}

/* ---------- дискорд-предпросмотр всегда тёмный ---------- */
.discord-preview { color: #e3e5e8; }

/* ---------- палитра команд (Ctrl+K) ---------- */

.palette {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    align-content: start;
    justify-items: center;
    padding: 12vh 16px 0;
}
.palette[hidden] { display: none; }
.palette-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 7, 10, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fade-in 0.2s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.palette-box {
    position: relative;
    width: min(620px, 94vw);
    background: var(--glass-strong);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(124, 58, 237, 0.14);
    overflow: hidden;
    animation: palette-in 0.2s cubic-bezier(0.2, 0.8, 0.25, 1);
}
@keyframes palette-in {
    from { opacity: 0; transform: translateY(-14px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.palette-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--muted);
}
.palette-head svg { width: 18px; height: 18px; flex-shrink: 0; }
.palette-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--text);
    font: inherit;
    font-size: 15px;
}
.palette-input::placeholder { color: var(--muted-2); }
.palette-head kbd {
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 6px;
    background: var(--panel2);
    border: 1px solid var(--border-soft);
    color: var(--muted);
}

.palette-list {
    max-height: 54vh;
    overflow-y: auto;
    padding: 8px;
    display: grid;
    gap: 4px;
}
.palette-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    color: var(--text);
    cursor: pointer;
}
.palette-item:hover { text-decoration: none; }
.pi-ico {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 9px;
    font-size: 15px;
    background: var(--panel2);
    border: 1px solid var(--border-soft);
}
.pi-text { flex: 1; min-width: 0; }
.pi-text b { display: block; font-weight: 700; font-size: 14px; }
.pi-text small { color: var(--muted); font-size: 12px; }
.pi-arrow { color: var(--muted-2); opacity: 0; transition: opacity 0.15s; }
.palette-item.active,
.palette-item:hover {
    background: var(--grad-soft);
    border-color: rgba(124, 58, 237, 0.35);
}
.palette-item.active .pi-arrow,
.palette-item:hover .pi-arrow { opacity: 1; }
.palette-empty { padding: 26px; text-align: center; color: var(--muted); }

/* ---------- кнопка «наверх» ---------- */

.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 90;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--glass-strong);
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(16px) scale(0.9);
    pointer-events: none;
    transition: opacity 0.22s, transform 0.22s, border-color 0.15s, background 0.2s, box-shadow 0.2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover {
    border-color: transparent;
    background: var(--grad);
    color: #fff;
    box-shadow: 0 14px 34px rgba(88, 101, 242, 0.5);
}

/* уведомление поднимаем над кнопкой «наверх» */
.toast { bottom: 82px; }

/* ---------- анимация появления карточек ---------- */

@keyframes float-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
.feature-card,
.showcase-card,
.trust-item,
.step,
.stat {
    animation: float-in 0.5s ease both;
}
.features .feature-card:nth-child(2),
.showcase-grid .showcase-card:nth-child(2),
.trust-grid .trust-item:nth-child(2),
.steps-grid .step:nth-child(2),
.stats .stat:nth-child(2) { animation-delay: 0.06s; }
.features .feature-card:nth-child(3),
.showcase-grid .showcase-card:nth-child(3),
.trust-grid .trust-item:nth-child(3),
.steps-grid .step:nth-child(3),
.stats .stat:nth-child(3) { animation-delay: 0.12s; }
.features .feature-card:nth-child(4),
.showcase-grid .showcase-card:nth-child(4),
.trust-grid .trust-item:nth-child(4),
.stats .stat:nth-child(4) { animation-delay: 0.18s; }
.features .feature-card:nth-child(5),
.showcase-grid .showcase-card:nth-child(5),
.stats .stat:nth-child(5) { animation-delay: 0.24s; }
.features .feature-card:nth-child(6),
.showcase-grid .showcase-card:nth-child(6) { animation-delay: 0.3s; }

/* ---------- светлая тема ---------- */

html[data-theme="light"] {
    --bg: #eef0f8;
    --bg-2: #e5e7f3;
    --panel: #ffffff;
    --panel2: #f2f3fa;
    --panel3: #e6e8f4;
    --border: #d7dae7;
    --border-soft: rgba(25, 27, 60, 0.09);
    --text: #1b1c29;
    --muted: #5b5f76;
    --muted-2: #8a8ea3;
    --accent-soft: rgba(88, 101, 242, 0.12);
    --ok-soft: rgba(35, 165, 90, 0.14);
    --glass: rgba(255, 255, 255, 0.72);
    --glass-strong: rgba(255, 255, 255, 0.96);
    --shadow-sm: 0 2px 10px rgba(25, 27, 60, 0.08);
    --shadow: 0 14px 40px rgba(25, 27, 60, 0.14);
    --shadow-lg: 0 30px 70px rgba(25, 27, 60, 0.22);
    --grad-soft: linear-gradient(115deg, rgba(88, 101, 242, 0.16), rgba(124, 58, 237, 0.13) 55%, rgba(235, 69, 158, 0.11));
}

html[data-theme="light"] body {
    background:
        radial-gradient(1000px 520px at 8% -8%, rgba(88, 101, 242, 0.16), transparent 60%),
        radial-gradient(820px 460px at 102% -2%, rgba(124, 58, 237, 0.14), transparent 58%),
        radial-gradient(720px 520px at 50% 118%, rgba(235, 69, 158, 0.08), transparent 60%),
        var(--bg);
    background-attachment: fixed;
}

html[data-theme="light"] .bg-shader { opacity: 0.45; }

html[data-theme="light"] .topbar { box-shadow: 0 6px 26px rgba(25, 27, 60, 0.08); }
html[data-theme="light"] .logo-text {
    background: linear-gradient(90deg, #1b1c29, #4b4f7a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
html[data-theme="light"] .page-head h1,
html[data-theme="light"] .hero h1 {
    background: linear-gradient(100deg, #171826 8%, #2b2d63 42%, #6b3ea8 72%, #171826 100%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
html[data-theme="light"] .hero-pill { color: #4a3aa8; background: rgba(88, 101, 242, 0.12); border-color: rgba(88, 101, 242, 0.3); }
html[data-theme="light"] .count-badge,
html[data-theme="light"] .cmd,
html[data-theme="light"] .cmd-row code { color: #3b3f8f; }
html[data-theme="light"] .legal h2,
html[data-theme="light"] .legal b,
html[data-theme="light"] .toc b { color: var(--text); }
html[data-theme="light"] .legal p,
html[data-theme="light"] .legal li { color: #4a4e63; }
html[data-theme="light"] .alert { color: #8a5a00; background: rgba(240, 178, 50, 0.16); }
html[data-theme="light"] .alert-ok { color: #1c7a45; background: rgba(35, 165, 90, 0.14); }
html[data-theme="light"] .footer { background: linear-gradient(180deg, transparent, rgba(25, 27, 60, 0.05)); }
html[data-theme="light"] .guild-hero {
    background:
        radial-gradient(600px 220px at 0% 0%, rgba(88, 101, 242, 0.16), transparent 70%),
        linear-gradient(135deg, #ffffff 0%, #f4f5fc 55%, #dfe2ff 185%);
}
html[data-theme="light"] .server-card { background: linear-gradient(160deg, #ffffff, #f6f7fd); }
html[data-theme="light"] .nav-link.active,
html[data-theme="light"] .module-link.active,
html[data-theme="light"] .chip:hover,
html[data-theme="light"] .tab:hover,
html[data-theme="light"] .faq-item summary:hover,
html[data-theme="light"] .nav-icon-btn:hover { color: #312f8a; }
html[data-theme="light"] .palette-box { background: #ffffff; }

/* ---------- адаптив ---------- */

@media (max-width: 780px) {
    .nav-tools { margin-left: 0; margin-top: 8px; }
    .nav-icon-btn.palette-btn .kbd { display: none; }
}

/* =========================================================
   NEXORA · REDESIGN 3.0 — акцентный цвет и мелкие доработки
   ========================================================= */

.switch-row-wide {
    width: 100%;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-soft);
}

.accent-wrap { position: relative; display: inline-flex; }

.accent-pop {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 120;
    min-width: 254px;
    max-width: 290px;
    padding: 14px;
    border-radius: 14px;
    background: var(--glass-strong, var(--panel2));
    border: 1px solid var(--border);
    box-shadow: var(--shadow), 0 0 0 1px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: palette-in 0.16s ease;
}
.accent-pop[hidden] { display: none; }

.accent-pop-title {
    display: block;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.accent-swatches { display: flex; flex-wrap: wrap; gap: 10px; }

.accent-swatch {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(135deg, var(--sw), var(--sw2));
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.34);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.accent-swatch:hover { transform: translateY(-2px) scale(1.08); }
.accent-swatch:focus-visible {
    outline: 2px solid var(--sw);
    outline-offset: 2px;
}
.accent-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--sw), 0 0 16px var(--sw);
}

@media (max-width: 780px) {
    .accent-pop { right: auto; left: 0; }
}

.stat-flash { color: var(--accent); transition: color 0.35s ease; }

/* =========================================================
   NEXORA · 3.0 — Тикеты, реакционные роли, топ участников
   ========================================================= */

.alert-warn {
    background: rgba(237, 66, 69, 0.12);
    border: 1px solid rgba(237, 66, 69, 0.55);
    color: #ff9b9e;
}
html[data-theme="light"] .alert-warn {
    background: rgba(237, 66, 69, 0.1);
    color: #ad2427;
}

/* ---------- топ участников ---------- */

.lb {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
}
.lb-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}
.lb-head h3 { margin: 0; font-size: 15px; letter-spacing: -0.01em; }
.lb-head .muted { font-size: 12px; }

.lb-list { display: grid; gap: 6px; }

.lb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 12px;
    background: var(--panel2);
    border: 1px solid var(--border-soft);
    transition: transform 0.14s ease, border-color 0.14s ease;
}
.lb-row:hover {
    transform: translateX(3px);
    border-color: rgba(124, 58, 237, 0.4);
}

.lb-rank {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    background: var(--panel3);
    border: 1px solid var(--border-soft);
}
.lb-rank.lb-top {
    color: #fff;
    background: var(--grad);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}

.lb-name {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-metrics { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.lb-pill {
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
    background: var(--panel3);
    border: 1px solid var(--border-soft);
    white-space: nowrap;
}
.lb-pill.lb-coins { color: #ffd37a; border-color: rgba(240, 178, 50, 0.35); }
html[data-theme="light"] .lb-pill.lb-coins { color: #9a6a00; }

.lb-note { margin: 12px 0 0; font-size: 12px; }

@media (max-width: 560px) {
    .lb-metrics { display: none; }
}

/* ---------- реакционные роли ---------- */

.rr-list {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
}

.rr-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--panel2);
    border: 1px solid var(--border-soft);
}
.rr-item form { margin: 0 0 0 auto; }

.rr-emoji {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 6px;
    border-radius: 11px;
    font-size: 19px;
    background: var(--panel3);
    border: 1px solid var(--border-soft);
    overflow: hidden;
}

.rr-info { display: grid; gap: 2px; min-width: 0; }
.rr-info b { font-size: 14px; }
.rr-info small { color: var(--muted); font-size: 12px; }
.rr-info a { color: var(--accent); }

@media (max-width: 560px) {
    .rr-item { flex-wrap: wrap; }
    .rr-item form { margin-left: 0; }
}

/* =========================================================
   NEXORA 3.1 — «Wow»: прогресс прокрутки, свечение курсора,
   герой, бенто-сетка, живой демо-чат Discord
   ========================================================= */

/* ---------- прогресс прокрутки ---------- */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 60;
    transform: scaleX(0);
    transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2) 55%, var(--accent-3, #eb459e));
    box-shadow: 0 0 12px var(--accent);
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.scroll-progress.hide { opacity: 0; }

/* ---------- свечение за курсором ---------- */

.cursor-glow {
    position: fixed;
    left: 0;
    top: 0;
    width: 46vmax;
    height: 46vmax;
    margin: -23vmax 0 0 -23vmax;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: transform;
}
.cursor-glow.on { opacity: 1; }
html[data-theme="light"] .cursor-glow.on { opacity: 0.7; }

@media (pointer: coarse) { .cursor-glow { display: none; } }
@media (prefers-reduced-motion: reduce) { .cursor-glow { display: none; } }

/* ---------- герой: бегущие слова и парящие бейджи ---------- */

.hero-rotate {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin: -8px 0 22px;
    color: var(--muted);
    font-size: 15px;
}
.hr-pre { opacity: 0.85; }
.hr-word {
    font-weight: 800;
    letter-spacing: -0.01em;
    background: linear-gradient(100deg, var(--accent), var(--accent-2) 58%, var(--accent-3, #eb459e));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}
.hr-word.swap {
    opacity: 0;
    transform: translateY(-9px) scale(0.98);
    filter: blur(4px);
}

.hero #hero-floats {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.hf {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--text);
    background: var(--glass-strong, rgba(30, 31, 34, 0.82));
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: hf-float 7s ease-in-out infinite;
}
.hf-1 { top: 44px; left: 3%; animation-delay: -0.4s; }
.hf-2 { top: 122px; right: 3%; animation-delay: -2.1s; }
.hf-3 { bottom: 30px; left: 5%; animation-delay: -3.4s; }
.hf-4 { bottom: 30px; right: 5%; animation-delay: -5.2s; }

@keyframes hf-float {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-14px) rotate(1deg); }
}

@media (max-width: 1160px) { .hero #hero-floats { display: none; } }

/* ---------- бенто-сетка «Что внутри» ---------- */

.bento { max-width: 1100px; margin: 0 auto; padding: 8px 20px 12px; }

.bento-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin-top: 26px;
}

.bento-tile {
    position: relative;
    grid-column: span 2;
    padding: 22px;
    border-radius: 18px;
    border: 1px solid transparent;
    background:
        radial-gradient(420px 220px at 50% -18%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
        linear-gradient(var(--panel), var(--panel)) padding-box,
        linear-gradient(150deg, color-mix(in srgb, var(--accent) 58%, transparent), color-mix(in srgb, var(--accent-2) 24%, transparent) 55%, color-mix(in srgb, var(--accent-3) 42%, transparent)) border-box;
    overflow: hidden;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}
.bento-tile:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 60px color-mix(in srgb, var(--accent) 22%, transparent), var(--shadow-sm);
}
.bento-tile.bt-wide { grid-column: span 3; }

.bento-tile header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.bento-tile h3 {
    margin: 0;
    font-size: 16px;
    letter-spacing: -0.01em;
}
.bt-ico {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 10px;
    font-size: 17px;
    background: var(--grad-soft, rgba(124, 58, 237, 0.14));
    border: 1px solid var(--border-soft);
    transition: transform 0.25s ease;
}
.bento-tile:hover .bt-ico { transform: translateY(-2px) scale(1.07) rotate(-4deg); }

.bento-tile p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* автороли/чипы автомода */
.bt-chips {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.bt-chips li {
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    background: var(--panel2);
    border: 1px solid var(--border-soft);
    animation: chip-pulse 3.8s ease-in-out infinite;
}
.bt-chips li:nth-child(2n) { animation-delay: -1.3s; }
.bt-chips li:nth-child(3n) { animation-delay: -2.6s; }

@keyframes chip-pulse {
    0%, 100% { border-color: var(--border-soft); box-shadow: none; }
    50% { border-color: rgba(124, 58, 237, 0.6); box-shadow: 0 0 14px rgba(124, 58, 237, 0.18); }
}

/* мини-макет панели */
.btpm {
    display: flex;
    gap: 8px;
    height: 84px;
    margin-top: 16px;
}
.btpm-side {
    width: 6px;
    border-radius: 999px;
    background: var(--panel3);
}
.btpm-side.on {
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 12px var(--accent);
}
.btpm-main {
    flex: 1;
    display: grid;
    align-content: start;
    gap: 9px;
    padding: 11px;
    border-radius: 11px;
    background: var(--panel2);
    border: 1px solid var(--border-soft);
}
.btpm-row {
    height: 9px;
    border-radius: 6px;
    background: var(--panel3);
    animation: row-shimmer 3s ease-in-out infinite;
}
.btpm-row.short { width: 55%; }
.btpm-toggle {
    position: relative;
    width: 40px;
    height: 20px;
    border-radius: 999px;
    background: var(--panel3);
}
.btpm-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--muted-2);
    transition: left 0.25s ease, background 0.25s ease;
}
.btpm-toggle.on { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.btpm-toggle.on::after { left: 23px; background: #fff; }

@keyframes row-shimmer {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

/* эквалайзер музыки */
.bt-eq {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 46px;
    margin-top: 14px;
}
.bt-eq span {
    flex: 1;
    height: 20%;
    border-radius: 4px 4px 2px 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    animation: eq-bounce 1.1s ease-in-out infinite;
}
.bt-eq span:nth-child(2n) { animation-duration: 0.9s; animation-delay: -0.3s; }
.bt-eq span:nth-child(3n) { animation-duration: 1.35s; animation-delay: -0.6s; }
.bt-eq span:nth-child(5n) { animation-duration: 0.75s; animation-delay: -0.15s; }

@keyframes eq-bounce {
    0%, 100% { height: 18%; }
    50% { height: 100%; }
}

/* полоса уровня */
.bt-level { margin-top: 16px; }
.bt-lvl-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}
.bt-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--panel3);
    overflow: hidden;
}
.bt-bar span {
    display: block;
    height: 100%;
    width: 20%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    animation: lvl-fill 4.6s ease-in-out infinite;
}

@keyframes lvl-fill {
    0%, 100% { width: 16%; }
    50% { width: 88%; }
}

/* строки логов */
.bt-log {
    display: grid;
    gap: 7px;
    margin-top: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
}
.bt-log span {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border-radius: 8px;
    color: var(--muted);
    background: var(--panel2);
    border: 1px solid var(--border-soft);
    animation: log-in 4.8s ease-in-out infinite;
}
.bt-log span:nth-child(2) { animation-delay: -1.6s; }
.bt-log span:nth-child(3) { animation-delay: -3.2s; }
.bt-log i { font-style: normal; }

@keyframes log-in {
    0%, 100% { opacity: 0.55; transform: translateX(0); }
    45% { opacity: 1; transform: translateX(3px); }
}

/* печатающаяся команда */
.bt-cmdline {
    display: flex;
    align-items: center;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    background: var(--panel2);
    border: 1px solid var(--border-soft);
}
.bt-slash { color: var(--accent); font-weight: 700; }
.bt-caret {
    width: 2px;
    height: 18px;
    margin-left: 2px;
    background: var(--accent);
    animation: caret-blink 1s steps(2) infinite;
}

@keyframes caret-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* появление плиток бенто */
.bento.reveal.in .bento-tile {
    animation: bt-in 0.55s ease both;
}
.bento.reveal.in .bento-tile:nth-child(2) { animation-delay: 0.06s; }
.bento.reveal.in .bento-tile:nth-child(3) { animation-delay: 0.12s; }
.bento.reveal.in .bento-tile:nth-child(4) { animation-delay: 0.18s; }
.bento.reveal.in .bento-tile:nth-child(5) { animation-delay: 0.24s; }
.bento.reveal.in .bento-tile:nth-child(6) { animation-delay: 0.3s; }

@keyframes bt-in {
    from { opacity: 0; translate: 0 18px; }
    to { opacity: 1; translate: 0 0; }
}

/* ---------- живой демо-чат Discord ---------- */

.dc-window {
    /* всегда «дискордовский» тёмный вид, независимо от темы */
    --panel: #2b2d31;
    --panel2: #313338;
    --panel3: #383a40;
    --border: #3f4147;
    --border-soft: rgba(255, 255, 255, 0.06);
    --text: #e3e5e8;
    --muted: #949ba4;
    --muted-2: #6d6f78;

    max-width: 760px;
    margin: 26px auto 0;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow), 0 0 0 1px rgba(124, 58, 237, 0.12);
}
.dc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--panel2);
    border-bottom: 1px solid var(--border-soft);
    font-weight: 700;
}
.dc-hash { color: var(--muted-2); font-size: 20px; }
.dc-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    color: var(--ok, #23a55a);
}
.dc-live i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ok, #23a55a);
    box-shadow: 0 0 10px var(--ok, #23a55a);
    animation: pulse-dot 1.7s ease-in-out infinite;
}
.dc-body { display: grid; gap: 16px; padding: 18px; }
.dc-msg { display: flex; gap: 12px; }
.dc-av {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-weight: 800;
    color: #fff;
}
.av-1 { background: linear-gradient(135deg, #5865f2, #7c3aed); }
.av-2 { background: linear-gradient(135deg, #f97316, #ef4444); }
.av-bot { background: linear-gradient(135deg, #10b981, #0ea5e9); }

.dc-bubble { flex: 1; min-width: 0; }
.dc-name {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
    font-size: 14px;
    font-weight: 700;
}
.dc-badge {
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    background: #5865f2;
}
.dc-time { color: var(--muted-2); font-size: 12px; font-weight: 500; }
.dc-text { color: #dbdee1; font-size: 14px; }
.dc-slash {
    padding: 1px 7px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #c9cdfb;
    background: rgba(88, 101, 242, 0.22);
}

.dc-embed {
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 6px;
    border-left: 3px solid #5865f2;
    background: var(--panel2);
}
.dc-embed.danger { border-left-color: #f23f43; }
.dc-embed-title { margin-bottom: 4px; font-weight: 700; }
.dc-embed-desc { color: var(--muted); font-size: 13.5px; }
.dc-embed-bar {
    height: 5px;
    margin-top: 10px;
    border-radius: 4px;
    background: var(--panel3);
    overflow: hidden;
}
.dc-embed-bar span {
    display: block;
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, #5865f2, #7c3aed);
    animation: lvl-fill 6s ease-in-out infinite;
}
.dc-embed-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #5865f2;
}
.dc-btn i { font-style: normal; }
.dc-btn.ghost { color: var(--text); background: var(--panel3); }

/* ---------- живые карточки: подъём и иконка ---------- */

.feature-card,
.showcase-card,
.trust-item,
.step,
.stat {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.feature-card:hover,
.showcase-card:hover,
.trust-item:hover,
.step:hover,
.stat:hover {
    transform: translateY(-5px);
}

.feature-icon,
.showcase-ico,
.trust-ico,
.step-num {
    transition: transform 0.25s ease;
}
.feature-card:hover .feature-icon,
.showcase-card:hover .showcase-ico,
.trust-item:hover .trust-ico,
.step:hover .step-num {
    transform: translateY(-2px) scale(1.08) rotate(-4deg);
}

/* ---------- усиленная CTA-полоса ---------- */

.cta-band {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(520px 200px at 12% 10%, rgba(88, 101, 242, 0.45), transparent 65%),
        radial-gradient(420px 200px at 90% 90%, rgba(235, 69, 158, 0.4), transparent 60%),
        linear-gradient(120deg, var(--accent), var(--accent-2));
    box-shadow: 0 26px 60px rgba(88, 101, 242, 0.32);
}
.cta-band::after {
    content: '';
    position: absolute;
    inset: -40% -10%;
    background: conic-gradient(from 0deg, transparent 0 62%, rgba(255, 255, 255, 0.16) 78%, transparent 92%);
    animation: cta-sweep 7s linear infinite;
    pointer-events: none;
}
@keyframes cta-sweep {
    to { transform: rotate(360deg); }
}

/* ---------- адаптив бенто ---------- */

@media (max-width: 900px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .bento-tile,
    .bento-tile.bt-wide { grid-column: span 1; }
    .bento-tile.bt-panel { grid-column: span 2; }
}

@media (max-width: 560px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-tile,
    .bento-tile.bt-wide,
    .bento-tile.bt-panel { grid-column: span 1; }
    .dc-body { padding: 14px; }
}

/* ---------- уважение к предпочтениям ---------- */

@media (prefers-reduced-motion: reduce) {
    .hf,
    .bt-eq span,
    .bt-bar span,
    .bt-log span,
    .btpm-row,
    .dc-live i,
    .dc-embed-bar span,
    .bt-caret,
    .bt-chips li,
    .cta-band::after {
        animation: none !important;
    }
    .bento.reveal.in .bento-tile { animation: none !important; }
}


/* ---------- установка бота в панели (Nexora 3.1) ---------- */

.install-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.install-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); filter: brightness(1.06); }
.install-btn:active { transform: translateY(0); }
.install-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.install-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    padding: 18px 20px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--accent-soft), var(--panel));
}
.install-banner-text { display: flex; flex-direction: column; gap: 6px; max-width: 720px; }
.install-banner-text b { font-size: 15px; }
.install-banner-text span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.install-banner-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

@media (max-width: 560px) {
    .install-banner { flex-direction: column; align-items: flex-start; }
    .install-banner-actions { width: 100%; }
    .install-banner-actions .btn { flex: 1; justify-content: center; }
}
\n.logo::before,.logo::after,.logo-mark::before,.logo-mark::after{content:none!important;display:none!important;}\n