/* ============================================================
   THEME — ПЕРЕМЕННЫЕ ДЛЯ СВЕТЛОЙ И ТЁМНОЙ ТЕМЫ (DESVI 2.0 LUXURY UI)
   ============================================================ */
:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

:root,
[data-theme="light"] {
    --bg: #f8fafc;
    --bg-soft: #f1f5f9;
    --bg-gray: #e2e8f0;
    --bg-elevated: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);

    --text: #090d16;
    --text-muted: #475569;
    --text-light: #64748b;

    --border: rgba(15, 23, 42, 0.08);
    --border-light: rgba(15, 23, 42, 0.05);
    --border-subtle: rgba(15, 23, 42, 0.04);
    --border-hover: rgba(99, 102, 241, 0.35);

    --primary: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);
    --accent: #7c3aed;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --header-bg: rgba(255, 255, 255, 0.82);

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.02);
    --shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 24px 52px -12px rgba(15, 23, 42, 0.12), 0 8px 20px -4px rgba(15, 23, 42, 0.04);
    --card-glow: 0 14px 40px -10px rgba(99, 102, 241, 0.14);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-2xl: 28px;
}

[data-theme="dark"] {
    --bg: #07090e;
    --bg-soft: #0e121d;
    --bg-gray: #151b2a;
    --bg-elevated: #111623;
    --bg-glass: rgba(17, 22, 35, 0.82);

    --text: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #64748b;

    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.05);
    --border-subtle: rgba(255, 255, 255, 0.035);
    --border-hover: rgba(129, 140, 248, 0.45);

    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --primary-light: rgba(99, 102, 241, 0.15);
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #a855f7 100%);
    --accent: #a855f7;
    --accent-cyan: #22d3ee;
    --accent-pink: #f472b6;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;

    --header-bg: rgba(7, 9, 14, 0.82);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.65);
    --card-glow: 0 14px 44px -8px rgba(99, 102, 241, 0.28);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-2xl: 28px;
}

[data-theme="gray"] {
    --bg: #1c202a;
    --bg-soft: #242936;
    --bg-gray: #2d3444;
    --bg-elevated: #222734;
    --bg-glass: rgba(28, 32, 42, 0.88);

    --text: #f3f4f6;
    --text-muted: #94a3b8;
    --text-light: #64748b;

    --border: rgba(255, 255, 255, 0.12);
    --border-light: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-hover: rgba(129, 140, 248, 0.45);

    --primary: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: rgba(99, 102, 241, 0.18);
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #8b5cf6 100%);
    --accent: #a855f7;
    --accent-cyan: #22d3ee;
    --accent-pink: #f472b6;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;

    --header-bg: rgba(28, 32, 42, 0.85);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
    --card-glow: 0 14px 44px -8px rgba(99, 102, 241, 0.22);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-2xl: 28px;
}

/* ============================================================
   RESET & BASE TYPOGRAPHY
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    color-scheme: light dark;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    transition: background-color 0.25s, color 0.25s;
    position: relative;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text);
    line-height: 1.25;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* Фоновые кинематографичные сферы света */
.site-ambient-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.6;
    will-change: transform;
}

.ambient-orb-1 {
    top: -15%;
    left: 20%;
    width: 650px;
    height: 520px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.14), transparent 70%);
}

.ambient-orb-2 {
    top: 35%;
    right: -10%;
    width: 580px;
    height: 580px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.10), transparent 70%);
}

.ambient-orb-3 {
    bottom: 5%;
    left: -5%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08), transparent 70%);
}

[data-theme="dark"] .ambient-orb-1,
[data-theme="gray"] .ambient-orb-1 {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.20), transparent 70%);
}
[data-theme="dark"] .ambient-orb-2,
[data-theme="gray"] .ambient-orb-2 {
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12), transparent 70%);
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 19px;
    flex-shrink: 0;
}

.logo-mark {
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    border-radius: 11px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    transition: transform 0.2s ease;
}

.logo:hover .logo-mark {
    transform: scale(1.05) rotate(-2deg);
}

.logo-text-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-text {
    font-family: var(--font-display);
    letter-spacing: -0.5px;
    font-weight: 800;
}

.logo-pill {
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.25);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
    padding: 8px 14px;
    border-radius: 10px;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.nav-item:hover {
    color: var(--text);
    background: var(--bg-soft);
}

.nav-item.active {
    color: var(--text);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.nav-badge-pill {
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 8px;
    letter-spacing: 0.4px;
    line-height: 1.3;
}

.nav-badge-spark {
    font-size: 12px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Переключатель темы */
/* ============================================================
   THEME PICKER (3 THEMES: LIGHT, GRAY / GRAPHITE, DARK)
   ============================================================ */
.theme-picker-wrapper {
    position: relative;
    display: inline-block;
}

.theme-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    user-select: none;
}

.theme-picker-btn:hover {
    background: var(--bg-soft);
    border-color: var(--border-hover);
    color: var(--primary);
    transform: translateY(-1px);
}

.theme-picker-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.theme-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.theme-btn-icon svg {
    display: none;
}

[data-theme="light"] .theme-btn-icon .theme-icon-sun { display: block; color: #f59e0b; }
[data-theme="gray"] .theme-btn-icon .theme-icon-gray { display: block; color: #94a3b8; }
[data-theme="dark"] .theme-btn-icon .theme-icon-moon { display: block; color: #818cf8; }

.theme-chevron {
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

.theme-picker-wrapper.open .theme-chevron {
    transform: rotate(180deg);
}

/* Выпадающая плашка выбора из 3 тем */
.theme-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 12px 36px rgba(0, 0, 0, 0.28);
    padding: 8px;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.theme-picker-wrapper.open .theme-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.theme-dropdown-header {
    padding: 6px 10px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 6px;
}

.theme-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.theme-opt-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    font-family: inherit;
}

.theme-opt-btn:hover {
    background: var(--bg-soft);
    border-color: var(--border-light);
}

.theme-opt-btn.active {
    background: var(--primary-light);
    border-color: rgba(99, 102, 241, 0.45);
    color: var(--text);
}

.theme-opt-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-opt-preview {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.theme-preview-light {
    background: #ffffff;
    border-color: #cbd5e1;
}
.theme-preview-light .preview-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
}

.theme-preview-gray {
    background: #242936;
    border-color: #475569;
}
.theme-preview-gray .preview-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
}

.theme-preview-dark {
    background: #07090e;
    border-color: #334155;
}
.theme-preview-dark .preview-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #818cf8;
}

.theme-opt-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.theme-opt-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.theme-opt-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.2;
}

.theme-check-icon {
    opacity: 0;
    color: var(--primary);
    transform: scale(0.7);
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.theme-opt-btn.active .theme-check-icon {
    opacity: 1;
    transform: scale(1);
}

/* Fallback legacy .theme-toggle support */
.theme-toggle {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
    background: var(--bg-soft);
    border-color: var(--border-hover);
    color: var(--primary);
    transform: translateY(-1px);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-moon { display: block; }
[data-theme="gray"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* Навигация auth */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-login {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: color 0.15s;
}

.nav-login:hover { color: var(--text); }

.nav-register {
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.nav-register:hover { background: var(--primary-dark); }

.nav-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
    padding: 4px 12px 4px 5px;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    max-width: 240px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-user:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

.nav-avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.nav-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nav-avatar-letter {
    line-height: 1;
    text-transform: uppercase;
}

.nav-user-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-admin-link {
    font-size: 12.5px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.1);
    color: var(--accent);
    border: 1px solid rgba(124, 58, 237, 0.25);
    text-decoration: none;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
}

.nav-admin-link:hover {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.nav-user-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    flex-shrink: 0;
}

.nav-logout {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 12px;
    transition: color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.nav-logout:hover { color: var(--danger); }

.nav-logout-icon {
    display: none;
}

/* ============================================================
   АДАПТАЦИЯ ШАПКИ ДЛЯ МОБИЛЬНЫХ ЭКРАНОВ (<= 768px и <= 440px)
   ============================================================ */
@media (max-width: 768px) {
    .header-inner {
        padding: 8px 14px !important;
        gap: 8px !important;
    }
    .header-right {
        gap: 8px !important;
    }
    .nav-auth {
        gap: 6px !important;
    }
    .nav-user-email {
        display: none !important; /* На смартфонах скрываем email */
    }
    .nav-user {
        padding: 2px !important;
        background: transparent !important;
        border: none !important;
        max-width: none !important;
    }
    .nav-avatar-circle {
        width: 32px !important;
        height: 32px !important;
        border: 2px solid var(--border) !important;
    }
    .nav-admin-link {
        font-size: 11.5px !important;
        padding: 5px 9px !important;
        border-radius: 8px !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
    }
    .nav-logout {
        padding: 5px 8px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 440px) {
    .header-inner {
        padding: 6px 10px !important;
        gap: 5px !important;
    }
    .header-right {
        gap: 5px !important;
    }
    .nav-auth {
        gap: 5px !important;
    }
    .mobile-menu-btn {
        width: 34px !important;
        height: 34px !important;
        margin-right: 0 !important;
        margin-left: auto !important;
    }
    .theme-toggle {
        width: 34px !important;
        height: 34px !important;
    }
    .nav-messages-btn {
        width: 34px !important;
        height: 34px !important;
        margin-right: 0 !important;
    }
    .logo {
        gap: 6px !important;
    }
    .logo-mark {
        width: 32px !important;
        height: 32px !important;
        font-size: 16px !important;
    }
    .logo-text {
        font-size: 17px !important;
    }
    .nav-admin-link {
        padding: 4px 7px !important;
        font-size: 11px !important;
    }
    .nav-logout-text {
        display: none !important; /* На экранах <= 440px заменяем текст на иконку выхода */
    }
    .nav-logout-icon {
        display: inline-block !important;
    }
    .nav-logout {
        width: 34px !important;
        height: 34px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 1px solid var(--border) !important;
        background: var(--bg-soft) !important;
        border-radius: 8px !important;
        color: var(--text-muted) !important;
    }
    .nav-logout:hover {
        background: rgba(239, 68, 68, 0.12) !important;
        border-color: rgba(239, 68, 68, 0.3) !important;
        color: #ef4444 !important;
    }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    margin-top: 80px;
    padding: 50px 24px 20px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 30px;
}

@media (max-width: 800px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-inner { grid-template-columns: 1fr; } }

.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 0;
    transition: color 0.15s, transform 0.15s;
}

.footer-col a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.footer-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 14px;
    max-width: 320px;
    line-height: 1.6;
}

.footer-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 18px;
}

.footer-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: heroPulse 2s infinite;
}

.footer-contact-text {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0 0 10px;
}

.footer-contact-link {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text) !important;
    margin-bottom: 16px;
}

.footer-contact-link:hover {
    color: var(--primary) !important;
    transform: none !important;
}

.footer-cta-box {
    margin-top: 12px;
}

.btn-footer-start {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 9px 16px !important;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff !important;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: all 0.2s !important;
}

.btn-footer-start:hover {
    background: var(--primary-dark);
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 13px;
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom-trust {
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .footer-bottom-flex {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================================
   LAYOUT
   ============================================================ */
.site-main {
    min-height: calc(100vh - 250px);
}

/* ============================================================
   КНОПКИ (общие)
   ============================================================ */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.btn-primary:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text);
}

.btn-secondary:hover { background: var(--border); }

/* ============================================================
   ЛЕНДИНГ
   ============================================================ */
.landing {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero {
    text-align: center;
    padding: 90px 20px 80px;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(37, 99, 235, 0.1), transparent 60%);
    pointer-events: none;
    z-index: -1;
}

.hero-title {
    font-size: 52px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    margin: 0 0 22px;
    letter-spacing: -1.5px;
}

@media (max-width: 700px) {
    .hero-title { font-size: 34px; letter-spacing: -0.8px; }
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

@media (max-width: 700px) {
    .hero-subtitle { font-size: 16px; }
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 16px 36px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.2s;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.3);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.4);
}

.btn-hero-secondary {
    display: inline-block;
    background: var(--bg-elevated);
    color: var(--text);
    padding: 16px 36px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    border: 1px solid var(--border);
    transition: all 0.15s;
}

.btn-hero-secondary:hover { border-color: var(--text); }

.hero-note {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 24px;
}

.section-title {
    font-size: 34px;
    font-weight: 800;
    color: var(--text);
    text-align: center;
    margin: 0 0 16px;
    letter-spacing: -0.8px;
}

@media (max-width: 700px) {
    .section-title { font-size: 26px; }
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 50px;
    font-size: 16px;
}

/* FEATURES */
.features {
    padding: 80px 0;
    border-top: 1px solid var(--border-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 50px;
    margin-bottom: 70px;
}

@media (max-width: 960px) { .features-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (max-width: 600px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    box-sizing: border-box;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 26px;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--primary-light);
    border-radius: var(--radius);
}

[data-theme="dark"] .feature-icon {
    background: rgba(59, 130, 246, 0.15);
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* HOW */
.how {
    padding: 80px 0;
    border-top: 1px solid var(--border-light);
}

.how-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

@media (max-width: 700px) { .how-steps { grid-template-columns: 1fr; } }

.how-step { text-align: center; }

.how-num {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.how-step h3 {
    margin: 0 0 8px;
    font-size: 17px;
    color: var(--text);
    font-weight: 700;
}

.how-step p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

.how-cta { text-align: center; margin-top: 50px; }

/* WHY */
.why {
    padding: 80px 0;
    border-top: 1px solid var(--border-light);
}

.why-content {
    max-width: 720px;
    margin: 40px auto 0;
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-muted);
    text-align: center;
}

.why-content p { margin-bottom: 20px; }
.why-content b { color: var(--text); font-weight: 700; }

/* TARIFFS TEASER */
.tariffs-teaser {
    padding: 80px 0;
    border-top: 1px solid var(--border-light);
}

.tariffs-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 20px;
}

@media (max-width: 800px) { .tariffs-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .tariffs-row { grid-template-columns: 1fr; } }

.tariff-mini {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px 20px;
    text-align: center;
    transition: all 0.2s;
}

.tariff-mini:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.tariff-mini-popular {
    border-color: var(--warning);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.15);
    position: relative;
}

.tariff-mini-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.tariff-mini-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.tariff-mini-popular .tariff-mini-price { color: var(--warning); }

.tariff-mini-desc {
    font-size: 13px;
    color: var(--text-light);
}

/* FINAL CTA */
.final-cta {
    text-align: center;
    padding: 80px 20px;
    border-top: 1px solid var(--border-light);
    margin-top: 20px;
}

.final-cta h2 {
    font-size: 30px;
    color: var(--text);
    margin: 0 0 12px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.final-cta p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 16px;
}

/* ============================================================
   СТАТЬИ
   ============================================================ */
.articles-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px;
}

.articles-page h1 {
    font-size: 38px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.8px;
    margin: 0 0 10px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 40px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.article-card {
    display: block;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.2s;
    overflow: hidden;
    position: relative;
}

.article-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.2s;
}

.article-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.article-card:hover::before { opacity: 1; }

.article-card-body { padding: 24px 26px; }

.article-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 10px;
    line-height: 1.35;
    letter-spacing: -0.2px;
}

.article-card-preview {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px;
}

.article-card-link {
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* ============================================================
   МЕДИА-РИДЕР 2.0 (PRODUCTION SPECIFICATION ДЛЯ СТАТЕЙ)
   ============================================================ */

:root {
    --article-bg: #fcfcfd;
    --article-text: #1a1f2c;
    --article-lead: #475569;
    --font-heading-h1: 'Unbounded', 'Manrope', -apple-system, sans-serif;
    --font-heading: 'Manrope', 'Plus Jakarta Sans', -apple-system, sans-serif;
    --font-article: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
    --article-bg: #07090e;
    --article-text: #e2e8f0;
    --article-lead: #94a3b8;
}

[data-theme="gray"] {
    --article-bg: #1c202a;
    --article-text: #f1f5f9;
    --article-lead: #cbd5e1;
}

/* Лейаут: Две колонки (Оглавление слева + Контент) */
.article-reader-container {
    max-width: 1140px;
    margin: 30px auto 80px;
    padding: 0 24px;
    display: flex;
    align-items: flex-start;
    gap: 48px;
    position: relative;
}

/* Липкое оглавление слева (TOC Desktop) */
.article-toc-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 20px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    scrollbar-width: thin;
}

.article-toc-sidebar::-webkit-scrollbar {
    width: 4px;
}
.article-toc-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.article-toc-title {
    font-family: var(--font-heading);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 800;
    color: var(--text-light);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-toc-item {
    margin-bottom: 6px;
}

.article-toc-item.level-3 {
    margin-left: 14px;
}

.article-toc-link {
    display: block;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.article-toc-link:hover {
    color: var(--primary);
    background: var(--bg-soft);
}

.article-toc-link.active {
    color: var(--primary);
    font-weight: 700;
    border-left-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

/* Основной контентный блок */
.article-main-wrapper {
    flex: 1;
    min-width: 0;
    max-width: 720px;
    margin: 0 auto;
}

/* Шапка статьи (Hero) */
.article-hero {
    margin-bottom: 36px;
}

.article-breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-light);
    margin-bottom: 18px;
}

.article-breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.article-breadcrumbs a:hover {
    color: var(--primary);
}

.article-badge-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.article-title-h1 {
    font-family: var(--font-heading-h1);
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.25;
    color: var(--text);
    margin: 18px 0 20px;
    text-wrap: balance;
}

@media (max-width: 768px) {
    .article-title-h1 {
        font-size: 28px;
    }
}

.article-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 14px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.article-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Главный блок форматирования статьи */
.article {
    max-width: 720px;
    margin: 0 auto;
    font-family: var(--font-article);
    font-size: 18px;
    line-height: 1.6;
    color: var(--article-text);
    text-align: left;
}

/* Заголовки с балансировкой и якорными ссылками */
.article h1,
.article h2,
.article h3,
.article h4 {
    color: var(--text);
    text-wrap: balance;
    font-family: var(--font-heading);
}

.article h2 {
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 56px 0 16px;
    line-height: 1.3;
    position: relative;
    padding-bottom: 6px;
}

.article h3 {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin: 38px 0 14px;
    line-height: 1.35;
}

/* Якорные ссылки */
.heading-with-anchor {
    position: relative;
}

.heading-anchor {
    opacity: 0;
    margin-left: 8px;
    font-size: 0.85em;
    text-decoration: none;
    color: var(--primary);
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: inline-block;
    cursor: pointer;
}

.heading-with-anchor:hover .heading-anchor {
    opacity: 0.85;
    transform: scale(1.1);
}

/* Журнальный Лид */
.article-lead,
.article > p.article-lead {
    font-size: 20px !important;
    line-height: 1.65 !important;
    color: var(--article-lead) !important;
    padding: 16px 20px 16px 22px !important;
    margin: 26px 0 32px !important;
    border-left: 4px solid var(--primary) !important;
    background: var(--bg-soft) !important;
    border-radius: 0 var(--radius) var(--radius) 0 !important;
    font-weight: 450 !important;
}

/* Абзацы текста */
.article p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--article-text);
    margin-bottom: 22px;
    text-wrap: pretty;
}

/* Ссылки */
.article a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.article a:hover {
    color: var(--primary-dark);
    text-decoration-color: var(--primary-dark);
}

/* Списки */
.article ul, .article ol {
    margin: 0 0 24px 28px;
    padding: 0;
    color: var(--article-text);
}

.article li {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 10px;
    padding-left: 4px;
}

.article ul > li::marker {
    color: var(--primary);
}

.article ol > li::marker {
    color: var(--primary);
    font-weight: 700;
}

/* Цитаты с гигантской дизайнерской кавычкой */
.article blockquote {
    position: relative;
    border-left: 4px solid var(--primary);
    background: var(--bg-soft);
    padding: 24px 28px 24px 34px;
    margin: 36px 0;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    color: var(--text);
    font-size: 19px;
    line-height: 1.65;
    font-style: italic;
    overflow: hidden;
}

.article blockquote::before {
    content: "“";
    position: absolute;
    top: -15px;
    left: 10px;
    font-family: Georgia, serif;
    font-size: 90px;
    line-height: 1;
    color: var(--primary);
    opacity: 0.15;
    pointer-events: none;
}

/* Умные Callout-блоки (GitHub Alerts) */
.callout {
    margin: 32px 0;
    padding: 18px 22px;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary);
    background: var(--bg-soft);
    box-shadow: var(--shadow-sm);
}

.callout-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 15px;
}

.callout-title {
    font-weight: 700;
    font-family: var(--font-heading);
}

.callout-content {
    font-size: 16.5px;
    line-height: 1.55;
    color: var(--article-text);
}

.callout-content p:last-child {
    margin-bottom: 0;
}

.callout-tip {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}
.callout-tip .callout-title { color: #10b981; }

.callout-warning {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.09);
}
.callout-warning .callout-title { color: #f59e0b; }

.callout-note {
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}
.callout-note .callout-title { color: #3b82f6; }

/* Тултипы терминов */
.article-term {
    position: relative;
    border-bottom: 1.5px dashed var(--primary);
    cursor: help;
    font-weight: 500;
    color: var(--text);
    transition: color 0.15s;
}

.article-term:hover {
    color: var(--primary);
}

.article-term::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--bg-elevated);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 250px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100;
}

.article-term:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Изображения внутри статьи */
.article img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 28px auto;
    display: block;
    box-shadow: var(--shadow-md);
    cursor: zoom-in;
    transition: transform 0.25s ease;
}

.article figure {
    margin: 32px 0;
    text-align: center;
}

.article figcaption {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 10px;
    font-style: italic;
}

/* Блоки кода с кнопкой «Скопировать» */
.code-block-wrapper {
    position: relative;
    margin: 28px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #1e1e2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-md);
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.35);
    font-family: var(--font-mono);
    font-size: 12px;
    color: #a6adc8;
}

.code-copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cdd6f4;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.article pre {
    margin: 0;
    padding: 16px 20px;
    overflow-x: auto;
    background: transparent;
    font-family: var(--font-mono);
    font-size: 14.5px;
    line-height: 1.55;
    color: #cdd6f4;
}

.article code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-soft);
    color: var(--primary);
    border: 1px solid var(--border);
}

.article pre code {
    padding: 0;
    background: transparent;
    color: inherit;
    border: none;
}

kbd {
    display: inline-block;
    padding: 3px 7px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1;
    color: var(--text);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 5px;
    box-shadow: 0 2px 0 var(--border);
}

/* Всплывающее меню цитирования (Medium Quote Share) */
.quote-share-popover {
    position: absolute;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: fadeInPop 0.15s ease;
}

@keyframes fadeInPop {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.quote-share-btn {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 12.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

.quote-share-btn:hover {
    background: var(--bg-soft);
    color: var(--primary);
}

/* Блок реакций (VK-Style) */
.article-reactions-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    margin: 48px 0 36px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.article-reactions-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.article-reactions-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.reaction-pill-btn {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 8px 18px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reaction-pill-btn:hover {
    transform: translateY(-2px) scale(1.05);
    border-color: var(--primary);
}

.reaction-pill-btn.active {
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--primary);
    color: var(--primary);
}

.reaction-pill-btn:active .reaction-emoji {
    transform: scale(1.3);
}

.reaction-emoji {
    font-size: 18px;
    transition: transform 0.2s;
}

/* Действия со статьей: Умная кнопка копирования */
.article-share-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 18px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.btn-smart-copy {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 9px 18px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-smart-copy:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Карточка автора */
.article-author-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    margin: 36px 0;
}

.author-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    flex-shrink: 0;
}

.author-info h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.author-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* Блок «Читайте также» */
.related-articles-section {
    margin: 50px 0 40px;
}

.related-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 22px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.related-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    text-decoration: none;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.related-card-cat {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.related-card-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
    margin-bottom: 10px;
}

.related-card-meta {
    margin-top: auto;
    font-size: 12.5px;
    color: var(--text-light);
}

/* Toast-уведомление */
.smart-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    background: #0f172a;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.smart-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Мобильная шторка содержания (Bottom Sheet) */
.mobile-toc-trigger {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 20px;
    right: auto;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    z-index: 998;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.bottom-sheet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-radius: 24px 24px 0 0;
    padding: 20px 24px calc(24px + env(safe-area-inset-bottom));
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
}

.bottom-sheet.open {
    transform: translateY(0);
}

.bottom-sheet-overlay.open {
    opacity: 1;
    display: block;
}

.bottom-sheet-handle {
    width: 44px;
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    margin: 0 auto 18px;
}

@media (max-width: 1024px) {
    .article-toc-sidebar {
        display: none !important;
    }
    .article-reader-container {
        padding: 0 16px;
    }
    .mobile-toc-trigger {
        display: inline-flex;
    }
}


/* ============================================================
   БОТ
   ============================================================ */
.bot-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 50px 24px;
}

.bot-page h1 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin: 0 0 8px;
}

.limit-info {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 20px;
    margin: 20px 0 30px;
    color: var(--text);
    font-weight: 500;
    font-size: 14px;
    line-height: 1.5;
}

.limit-info b { color: var(--primary); }

.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

@media (max-width: 700px) { .preview-grid { grid-template-columns: 1fr; } }

.preview-box {
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
}

.preview-box h3 {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
}

.preview-content {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-conic-gradient(var(--bg-gray) 0% 25%, var(--bg-elevated) 0% 50%) 50% / 20px 20px;
    border-radius: var(--radius);
    overflow: hidden;
}

.preview-content img {
    max-width: 100%;
    max-height: 400px;
}

.placeholder {
    color: var(--text-light);
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

/* Upload zone */
.upload-zone {
    position: relative;
    cursor: pointer;
    border: 2px dashed var(--border);
    transition: all 0.2s;
    background: var(--bg-elevated);
}

.upload-zone:hover {
    border-color: var(--primary);
    background: var(--bg-soft);
}

.upload-zone.drag-over {
    border-color: var(--primary);
    background: var(--bg-soft);
    transform: scale(1.02);
}

.upload-zone.has-file {
    border-style: solid;
    border-color: var(--border);
    cursor: default;
}

.upload-zone input[type="file"] { display: none; }

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 40px 20px;
    pointer-events: none;
}

.upload-placeholder p {
    margin: 0;
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
}

.upload-placeholder span {
    color: var(--text-light);
    font-size: 13px;
}

/* Режимы */
.group-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
}

.mode-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mode-card { cursor: pointer; position: relative; }

.mode-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mode-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 14px;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.15s;
    text-align: center;
}

.mode-card-content svg { color: var(--text-muted); }
.mode-card-content span { font-weight: 600; color: var(--text); font-size: 15px; }
.mode-card-content small { color: var(--text-light); font-size: 12px; }

.mode-card:hover .mode-card-content { border-color: var(--primary); }

.mode-card input:checked + .mode-card-content {
    border-color: var(--primary);
    background: var(--bg-soft);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.mode-card input:checked + .mode-card-content svg { color: var(--primary); }

/* Палитра */
.color-picker-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

input[type="color"] {
    width: 60px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 3px;
    background: var(--bg-elevated);
}

#color-hex {
    font-family: 'SF Mono', Monaco, monospace;
    color: var(--text-muted);
    font-size: 14px;
    text-transform: uppercase;
}

.custom-size-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-size-row span {
    color: var(--text-light);
    font-weight: 700;
}

/* Форма */
.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="tel"],
select,
input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    background: var(--bg-elevated);
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.form-group input:focus,
select:focus,
input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

#submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    margin-top: 10px;
    font-family: inherit;
}

#submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

#submit-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

#download-block {
    margin-top: 24px;
    text-align: center;
}

.btn-download {
    display: inline-block;
    background: var(--success);
    color: white;
    padding: 16px 40px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.15s;
}

.btn-download:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(22, 163, 74, 0.3);
}

/* История */
.history-section {
    margin-top: 60px;
    padding: 30px 24px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.history-header { margin-bottom: 20px; }

.history-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.15s;
}

.history-row:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.history-thumb {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: repeating-conic-gradient(var(--bg-gray) 0% 25%, var(--bg-elevated) 0% 50%) 50% / 10px 10px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.history-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.history-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.history-date {
    font-size: 12px;
    color: var(--text-light);
}

.badge {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .badge {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.btn-small {
    background: var(--text);
    color: var(--bg);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s;
}

.btn-small:hover { background: var(--primary); color: white; }

/* Пакетная CTA */
.batch-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 20px 0 30px;
    padding: 18px 22px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    color: white;
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.25);
    position: relative;
    overflow: hidden;
}

.batch-cta::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.batch-cta-left {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.batch-cta-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    color: white;
}

.batch-cta-title { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.batch-cta-subtitle { font-size: 13px; color: rgba(255, 255, 255, 0.85); }

.batch-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    background: white;
    color: var(--accent);
    padding: 12px 22px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.15s;
    position: relative;
    z-index: 1;
}

.batch-cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

@media (max-width: 600px) {
    .batch-cta { flex-direction: column; text-align: center; }
    .batch-cta-left { flex-direction: column; }
    .batch-cta-button { width: 100%; justify-content: center; }
}

/* Пакетная страница */
.batch-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 50px 24px;
}

.progress-info {
    margin-top: 25px;
    padding: 24px;
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

#progress-text {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 14px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--border);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s;
}

#result-block { margin-top: 24px; text-align: center; }

/* Замок */
.locked-page {
    max-width: 600px;
    margin: 80px auto;
    padding: 0 24px;
}

.locked-card {
    text-align: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 50px 40px;
    box-shadow: var(--shadow-md);
}

.locked-icon {
    font-size: 44px;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(168, 85, 247, 0.15));
    border-radius: var(--radius-xl);
    color: var(--accent);
}

.locked-card h1 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--text);
}

.locked-card .subtitle { margin-bottom: 35px; }

.locked-benefits {
    text-align: left;
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.locked-benefit {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    align-items: flex-start;
}

.locked-benefit-icon { font-size: 22px; flex-shrink: 0; }

.locked-benefit b {
    display: block;
    color: var(--text);
    font-size: 14px;
    margin-bottom: 2px;
}

.locked-benefit p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.locked-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-upgrade {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    color: white;
    padding: 14px 32px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.15s;
    box-shadow: 0 8px 22px rgba(124, 58, 237, 0.3);
}

.btn-upgrade:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.4);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-gray);
    margin-bottom: 24px;
    transition: all 0.15s;
}

.back-link:hover {
    background: var(--border);
    color: var(--text);
    transform: translateX(-2px);
}

/* ============================================================
   ПРОФИЛЬ
   ============================================================ */
.profile-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 24px;
}

.profile-page h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0 0 10px;
}

.profile-header-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 30px 0 20px;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
}

.profile-header-info { flex: 1; }

.profile-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.2px;
}

.profile-nickname {
    color: var(--primary);
    font-size: 14px;
    margin-top: 2px;
    font-weight: 500;
}

.profile-email {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

.btn-edit-profile {
    display: inline-block;
    padding: 10px 20px;
    background: var(--bg-gray);
    color: var(--text);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.15s;
    flex-shrink: 0;
}

.btn-edit-profile:hover { background: var(--border); }

.profile-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
    margin-bottom: 20px;
}

.profile-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.profile-row:last-child { border-bottom: none; }

.profile-label {
    color: var(--text-muted);
    font-size: 14px;
}

.profile-value {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* Бейджи тарифов */
.badge-free, .badge-base, .badge-pro, .badge-business {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.badge-free { background: var(--bg-gray); color: var(--text-muted); }
.badge-base { background: #dbeafe; color: #1e40af; }
.badge-pro { background: #fef3c7; color: #92400e; }
.badge-business { background: #ede9fe; color: #5b21b6; }

[data-theme="dark"] .badge-base { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
[data-theme="dark"] .badge-pro { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
[data-theme="dark"] .badge-business { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; }

/* Плашка статуса тарифа */
.tariff-status {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 20px;
    border: 1px solid;
}

.tariff-status-icon {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--bg-elevated);
}

.tariff-status-content { flex: 1; }

.tariff-status-title {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 4px;
    font-weight: 500;
}

.tariff-status-date {
    font-size: 13px;
    color: var(--text-muted);
}

.tariff-status-warning {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--warning);
    border-radius: 6px;
    font-size: 13px;
    color: #8a5a00;
}

[data-theme="dark"] .tariff-status-warning { color: #fcd34d; }

.tariff-status-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.tariff-status-free {
    background: var(--bg-soft);
    border-color: var(--border);
}
.tariff-status-free .tariff-status-icon { color: var(--text-muted); }
.tariff-status-free .tariff-status-link { color: var(--primary); }

.tariff-status-base {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.3);
}
.tariff-status-base .tariff-status-icon { color: var(--primary); }
.tariff-status-base .tariff-status-title b { color: var(--primary); }

.tariff-status-pro {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.35);
}
.tariff-status-pro .tariff-status-icon { color: #d4a017; }
.tariff-status-pro .tariff-status-title b { color: #d4a017; }

.tariff-status-business {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.3);
}
.tariff-status-business .tariff-status-icon { color: var(--accent); }
.tariff-status-business .tariff-status-title b { color: var(--accent); }

/* Форма редактирования профиля */
.profile-edit-form {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-top: 20px;
}

.avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-gray);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 800;
}

.avatar-button {
    display: inline-block;
    padding: 8px 18px;
    background: var(--bg-gray);
    color: var(--text);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s;
}

.avatar-button:hover { background: var(--border); }

/* ============================================================
   ТАРИФЫ
   ============================================================ */
.pricing-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
}

.pricing-page h1 {
    text-align: center;
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin: 0 0 12px;
    color: var(--text);
}

.pricing-page > .subtitle { text-align: center; }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 50px;
    margin-bottom: 70px;
}

.pricing-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1000px) { .pricing-grid, .pricing-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .pricing-grid, .pricing-grid-4 { grid-template-columns: 1fr; } }

.pricing-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    position: relative;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pricing-card h2 {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--text);
}

.price {
    font-size: 36px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.price span {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
}

.features {
    list-style: none;
    padding: 0;
    margin: 0 0 25px;
    flex: 1;
}

.features li {
    padding: 8px 0 8px 26px;
    position: relative;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
    font-size: 15px;
}

.pricing-action { text-align: center; margin-top: auto; }

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.business-badge {
    background: linear-gradient(135deg, var(--accent), #a855f7) !important;
}

.btn-pro {
    display: inline-block;
    background: var(--text);
    color: var(--bg);
    padding: 14px 32px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.15s;
    width: 100%;
}

.btn-pro:hover { background: var(--primary); color: white; }

.btn-free, .btn-business {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.15s;
    width: 100%;
}

.btn-free { background: var(--bg-gray); color: var(--text); }
.btn-free:hover { background: var(--border); }

.btn-business {
    background: linear-gradient(135deg, var(--accent), #a855f7);
    color: white;
}
.btn-business:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.3);
}

/* Цвета карточек тарифов */
.pricing-card-free .price { color: var(--text-muted); }

.pricing-card-base { border-color: rgba(37, 99, 235, 0.4); }
.pricing-card-base .price { color: var(--primary); }
.pricing-card-base .features li::before { color: var(--primary); }
.pricing-card-base .popular-badge { background: var(--primary) !important; }
.pricing-card-base .btn-pro { background: var(--primary); color: white; }

.pricing-card-pro {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.1);
}
.pricing-card-pro .price { color: #d4a017; }
.pricing-card-pro .features li::before { color: #d4a017; }
.pricing-card-pro .popular-badge { background: #d4a017 !important; color: white !important; }
.pricing-card-pro .btn-pro { background: #d4a017; color: white; }
.pricing-card-pro .btn-pro:hover { background: #b8860b; }

.pricing-card-business {
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.1);
}
.pricing-card-business .price { color: var(--accent); }
.pricing-card-business .features li::before { color: var(--accent); }
.pricing-card-business .popular-badge,
.pricing-card-business .business-badge {
    background: linear-gradient(135deg, var(--accent), #a855f7) !important;
}

/* Активная карточка */
.pricing-card.pricing-card-current {
    border-width: 2px !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1) !important;
}

.pricing-card-free.pricing-card-current { border-color: var(--text-muted) !important; }
.pricing-card-base.pricing-card-current { border-color: var(--primary) !important; box-shadow: 0 12px 35px rgba(37, 99, 235, 0.2) !important; }
.pricing-card-pro.pricing-card-current { border-color: #d4a017 !important; box-shadow: 0 12px 35px rgba(212, 160, 23, 0.25) !important; }
.pricing-card-business.pricing-card-current { border-color: var(--accent) !important; box-shadow: 0 12px 35px rgba(124, 58, 237, 0.22) !important; }

.pricing-card-current .current-badge {
    color: white !important;
    font-weight: 700;
}

.pricing-card-free.pricing-card-current .current-badge { background: var(--text-muted) !important; }
.pricing-card-base.pricing-card-current .current-badge { background: var(--primary) !important; }
.pricing-card-pro.pricing-card-current .current-badge { background: #d4a017 !important; }
.pricing-card-business.pricing-card-current .current-badge { background: var(--accent) !important; }

.current-badge-text {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
    border: 1px dashed;
    background: var(--bg-elevated);
    width: 100%;
}

.pricing-card-free .current-badge-text { color: var(--text-muted); border-color: var(--text-light); }
.pricing-card-base .current-badge-text { color: var(--primary); border-color: var(--primary); }
.pricing-card-pro .current-badge-text { color: #d4a017; border-color: #d4a017; }
.pricing-card-business .current-badge-text { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   АВТОРИЗАЦИЯ
   ============================================================ */
.auth-page {
    max-width: 440px;
    margin: 48px auto 64px;
    padding: 0 16px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.auth-page h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0 0 8px;
    color: var(--text);
}

.auth-form { margin-bottom: 20px; }

.auth-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    background: var(--bg);
    color: var(--text);
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auth-switch {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 20px;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover { text-decoration: underline; }

.error-message {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid rgba(220, 38, 38, 0.25);
}

.success-message {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid rgba(22, 163, 74, 0.25);
}

/* ============================================================
   АДМИНКА
   ============================================================ */
.admin-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 24px;
}

.admin-page h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0 0 30px;
    color: var(--text);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 700px) { .admin-stats { grid-template-columns: 1fr; } }

.admin-stat {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    transition: all 0.2s;
}

.admin-stat:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.admin-stat-value {
    font-size: 38px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
    letter-spacing: -1px;
}

.admin-stat-label {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.admin-table th, .admin-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text);
}

.admin-table th {
    background: var(--bg-soft);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.8px;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-soft); }

.badge-admin {
    background: linear-gradient(135deg, var(--danger), #991b1b);
    color: white;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ============================================================
   UTILITY
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.article-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 50px 24px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-gray);
    margin-bottom: 30px;
    transition: all 0.15s;
}

.back-link:hover {
    background: var(--border);
    color: var(--text);
    transform: translateX(-2px);
}


/* ============================================================
   КОММЕНТАРИИ
   ============================================================ */
.comments-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.comments-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
}

.comments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: var(--bg-gray);
    color: var(--text-muted);
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.comment {
    display: flex;
    gap: 14px;
}

.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-body {
    flex: 1;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
}

.comment-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 700;
    color: var(--text);
    font-size: 14px;
}

.comment-date {
    font-size: 12px;
    color: var(--text-light);
}

.comment-text {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.comments-empty {
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    padding: 30px 20px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.comment-form {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.comments-login-required {
    text-align: center;
    padding: 24px;
    background: var(--bg-soft);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 14px;
}

.comments-login-required a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.comments-login-required a:hover { text-decoration: underline; }


/* --- Статус онлайн --- */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2); }
    50% { box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.1); }
}

.badge-online {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(22, 163, 74, 0.12);
    color: var(--success);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.badge-online::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
}

.badge-offline {
    color: var(--text-light);
    font-size: 12px;
}

/* --- Редактирование пользователя --- */
.admin-user-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

@media (max-width: 800px) {
    .admin-user-grid { grid-template-columns: 1fr; }
}

.admin-user-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.admin-user-card h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    color: var(--text);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* --- Комментарии в админке --- */
.admin-comments {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-comment {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
}

.admin-comment-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-comment-head b {
    color: var(--primary);
    font-size: 13px;
    font-family: 'SF Mono', Monaco, monospace;
}

.admin-comment-head span {
    color: var(--text-light);
    font-size: 12px;
}

.admin-comment-text {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ============================================================
   СТРАНИЦА «О НАС»
   ============================================================ */
/* ============================================================
   СТРАНИЦА «О НАС»
   ============================================================ */
.about-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 60px 24px;
}

.about-hero {
    text-align: center;
    padding: 20px 20px 60px;
    margin-bottom: 40px;
}

.about-hero h1 {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin: 0 0 24px;
    line-height: 1.05;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 700px) {
    .about-hero h1 { font-size: 38px; letter-spacing: -1px; }
}

.about-lead {
    font-size: 19px;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
}

@media (max-width: 700px) {
    .about-lead { font-size: 16px; }
}

/* Основной контент */
.about-content {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text);
}

.about-content h1 {
    display: none; /* скрываем # О нас из markdown — у нас уже есть свой заголовок */
}

.about-content hr {
    display: none;
}

.about-content h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 54px 0 24px;
    padding: 0;
    color: var(--text);
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.about-content h2::before {
    content: "";
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #6366f1, #3b82f6);
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
}

.about-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 32px 0 12px;
    color: var(--text);
}

/* Карточки разделов */
.about-content > p,
.about-content > ul,
.about-content > ol,
.about-content > blockquote {
    margin-bottom: 20px;
    color: var(--text-muted);
}

/* Каждый раздел h2 + следующий за ним контент — визуально в карточке */
.about-content h2 {
    margin-top: 48px;
}

.about-content h2:first-of-type { margin-top: 0; }

.about-content p {
    margin-bottom: 18px;
    color: var(--text-muted);
    font-size: 16px;
}

.about-content p strong {
    color: var(--text);
    font-weight: 700;
}

.about-content ul,
.about-content ol {
    margin: 0 0 20px 24px;
    color: var(--text-muted);
}

.about-content li {
    margin-bottom: 10px;
    line-height: 1.65;
}

.about-content li::marker {
    color: var(--primary);
}

.about-content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}

.about-content a:hover { border-bottom-color: var(--primary); }

/* Цитата */
.about-content blockquote {
    position: relative;
    border: none;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(124, 58, 237, 0.06));
    padding: 24px 28px 24px 60px;
    margin: 32px 0;
    border-radius: var(--radius-lg);
    color: var(--text);
    font-style: normal;
    font-size: 16px;
    line-height: 1.7;
    font-weight: 500;
}

.about-content blockquote::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 20px;
    font-size: 64px;
    line-height: 1;
    color: var(--primary);
    font-family: Georgia, serif;
    opacity: 0.4;
}

/* CTA внизу */
.about-cta {
    text-align: center;
    padding: 50px 30px;
    margin-top: 70px;
    background: linear-gradient(135deg, var(--bg-soft), var(--bg-gray));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.about-cta::before {
    content: "";
    position: absolute;
    top: -60%;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08), transparent 70%);
    pointer-events: none;
}

.about-cta h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0 0 12px;
    color: var(--text);
    position: relative;
}

.about-cta p {
    color: var(--text-muted);
    font-size: 16px;
    margin: 0 0 28px;
    position: relative;
}

.about-cta .btn-hero-primary {
    position: relative;
}


/* ============================================================
   СТРАНИЦА СТАТЕЙ — РАСШИРЕННАЯ
   ============================================================ */
.articles-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px;
}

.articles-header {
    margin-bottom: 36px;
}

.articles-header h1 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 0 0 10px;
    color: var(--text);
}

.articles-header .subtitle {
    color: var(--text-muted);
    font-size: 16px;
    margin: 0;
}

/* Панель поиска и фильтров */
.articles-toolbar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 36px;
}

.articles-search {
    position: relative;
    max-width: 480px;
}

.articles-search svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.articles-search input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.articles-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.articles-search input::placeholder {
    color: var(--text-light);
}

.articles-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 9px 18px;
    background: var(--bg-gray);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.filter-btn:hover {
    background: var(--bg-soft);
    color: var(--text);
    border-color: var(--primary);
}

.filter-btn.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

[data-theme="dark"] .filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Сетка */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.article-card {
    display: block;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.2s;
    overflow: hidden;
    position: relative;
    display: flex;
}

.article-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.2s;
}

.article-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.article-card:hover::before { opacity: 1; }

.article-card-body {
    padding: 24px 26px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.article-card-category {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

[data-theme="dark"] .article-card-category {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.article-card-date {
    font-size: 12px;
    color: var(--text-light);
}

.article-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 10px;
    line-height: 1.35;
    letter-spacing: -0.2px;
}

.article-card-preview {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 18px;
    flex: 1;
}

.article-card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-top: auto;
}

.article-card-link svg {
    transition: transform 0.15s;
}

.article-card:hover .article-card-link svg {
    transform: translateX(3px);
}

.articles-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 15px;
    background: var(--bg-soft);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    margin-top: 20px;
}


/* ============================================================
   ПАГИНАЦИЯ
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.page-numbers {
    display: flex;
    gap: 6px;
    align-items: center;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.15s;
    cursor: pointer;
}

.page-btn:hover:not(.disabled):not(.active) {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.page-btn.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    cursor: default;
}

[data-theme="dark"] .page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.page-nav {
    padding: 0 18px;
}

.page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 42px;
    color: var(--text-light);
    font-weight: 700;
}

@media (max-width: 500px) {
    .page-num {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }
    .page-nav {
        padding: 0 12px;
        font-size: 13px;
    }
}


/* ============================================================
   СТРАНИЦА ТАРИФОВ — РАСШИРЕННАЯ
   ============================================================ */
.pricing-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 0;
}

/* Hero */
.pricing-hero {
    text-align: center;
    padding: 40px 20px 70px;
}

.pricing-hero h1 {
    font-size: 46px;
    font-weight: 800;
    letter-spacing: -1.2px;
    margin: 0 0 18px;
    line-height: 1.1;
    color: var(--text);
}

@media (max-width: 700px) {
    .pricing-hero h1 { font-size: 32px; letter-spacing: -0.6px; }
}

.pricing-hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Заголовок карточки тарифа */
.pricing-card-header {
    margin-bottom: 20px;
}

.pricing-card-tagline {
    color: var(--text-light);
    font-size: 13px;
    margin: 6px 0 0;
}

.pricing-card h2 {
    margin: 0;
}

/* Секции на странице тарифов */
.pricing-section {
    padding: 60px 0 20px;
    margin-top: 40px;
}

.pricing-section + .pricing-section {
    border-top: 1px solid var(--border-light);
    padding-top: 60px;
}

/* Кому подойдёт */
.pricing-who-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.pricing-who-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.pricing-who-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.pricing-who-icon {
    font-size: 34px;
    margin-bottom: 14px;
    width: 60px;
    height: 60px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pricing-who-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--text);
    letter-spacing: -0.2px;
}

.pricing-who-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 18px;
    flex: 1;
}

.pricing-who-answer {
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
}

/* Таблица сравнения */
.compare-wrap {
    overflow-x: auto;
    margin-top: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-elevated);
    min-width: 640px;
}

.compare-table th,
.compare-table td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text);
}

.compare-table th {
    background: var(--bg-soft);
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.8px;
}

.compare-table td:first-child {
    font-weight: 500;
    color: var(--text-muted);
}

.compare-table tr:last-child td { border-bottom: none; }

.compare-table tr:hover td { background: var(--bg-soft); }

.compare-table th:not(:first-child),
.compare-table td:not(:first-child) {
    text-align: center;
}

.compare-highlight {
    background: rgba(245, 158, 11, 0.08) !important;
    color: #b45309 !important;
    font-weight: 700;
}

[data-theme="dark"] .compare-highlight {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #fcd34d !important;
}

/* Почему мы */
.pricing-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.pricing-benefit {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px 22px;
    transition: all 0.2s;
}

.pricing-benefit:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.pricing-benefit-icon {
    font-size: 28px;
    margin-bottom: 14px;
    width: 52px;
    height: 52px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pricing-benefit h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text);
}

.pricing-benefit p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* ROI Калькулятор на тарифах */
.pricing-roi-wrapper {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(124, 58, 237, 0.05));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 30px;
    margin-top: 40px;
}

.pricing-roi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 24px;
}

@media (max-width: 800px) {
    .pricing-roi-grid {
        grid-template-columns: 1fr;
    }
}

.pricing-roi-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.pricing-roi-card-accent {
    border: 2px solid var(--primary);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.12);
}

.pricing-roi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.pricing-roi-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.pricing-roi-sum {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}

.pricing-roi-card-accent .pricing-roi-sum {
    color: var(--primary);
}

.pricing-roi-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    color: var(--text-muted);
}

.pricing-roi-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* FAQ */
.faq {
    max-width: 800px;
    margin: 40px auto 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease !important;
}

.faq-item[open] {
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.12) !important;
}

.faq-item summary {
    cursor: pointer;
    padding: 20px 24px;
    font-weight: 700;
    color: var(--text);
    font-size: 15.5px;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background 0.25s ease, color 0.25s ease;
}

.faq-item summary:hover {
    background: var(--bg-soft);
    color: var(--primary);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    font-size: 20px;
    font-weight: 600;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease, color 0.25s ease !important;
    line-height: 1;
    margin-left: 16px;
    flex-shrink: 0;
}

.faq-item[open] summary::after {
    content: "+";
    transform: rotate(45deg) !important;
    background: rgba(236, 72, 153, 0.14) !important;
    color: #EC4899 !important;
}

.faq-answer {
    padding: 0 24px 20px;
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.7;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* CTA внизу */
.pricing-final-cta {
    text-align: center;
    padding: 80px 30px;
    margin-top: 40px;
    background: linear-gradient(135deg, var(--bg-soft), var(--bg-gray));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    margin-bottom: 40px;
}

.pricing-final-cta h2 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.6px;
    margin: 0 0 14px;
    color: var(--text);
}

.pricing-final-cta p {
    color: var(--text-muted);
    font-size: 16px;
    margin: 0 0 30px;
}

.pricing-final-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 500px) {
    .pricing-final-cta h2 { font-size: 24px; }
    .pricing-section { padding: 50px 0; }
}


/* ============================================================
   КОММЕНТАРИИ — ОТВЕТЫ И РЕАКЦИИ
   ============================================================ */

/* Вложенные ответы */
.comment-replies {
    margin-top: 14px;
    margin-left: 56px;
    padding-left: 18px;
    border-left: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment-reply .comment-avatar {
    width: 34px;
    height: 34px;
    font-size: 14px;
}

.comment-reply .comment-body {
    padding: 12px 16px;
}

/* Действия под комментарием */
.comment-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.15s;
}

.reaction-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-soft);
}

.reaction-btn.active-like {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.4);
    color: var(--success);
}

.reaction-btn.active-like svg {
    fill: var(--success);
}

.reaction-btn.active-dislike {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.4);
    color: var(--danger);
}

.reaction-btn.active-dislike svg {
    fill: var(--danger);
}

.reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.15s;
}

.reply-btn:hover {
    color: var(--primary);
    background: var(--bg-soft);
}

/* Форма ответа */
.reply-form-wrap {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}

.reply-form-wrap textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    resize: vertical;
    box-sizing: border-box;
    min-height: 60px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.reply-form-wrap textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.reply-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-cancel {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.15s;
}

.btn-cancel:hover {
    color: var(--text);
    border-color: var(--text);
}

@media (max-width: 600px) {
    .comment-replies {
        margin-left: 20px;
        padding-left: 12px;
    }
}


/* ============================================================
   АДМИНКА — БЛОКИРОВКА, УДАЛЕНИЕ КОММЕНТАРИЕВ
   ============================================================ */
.blocked-banner {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin: 20px 0;
    color: var(--danger);
    font-size: 14px;
    line-height: 1.7;
}

.blocked-banner b {
    display: block;
    font-size: 16px;
    margin-bottom: 6px;
}

.btn-danger {
    background: var(--danger);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.btn-danger:hover {
    filter: brightness(0.9);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

.admin-user-actions {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-soft);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

.admin-comment {
    position: relative;
}

.admin-comment-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.admin-comment-head b {
    color: var(--primary);
    font-size: 13px;
    font-family: 'SF Mono', Monaco, monospace;
}

.admin-comment-head > span {
    color: var(--text-light);
    font-size: 12px;
}

.btn-delete-comment {
    margin-left: auto;
    background: transparent;
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: var(--danger);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.15s;
}

.btn-delete-comment:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}


/* ============================================================
   НОВЫЙ HERO НА ГЛАВНОЙ
   ============================================================ */
.hero-new {
    padding: 60px 0 40px;
    position: relative;
}

.hero-new-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
}

@media (max-width: 900px) {
    .hero-new-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.hero-new-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hero-badge-dot {
    width: 7px;
    height: 7px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
    animation: heroPulse 2s infinite;
}

@keyframes heroPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.08); }
}

.hero-new-title {
    font-size: 54px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -1.8px;
    margin: 0 0 24px;
    color: var(--text);
}

@media (max-width: 900px) {
    .hero-new-title { font-size: 40px; letter-spacing: -1.2px; }
}
@media (max-width: 500px) {
    .hero-new-title { font-size: 32px; letter-spacing: -0.8px; }
}

.hero-new-highlight {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-new-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 36px;
    max-width: 540px;
}

.hero-new-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.hero-new-actions .btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-new-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.hero-new-note svg {
    color: var(--success);
    flex-shrink: 0;
}

/* Правая часть hero — мокап */
.hero-new-visual {
    position: relative;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .hero-new-visual { height: 320px; }
}

.hero-mockup {
    width: 100%;
    max-width: 380px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.15);
    overflow: hidden;
    transform: rotate(-2deg);
    transition: transform 0.3s;
}

.hero-mockup:hover { transform: rotate(0deg); }

.hero-mockup-header {
    display: flex;
    gap: 6px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-soft);
}

.hero-mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
}

.hero-mockup-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 26px 20px;
}

.hero-mockup-preview {
    flex: 1;
    aspect-ratio: 1;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    padding: 12px;
}

.hero-mockup-preview span {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    line-height: 1.35;
}

.hero-mockup-before {
    background: repeating-conic-gradient(#e5e7eb 0% 25%, #f3f4f6 0% 50%) 50% / 16px 16px;
    color: #9ca3af;
}

.hero-mockup-after {
    background: linear-gradient(135deg, #dbeafe, #e0e7ff);
    color: var(--primary);
}

[data-theme="dark"] .hero-mockup-before {
    background: repeating-conic-gradient(#1f2740 0% 25%, #171d2e 0% 50%) 50% / 16px 16px;
    color: #475569;
}

[data-theme="dark"] .hero-mockup-after {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(124, 58, 237, 0.3));
    color: #93c5fd;
}

.hero-mockup-arrow {
    color: var(--primary);
    flex-shrink: 0;
}

/* Плавающие карточки */
.hero-float-card {
    position: absolute;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.12);
    z-index: 3;
    animation: heroFloat 4s ease-in-out infinite;
}

.hero-float-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.hero-float-card b {
    display: block;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.hero-float-card span {
    color: var(--text-light);
    font-size: 12px;
}

.hero-float-1 {
    top: 20px;
    right: -10px;
    animation-delay: 0s;
}

.hero-float-2 {
    bottom: 40px;
    left: -20px;
    animation-delay: 2s;
}

@media (max-width: 500px) {
    .hero-float-1 { right: -5px; top: 5px; }
    .hero-float-2 { left: -5px; }
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Статистика под hero */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 70px;
    padding-top: 50px;
    border-top: 1px solid var(--border-light);
}

@media (max-width: 700px) {
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.hero-stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================================
   WHY COMPARE (ПОЧЕМУ ВЫГОДНО)
   ============================================================ */
.why-compare {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

@media (max-width: 800px) {
    .why-compare { grid-template-columns: 1fr; }
}

.why-compare-item {
    padding: 30px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    text-align: center;
    transition: all 0.2s;
}

.why-compare-old {
    opacity: 0.75;
}

.why-compare-old:hover {
    opacity: 1;
}

.why-compare-new {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(124, 58, 237, 0.06));
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.12);
    transform: scale(1.04);
}

.why-compare-icon {
    font-size: 32px;
    margin-bottom: 14px;
}

.why-compare-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 10px;
}

.why-compare-price {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.6px;
    margin-bottom: 6px;
}

.why-compare-new .why-compare-price {
    color: var(--primary);
}

.why-compare-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.why-bottom {
    max-width: 720px;
    margin: 50px auto 0;
    text-align: center;
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
}

.why-bottom b {
    color: var(--text);
}

/* ============================================================
   БОЛИ СЕЛЛЕРОВ И РЕШЕНИЕ
   ============================================================ */
.seller-pains-section {
    padding: 70px 0;
    border-top: 1px solid var(--border-light);
}

.seller-pains-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

@media (max-width: 900px) {
    .seller-pains-grid {
        grid-template-columns: 1fr;
    }
}

.seller-pain-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
    position: relative;
}

.seller-pain-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.seller-pain-bad {
    border-color: rgba(239, 68, 68, 0.25);
    background: var(--bg-soft);
}

.seller-pain-bad:hover {
    border-color: rgba(239, 68, 68, 0.5);
}

.seller-pain-good {
    border: 2px solid var(--primary);
    background: linear-gradient(145deg, var(--bg-elevated), rgba(37, 99, 235, 0.08));
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.12);
}

.seller-pain-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 10px;
    border-radius: 999px;
    width: fit-content;
    margin-bottom: 16px;
}

.seller-badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.seller-badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.seller-pain-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 12px;
    line-height: 1.35;
}

.seller-pain-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 18px;
    flex: 1;
}

.seller-pain-stat {
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.seller-pain-good .seller-pain-stat {
    color: var(--primary);
    font-weight: 700;
}

/* ============================================================
   СВЕЖИЕ СТАТЬИ НА ГЛАВНОЙ
   ============================================================ */
.home-articles {
    padding: 80px 0;
    border-top: 1px solid var(--border-light);
}

.home-articles-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 16px;
}

.home-articles-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.15s;
}

.home-articles-all:hover {
    border-color: var(--primary);
    background: var(--bg-soft);
}

.home-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .home-articles-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ТАРИФЫ НА ГЛАВНОЙ — РАСШИРЕННЫЕ
   ============================================================ */
.tariffs-teaser {
    padding: 80px 0;
    border-top: 1px solid var(--border-light);
}

.tariffs-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .tariffs-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    .tariffs-row { grid-template-columns: 1fr; }
}

.tariff-mini {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    text-align: left;
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.tariff-mini:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.tariff-mini-popular {
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.15);
}

.tariff-mini-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 999px;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.tariff-mini-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 12px;
}

.tariff-mini-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -1px;
    line-height: 1;
}

.tariff-mini-price span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 0;
}

.tariff-mini-popular .tariff-mini-price {
    color: var(--primary);
}

.tariff-mini-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-light);
}

.tariff-mini-features {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.tariff-mini-features li {
    padding: 6px 0 6px 22px;
    position: relative;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.tariff-mini-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

.tariff-mini-popular .tariff-mini-features li::before {
    color: var(--primary);
}

/* ============================================================
   FAQ НА ГЛАВНОЙ
   ============================================================ */
.home-faq {
    padding: 80px 0;
    border-top: 1px solid var(--border-light);
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 700px) {
    .hero-new { padding: 30px 0 20px; }
    .hero-stats { margin-top: 40px; padding-top: 30px; }
    .hero-stat-value { font-size: 26px; }
    .features, .how, .why, .home-articles, .tariffs-teaser, .home-faq {
        padding: 55px 0;
    }
}


/* ============================================================
   МЕНЮ ИНСТРУМЕНТОВ НА /bot
   ============================================================ */
.bot-menu-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px;
}

.bot-menu-header {
    text-align: center;
    margin-bottom: 50px;
}

.bot-menu-header h1 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 0 0 12px;
    color: var(--text);
}

.bot-menu-header .subtitle {
    color: var(--text-muted);
    font-size: 16px;
    margin: 0 0 24px;
}

.bot-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .bot-menu-grid { grid-template-columns: 1fr; }
}

.tool-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.tool-card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
}

.tool-icon-blue {
    background: linear-gradient(135deg, #4dabf7, #007bff);
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.25);
}

.tool-icon-purple {
    background: linear-gradient(135deg, #8b5cf6, #6f42c1);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.25);
}

.tool-icon-violet {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.25);
}

.tool-icon-cyan {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.25);
}

.tool-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--text);
    letter-spacing: -0.3px;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px;
    flex: 1;
}

.tool-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.tool-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--bg-gray);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.tool-tag-new {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent);
}

.tool-tag-lock {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.tool-arrow {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.tool-arrow svg {
    transition: transform 0.15s;
}

.tool-card:hover .tool-arrow svg {
    transform: translateX(3px);
}

/* 3-колоночная сетка режимов */
.mode-cards-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 500px) {
    .mode-cards-3 { grid-template-columns: 1fr; }
}

/* ============================================================
   ЧЕК-КАРТОЧКИ ДЛЯ ВЫБОРА ФУНКЦИЙ
   ============================================================ */
.check-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 600px) {
    .check-cards { grid-template-columns: 1fr; }
}

.check-card {
    cursor: pointer;
    position: relative;
}

.check-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.check-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 14px;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.15s;
    text-align: center;
    position: relative;
}

.check-card-content::after {
    content: "";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 5px;
    transition: all 0.15s;
}

.check-card:hover .check-card-content {
    border-color: var(--primary);
}

.check-card input:checked + .check-card-content {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.06);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.check-card input:checked + .check-card-content::after {
    background: var(--primary);
    border-color: var(--primary);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
}

.check-card-icon {
    font-size: 26px;
    margin-bottom: 2px;
}

.check-card-content span {
    font-weight: 700;
    color: var(--text);
    font-size: 14px;
}

.check-card-content small {
    color: var(--text-light);
    font-size: 12px;
}

/* ============================================================
   БЛОКИ НАСТРОЙКИ ЦВЕТОКОРРЕКЦИИ
   ============================================================ */
.adjust-block {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    margin-bottom: 16px;
    transition: border-color 0.15s;
}

.adjust-block:hover {
    border-color: var(--primary);
}

.adjust-header {
    margin-bottom: 4px;
}

.adjust-check {
    cursor: pointer;
    display: block;
}

.adjust-check input[type="checkbox"] {
    display: none;
}

.adjust-check-content {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    padding-right: 36px;
}

.adjust-check-content::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    transition: all 0.15s;
}

.adjust-check input:checked + .adjust-check-content::after {
    background: var(--primary);
    border-color: var(--primary);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
}

.adjust-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    transition: background 0.15s;
}

.adjust-check input:checked + .adjust-check-content .adjust-icon {
    background: rgba(37, 99, 235, 0.1);
}

.adjust-title {
    font-weight: 700;
    color: var(--text);
    font-size: 15px;
    margin-bottom: 2px;
}

.adjust-desc {
    font-size: 13px;
    color: var(--text-muted);
}

/* Слайдер */
.adjust-slider-wrap {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
}

.adjust-slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.adjust-slider-value {
    font-weight: 700;
    color: var(--primary);
    font-size: 14px;
    font-family: 'SF Mono', Monaco, monospace;
}

.adjust-slider-wrap input[type="range"] {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    padding: 0;
}

.adjust-slider-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: white;
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    transition: transform 0.15s;
}

.adjust-slider-wrap input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.adjust-slider-wrap input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: white;
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.adjust-slider-hint {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-light);
}

@media (max-width: 500px) {
    .adjust-check-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .adjust-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}


/* ============================================================
   ЦВЕТА ДЛЯ КАРТОЧЕК ИНСТРУМЕНТОВ
   ============================================================ */
.tool-icon-green {
    background: linear-gradient(135deg, #34d399, #059669);
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.25);
}

/* ============================================================
   АПСКЕЙЛ — ДОПОЛНИТЕЛЬНЫЕ ЭЛЕМЕНТЫ
   ============================================================ */
.upscale-factor {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text);
    line-height: 1;
}

.mode-card input:checked + .mode-card-content .upscale-factor {
    color: var(--primary);
}

.upscale-info {
    margin-top: 10px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    font-family: 'SF Mono', Monaco, monospace;
    padding: 6px 12px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.check-cards-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 500px) {
    .check-cards-2 { grid-template-columns: 1fr; }
}

/* Акцентный блок (защита от шума) */
.adjust-block-accent {
    border-color: rgba(37, 99, 235, 0.3);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(124, 58, 237, 0.04));
}

.adjust-recommend {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ============================================================
   РЕДАКТОР МАСКИ
   ============================================================ */
.refine-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.refine-content {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    max-width: 1000px;
    width: 100%;
    max-height: 95vh;
    overflow: auto;
    padding: 24px;
}

.refine-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.refine-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--text);
}

.refine-close {
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background 0.15s;
}

.refine-close:hover {
    background: var(--bg-gray);
    color: var(--text);
}

.refine-toolbar {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--bg-soft);
    border-radius: var(--radius);
}

.refine-tools {
    display: flex;
    gap: 6px;
}

.refine-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.15s;
}

.refine-tool:hover { border-color: var(--primary); }

.refine-tool.active {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
}

.refine-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.refine-dot.keep { background: #22c55e; }
.refine-dot.remove { background: #dc2626; }
.refine-dot.eraser { background: #999; }

.refine-brush-size {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
}

.refine-brush-size input[type="range"] {
    width: 120px;
    accent-color: var(--primary);
}

#brush-size-val {
    font-family: monospace;
    font-weight: 700;
    color: var(--primary);
    min-width: 30px;
}

.refine-clear {
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-muted);
    transition: all 0.15s;
}

.refine-clear:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.refine-canvas-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    background: repeating-conic-gradient(#e5e7eb 0% 25%, #ffffff 0% 50%) 50% / 20px 20px;
    border-radius: var(--radius);
    padding: 20px;
    min-height: 300px;
    overflow: auto;
}

[data-theme="dark"] .refine-canvas-wrap {
    background: repeating-conic-gradient(#1f2740 0% 25%, #131826 0% 50%) 50% / 20px 20px;
}

#refine-canvas {
    cursor: crosshair;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    touch-action: none;
}

.refine-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.refine-hint {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}

.refine-hint b { color: var(--text); }

/* ============================================================
   ПАНЕЛЬ ДЕЙСТВИЙ ПОД ПРЕВЬЮ
   ============================================================ */
.result-actions-panel {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 0 30px;
    flex-wrap: wrap;
}

.result-actions-panel .btn-download,
.result-actions-panel .btn-refine {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.result-actions-panel .btn-download {
    background: var(--success);
    color: white;
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.25);
}

.result-actions-panel .btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(22, 163, 74, 0.35);
}

.result-actions-panel .btn-refine {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.result-actions-panel .btn-refine:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

@media (max-width: 500px) {
    .result-actions-panel { flex-direction: column; }
    .result-actions-panel .btn-download,
    .result-actions-panel .btn-refine {
        width: 100%;
        justify-content: center;
    }
}


/* ============================================================
   РЕДАКТОР МАСКИ
   ============================================================ */
.refine-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.refine-content {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    max-width: 1000px;
    width: 100%;
    max-height: 95vh;
    overflow: auto;
    padding: 24px;
}

.refine-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.refine-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--text);
}

.refine-close {
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background 0.15s;
}

.refine-close:hover {
    background: var(--bg-gray);
    color: var(--text);
}

.refine-toolbar {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--bg-soft);
    border-radius: var(--radius);
}

.refine-tools { display: flex; gap: 6px; }

.refine-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.15s;
}

.refine-tool:hover { border-color: var(--primary); }

.refine-tool.active {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
}

.refine-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.refine-dot.keep { background: #22c55e; }
.refine-dot.remove { background: #dc2626; }
.refine-dot.eraser { background: #999; }

.refine-brush-size {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
}

.refine-brush-size input[type="range"] {
    width: 120px;
    accent-color: var(--primary);
}

#brush-size-val {
    font-family: monospace;
    font-weight: 700;
    color: var(--primary);
    min-width: 30px;
}

.refine-clear {
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-muted);
    transition: all 0.15s;
}

.refine-clear:hover { border-color: var(--danger); color: var(--danger); }

.refine-canvas-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    background: repeating-conic-gradient(#e5e7eb 0% 25%, #ffffff 0% 50%) 50% / 20px 20px;
    border-radius: var(--radius);
    padding: 20px;
    min-height: 300px;
    overflow: auto;
}

[data-theme="dark"] .refine-canvas-wrap {
    background: repeating-conic-gradient(#1f2740 0% 25%, #131826 0% 50%) 50% / 20px 20px;
}

.refine-canvas-container {
    position: relative;
    display: inline-block;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.refine-canvas-container canvas {
    display: block;
    border-radius: 6px;
}

#refine-canvas-base {
    position: relative;
    z-index: 1;
}

#refine-canvas-mask {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    cursor: crosshair;
    touch-action: none;
}

.refine-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.refine-hint-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.refine-hint-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
}

.refine-hint-item b {
    color: var(--text);
    display: block;
    margin-bottom: 2px;
}

.refine-hint-item span {
    display: block;
}

.refine-hint-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 3px;
    flex-shrink: 0;
}

.refine-hint-dot.keep { background: #22c55e; }
.refine-hint-dot.remove { background: #dc2626; }

.refine-tip {
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(124, 58, 237, 0.08));
    border-radius: var(--radius);
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .refine-tip {
        white-space: normal;
        width: 100%;
        text-align: center;
    }
}


/* ============================================================
   ПАНЕЛЬ ДЕЙСТВИЙ ПОД ПРЕВЬЮ
   ============================================================ */
.actions-panel {
    margin: 30px 0 40px;
    padding: 20px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.actions-panel-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 800px) {
    .actions-panel-inner {
        grid-template-columns: 1fr;
    }
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: var(--radius);
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: all 0.18s;
    min-width: 0;
}

.action-btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.action-btn-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.action-btn-title {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-btn-sub {
    font-size: 11px;
    opacity: 0.75;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.action-btn:hover .action-btn-icon {
    transform: scale(1.08);
}

.action-btn-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.action-btn-title {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
}

.action-btn-sub {
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.3;
}

/* Primary — Скачать */
.action-btn-primary {
    background: linear-gradient(135deg, var(--success), #15803d);
    color: white;
    box-shadow: 0 8px 22px rgba(22, 163, 74, 0.25);
}

.action-btn-primary .action-btn-icon {
    background: rgba(255, 255, 255, 0.2);
}

.action-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(22, 163, 74, 0.35);
}

/* Secondary — Уточнить маску */
.action-btn-secondary {
    background: var(--bg-elevated);
    color: var(--text);
    border-color: var(--border);
}

.action-btn-secondary .action-btn-icon {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.action-btn-secondary:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.18);
}

/* ============================================================
   ПЕРЕКЛЮЧАТЕЛЬ РЕЖИМА В РЕДАКТОРЕ МАСКИ
   ============================================================ */
.refine-mode-switch {
    display: flex;
    gap: 6px;
    background: var(--bg-gray);
    padding: 4px;
    border-radius: var(--radius);
}

.refine-mode {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: calc(var(--radius) - 3px);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.15s;
    text-align: left;
}

.refine-mode small {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.75;
    line-height: 1.2;
}

.refine-mode:hover {
    color: var(--text);
}

.refine-mode.active {
    background: var(--bg-elevated);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

@media (max-width: 700px) {
    .refine-mode-switch {
        width: 100%;
    }
    .refine-mode {
        flex: 1;
        text-align: center;
    }
}


/* ============================================================
   КУРСОР-КРУГ КИСТИ
   ============================================================ */
.refine-canvas-container {
    position: relative;
    display: inline-block;
    transition: transform 0.15s ease-out;
    transform-origin: center center;
}

.brush-cursor {
    position: absolute;
    display: none;
    border: 2px solid #22c55e;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
    transition: width 0.1s, height 0.1s, border-color 0.15s;
}

/* ============================================================
   ПЕРЕКЛЮЧАТЕЛЬ РЕЖИМА
   ============================================================ */
.refine-mode-switch {
    display: flex;
    gap: 6px;
    background: var(--bg-gray);
    padding: 4px;
    border-radius: var(--radius);
    margin-bottom: 14px;
}

.refine-mode {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-radius: calc(var(--radius) - 3px);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.15s;
    text-align: left;
    flex: 1;
}

.refine-mode small {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.75;
    line-height: 1.2;
}

.refine-mode:hover { color: var(--text); }

.refine-mode.active {
    background: var(--bg-elevated);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ============================================================
   ЗУМ-БАР
   ============================================================ */
.refine-zoom-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 10px 14px;
    margin-top: 12px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    flex-wrap: wrap;
}

.zoom-btn {
    width: 34px;
    height: 34px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    transition: all 0.15s;
}

.zoom-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.zoom-btn.zoom-reset {
    width: auto;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
}

#zoom-value {
    font-family: 'SF Mono', Monaco, monospace;
    font-weight: 700;
    color: var(--text);
    min-width: 55px;
    text-align: center;
    font-size: 14px;
}

.zoom-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-left: 8px;
}

@media (max-width: 500px) {
    .zoom-hint { display: none; }
}

.refine-canvas-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: repeating-conic-gradient(#e5e7eb 0% 25%, #ffffff 0% 50%) 50% / 20px 20px;
    border-radius: var(--radius);
    padding: 20px;
    min-height: 300px;
    max-height: 620px;
    overflow: hidden;
    cursor: default;
}

[data-theme="dark"] .refine-canvas-wrap {
    background: repeating-conic-gradient(#1f2740 0% 25%, #131826 0% 50%) 50% / 20px 20px;
}

.refine-canvas-container {
    position: relative;
    display: inline-block;
    transition: transform 0.12s ease-out;
    transform-origin: center center;
    will-change: transform;
}

.refine-canvas-container canvas {
    display: block;
    border-radius: 6px;
}

#refine-canvas-base {
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#refine-canvas-mask {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    cursor: crosshair;
    touch-action: none;
}

.brush-cursor {
    position: absolute;
    display: none;
    border: 2px solid #22c55e;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.9), 0 0 6px rgba(0, 0, 0, 0.3);
    transition: width 0.08s, height 0.08s, border-color 0.15s;
}


/* ============================================================
   НАСТРОЙКИ КРАЁВ
   ============================================================ */
.refine-edges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 14px 18px;
    margin-bottom: 14px;
    background: var(--bg-soft);
    border-radius: var(--radius);
}

.refine-edge-item label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.refine-edge-val {
    font-family: 'SF Mono', Monaco, monospace;
    color: var(--primary);
    font-weight: 700;
}

.refine-edge-item input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

@media (max-width: 600px) {
    .refine-edges {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   ПАНЕЛЬ ЦВЕТОВ — ПЕРЕРАБОТАННАЯ
   ============================================================ */
.refine-color-panel {
    padding: 20px;
    margin-bottom: 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cp-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cp-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* === Режимы: Оставить / Удалить === */
.cp-modes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 500px) {
    .cp-modes {
        grid-template-columns: 1fr;
    }
}

.cp-mode {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: all 0.15s;
    color: var(--text);
}

.cp-mode:hover {
    border-color: var(--text-light);
}

.cp-mode-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.cp-icon-keep {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.cp-icon-remove {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}

.cp-mode-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cp-mode-text b {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.cp-mode-text small {
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.3;
}

/* Активное состояние */
.cp-mode.active {
    transform: translateY(-1px);
}

.cp-mode[data-type="keep"].active {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.06);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.15);
}

.cp-mode[data-type="keep"].active .cp-icon-keep {
    background: #22c55e;
    color: #fff;
}

.cp-mode[data-type="remove"].active {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.05);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.12);
}

.cp-mode[data-type="remove"].active .cp-icon-remove {
    background: #dc2626;
    color: #fff;
}

/* === Точность === */
.cp-tolerance-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cp-tolerance-value {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    font-family: 'SF Mono', Monaco, monospace;
    font-weight: 800;
    color: var(--primary);
    font-size: 18px;
    line-height: 1;
    padding: 6px 12px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: var(--radius-sm);
}

.cp-tolerance-percent {
    font-size: 12px;
    opacity: 0.7;
}

.cp-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.cp-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: white;
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    transition: transform 0.15s;
}

.cp-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.cp-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: white;
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.cp-tolerance-hint {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-light);
    margin-top: -2px;
}

/* === Подсказка === */
.cp-tip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(124, 58, 237, 0.06));
    border-left: 3px solid var(--primary);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.cp-tip svg {
    color: var(--primary);
    flex-shrink: 0;
}

/* === Футер с точками и очисткой === */
.cp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    gap: 12px;
    flex-wrap: wrap;
}

.cp-points-info {
    display: flex;
    gap: 16px;
}

.cp-point-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    padding: 6px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.cp-dot-mini {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.cp-dot-keep { background: #22c55e; }
.cp-dot-remove { background: #dc2626; }

.cp-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.cp-clear-btn:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(220, 38, 38, 0.04);
}

.cp-clear-btn:hover svg {
    color: var(--danger);
}


/* ============================================================
   КНОПКА «ФИНАЛЬНОЕ РЕДАКТИРОВАНИЕ»
   ============================================================ */
.action-btn-accent {
    background: linear-gradient(135deg, #8b5cf6, #6f42c1);
    color: white;
    box-shadow: 0 8px 22px rgba(139, 92, 246, 0.25);
}

.action-btn-accent .action-btn-icon {
    background: rgba(255, 255, 255, 0.2);
}

.action-btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(139, 92, 246, 0.35);
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО ФИНАЛЬНОГО РЕДАКТИРОВАНИЯ
   ============================================================ */
.final-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.final-content {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    max-width: 720px;
    width: 100%;
    max-height: 95vh;
    overflow: auto;
    padding: 24px;
}

.final-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.final-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--text);
}

.final-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 22px;
}

.final-preview-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.final-preview-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: center;
}

.final-preview-content {
    background: repeating-conic-gradient(#e5e7eb 0% 25%, #ffffff 0% 50%) 50% / 16px 16px;
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 220px;
    max-height: 260px;
    overflow: hidden;
}

[data-theme="dark"] .final-preview-content {
    background: repeating-conic-gradient(#1f2740 0% 25%, #131826 0% 50%) 50% / 16px 16px;
}

.final-preview-content img,
.final-preview-content canvas {
    max-width: 100%;
    max-height: 236px;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    display: block;
}

@media (max-width: 600px) {
    .final-preview {
        grid-template-columns: 1fr;
    }
}

.final-sliders {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 22px;
}

.final-slider-group {
    padding: 14px 16px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    transition: background 0.15s;
}

.final-slider-group:hover {
    background: var(--bg-gray);
}

.final-slider-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 12px;
}

.final-slider-label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.final-slider-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-elevated);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.final-slider-label b {
    display: block;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.final-slider-label small {
    color: var(--text-light);
    font-size: 11px;
    line-height: 1.3;
}

.final-slider-value {
    font-family: 'SF Mono', Monaco, monospace;
    font-weight: 800;
    color: var(--primary);
    font-size: 15px;
    min-width: 40px;
    text-align: right;
    padding: 4px 10px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: var(--radius-sm);
}

.final-slider-group input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.final-slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: white;
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
    transition: transform 0.15s;
}

.final-slider-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.final-slider-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: white;
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.final-slider-hint {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-light);
    margin-top: 6px;
}

.final-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 6px;
}

.final-actions .btn-secondary,
.final-actions .btn-primary {
    width: auto;
    padding: 12px 28px;
    margin: 0;
}

@media (max-width: 500px) {
    .final-content { padding: 18px; }
    .final-slider-label small { display: none; }
    .final-actions {
        flex-direction: column-reverse;
    }
    .final-actions .btn-secondary,
    .final-actions .btn-primary {
        width: 100%;
    }
}



/* ============================================================
   ТЕНИ И ФОНЫ
   ============================================================ */
.tool-icon-shadow {
    background: linear-gradient(135deg, #64748b, #334155);
    box-shadow: 0 10px 25px rgba(51, 65, 85, 0.3);
}

.shadow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
}

.shadow-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shadow-item label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shadow-item label span {
    font-family: 'SF Mono', Monaco, monospace;
    color: var(--primary);
    font-weight: 700;
}

.shadow-item input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.shadow-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: white;
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.shadow-item input[type="color"] {
    width: 100%;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 3px;
    background: var(--bg-elevated);
}

.mode-cards-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 700px) {
    .mode-cards-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
    .mode-cards-4 { grid-template-columns: 1fr; }
}


/* ============================================================
   ТЕНИ И ФОНЫ — КОМПАКТНЫЕ КАРТОЧКИ НАСТРОЕК
   ============================================================ */
.settings-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 14px;
    overflow: hidden;
    transition: border-color 0.15s;
}

.settings-card:hover {
    border-color: var(--primary);
}

/* Тумблер-заголовок */
.settings-toggle {
    cursor: pointer;
    display: block;
}

.settings-toggle input[type="checkbox"] {
    display: none;
}

.settings-toggle-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    transition: background 0.15s;
}

.settings-toggle:hover .settings-toggle-box {
    background: var(--bg-soft);
}

.settings-toggle-static {
    cursor: default;
}

.settings-toggle-static:hover {
    background: transparent;
}

.settings-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.settings-icon-dark { background: linear-gradient(135deg, #475569, #1e293b); color: white; }
.settings-icon-violet { background: linear-gradient(135deg, #8b5cf6, #6f42c1); color: white; }
.settings-icon-blue { background: linear-gradient(135deg, #60a5fa, #2563eb); color: white; }
.settings-icon-green { background: linear-gradient(135deg, #34d399, #059669); color: white; }

.settings-toggle-text {
    flex: 1;
    min-width: 0;
}

.settings-toggle-text b {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 2px;
}

.settings-toggle-text small {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Переключатель-свитч */
.settings-switch {
    width: 44px;
    height: 26px;
    background: var(--border);
    border-radius: 999px;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}

.settings-switch::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.settings-toggle input:checked + .settings-toggle-box .settings-switch {
    background: var(--primary);
}

.settings-toggle input:checked + .settings-toggle-box .settings-switch::before {
    transform: translateX(18px);
}

/* Тело карточки */
.settings-body {
    padding: 4px 20px 20px;
    border-top: 1px solid var(--border-light);
    margin-top: 0;
    padding-top: 18px;
}

.settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.settings-row:last-child {
    margin-bottom: 0;
}

@media (max-width: 550px) {
    .settings-row {
        grid-template-columns: 1fr;
    }
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-field-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.settings-field-head b {
    font-family: 'SF Mono', Monaco, monospace;
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    padding: 2px 8px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 4px;
}

.settings-field input[type="range"] {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.settings-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border: 2.5px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
    transition: transform 0.12s;
}

.settings-field input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.settings-field input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: white;
    border: 2.5px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.settings-field input[type="color"] {
    width: 100%;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 3px;
    background: var(--bg);
}

.settings-field input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    box-sizing: border-box;
}

.settings-body select {
    width: 100%;
}

/* Выбор фона */
.bg-choices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

@media (max-width: 600px) {
    .bg-choices { grid-template-columns: repeat(2, 1fr); }
}

.bg-choice {
    cursor: pointer;
}

.bg-choice input[type="radio"] {
    display: none;
}

.bg-choice-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.15s;
}

.bg-choice:hover .bg-choice-content {
    border-color: var(--primary);
}

.bg-choice input:checked + .bg-choice-content {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.06);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.bg-choice-content span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.bg-choice input:checked + .bg-choice-content span {
    color: var(--primary);
}

.bg-choice-preview {
    width: 100%;
    height: 34px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.bg-prev-transparent {
    background: repeating-conic-gradient(#e5e7eb 0% 25%, #ffffff 0% 50%) 50% / 12px 12px;
}

.bg-prev-color {
    background: linear-gradient(135deg, #ffffff, #f1f5f9);
}

.bg-prev-gradient {
    background: linear-gradient(180deg, #dbeafe, #7c3aed);
}

.bg-prev-blur {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    filter: blur(0.5px);
}


.settings-subtitle {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 16px 0 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.settings-subtitle:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* ============================================================
   ПРЕСЕТЫ ФОНОВ
   ============================================================ */
.bg-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 600px) {
    .bg-presets { grid-template-columns: repeat(2, 1fr); }
}

.bg-preset {
    cursor: pointer;
}

.bg-preset input[type="radio"] {
    display: none;
}

.bg-preset-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.15s;
}

.bg-preset:hover .bg-preset-content {
    border-color: var(--primary);
}

.bg-preset input:checked + .bg-preset-content {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.06);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.bg-preset-content span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.bg-preset input:checked + .bg-preset-content span {
    color: var(--primary);
}

.bg-preset-prev {
    width: 100%;
    height: 44px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.bg-prev-preset {
    background: linear-gradient(180deg, #f5f5f5 0%, #d0d0d0 100%);
}

.bg-prev-studio-white {
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
}
.bg-prev-studio-gray {
    background: linear-gradient(180deg, #ebebee 0%, #c8c8cd 100%);
}
.bg-prev-studio-dark {
    background: linear-gradient(180deg, #4b4b50 0%, #28282d 100%);
}
.bg-prev-wood {
    background: linear-gradient(180deg, #d7af82 0%, #a5784b 100%);
}
.bg-prev-marble {
    background: linear-gradient(180deg, #fafafc 0%, #e1e1e6 100%);
}
.bg-prev-blue {
    background: linear-gradient(180deg, #c8dcff 0%, #8cafeb 100%);
}
.bg-prev-warm {
    background: linear-gradient(180deg, #fff0dc 0%, #f0cdaf 100%);
}
.bg-prev-mint {
    background: linear-gradient(180deg, #dcfaf0 0%, #aadccd 100%);
}


/* ============================================================
   КАСТОМНЫЕ КОНТРОЛЫ (СЛАЙДЕР + ЧИСЛО)
   ============================================================ */
.ctl {
    margin-bottom: 16px;
}

.ctl:last-child {
    margin-bottom: 0;
}

.ctl-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 12px;
}

.ctl-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.ctl-input {
    width: 68px;
    padding: 5px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    transition: all 0.15s;
    box-sizing: border-box;
    -moz-appearance: textfield;
}

.ctl-input::-webkit-outer-spin-button,
.ctl-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ctl-input:hover {
    border-color: var(--primary);
}

.ctl-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background: #fff;
}

[data-theme="dark"] .ctl-input:focus {
    background: var(--bg);
}

.ctl input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    display: block;
}

.ctl input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #fff;
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
    transition: transform 0.12s;
}

.ctl input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.ctl input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #fff;
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.ctl-color {
    width: 100%;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    padding: 3px;
    background: var(--bg);
}

.ctl-color:hover {
    border-color: var(--primary);
}

/* Убираем старые стили, если есть конфликты */
.settings-row .settings-field input[type="range"] {
    margin-top: 0;
}

/* ============================================================
   ЗАГРУЗКА СВОЕГО ФОНА
   ============================================================ */
.bg-prev-custom {
    background: linear-gradient(135deg, #a78bfa 0%, #60a5fa 50%, #34d399 100%);
}

.bg-upload-zone {
    display: block;
    position: relative;
    cursor: pointer;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    transition: all 0.15s;
    overflow: hidden;
    min-height: 140px;
}

.bg-upload-zone:hover,
.bg-upload-zone.drag-over {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.04);
}

.bg-upload-zone input[type="file"] {
    display: none;
}

.bg-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 20px;
    color: var(--text-light);
    text-align: center;
}

.bg-upload-placeholder p {
    margin: 0;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.bg-upload-placeholder span {
    font-size: 12px;
}

#bg-preview-img {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    border-radius: calc(var(--radius) - 2px);
    display: block;
}

.bg-prev-custom {
    background: linear-gradient(135deg, #a78bfa 0%, #60a5fa 50%, #34d399 100%);
}



/* ============================================================
   УДАЛЕНИЕ ВОДЯНЫХ ЗНАКОВ
   ============================================================ */
.tool-icon-watermark {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.25);
}

.wm-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    margin-bottom: 14px;
    background: var(--bg-soft);
    border-radius: var(--radius);
}

#start-btn {
    margin-top: 20px;
}

/* ============================================================
   МАСКА ДЛЯ ВОДЯНЫХ ЗНАКОВ
   ============================================================ */
#wm-canvas-base {
    position: relative;
    z-index: 1;
    display: block;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#wm-canvas-mask {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    cursor: crosshair;
    touch-action: none;
    display: block;
    border-radius: 6px;
}

#wm-canvas-container {
    position: relative;
    display: inline-block;
}


/* ============================================================
   ИНСТРУМЕНТЫ ДЛЯ МАСКИ ВОДЯНОГО ЗНАКА
   ============================================================ */
.wm-tools {
    display: flex;
    gap: 6px;
}

.wm-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.15s;
}

.wm-tool:hover {
    border-color: var(--primary);
    color: var(--text);
}

.wm-tool.active[data-mode="brush"] {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

.wm-tool.active[data-mode="erase"] {
    border-color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
    color: #475569;
}

.wm-tool-icon {
    font-size: 15px;
}


/* ============================================================
   МАСКА ДЛЯ ВОДЯНЫХ ЗНАКОВ — КУРСОР
   ============================================================ */
#wm-canvas-base {
    position: relative;
    z-index: 1;
    display: block;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#wm-canvas-mask {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    cursor: crosshair;
    touch-action: none;
    display: block;
    border-radius: 6px;
}

#wm-canvas-container {
    position: relative;
    display: inline-block;
}

#wm-brush-cursor {
    position: absolute;
    display: none;
    border: 2px solid #ef4444;
    background: rgba(239, 68, 68, 0.12);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.8);
    transition: width 0.08s, height 0.08s, border-color 0.15s, background 0.15s;
}

.wm-method {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.wm-method-option {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.15s;
    flex: 1;
}

.wm-method-option input[type="radio"] {
    display: none;
}

.wm-method-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.06);
    color: var(--primary);
}

.wm-method-option small {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.7;
}

.wm-auto-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #8b5cf6, #6f42c1);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.15s;
    margin-left: auto;
}

.wm-auto-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3);
}

.wm-auto-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* ============================================================
   КРАСИВЫЙ РЕДАКТОР МАСКИ ВОДЯНОГО ЗНАКА
   ============================================================ */
.wm-modal-content {
    max-width: 1100px;
}

#wm-canvas-container {
    position: relative;
    display: inline-block;
    transition: transform 0.15s ease-out;
    transform-origin: center center;
    will-change: transform;
}

#wm-canvas-base {
    position: relative;
    z-index: 1;
    display: block;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#wm-canvas-mask {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    cursor: crosshair;
    touch-action: none;
    display: block;
    border-radius: 6px;
}

/* Панель автовыделения */
.wm-auto-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), rgba(37, 99, 235, 0.06));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius);
    flex-wrap: wrap;
}

.wm-sensitivity {
    display: flex;
    gap: 4px;
    background: var(--bg-elevated);
    padding: 4px;
    border-radius: var(--radius);
}

.wm-sens-btn {
    padding: 6px 14px;
    background: transparent;
    border: none;
    border-radius: calc(var(--radius) - 3px);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.15s;
}

.wm-sens-btn:hover {
    color: var(--text);
}

.wm-sens-btn.active {
    background: var(--primary);
    color: white;
}

.wm-auto-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #8b5cf6, #6f42c1);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.15s;
    margin-left: auto;
}

.wm-auto-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.35);
}

.wm-auto-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.wm-auto-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    padding-left: 4px;
}

/* Кнопки чувствительности */
.wm-tools {
    display: flex;
    gap: 6px;
}

.wm-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.15s;
}

.wm-tool:hover {
    border-color: var(--primary);
    color: var(--text);
}

.wm-tool.active[data-mode="brush"] {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

.wm-tool.active[data-mode="erase"] {
    border-color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
    color: #475569;
}

.wm-tool-icon {
    font-size: 15px;
}

/* Метод */
.wm-method {
    display: flex;
    gap: 8px;
    margin-right: auto;
}

.wm-method-option {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 14px;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.15s;
}

.wm-method-option input[type="radio"] {
    display: none;
}

.wm-method-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.06);
    color: var(--primary);
}

.wm-method-option small {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.7;
}

.refine-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}


/* ============================================================
   БЛОК "СВЯЗАТЬСЯ С НАМИ" НА СТРАНИЦЕ О НАС
   ============================================================ */
.about-contact {
    text-align: center;
    padding: 60px 40px;
    margin-top: 70px;
    background: linear-gradient(135deg, var(--bg-soft), var(--bg-gray));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.about-contact::before {
    content: "";
    position: absolute;
    top: -60%;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1), transparent 70%);
    pointer-events: none;
}

.about-contact-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: var(--radius-xl);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.3);
    position: relative;
}

.about-contact h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0 0 14px;
    color: var(--text);
    position: relative;
}

.about-contact p {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto 28px;
    position: relative;
}

.about-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.about-contact-email {
    margin-top: 0 !important;
    font-size: 15px !important;
    color: var(--text-muted) !important;
}

.about-contact-email a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}

.about-contact-email a:hover {
    border-bottom-color: var(--primary);
}

/* Разделитель "или" */
.about-contact-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 32px auto 24px;
    max-width: 280px;
    position: relative;
}

.about-contact-divider::before,
.about-contact-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.about-contact-divider span {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}


/* ============================================================
   АНИМАЦИЯ ПОЯВЛЕНИЯ БЛОКОВ
   ============================================================ */
[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   БЛОК ЦИФР
   ============================================================ */
.stats-block {
    padding: 50px 20px 60px;
    text-align: center;
}

.stats-head {
    margin-bottom: 40px;
}

.stats-head h2 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--text);
    margin: 0 0 10px;
}

.stats-head p {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 700px) {
    .stats-head h2 { font-size: 24px; }
}

/* ============================================================
   ДОПОЛНИТЕЛЬНЫЕ ФИЧИ (Пакетная обработка, История)
   ============================================================ */
.features-extra {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 720px;
    margin: 30px auto 0;
}

@media (max-width: 600px) {
    .features-extra { grid-template-columns: 1fr; }
}

.features-extra-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
}

.features-extra-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.features-extra-item svg {
    color: var(--primary);
    flex-shrink: 0;
}

.features-extra-item b {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.features-extra-item span {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================================
   БЛОК "ПОЧЕМУ ВЫГОДНО" — НОВЫЙ
   ============================================================ */
.why-new {
    padding: 80px 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.savings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 50px auto 0;
    align-items: center;
}

@media (max-width: 800px) {
    .savings-grid { grid-template-columns: 1fr; }
}

.saving-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.25s;
    position: relative;
}

.saving-old {
    opacity: 0.7;
}

.saving-old:hover {
    opacity: 1;
    transform: translateY(-4px);
}

.saving-icon {
    font-size: 32px;
    margin-bottom: 14px;
}

.saving-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.saving-price {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.6px;
}

.saving-desc {
    font-size: 13px;
    color: var(--text-light);
}

/* Новый вариант — выделен */
.saving-new {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(124, 58, 237, 0.08));
    border: 2px solid var(--primary);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.15);
    transform: scale(1.05);
    padding-top: 42px;
}

.saving-new:hover {
    transform: scale(1.08);
    box-shadow: 0 25px 60px rgba(37, 99, 235, 0.25);
}

@media (max-width: 800px) {
    .saving-new { transform: scale(1); }
    .saving-new:hover { transform: translateY(-4px); }
}

.saving-new .saving-price {
    color: var(--primary);
    font-size: 32px;
}

.saving-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 999px;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.saving-arrow {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
}

.saving-bottom {
    max-width: 640px;
    margin: 50px auto 0;
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-muted);
    text-align: center;
}

.saving-bottom b {
    color: var(--primary);
    font-weight: 800;
}

/* ============================================================
   ФИНАЛЬНЫЙ CTA — НОВЫЙ
   ============================================================ */
.final-cta-new {
    padding: 60px 20px 80px;
    border-top: 1px solid var(--border-light);
}

.final-cta-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: center;
    padding: 50px 40px;
    background: linear-gradient(135deg, var(--bg-soft), var(--bg-gray));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.final-cta-inner::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12), transparent 70%);
    pointer-events: none;
}

@media (max-width: 800px) {
    .final-cta-inner {
        grid-template-columns: 1fr;
        padding: 40px 24px;
        gap: 30px;
    }
}

.final-cta-content {
    position: relative;
    z-index: 1;
}

.final-cta-content h2 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 0 0 16px;
    color: var(--text);
    line-height: 1.15;
}

@media (max-width: 700px) {
    .final-cta-content h2 { font-size: 26px; letter-spacing: -0.5px; }
}

.final-cta-content p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0 0 30px;
    max-width: 480px;
}

.final-cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Мокап справа */
.final-cta-visual {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.final-cta-mockup {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 100%;
    max-width: 280px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.final-cta-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    margin-right: 4px;
}

.final-cta-dot:first-child { background: #ef4444; }
.final-cta-dot:nth-child(2) { background: #f59e0b; }
.final-cta-dot:nth-child(3) { background: #22c55e; }

.final-cta-stripe {
    width: 100%;
    height: 12px;
    background: var(--bg-soft);
    border-radius: 6px;
    margin-top: 12px;
    overflow: hidden;
}

.final-cta-stripe-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 6px;
    animation: stripeGrow 2s ease-in-out infinite alternate;
}

@keyframes stripeGrow {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ============================================================
   КИСТЬ-ПРОГРЕСС — ВОЛНИСТАЯ ЛИНИЯ
   ============================================================ */
.scroll-brush {
    position: fixed;
    right: 28px;
    top: 100px;
    bottom: 50px;
    width: 52px;
    z-index: 90;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
}

.scroll-brush.visible {
    opacity: 1;
}

@media (max-width: 1100px) {
    .scroll-brush {
        display: none;
    }
}

.scroll-brush-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.scroll-brush-path-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.6;
}

.scroll-brush-path-fill {
    fill: none;
    stroke: url(#brush-gradient);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.5));
    transition: none !important;
}

.scroll-brush-icon {
    position: absolute;
    width: 36px;
    height: 36px;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.45),
                0 0 0 4px rgba(37, 99, 235, 0.12);
    transition: none !important;
    will-change: top, left;
}

.scroll-brush-icon svg {
    transform: rotate(-15deg);
}



/* ============================================================
   ГЛОБАЛЬНАЯ АДАПТАЦИЯ — ПЛАНШЕТЫ И ТЕЛЕФОНЫ
   ============================================================ */

/* --- Базовые улучшения для тача --- */
button, a, input, select, textarea {
    -webkit-tap-highlight-color: transparent;
}

button, 
.btn-primary, 
.btn-secondary,
.btn-hero-primary,
.btn-hero-secondary,
.action-btn,
.tool-card,
.filter-btn,
.page-btn,
.zoom-btn,
.wm-tool,
.wm-sens-btn,
.wm-auto-btn,
.refine-tool,
.cp-mode,
.mode-card,
.check-card,
.bg-choice,
.bg-preset {
    touch-action: manipulation;
}

/* Предотвращаем горизонтальный скролл */
html, body {
    overflow-x: clip;
    max-width: 100%;
}

img, svg, canvas, video {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   МОБИЛЬНОЕ МЕНЮ — БУРГЕР
   ============================================================ */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    margin-right: 10px;
    flex-shrink: 0;
    transition: background 0.15s;
}

.mobile-menu-btn:hover {
    background: var(--bg-gray);
}

.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    margin: 0 auto;
    transition: all 0.25s;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Планшеты и меньше --- */
@media (max-width: 900px) {
    /* Отключаем blur — иначе position: fixed у меню ломается */
    .site-header {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--bg);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .header-inner {
        padding: 12px 16px;
        gap: 12px;
    }

        .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg);
        flex-direction: column;
        gap: 0;
        padding: 76px 20px 40px;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: auto;
        z-index: 999;
        display: flex;
    }

    .main-nav.open {
        transform: translateX(0);
    }

    /* Затемнение фона */
    body.menu-open::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 98;
        animation: fadeIn 0.2s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    /* Крупные ссылки */
    .main-nav a {
        font-size: 20px;
        font-weight: 700;
        padding: 18px 8px;
        border-bottom: 1px solid var(--border-light);
        border-radius: 0;
        color: var(--text);
        display: flex;
        align-items: center;
        gap: 14px;
        opacity: 0;
        transform: translateX(20px);
    }

    .main-nav.open a {
        animation: slideInLink 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .main-nav.open a:nth-child(1) { animation-delay: 0.08s; }
    .main-nav.open a:nth-child(2) { animation-delay: 0.14s; }
    .main-nav.open a:nth-child(3) { animation-delay: 0.20s; }
    .main-nav.open a:nth-child(4) { animation-delay: 0.26s; }
    .main-nav.open a:nth-child(5) { animation-delay: 0.32s; }

    @keyframes slideInLink {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    /* Иконки перед ссылками */
    .main-nav a::before {
        content: "";
        width: 6px;
        height: 6px;
        background: var(--primary);
        border-radius: 50%;
        flex-shrink: 0;
        transition: transform 0.2s;
    }

    .main-nav a:hover {
        background: var(--bg-soft);
    }

    .main-nav a:hover::before {
        transform: scale(1.6);
    }

    /* Кнопка закрытия — крестик */
    .main-nav::after {
        content: "✕";
        position: absolute;
        top: 18px;
        right: 20px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        font-weight: 600;
        color: var(--text);
        background: var(--bg-gray);
        border-radius: 50%;
        cursor: pointer;
        pointer-events: auto;
        transition: background 0.15s;
    }

    .main-nav::after:hover {
        background: var(--border);
    }

    /* Заголовок меню */
    .main-nav::before {
        content: "Меню";
        position: absolute;
        top: 24px;
        left: 24px;
        font-size: 14px;
        font-weight: 700;
        color: var(--text-light);
        text-transform: uppercase;
        letter-spacing: 1.5px;
    }
}

/* ============================================================
   HERO НА МОБИЛЬНЫХ
   ============================================================ */
@media (max-width: 900px) {
    .hero-new {
        padding: 40px 20px 30px;
    }

    .hero-new-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-new-title {
        font-size: 34px;
        letter-spacing: -0.8px;
    }

    .hero-new-subtitle {
        font-size: 16px;
    }

    .hero-new-visual {
        height: 320px;
        transform: scale(0.85);
    }

    .hero-float-card {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-new-title {
        font-size: 26px;
        letter-spacing: -0.5px;
    }

    .hero-new-subtitle {
        font-size: 15px;
        margin-bottom: 26px;
    }

    .hero-new-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        padding: 14px 24px;
        font-size: 15px;
        justify-content: center;
        text-align: center;
    }

    .hero-badge {
        font-size: 12px;
        padding: 5px 12px;
    }

    .hero-new-note {
        font-size: 13px;
        flex-wrap: wrap;
    }

    .hero-new-visual {
        height: 260px;
        transform: scale(0.7);
    }
}

/* ============================================================
   ЦИФРЫ
   ============================================================ */
@media (max-width: 900px) {
    .stats-block {
        padding: 40px 16px 50px;
    }

    .stats-head h2 {
        font-size: 24px;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-top: 30px;
        padding-top: 30px;
    }

    .hero-stat-value {
        font-size: 26px;
    }

    .hero-stat-label {
        font-size: 12px;
    }
}

/* ============================================================
   ФИЧИ И СЕТКИ
   ============================================================ */
@media (max-width: 1100px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .features,
    .how,
    .why-new,
    .home-articles,
    .tariffs-teaser,
    .home-faq {
        padding: 50px 0;
    }

    .features-grid,
    .pricing-grid,
    .pricing-grid-4,
    .tariffs-row,
    .home-articles-grid,
    .pricing-who-grid,
    .pricing-benefits-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 24px;
        letter-spacing: -0.4px;
    }

    .section-subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }

    .feature-card {
        padding: 22px 20px;
    }
}

/* ============================================================
   БЛОК ЭКОНОМИИ
   ============================================================ */
@media (max-width: 900px) {
    .savings-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 30px;
    }

    .saving-new {
        transform: scale(1);
    }

    .saving-new:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 500px) {
    .saving-price {
        font-size: 22px;
    }

    .saving-bottom {
        font-size: 15px;
        margin-top: 30px;
    }
}

/* ============================================================
   БОТ: МЕНЮ ИНСТРУМЕНТОВ
   ============================================================ */
@media (max-width: 900px) {
    .bot-menu-grid {
        grid-template-columns: 1fr;
    }

    .bot-menu-header h1 {
        font-size: 30px;
    }
}

/* ============================================================
   БОТ: ПРЕВЬЮ И ЗАГРУЗКА
   ============================================================ */
@media (max-width: 700px) {
    .bot-page {
        padding: 30px 16px;
    }

    .bot-page h1 {
        font-size: 26px;
        letter-spacing: -0.5px;
    }

    .preview-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .preview-content {
        min-height: 220px;
    }

    .limit-info {
        font-size: 13px;
        padding: 12px 16px;
    }
}

/* ============================================================
   ПАНЕЛЬ ДЕЙСТВИЙ
   ============================================================ */
@media (max-width: 800px) {
    .actions-panel-inner {
        grid-template-columns: 1fr !important;
    }

    .action-btn {
        padding: 14px 16px;
    }

    .action-btn-title {
        font-size: 14px;
    }

    .action-btn-sub {
        font-size: 11px;
    }
}

/* ============================================================
   БОТ: НАСТРОЙКИ И СЛАЙДЕРЫ
   ============================================================ */
@media (max-width: 600px) {
    .settings-body {
        padding: 14px 16px 18px;
    }

    .settings-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .settings-toggle-box {
        padding: 14px 16px;
        gap: 12px;
    }

    .settings-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .settings-toggle-text b {
        font-size: 14px;
    }

    .settings-toggle-text small {
        font-size: 11px;
    }

    .ctl-input {
        width: 60px;
        padding: 4px 8px;
        font-size: 12px;
    }

    .bg-choices {
        grid-template-columns: repeat(2, 1fr);
    }

    .bg-presets {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   РЕДАКТОРЫ МАСОК (УДАЛЕНИЕ ФОНА, ВОДЯНЫЕ ЗНАКИ)
   ============================================================ */
@media (max-width: 900px) {
    .refine-content,
    .wm-modal-content,
    .final-content {
        padding: 16px;
        max-height: 96vh;
        border-radius: var(--radius-lg);
    }

    .refine-modal,
    .final-modal {
        padding: 10px;
    }

    .refine-header h2,
    .final-header h2 {
        font-size: 17px;
    }

    .refine-toolbar,
    .wm-toolbar,
    .wm-auto-panel {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }

    .refine-tools,
    .wm-tools,
    .refine-mode-switch,
    .wm-sensitivity {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .refine-tools::-webkit-scrollbar,
    .wm-tools::-webkit-scrollbar {
        display: none;
    }

    .refine-mode-switch {
        display: flex;
    }

    .refine-mode,
    .refine-tool,
    .wm-tool,
    .wm-sens-btn {
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 12px;
    }

    .refine-brush-size {
        width: 100%;
        justify-content: space-between;
    }

    .refine-brush-size input[type="range"] {
        flex: 1;
        width: auto;
    }

    .refine-clear,
    .wm-auto-btn {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }

    .refine-canvas-wrap {
        padding: 10px;
        max-height: 50vh;
    }

    .refine-footer,
    .wm-method {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .refine-footer .btn-primary,
    #wm-apply {
        width: 100%;
        padding: 14px;
    }

    .wm-method {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .refine-zoom-bar {
        flex-wrap: wrap;
        justify-content: center;
    }

    .zoom-hint {
        width: 100%;
        text-align: center;
        margin: 4px 0 0;
    }
}

@media (max-width: 480px) {
    .refine-modal,
    .final-modal {
        padding: 0;
    }

    .refine-content,
    .wm-modal-content,
    .final-content {
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
        padding: 14px;
    }

    .refine-mode,
    .refine-tool,
    .wm-tool {
        font-size: 11px;
        padding: 7px 10px;
    }

    .refine-canvas-wrap {
        max-height: 44vh;
    }

    .cp-modes {
        grid-template-columns: 1fr;
    }

    .final-slider-group {
        padding: 12px 14px;
    }

    .final-slider-label small {
        display: none;
    }

    .final-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .final-actions .btn-primary,
    .final-actions .btn-secondary {
        width: 100%;
    }
}

/* ============================================================
   ТАРИФЫ
   ============================================================ */
@media (max-width: 900px) {
    .pricing-hero h1 {
        font-size: 32px;
        letter-spacing: -0.6px;
    }

    .pricing-hero-subtitle {
        font-size: 15px;
    }

    .pricing-page {
        padding: 30px 16px 0;
    }

    .pricing-card {
        padding: 26px 20px;
    }

    .pricing-final-cta h2 {
        font-size: 24px;
    }

    .pricing-final-actions {
        flex-direction: column;
    }

    .pricing-final-actions a {
        width: 100%;
        text-align: center;
    }
}

/* Сравнительная таблица на мобильных */
@media (max-width: 700px) {
    .compare-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .compare-table {
        min-width: 560px;
        font-size: 13px;
    }

    .compare-table th,
    .compare-table td {
        padding: 12px 10px;
    }
}

/* ============================================================
   ПРОФИЛЬ И АДМИНКА
   ============================================================ */
@media (max-width: 700px) {
    .profile-page {
        padding: 30px 16px;
    }

    .profile-page h1 {
        font-size: 24px;
    }

    .profile-header-card {
        padding: 18px;
        flex-wrap: wrap;
    }

    .profile-avatar {
        width: 60px;
        height: 60px;
    }

    .profile-avatar-placeholder {
        font-size: 22px;
    }

    .btn-edit-profile {
        width: 100%;
        text-align: center;
    }

    .profile-card {
        padding: 18px;
    }

    .profile-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .profile-value {
        font-weight: 700;
    }

    .profile-actions {
        flex-direction: column;
    }

    .profile-actions a {
        width: 100%;
        text-align: center;
    }

    .admin-page {
        padding: 30px 16px;
    }

    .admin-page h1 {
        font-size: 22px;
    }

    .admin-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .admin-stat {
        padding: 18px;
    }

    .admin-stat-value {
        font-size: 28px;
    }

    /* Таблица админа — горизонтальный скролл */
    .admin-table-wrapper,
    .admin-page table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .admin-user-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   АВТОРИЗАЦИЯ
   ============================================================ */
@media (max-width: 768px) {
    .auth-page {
        margin: 30px auto 40px !important;
        padding: 0 16px !important;
        min-height: auto !important;
    }

    .auth-page h1 {
        font-size: 24px;
    }
}

/* ============================================================
   СТАТЬИ
   ============================================================ */
@media (max-width: 700px) {
    .articles-page,
    .article-page {
        padding: 30px 16px;
    }

    .articles-page h1,
    .articles-header h1 {
        font-size: 30px;
    }

    .article-page h1,
    .article-body h1 {
        font-size: 26px;
        letter-spacing: -0.5px;
    }

    .article-body h2 {
        font-size: 20px;
        margin: 30px 0 12px;
    }

    .article-body h3 {
        font-size: 17px;
    }

    .article-body {
        font-size: 15px;
    }

    .article-page {
        padding: 30px 16px;
    }

    .articles-header .subtitle,
    .subtitle {
        font-size: 14px;
    }

    .articles-toolbar {
        gap: 12px;
    }

    .articles-search {
        max-width: 100%;
    }

    .articles-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 6px;
        scrollbar-width: none;
    }

    .articles-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        flex-shrink: 0;
    }
}

/* Пагинация */
@media (max-width: 500px) {
    .pagination {
        gap: 6px;
        margin-top: 30px;
    }

    .page-btn {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
        font-size: 13px;
    }

    .page-nav {
        padding: 0 10px;
        font-size: 12px;
    }

    .page-nav svg {
        width: 12px;
        height: 12px;
    }
}

/* Комментарии */
@media (max-width: 600px) {
    .comments-section {
        margin-top: 40px;
        padding-top: 24px;
    }

    .comments-title {
        font-size: 18px;
    }

    .comment {
        gap: 10px;
    }

    .comment-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .comment-body {
        padding: 12px 14px;
    }

    .comment-actions {
        gap: 4px;
    }

    .reaction-btn,
    .reply-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .comment-replies {
        margin-left: 20px;
        padding-left: 12px;
    }

    .comment-form {
        padding: 16px;
    }
}

/* ============================================================
   FAQ
   ============================================================ */
@media (max-width: 600px) {
    .faq-item summary {
        padding: 14px 18px;
        font-size: 14px;
    }

    .faq-answer {
        padding: 0 18px 16px;
        font-size: 13px;
    }
}

/* ============================================================
   ФИНАЛЬНЫЙ CTA
   ============================================================ */
@media (max-width: 800px) {
    .final-cta-new {
        padding: 40px 16px 60px;
    }

    .final-cta-inner {
        grid-template-columns: 1fr;
        padding: 32px 22px;
    }

    .final-cta-content h2 {
        font-size: 24px;
    }

    .final-cta-actions {
        flex-direction: column;
    }

    .final-cta-actions a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .final-cta-visual {
        display: none;
    }
}

/* ============================================================
   ПОДВАЛ
   ============================================================ */
@media (max-width: 700px) {
    .site-footer {
        padding: 40px 16px 20px;
        margin-top: 50px;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .footer-col:first-child {
        grid-column: 1 / -1;
    }

    .footer-desc {
        max-width: 100%;
    }
}

@media (max-width: 400px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   ТАРИФЫ НА ГЛАВНОЙ (tariff-mini)
   ============================================================ */
@media (max-width: 900px) {
    .tariffs-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .tariffs-row {
        grid-template-columns: 1fr;
    }

    .tariff-mini {
        padding: 22px 18px;
    }

    .tariff-mini-price {
        font-size: 24px;
    }
}

/* ============================================================
   ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (360px и меньше)
   ============================================================ */
@media (max-width: 380px) {
    .hero-new-title {
        font-size: 22px;
    }

    .section-title {
        font-size: 20px;
    }

    .hero-stat-value {
        font-size: 22px;
    }

    .action-btn-icon {
        width: 34px;
        height: 34px;
    }

    .mobile-menu-btn {
        width: 36px;
        height: 36px;
    }

    .logo-text {
        display: none;
    }
}

/* ============================================================
   БОЛЬШИЕ ЭКРАНЫ (1400px+)
   ============================================================ */
@media (min-width: 1400px) {
    .header-inner,
    .footer-inner,
    .landing,
    .articles-page,
    .pricing-page,
    .bot-page,
    .bot-menu-page,
    .profile-page,
    .admin-page {
        max-width: 1300px;
    }

    .hero-new-title {
        font-size: 60px;
    }

    .hero-new-subtitle {
        font-size: 20px;
    }

    .section-title {
        font-size: 40px;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    body {
        font-size: 16px;
    }
}

/* ============================================================
   ОЧЕНЬ БОЛЬШИЕ ЭКРАНЫ (1800px+)
   ============================================================ */
@media (min-width: 1800px) {
    .header-inner,
    .footer-inner,
    .landing,
    .articles-page,
    .pricing-page,
    .bot-page,
    .bot-menu-page,
    .profile-page,
    .admin-page {
        max-width: 1500px;
    }

    .hero-new-title {
        font-size: 68px;
    }
}

/* ============================================================
   ОРИЕНТАЦИЯ ЭКРАНА (телефон лёжа)
   ============================================================ */
@media (max-width: 900px) and (orientation: landscape) {
    .refine-modal,
    .final-modal {
        padding: 8px;
    }

    .refine-content,
    .final-content {
        max-height: 96vh;
    }

    .refine-canvas-wrap {
        max-height: 60vh;
    }
}

/* ============================================================
   МОБИЛЬНЫЙ СКРОЛЛ — ИНЕРЦИЯ
   ============================================================ */
.compare-wrap,
.admin-table,
.articles-filters,
.refine-tools,
.wm-tools,
.refine-mode-switch,
.wm-sensitivity {
    -webkit-overflow-scrolling: touch;
}

.mode-cards-5 {
    grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 900px) {
    .mode-cards-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .mode-cards-5 { grid-template-columns: repeat(2, 1fr); }
}

.mode-cards-5 .mode-card-content {
    padding: 14px 8px;
}

.mode-cards-5 .mode-card-content span {
    font-size: 13px;
}

.mode-cards-5 .mode-card-content small {
    font-size: 10px;
}

.mode-cards-5 .check-card-icon {
    font-size: 20px !important;
}


/* ============================================================
   UPSCALE — КОМПАКТНЫЙ ВЫБОР МОДЕЛИ (PILLS)
   ============================================================ */
.model-picker {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

@media (max-width: 900px) {
    .model-picker { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 550px) {
    .model-picker { grid-template-columns: repeat(2, 1fr); }
}

.model-pill {
    cursor: pointer;
    display: block;
}

.model-pill input[type="radio"] {
    display: none;
}

.model-pill-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.15s;
    text-align: center;
    height: 100%;
}

.model-pill:hover .model-pill-content {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.model-pill.active .model-pill-content,
.model-pill input:checked + .model-pill-content {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.06);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.model-pill-icon {
    font-size: 20px;
    line-height: 1;
}

.model-pill-text b {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.model-pill-text small {
    display: block;
    font-size: 10px;
    color: var(--text-light);
    line-height: 1.2;
    margin-top: 2px;
}

.model-pill-stars {
    font-size: 9px;
    letter-spacing: -1px;
    line-height: 1;
    margin-top: 2px;
}

.model-pill.active .model-pill-stars,
.model-pill input:checked + .model-pill-content .model-pill-stars {
    transform: scale(1.05);
}

.model-hint {
    padding: 10px 14px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
}

/* ============================================================
   UPSCALE — КНОПКА ПОД ПРЕВЬЮ
   ============================================================ */
.upscale-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    margin: 24px auto 16px;
    padding: 16px 24px;
    font-size: 16px;
}

.upscale-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================================
   UPSCALE — МНОЖИТЕЛЬ (PILLS)
   ============================================================ */
.factor-pills {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.factor-pill {
    cursor: pointer;
}

.factor-pill input[type="radio"] {
    display: none;
}

.factor-pill span {
    display: block;
    padding: 10px 8px;
    text-align: center;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
    color: var(--text-muted);
    transition: all 0.15s;
}

.factor-pill:hover span {
    border-color: var(--primary);
    color: var(--text);
}

.factor-pill input:checked + span {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.06);
    color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.factor-pill input:disabled + span {
    opacity: 0.3;
    cursor: not-allowed;
} 

/* ============================================================
   UPSCALE — КРАСИВЫЕ ЧЕКБОКСЫ И СЛАЙДЕРЫ
   ============================================================ */
.enhance-item {
    margin-bottom: 14px;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s;
}

.enhance-item:last-child {
    margin-bottom: 0;
}

.enhance-item:hover {
    border-color: var(--primary);
}

.enhance-toggle {
    cursor: pointer;
    display: block;
}

.enhance-toggle input[type="checkbox"] {
    display: none;
}

.enhance-header {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    padding-right: 40px;
}

.enhance-icon {
    width: 38px;
    height: 38px;
    background: var(--bg-soft);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: background 0.15s;
}

.enhance-toggle input:checked + .enhance-header .enhance-icon {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(124, 58, 237, 0.15));
}

.enhance-text {
    flex: 1;
    min-width: 0;
}

.enhance-text b {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 2px;
}

.enhance-text small {
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.2;
}

/* Красивый чекбокс */
.enhance-check {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 7px;
    transition: all 0.15s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
}

.enhance-toggle:hover .enhance-check {
    border-color: var(--primary);
}

.enhance-toggle input:checked + .enhance-header .enhance-check {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.enhance-toggle input:checked + .enhance-header .enhance-check::after {
    content: "";
    width: 11px;
    height: 6px;
    border-left: 2.5px solid white;
    border-bottom: 2.5px solid white;
    transform: rotate(-45deg) translateY(-2px);
}

/* Слайдер под чекбоксом */
.enhance-slider {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    transition: opacity 0.15s;
}

.enhance-slider .ctl-head {
    margin-bottom: 8px;
}

.enhance-slider .ctl-label {
    font-size: 12px;
    color: var(--text-light);
}

.enhance-slider input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    display: block;
}

.enhance-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #fff;
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
    transition: transform 0.12s;
}

.enhance-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.enhance-slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #fff;
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}


/* ============================================================
   UPSCALE — КНОПКИ РЯДОМ
   ============================================================ */
.upscale-actions {
    display: inline-flex !important;
    gap: 12px !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 24px auto 16px !important;
    flex-wrap: wrap !important;
    width: auto !important;
    max-width: 100% !important;
    /* Центрируем сам контейнер */
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

.upscale-submit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 14px 28px !important;
    font-size: 15px !important;
    width: auto !important;
    max-width: 220px !important;
    flex: 0 0 auto !important;
}

.upscale-download {
    display: none;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 14px 28px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    background: var(--success) !important;
    color: white !important;
    border-radius: var(--radius) !important;
    text-decoration: none !important;
    transition: all 0.15s !important;
    box-shadow: 0 8px 22px rgba(22, 163, 74, 0.25) !important;
    width: auto !important;
    max-width: 240px !important;
    flex: 0 0 auto !important;
}

.upscale-download:hover {
    transform: translateY(-2px) !important;
    background: #15803d !important;
}
@media (max-width: 600px) {
    .upscale-actions {
        flex-direction: column;
    }
    .upscale-submit,
    .upscale-download {
        width: 100%;
    }
}

.refine-auto-all {
    padding: 8px 14px;
    background: linear-gradient(135deg, #8b5cf6, #6f42c1);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.15s;
}

.refine-auto-all:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.35);
}

.refine-auto-all:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================
   ПЕРЕКЛЮЧАТЕЛЬ ВИДА CANVAS В РЕДАКТОРЕ МАСКИ
   ============================================================ */
.refine-base-switch {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: var(--bg-gray);
    border-radius: var(--radius);
    margin-bottom: 14px;
}

.refine-base-btn {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: calc(var(--radius) - 3px);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.15s;
}

.refine-base-btn:hover {
    color: var(--text);
}

.refine-base-btn.active {
    background: var(--bg-elevated);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.refine-legend {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.refine-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.refine-legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 2px solid;
    flex-shrink: 0;
}

/* ============================================================
   ВЫБОР ИСТОЧНИКА СВЕТА (ТЕНИ И ФОНЫ)
   ============================================================ */
.light-picker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.light-picker-label {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

#light-canvas {
    background: linear-gradient(180deg, #f0f4ff 0%, #dbeafe 100%);
    border-radius: 10px;
    cursor: crosshair;
    border: 1px solid var(--border);
    touch-action: none;
    max-width: 100%;
}

[data-theme="dark"] #light-canvas {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}


/* ============================================================
   ЗУМ ПРЕВЬЮ РЕЗУЛЬТАТА
   ============================================================ */
.preview-zoomable {
    position: relative;
    overflow: hidden;
    cursor: grab;
    user-select: none;
}

.preview-zoomable.grabbing {
    cursor: grabbing;
}

.preview-zoomable img {
    transform-origin: center center;
    transition: transform 0.08s linear;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
    max-width: 100%;
    max-height: 400px;
}

.zoom-hint-inline {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 8px;
}


.actions-top {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.actions-top-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    font-family: inherit;
}

.actions-top-btn.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.actions-top-btn.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.actions-top-btn.btn-download {
    background: var(--success);
    color: white;
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.25);
}

.actions-top-btn.btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(22, 163, 74, 0.35);
}

.btn-download.disabled {
    pointer-events: none;
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.6);
}


/* ============ СЕКЦИЯ «СКОРО ПОЯВИТСЯ» ============ */

.coming-soon-section {
    margin-top: 60px;
    position: relative;
}

/* Тонкий градиентный разделитель */
.coming-soon-divider {
    position: relative;
    text-align: center;
    margin-bottom: 32px;
}

.coming-soon-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent 0%,
        var(--border) 25%,
        var(--border) 75%,
        transparent 100%
    );
    opacity: 0.6;
}

.coming-soon-label {
    position: relative;
    display: inline-block;
    padding: 0 20px;
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Карточка «Скоро» — приглушённая */
.tool-card-soon {
    position: relative;
    opacity: 0.85;
    border: 1px dashed var(--border) !important;
    background: linear-gradient(
        135deg,
        var(--bg-secondary) 0%,
        var(--bg) 100%
    ) !important;
    transition: opacity .25s, transform .25s, border-color .25s;
}

.tool-card-soon:hover {
    opacity: 1;
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.5) !important;
    border-style: solid !important;
}

/* Иконка AI с градиентом */
.tool-icon-ai {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

/* Бейдж «Скоро» */
.tool-tag-soon {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%) !important;
    color: #fff !important;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    letter-spacing: 0.03em;
}

/* В тёмной теме — чуть другое свечение */
[data-theme="dark"] .tool-card-soon:hover {
    border-color: rgba(245, 158, 11, 0.6) !important;
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.15);
}


/* Тонкий разделитель между блоками */
.section-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 40px 0 28px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.7;
}

.section-divider::before,
.section-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(
        to var(--dir, right),
        transparent,
        var(--border),
        transparent
    );
}

.section-divider::after {
    --dir: left;
}

/* Иконка AI — градиент, как намёк */
.tool-icon-ai {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

/* Бейдж «Скоро» — тот же размер, но акцентный */
.tool-tag-soon {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: #fff;
    font-weight: 600;
}


/* ============ ГЕНЕРАЦИЯ ИЗОБРАЖЕНИЙ ============ */

.gen-header { margin-bottom: 20px; }

.gen-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
    width: fit-content;
}

.gen-tab {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.15s;
}

.gen-tab:hover { color: var(--text); }
.gen-tab.active {
    background: var(--bg);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.gen-offline {
    text-align: center;
    padding: 32px;
    background: var(--bg-secondary);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 14px;
    margin-bottom: 24px;
}
.gen-offline-icon { font-size: 48px; margin-bottom: 12px; }
.gen-offline h3 { margin: 0 0 8px; }
.gen-offline p { color: var(--text-secondary); margin: 0 0 12px; }
.gen-offline code {
    display: inline-block;
    padding: 6px 12px;
    background: var(--bg);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-light);
}

.gen-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 900px) {
    .gen-layout { grid-template-columns: 1fr; }
}

.gen-form-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gen-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
}

.gen-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.gen-hint {
    font-size: 12px;
    color: var(--text-light);
    margin: -4px 0 10px;
}

.gen-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.gen-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============ ЧИПСЫ ПРЕСЕТОВ ============ */

.preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preset-chip {
    padding: 8px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.preset-chip:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.preset-chip.active {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.active-style-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text);
}

.clear-style-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 4px;
}
.clear-style-btn:hover { background: var(--bg); color: var(--text); }

/* ============ КНОПКИ РАЗМЕРОВ ============ */

.size-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.size-btn {
    padding: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.size-btn:hover {
    border-color: var(--primary);
}

.size-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ============ РАСШИРЕННЫЕ ============ */

.gen-advanced {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
}

.gen-advanced summary {
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    user-select: none;
    list-style: none;
}
.gen-advanced summary::-webkit-details-marker { display: none; }
.gen-advanced summary:hover { color: var(--text); }

.gen-advanced-body {
    padding: 0 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gen-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gen-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.gen-field input,
.gen-field select,
.gen-field textarea {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}

.gen-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ============ КНОПКА ГЕНЕРАЦИИ ============ */

/* ============ КНОПКА ГЕНЕРАЦИИ ============ */

.gen-submit {
    padding: 16px 24px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
}

.gen-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.5);
}

.gen-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============ ПРАВАЯ КОЛОНКА: РЕЗУЛЬТАТ ============ */

.gen-result-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gen-result {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.gen-result img {
    max-width: 100%;
    max-height: 600px;
    display: block;
    border-radius: 12px;
}

.gen-result-placeholder {
    text-align: center;
    color: var(--text-light);
    padding: 40px;
}

.gen-placeholder-icon {
    font-size: 64px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.gen-result-placeholder p {
    margin: 0;
    font-size: 14px;
}

.gen-error {
    padding: 24px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #ef4444;
    font-size: 14px;
    text-align: center;
}

/* ============ ПРОГРЕСС ============ */

.gen-progress {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
}

.gen-progress-bar {
    height: 6px;
    background: var(--bg);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.gen-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    width: 0%;
    transition: width 1.2s ease-out;
    border-radius: 3px;
}

.gen-progress-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============ КНОПКИ ДЕЙСТВИЙ ============ */

.gen-actions {
    display: flex;
    gap: 10px;
}

.gen-action-btn {
    flex: 1;
    padding: 12px 20px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.15s;
}

.gen-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.gen-action-secondary {
    background: var(--bg-secondary);
    color: var(--text);
    border: 1px solid var(--border);
}
.gen-action-secondary:hover {
    background: var(--bg);
    box-shadow: none;
    border-color: var(--primary);
}

/* ============ ИСТОРИЯ / ГАЛЕРЕЯ ============ */

.gen-history-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.gen-history-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
}

.gen-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.gen-gallery-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-light);
    padding: 40px;
    font-size: 14px;
}

.gen-card {
    display: block;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.gen-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.gen-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: var(--bg);
}

.gen-card-info {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    font-size: 11px;
    color: var(--text-light);
    border-top: 1px solid var(--border);
}

/* ============ СТИЛИЗАЦИЯ ФОТО (UPLOAD) ============ */

.style-upload {
    display: block;
    cursor: pointer;
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 32px 20px;
    transition: all 0.2s;
    text-align: center;
    background: var(--bg);
}

.style-upload:hover,
.style-upload.drag-over {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.style-upload-inner {
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.style-upload-inner p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.style-upload-inner span {
    font-size: 12px;
    color: var(--text-light);
}

.style-upload img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

/* ============ DENOISE СЛАЙДЕР ============ */

.denoise-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 6px;
    background: linear-gradient(to right, #22c55e, #f59e0b, #ef4444);
    border-radius: 3px;
    outline: none;
    margin: 12px 0 8px;
}

.denoise-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.denoise-hint {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-light);
}

/* Тёмная тема */
[data-theme="dark"] .gen-card {
    background: var(--bg-secondary);
}
[data-theme="dark"] .gen-result {
    background: var(--bg-secondary);
}

/* Два блока рядом: свет + позиционирование */
.light-picker-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 700px) {
    .light-picker-row {
        grid-template-columns: 1fr;
    }
}

/* ============ ПАНЕЛЬ КОМПОЗИЦИИ ============ */

.composition-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin: 20px 0;
    overflow: hidden;
    transition: all 0.2s;
}

.composition-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.composition-header:hover {
    background: var(--bg);
}

.composition-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.composition-toggle {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.composition-toggle.collapsed .toggle-arrow {
    transform: rotate(-90deg);
    display: inline-block;
}

.composition-body {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    transition: max-height 0.2s, opacity 0.2s;
}

.composition-body.collapsed {
    display: none;
}

@media (max-width: 700px) {
    .composition-body {
        grid-template-columns: 1fr;
    }
}

.composition-group {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
}

.composition-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.group-icon {
    font-size: 16px;
}

.comp-ctl {
    margin-bottom: 14px;
}

.comp-ctl:last-child {
    margin-bottom: 0;
}

.comp-ctl-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.comp-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.comp-num {
    width: 70px;
    padding: 4px 8px;
    font-size: 12px;
    text-align: right;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text);
    font-family: inherit;
}

.comp-num:focus {
    outline: none;
    border-color: var(--primary);
}

.comp-ctl input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.comp-ctl input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.35);
    transition: transform 0.1s;
}

.comp-ctl input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.comp-ctl input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.composition-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.comp-btn {
    flex: 1;
    padding: 11px 18px;
    border: none;
    border-radius: 9px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.comp-btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.comp-btn-secondary:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.comp-btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #fff;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.3);
}

.comp-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}

.comp-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Мобильная версия */
@media (max-width: 500px) {
    .composition-body {
        padding: 14px;
        gap: 14px;
    }
    .composition-group {
        padding: 12px;
    }
    .comp-num {
        width: 60px;
        font-size: 11px;
    }
}

/* ============================================================
   UPSCALE PRESETS
   ============================================================ */
.upscale-presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-bottom: 8px;
}

.upscale-preset-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    font-family: inherit;
    color: inherit;
}

.upscale-preset-btn:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    background: rgba(37, 99, 235, 0.03);
}

.upscale-preset-btn.active {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.preset-emoji {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.preset-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.preset-info b {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.preset-info small {
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.3;
    margin-top: 3px;
}

.preset-active-indicator {
    padding: 8px 12px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    border: 1px solid var(--border-light, var(--border));
}

@media (max-width: 600px) {
    .upscale-presets-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   LANDING ENRICHED BLOCKS
   ============================================================ */
.audience-section {
    padding: 95px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}
body.light-theme .audience-section {
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1220px;
    margin: 50px auto 0;
    text-align: left;
}

@media (max-width: 900px) {
    .audience-grid {
        grid-template-columns: 1fr;
    }
}

.audience-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: 38px 30px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.audience-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.25s;
}

.audience-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.audience-card:hover::before {
    opacity: 1;
}

.audience-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 20px;
    background: rgba(37, 99, 235, 0.08);
}

.audience-icon-purple {
    background: rgba(139, 92, 246, 0.1);
}

.audience-icon-amber {
    background: rgba(245, 158, 11, 0.1);
}

.audience-card h3 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 12px;
    color: var(--text);
    letter-spacing: -0.4px;
}

.audience-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 20px;
}

.audience-list {
    list-style: none;
    padding: 0;
    margin: auto 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.audience-list li {
    font-size: 13px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.audience-list li svg {
    color: #16a34a;
    flex-shrink: 0;
}

/* 3 ПРОСТЫХ ШАГА */
.workflow-section {
    padding: 70px 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.workflow-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1080px;
    margin: 44px auto 0;
    position: relative;
}

@media (max-width: 850px) {
    .workflow-steps {
        grid-template-columns: 1fr;
    }
}

.workflow-step {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: all 0.25s ease;
}

.workflow-step:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.workflow-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 18px;
    font-weight: 800;
    border-radius: 50%;
    margin-bottom: 18px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.workflow-step h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--text);
}

.workflow-step p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* СЦЕНАРИИ ПРИМЕНЕНИЯ */
.usecases-section {
    padding: 80px 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    position: relative;
}

.usecases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1180px;
    margin: 48px auto 0;
    text-align: left;
    align-items: stretch;
}

@media (max-width: 950px) {
    .usecases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 550px) {
    .usecases-grid {
        grid-template-columns: 1fr;
    }
}

.usecase-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    transition: all 0.2s ease;
}

.usecase-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.usecase-badge {
    font-size: 28px;
    margin-bottom: 12px;
}

.usecase-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text);
}

.usecase-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}



/* ============================================================
   ADMIN CMS & ARTICLES MANAGEMENT
   ============================================================ */
.admin-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.admin-tabs-nav {
    display: flex;
    gap: 12px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 28px;
    padding-bottom: 4px;
    overflow-x: auto;
}

.admin-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    margin-bottom: -6px;
    white-space: nowrap;
}

.admin-tab-btn:hover {
    color: var(--text);
    background: var(--bg-soft);
}

.admin-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--primary-light);
    font-weight: 700;
}

[data-theme="dark"] .admin-tab-btn.active {
    background: rgba(59, 130, 246, 0.15);
}

.admin-tab-content {
    display: none;
    animation: fadeInTab 0.2s ease-in-out;
}

.admin-tab-content.active {
    display: block;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-table-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-category-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.btn-delete-small {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--danger);
    cursor: pointer;
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    transition: all 0.15s ease;
}

.btn-delete-small:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--danger);
}

.articles-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

/* --- Страница редактора статей --- */
.admin-editor-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 20px 80px;
}

.editor-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.editor-page-badge {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.editor-main-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.editor-meta-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.editor-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.editor-title-input {
    width: 100%;
    font-size: 20px;
    font-weight: 700;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-soft);
    color: var(--text);
    transition: all 0.2s ease;
}

.editor-title-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.editor-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .editor-meta-grid {
        grid-template-columns: 1fr;
    }
}

.editor-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    color: var(--text);
    font-size: 14px;
    transition: all 0.2s ease;
}

.editor-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.category-chip {
    padding: 5px 12px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.category-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.category-chip.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.editor-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.editor-hint code {
    background: var(--bg-soft);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--primary);
}

/* Рабочая зона редактора */
.editor-workspace-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 6px;
}

.toolbar-spacer {
    flex: 1;
}

.tb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    min-height: 34px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tb-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

[data-theme="dark"] .tb-btn:hover {
    background: rgba(59, 130, 246, 0.18);
}

.tb-upload-btn {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(124, 58, 237, 0.08));
    border-color: var(--primary);
    color: var(--primary);
}

.editor-split-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 550px;
}

@media (max-width: 900px) {
    .editor-split-view {
        grid-template-columns: 1fr;
    }
}

.editor-split-view.editor-only {
    grid-template-columns: 1fr;
}

.editor-split-view.editor-only .editor-pane-preview {
    display: none;
}

.editor-split-view.preview-only {
    grid-template-columns: 1fr;
}

.editor-split-view.preview-only .editor-pane-input {
    display: none;
}

.editor-pane {
    display: flex;
    flex-direction: column;
}

.editor-pane-input {
    border-right: 1px solid var(--border);
}

@media (max-width: 900px) {
    .editor-pane-input {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

.pane-header {
    padding: 10px 18px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.editor-textarea {
    width: 100%;
    flex: 1;
    min-height: 500px;
    padding: 20px;
    border: none;
    outline: none;
    background: var(--bg-elevated);
    color: var(--text);
    font-family: 'SF Mono', Consolas, Monaco, monospace;
    font-size: 14px;
    line-height: 1.65;
    resize: vertical;
}

.article-preview-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    max-height: 800px;
    background: var(--bg-elevated);
}

.editor-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.footer-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-delete-article {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: var(--danger);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete-article:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}


/* ============================================================
   COLOR CORRECTION HINTS & SWITCHES
   ============================================================ */
/* Переключатель группы настроек */
.adjust-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.adjust-header-right {
    display: flex;
    align-items: center;
}

.adjust-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 0;
}

.group-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.group-switch input[type="checkbox"] {
    display: none;
}

.group-switch-slider {
    position: relative;
    width: 46px;
    height: 26px;
    background: var(--border);
    border-radius: 20px;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.group-switch-slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.group-switch input:checked + .group-switch-slider {
    background: var(--primary);
}

.group-switch input:checked + .group-switch-slider::before {
    transform: translateX(20px);
}

.group-switch-status {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    min-width: 32px;
}

.group-switch-status.off {
    color: var(--text-muted);
}

/* Отключённый блок цветокоррекции */
.adjust-block.is-disabled {
    opacity: 0.6;
    border-color: var(--border-light);
}

.adjust-block.is-disabled:hover {
    border-color: var(--border);
}

/* Панель подсказок */
.hints-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.hints-toolbar-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hints-info-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.hints-info-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-toggle-all-hints {
    padding: 8px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-toggle-all-hints:hover,
.btn-toggle-all-hints.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* Кнопка ⓘ у параметров */
.slider-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hint-trigger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1;
}

.hint-trigger-btn:hover,
.hint-trigger-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Блок подсказки к параметру */
.adjust-param-hint {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(37, 99, 235, 0.07);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text);
    transition: all 0.2s ease;
}

[data-theme="dark"] .adjust-param-hint {
    background: rgba(59, 130, 246, 0.12);
    color: #e2e8f0;
}

/* Наведение на десктопе vs мобильные */
@media (hover: hover) and (min-width: 769px) {
    .adjust-param-hint {
        opacity: 0.75;
    }
    .slider-field-row:hover .adjust-param-hint {
        opacity: 1;
        background: rgba(37, 99, 235, 0.12);
    }
}

@media (max-width: 768px) {
    .adjust-param-hint {
        display: none;
    }
    .adjust-param-hint.show-always {
        display: block;
        animation: fadeInTab 0.2s ease;
    }
}

.adjust-param-hint.show-always {
    display: block !important;
    opacity: 1 !important;
}

/* Улучшение контраста светлой темы */
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="number"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #090d16;
}

[data-theme="light"] .hero-card,
[data-theme="light"] .tool-card,
[data-theme="light"] .pricing-card,
[data-theme="light"] .adjust-block,
[data-theme="light"] .settings-block,
[data-theme="light"] .bot-panel {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .tool-card:hover,
[data-theme="light"] .adjust-block:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.12), 0 4px 10px -2px rgba(37, 99, 235, 0.06);
}


/* ============================================================
   AI ICON GENERATOR STUDIO (Expanded Workbench)
   ============================================================ */
.bot-icons-studio {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 24px 60px;
}

.bot-icons-studio .tool-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-icons-studio .tool-badge-new {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.icons-studio-layout {
    display: grid;
    grid-template-columns: 1fr 460px;
    gap: 32px;
    align-items: start;
}

@media (max-width: 990px) {
    .icons-studio-layout {
        grid-template-columns: 1fr;
    }
}

.icons-studio-workspace {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.icons-studio-showcase {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 84px;
}

@media (max-width: 990px) {
    .icons-studio-showcase {
        position: static;
    }
}

/* Карточки студии */
.icon-studio-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.icon-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.icon-card-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
}

.icon-card-hint {
    font-size: 12px;
    color: var(--text-muted);
}

/* Поле ввода запроса */
.icon-prompt-box {
    margin-bottom: 10px;
}

.icon-prompt-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--bg-soft);
    color: var(--text);
    transition: all 0.2s ease;
}

.icon-prompt-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.icon-prompt-helper {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.45;
    margin-top: 6px;
    margin-bottom: 12px;
}

/* Быстрые чипсы */
.icon-quick-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

.quick-prompt-btn {
    padding: 6px 13px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 18px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s ease;
}

.quick-prompt-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
}

[data-theme="dark"] .quick-prompt-btn:hover {
    background: rgba(59, 130, 246, 0.15);
}

/* Сетка стилей иконки (простые формы) */
.icon-styles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 640px) {
    .icon-styles-grid {
        grid-template-columns: 1fr;
    }
}

.icon-style-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-soft);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.18s ease;
}

.icon-style-card:hover {
    border-color: var(--primary);
    background: var(--bg-elevated);
    transform: translateY(-1px);
}

.icon-style-card.active {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    box-shadow: 0 0 0 1px var(--primary);
}

[data-theme="dark"] .icon-style-card.active {
    background: rgba(59, 130, 246, 0.16);
}

.icon-style-ico {
    font-size: 26px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}

.icon-style-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.icon-style-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
}

.icon-style-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.35;
}

.icon-style-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
}

/* Форма и цвета */
.icon-settings-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 640px) {
    .icon-settings-two-col {
        grid-template-columns: 1fr;
    }
}

.icon-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.icon-chip-btn {
    padding: 7px 13px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s ease;
}

.icon-chip-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.icon-chip-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

/* Панель выбора своего цвета */
.custom-color-panel {
    margin-top: 14px;
    padding: 14px 16px;
    background: var(--bg-soft);
    border: 1.5px dashed var(--border);
    border-radius: 12px;
    animation: fadeInTab 0.2s ease;
}

.custom-color-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    display: block;
    margin-bottom: 10px;
}

.custom-color-control {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.custom-color-input {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    background: none;
    flex-shrink: 0;
}

.custom-color-hex {
    width: 100px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: monospace;
    font-weight: 700;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg-elevated);
    color: var(--text);
    text-transform: uppercase;
}

.custom-color-swatches {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-left: auto;
}

.swatch-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: transform 0.15s ease;
    padding: 0;
}

.swatch-btn:hover {
    transform: scale(1.22);
}

/* Настройки экспорта */
.icon-export-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.icon-toggle-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    user-select: none;
    padding: 12px 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.icon-toggle-feature input[type="checkbox"] {
    display: none;
}

.icon-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.icon-toggle-switch::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.icon-toggle-feature input:checked + .icon-toggle-switch {
    background: var(--primary);
}

.icon-toggle-feature input:checked + .icon-toggle-switch::before {
    transform: translateX(20px);
}

.icon-toggle-text {
    display: flex;
    flex-direction: column;
}

.icon-toggle-text b {
    font-size: 13.5px;
    color: var(--text);
}

.icon-toggle-text small {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

.icon-size-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.icon-size-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.icon-size-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
}

.icon-active-size-badge {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary, #2563eb);
    background: rgba(37, 99, 235, 0.09);
    border: 1px solid rgba(37, 99, 235, 0.22);
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.3px;
}

.icon-size-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.icon-size-btn {
    padding: 7px 13px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-size-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.icon-size-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}

.icon-size-custom-btn {
    background: rgba(37, 99, 235, 0.04);
    border-style: dashed;
}

/* Панель произвольных размеров */
.icon-custom-size-panel {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg-soft, rgba(0, 0, 0, 0.02));
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 4px;
    animation: fadeInCustom 0.2s ease;
}

.icon-custom-size-panel.visible {
    display: flex;
}

@keyframes fadeInCustom {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.custom-dim-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.custom-dim-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.custom-dim-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.custom-dim-input {
    width: 100%;
    padding: 8px 30px 8px 12px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    outline: none;
    transition: all 0.2s ease;
    -moz-appearance: textfield;
}

.custom-dim-input::-webkit-outer-spin-button,
.custom-dim-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.custom-dim-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.custom-dim-unit {
    position: absolute;
    right: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    pointer-events: none;
}

.btn-aspect-lock {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 17px;
}

.btn-aspect-lock:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-aspect-lock.active {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
}

.btn-aspect-lock .lock-label {
    font-size: 10px;
    font-weight: 700;
}

/* Главная кнопка генерации */
.btn-generate-icon-main {
    width: 100%;
    padding: 17px 24px;
    font-size: 16.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
    transition: all 0.2s ease;
}

.btn-generate-icon-main:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(37, 99, 235, 0.45);
}

.btn-generate-icon-main:active {
    transform: translateY(0);
}

.btn-generate-icon-main:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ПРАВАЯ КОЛОНКА: СЦЕНА ПРЕДПРОСМОТРА */
.icon-stage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.bg-switcher {
    display: flex;
    align-items: center;
    gap: 5px;
}

.bg-switch-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-soft);
    cursor: pointer;
    font-size: 13.5px;
    transition: all 0.15s ease;
}

.bg-switch-btn.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

/* Квадратный холст */
.icon-canvas-stage {
    width: 100%;
    aspect-ratio: 1;
    max-width: 410px;
    margin: 0 auto;
    border-radius: 18px;
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: background 0.25s ease;
}

.checker-bg {
    background-color: #f8fafc;
    background-image: 
        linear-gradient(45deg, #e2e8f0 25%, transparent 25%), 
        linear-gradient(-45deg, #e2e8f0 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #e2e8f0 75%), 
        linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

[data-theme="dark"] .checker-bg {
    background-color: #0b1120;
    background-image: 
        linear-gradient(45deg, #1e293b 25%, transparent 25%), 
        linear-gradient(-45deg, #1e293b 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #1e293b 75%), 
        linear-gradient(-45deg, transparent 75%, #1e293b 75%);
    background-size: 16px 16px;
}

.white-bg {
    background: #ffffff !important;
}

.dark-bg {
    background: #0f172a !important;
}

/* Пустое состояние */
.icon-idle-placeholder {
    text-align: center;
    padding: 28px;
    color: var(--text-muted);
}

.icon-idle-glyph {
    font-size: 64px;
    margin-bottom: 14px;
    display: inline-block;
    animation: iconBounce 3s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.icon-idle-placeholder h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 6px;
}

.icon-idle-placeholder p {
    font-size: 12.5px;
    margin: 0;
    line-height: 1.45;
}

/* Отображение готовой иконки */
.icon-result-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    animation: zoomInIcon 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomInIcon {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.icon-result-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 22px rgba(0,0,0,0.18));
    transition: transform 0.2s ease;
}

.icon-result-img:hover {
    transform: scale(1.03);
}

/* Прогресс-бар */
.icon-progress-container {
    margin-top: 14px;
}

.icon-progress-bar {
    height: 6px;
    background: var(--bg-soft);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.icon-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    width: 0%;
    transition: width 0.4s ease;
}

.icon-progress-status {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

/* Кнопки действий */
.icon-stage-actions {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.icon-stage-btn-row {
    display: flex;
    gap: 8px;
}

.btn-stage-download {
    flex: 1;
    padding: 13px 18px;
    font-weight: 700;
    font-size: 14.5px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    transition: all 0.15s ease;
}

.btn-stage-download:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-stage-secondary {
    padding: 12px 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.btn-stage-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Карточка истории */
.icon-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.icon-history-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.icon-history-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.15s ease;
}

.icon-history-item:hover {
    border-color: var(--primary);
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.icon-history-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: filter 0.25s ease;
}

[data-theme="dark"] .icon-history-item:not([data-is-3d="1"]) img {
    filter: invert(1) brightness(1.2);
}

.icon-history-item[data-is-3d="1"] img {
    filter: none !important;
}

[data-theme="light"] .icon-history-item img {
    filter: none;
}

.icon-history-dl {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.15s ease;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.icon-history-item:hover .icon-history-dl {
    opacity: 1;
}

/* Toast уведомление */
.icon-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #0f172a;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* ============================================================
   ГОТОВЫЕ РЕШЕНИЯ (FEATURED TOOLS) В /bot
   ============================================================ */
.featured-divider {
    margin: 40px 0 20px;
}

.featured-divider-badge {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    padding: 7px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(37,99,235,0.35);
    letter-spacing: 0.3px;
}

.bot-featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .bot-featured-grid {
        grid-template-columns: 1fr;
    }
}

.featured-tool-card {
    position: relative;
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    background: var(--bg-secondary);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-gen-card {
    border-color: rgba(124, 58, 237, 0.35);
    background: linear-gradient(145deg, var(--bg-secondary) 0%, rgba(124, 58, 237, 0.06) 100%);
}

.featured-gen-card:hover {
    border-color: #7c3aed;
    box-shadow: 0 12px 30px -5px rgba(124, 58, 237, 0.25);
    transform: translateY(-4px);
}

.featured-icon-card {
    border-color: rgba(37, 99, 235, 0.35);
    background: linear-gradient(145deg, var(--bg-secondary) 0%, rgba(37, 99, 235, 0.06) 100%);
}

.featured-icon-card:hover {
    border-color: #2563eb;
    box-shadow: 0 12px 30px -5px rgba(37, 99, 235, 0.25);
    transform: translateY(-4px);
}

.featured-card-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 14px;
    letter-spacing: 0.4px;
}

.featured-gen-card .featured-card-badge {
    background: rgba(124, 58, 237, 0.15);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.featured-icon-card .featured-card-badge {
    background: rgba(37, 99, 235, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.featured-tag {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
}


/* ============================================================
   КНОПКИ В АДМИН-ПАНЕЛИ (ПРОСМОТР / РЕДАКТИРОВАНИЕ)
   ============================================================ */
.admin-article-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.btn-admin-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-admin-view {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
    border: 1.5px solid rgba(37, 99, 235, 0.4);
}

.btn-admin-view:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

[data-theme="dark"] .btn-admin-view {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.5);
}

[data-theme="dark"] .btn-admin-view:hover {
    background: #3b82f6;
    color: #ffffff;
}

.btn-admin-edit {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1.5px solid rgba(16, 185, 129, 0.4);
}

.btn-admin-edit:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .btn-admin-edit {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border-color: rgba(52, 211, 153, 0.5);
}

[data-theme="dark"] .btn-admin-edit:hover {
    background: #10b981;
    color: #ffffff;
}

.btn-admin-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1.5px solid rgba(239, 68, 68, 0.35);
    padding: 7px 10px;
}

.btn-admin-delete:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}


/* ============================================================
   ОБЛОЖКА В КАРТОЧКЕ СТАТЬИ (/articles)
   ============================================================ */
.article-card {
    flex-direction: column !important;
}

.article-card-cover {
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
}

.article-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card-cover img {
    transform: scale(1.04);
}


/* ==================== СТАТЬИ: СКРУГЛЕНИЕ КАРТИНОК И ТЕНИ ==================== */
.article-page img,
.article-body img,
.article-content img {
    border-radius: 16px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 24px auto !important;
    border: 1px solid var(--border) !important;
}

/* ==================== АНИМАЦИИ И СТИЛИ ЧАТА ПОДДЕРЖКИ ==================== */
#live-support-btn:hover {
    transform: scale(1.08) !important;
}
#live-support-box {
    animation: supportFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
@keyframes supportFadeIn {
    from { opacity: 0; transform: translateY(14px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==============================================================================
   DESVI 2.0 LUXURY DESIGN SYSTEM — ГЛОБАЛЬНЫЙ РЕДИЗАЙН ВСЕХ СТРАНИЦ
   ============================================================================== */

/* --- 1. ПЛАВНЫЙ СКРОЛЛБАР --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* --- 2. МИКРО-АНИМАЦИИ И ПЕРЕХОДЫ --- */
button, a, input, select, textarea, .tool-card, .pricing-card, .feature-card, .audience-card, .article-card {
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- 3. КНОПКИ — ПРЕМИУМ КЛАСС --- */
.btn-hero-primary,
.btn-primary,
.btn-pro {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    font-family: var(--font-display) !important;
    font-weight: 700 !important;
    border-radius: 14px !important;
    padding: 14px 30px !important;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    position: relative !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.btn-hero-primary::after,
.btn-primary::after,
.btn-pro::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.btn-hero-primary:hover::after,
.btn-primary:hover::after,
.btn-pro:hover::after {
    left: 140%;
}

.btn-hero-primary:hover,
.btn-primary:hover,
.btn-pro:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 28px rgba(79, 70, 229, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
    filter: brightness(1.05);
}

.btn-hero-primary:active,
.btn-primary:active,
.btn-pro:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3) !important;
}

.btn-hero-secondary,
.btn-secondary {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    font-family: var(--font-display) !important;
    font-weight: 600 !important;
    border-radius: 14px !important;
    padding: 14px 28px !important;
    box-shadow: var(--shadow-sm) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.btn-hero-secondary:hover,
.btn-secondary:hover {
    background: var(--bg-soft) !important;
    border-color: var(--border-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow) !important;
    color: var(--primary) !important;
}

/* --- 4. HERO SECTION — СТУДИЙНЫЙ ЛЮКС --- */
.hero-new {
    padding: 70px 0 50px !important;
    position: relative;
}

.hero-badge {
    background: rgba(99, 102, 241, 0.08) !important;
    border: 1px solid rgba(99, 102, 241, 0.22) !important;
    color: var(--text) !important;
    padding: 8px 18px !important;
    border-radius: 999px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 24px !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08) !important;
}

.hero-badge-dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
    animation: heroPulse 2s infinite !important;
}

.hero-new {
    padding: 85px 0 60px !important;
}

.hero-new-title {
    font-family: var(--font-display) !important;
    font-size: 62px !important;
    font-weight: 800 !important;
    letter-spacing: -0.035em !important;
    line-height: 1.1 !important;
    margin-bottom: 24px !important;
}

@media (max-width: 900px) {
    .hero-new-title { font-size: 42px !important; }
}

.hero-new-highlight {
    background: var(--primary-gradient) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    display: inline-block;
}

.hero-new-subtitle {
    font-size: 19px !important;
    line-height: 1.7 !important;
    color: var(--text-muted) !important;
    max-width: 620px !important;
    margin-bottom: 38px !important;
}

/* Маркетплейс трек доверия */
.hero-trust-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.hero-trust-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-light);
}

.hero-trust-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

.trust-pill-wb { border-color: rgba(203, 17, 171, 0.3); color: #cb11ab; }
.trust-pill-ozon { border-color: rgba(0, 91, 255, 0.3); color: #005bff; }
.trust-pill-ym { border-color: rgba(252, 63, 29, 0.3); color: #fc3f1d; }
.trust-pill-mm { border-color: rgba(124, 58, 237, 0.3); color: #7c3aed; }

/* Мокап в Hero */
.hero-mockup {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-2xl) !important;
    box-shadow: 0 30px 80px -15px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
    backdrop-filter: blur(20px) !important;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease !important;
}

[data-theme="dark"] .hero-mockup {
    box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.7), 0 0 40px -10px rgba(99, 102, 241, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.08) inset !important;
}

.hero-mockup:hover {
    transform: rotate(0deg) translateY(-6px) !important;
}

.hero-float-card {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    box-shadow: 0 18px 45px -8px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.12) inset !important;
    padding: 12px 18px !important;
}

[data-theme="dark"] .hero-float-card {
    box-shadow: 0 18px 45px -8px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08) inset !important;
}

/* --- 5. BENTO КАРТОЧКИ ИНСТРУМЕНТОВ (.tool-card) --- */
.tool-card {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-2xl) !important;
    padding: 30px 26px !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: var(--shadow) !important;
    display: flex;
    flex-direction: column !important;
    text-decoration: none !important;
}

.tool-card.is-hidden {
    display: none !important;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.tool-card:hover {
    border-color: var(--border-hover) !important;
    transform: translateY(-5px) !important;
    box-shadow: var(--card-hover-shadow) !important;
}

.tool-card-icon {
    width: 60px !important;
    height: 60px !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 22px !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.tool-card:hover .tool-card-icon {
    transform: scale(1.08) rotate(-2deg) !important;
}

.tool-card h2 {
    font-family: var(--font-display) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 10px !important;
    color: var(--text) !important;
}

.tool-card p {
    color: var(--text-muted) !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 22px !important;
    flex: 1 !important;
}

.tool-card-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-top: 16px !important;
    border-top: 1px solid var(--border-light) !important;
}

.tool-tag {
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    background: var(--bg-soft) !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border) !important;
}

.tool-arrow {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
}

.tool-card:hover .tool-arrow svg {
    transform: translateX(4px) !important;
}

/* --- 6. ТАРИФЫ И КАРТОЧКИ ЦЕН (.pricing-card) --- */
.pricing-card {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-2xl) !important;
    padding: 36px 26px !important;
    position: relative !important;
    box-shadow: var(--shadow) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.pricing-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: var(--shadow-lg) !important;
}

.pricing-card-pro {
    border: 2px solid rgba(245, 158, 11, 0.5) !important;
    background: linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box,
                linear-gradient(135deg, #f59e0b, #d97706, #fbbf24) border-box !important;
    box-shadow: 0 16px 45px -8px rgba(245, 158, 11, 0.22) !important;
    transform: scale(1.02);
}

.pricing-card-pro:hover {
    transform: scale(1.03) translateY(-6px) !important;
    box-shadow: 0 24px 60px -10px rgba(245, 158, 11, 0.38) !important;
}

.pricing-card-pro .price {
    color: #f59e0b !important;
}

.pricing-card-pro .btn-pro {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3) !important;
}

.pricing-card-pro .btn-pro:hover {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    box-shadow: 0 12px 25px rgba(245, 158, 11, 0.45) !important;
}

.pricing-card-pro .popular-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45) !important;
}

.pricing-card-business {
    border: 2px solid rgba(124, 58, 237, 0.45) !important;
    background: linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box,
                linear-gradient(135deg, #7c3aed, #9333ea, #c084fc) border-box !important;
    box-shadow: 0 16px 45px -8px rgba(124, 58, 237, 0.22) !important;
}

.pricing-card-business:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 24px 60px -10px rgba(124, 58, 237, 0.36) !important;
}

.pricing-card-business .price {
    color: #9333ea !important;
}

.pricing-card-business .btn-business {
    background: linear-gradient(135deg, #7c3aed, #9333ea) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3) !important;
}

.pricing-card-business .btn-business:hover {
    background: linear-gradient(135deg, #6d28d9, #7c3aed) !important;
    box-shadow: 0 12px 25px rgba(124, 58, 237, 0.45) !important;
}

.pricing-card-business .business-badge,
.pricing-card-business .popular-badge {
    background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.45) !important;
}

.popular-badge,
.current-badge,
.business-badge {
    position: absolute !important;
    top: -12px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-family: var(--font-display) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 6px 18px !important;
    border-radius: 999px !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    z-index: 10 !important;
    pointer-events: none !important;
    transition: box-shadow 0.25s ease !important;
}

.pricing-card .price {
    font-family: var(--font-display) !important;
    font-size: 42px !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    margin-bottom: 24px !important;
}

.pricing-card .features li {
    font-size: 14px !important;
    padding: 9px 0 9px 28px !important;
    line-height: 1.5 !important;
}

.pricing-card .features li::before {
    content: '✓' !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: var(--success) !important;
}

/* --- 7. КАРТОЧКИ АУДИТОРИИ, СЦЕНАРИЕВ И СРАВНЕНИЯ --- */
.audience-card,
.feature-card,
.usecase-card {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-2xl) !important;
    padding: 32px 26px !important;
    box-shadow: var(--shadow) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative;
    overflow: hidden;
}

.saving-card {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-2xl) !important;
    padding: 36px 26px 32px !important;
    box-shadow: var(--shadow) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
    overflow: visible !important;
}

.saving-badge {
    position: absolute !important;
    top: -14px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
    color: #ffffff !important;
    font-family: var(--font-display) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 6px 18px !important;
    border-radius: 999px !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    z-index: 20 !important;
    display: inline-block !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5) !important;
}

.audience-card:hover,
.feature-card:hover,
.usecase-card:hover,
.saving-card:hover {
    transform: translateY(-4px) !important;
    border-color: var(--border-hover) !important;
    box-shadow: var(--card-hover-shadow) !important;
}

.saving-new {
    border: 2px solid transparent !important;
    background: linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box,
                var(--primary-gradient) border-box !important;
    box-shadow: 0 16px 45px -8px rgba(99, 102, 241, 0.2) !important;
}

/* --- 8. КАРТОЧКИ СТАТЕЙ (.article-card) --- */
.article-card {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-2xl) !important;
    box-shadow: var(--shadow) !important;
    overflow: hidden !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.article-card:hover {
    transform: translateY(-5px) !important;
    border-color: var(--border-hover) !important;
    box-shadow: var(--card-hover-shadow) !important;
}

.article-card-title {
    font-family: var(--font-display) !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.35 !important;
    color: var(--text) !important;
}

/* --- 9. ЛИЧНЫЙ КАБИНЕТ И АВТОРИЗАЦИЯ (.profile-card, .auth-page) --- */
.profile-header-card,
.profile-card,
.auth-form {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-2xl) !important;
    box-shadow: var(--shadow) !important;
}

.auth-page {
    max-width: 440px !important;
    margin: 48px auto 64px !important;
    padding: 0 16px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: auto !important;
    display: block !important;
}

.auth-form {
    padding: 34px 28px !important;
    margin-top: 24px !important;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100% !important;
    padding: 13px 16px !important;
    border-radius: 12px !important;
    border: 1px solid var(--border) !important;
    background: var(--bg) !important;
    color: var(--text) !important;
    font-size: 15px !important;
    font-family: inherit !important;
    transition: all 0.2s ease !important;
}

.auth-form input:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
    background: var(--bg-elevated) !important;
}

.btn-edit-profile {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 9px 18px !important;
    border-radius: 10px !important;
    background: var(--bg-soft) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    font-weight: 600 !important;
    font-size: 13.5px !important;
    text-decoration: none !important;
}

.btn-edit-profile:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3) !important;
}

/* --- 10. ФИНАЛЬНЫЙ CTA НА ГЛАВНОЙ (.final-cta-new) --- */
.final-cta-new {
    margin: 80px 0 40px !important;
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-2xl) !important;
    box-shadow: var(--shadow-lg) !important;
    position: relative;
    overflow: hidden;
}

.final-cta-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 100% 50%, rgba(99, 102, 241, 0.15), transparent 60%),
                radial-gradient(circle at 0% 50%, rgba(6, 182, 212, 0.10), transparent 50%);
    pointer-events: none;
}

.final-cta-inner {
    padding: 60px 50px !important;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .final-cta-inner { padding: 40px 24px !important; }
}

.final-cta-content h2 {
    font-size: 40px !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    margin-bottom: 16px !important;
}

/* --- 11. КОМПАКТНЫЙ СТИЛЬНЫЙ ФУТЕР --- */
.site-footer {
    background: var(--bg-soft) !important;
    border-top: 1px solid var(--border) !important;
    margin-top: 50px !important;
    padding: 34px 24px 20px !important;
}

.footer-inner-compact {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.footer-brand-compact {
    max-width: 320px;
}

.footer-brand-compact .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.footer-desc-compact {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
}

.footer-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

.footer-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.footer-nav-compact {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
}

.footer-nav-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-group-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-light);
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 8px 24px;
}

.footer-links-grid a,
.footer-links-list a {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-links-grid a:hover,
.footer-links-list a:hover {
    color: var(--primary);
}

.footer-links-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-mail-pill {
    color: var(--primary) !important;
    font-weight: 700 !important;
}

.footer-bottom-compact {
    max-width: 1240px;
    margin: 16px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-light);
}

.footer-trust-compact {
    font-size: 11.5px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .footer-inner-compact {
        flex-direction: column;
        gap: 28px;
    }
    .footer-nav-compact {
        justify-content: flex-start;
        gap: 32px;
    }
    .footer-links-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom-compact {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --- 12. КАТЕГОРИИ ИНСТРУМЕНТОВ БОТА (НОРМАЛЬНЫЕ КНОПКИ) --- */
.bot-toolbar-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.bot-category-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: var(--bg-soft);
    padding: 6px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tool-tab-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 16px !important;
    border-radius: 11px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: var(--text-muted) !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    user-select: none !important;
    white-space: nowrap !important;
}

.tool-tab-btn:hover {
    background: var(--bg-elevated) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
    transform: translateY(-1px) !important;
    box-shadow: var(--shadow-sm) !important;
}

.tool-tab-btn.active {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-color: transparent !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35) !important;
    transform: translateY(-1px) !important;
}

.tool-tab-btn .tab-btn-icon {
    font-size: 15px;
    line-height: 1;
}

.tool-tab-btn .tab-btn-text {
    font-size: 13.5px;
    letter-spacing: -0.01em;
}

.bot-search-box {
    position: relative;
    min-width: 260px;
    flex: 1;
    max-width: 320px;
}

.bot-search-box input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.bot-search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.bot-search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

/* --- 13. ПЛАШКА ЭКОНОМИИ И ТАРИФЫ --- */
.pricing-toggle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 28px 0 36px;
}

.pricing-toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.pricing-toggle-pill .toggle-btn {
    padding: 9px 24px;
    border-radius: 999px;
    border: none;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pricing-toggle-pill .toggle-btn.active {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
}

.toggle-discount-chip {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 999px;
    letter-spacing: 0.3px;
}

.pricing-annual-callout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #10B981;
    font-size: 13px;
    font-weight: 700;
}

/* КРАСИВАЯ ПЛАШКА ЭКОНОМИИ */
.pricing-card-price-wrap {
    margin: 16px 0 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.pricing-save-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10B981;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
    margin-top: 8px;
    animation: savePillGlow 2.5s infinite ease-in-out;
}

@keyframes savePillGlow {
    0%, 100% { box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2); border-color: rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4); border-color: rgba(16, 185, 129, 0.7); }
}

.save-pill-icon {
    font-size: 13px;
    line-height: 1;
}

.save-pill-text {
    font-size: 12px;
    font-weight: 800;
}

/* --- 14. ЛИЧНЫЙ КАБИНЕТ (BENTO GRID) --- */
.profile-bento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

@media (max-width: 860px) {
    .profile-bento-grid { grid-template-columns: 1fr; }
}

.profile-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.profile-tariff-chip .badge-free,
.profile-tariff-chip .badge-base,
.profile-tariff-chip .badge-pro,
.profile-tariff-chip .badge-business {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.profile-stat-box {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 12px;
}

.stat-box-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
}

.stat-box-label {
    color: var(--text-muted);
    font-weight: 600;
}

.stat-box-value {
    color: var(--text);
    font-weight: 700;
}

.highlight-num {
    color: var(--primary);
    font-size: 15px;
}

.stat-progress-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-top: 8px;
}

.stat-progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.profile-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: #10B981;
    background: rgba(16, 185, 129, 0.1);
    padding: 3px 10px;
    border-radius: 999px;
    margin-top: 6px;
}

.profile-role-badge .role-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10B981;
}

.btn-logout-pill {
    padding: 10px 22px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.08);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-logout-pill:hover {
    background: #EF4444;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

/* --- 15. УЛУЧШЕНИЯ БЛОКОВ ГЛАВНОЙ, СТАТЕЙ И ТАРИФОВ --- */
.workflow-step {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-2xl) !important;
    box-shadow: var(--shadow) !important;
    padding: 36px 26px !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.workflow-step:hover {
    transform: translateY(-4px) !important;
    border-color: var(--border-hover) !important;
    box-shadow: var(--card-hover-shadow) !important;
}

.faq-item {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    margin-bottom: 14px !important;
    box-shadow: var(--shadow-sm) !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
}

.faq-item summary {
    padding: 20px 24px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    cursor: pointer !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.faq-item[open] {
    border-color: var(--primary) !important;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.12) !important;
}

.faq-answer {
    padding: 0 24px 22px !important;
    font-size: 14.5px !important;
    line-height: 1.65 !important;
    color: var(--text-muted) !important;
}

.hero-stats {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
}

@media (max-width: 768px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.hero-stat {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: 18px !important;
    padding: 22px 18px !important;
    box-shadow: var(--shadow-sm) !important;
    transition: transform 0.2s ease, border-color 0.2s ease !important;
}

.hero-stat:hover {
    transform: translateY(-2px) !important;
    border-color: var(--border-hover) !important;
}

.pricing-who-card,
.pricing-roi-card {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-2xl) !important;
    box-shadow: var(--shadow) !important;
    padding: 28px 24px !important;
}

.pricing-roi-card-accent {
    border: 2px solid transparent !important;
    background: linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box,
                var(--primary-gradient) border-box !important;
    box-shadow: 0 16px 45px -8px rgba(99, 102, 241, 0.2) !important;
}

.compare-wrap {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-2xl) !important;
    box-shadow: var(--shadow) !important;
    overflow: hidden !important;
}

.articles-toolbar {
    background: var(--bg-soft) !important;
    border: 1px solid var(--border) !important;
    border-radius: 20px !important;
    padding: 14px 18px !important;
    box-shadow: var(--shadow-sm) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 14px !important;
}

.articles-filters {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.filter-btn {
    padding: 7px 16px !important;
    border-radius: 10px !important;
    border: 1px solid transparent !important;
    background: var(--bg-elevated) !important;
    color: var(--text-muted) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.filter-btn:hover {
    color: var(--text) !important;
    border-color: var(--border) !important;
    transform: translateY(-1px) !important;
}

.filter-btn.active {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-color: transparent !important;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.3) !important;
}

/* ============================================================
   16. СИСТЕМА КРУТЫХ АНИМАЦИЙ DESVI (ГЛАВНАЯ, ТАРИФЫ, О НАС, СТАТЬИ)
   ============================================================ */

/* 1. БАЗОВАЯ СИСТЕМА ПРОЯВЛЕНИЯ ГЛАВ ПРИ СКРОЛЛЕ */
.reveal-on-scroll {
    opacity: 0;
    will-change: transform, opacity, filter;
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--stagger-idx, 0) * 0.08s);
}

/* Обратный каскад задержек при скролле вверх */
body.scrolling-up .reveal-on-scroll {
    transition-delay: calc((5 - var(--stagger-idx, 0)) * 0.07s) !important;
}

/* Fallback для общих элементов */
.reveal-on-scroll {
    transform: translateY(28px);
}
.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    filter: blur(0) !important;
}

/* ============================================================
   УНИКАЛЬНЫЕ АНИМАЦИИ ВХОДА ДЛЯ КАЖДОЙ ГЛАВЫ (БЛОКА) НА ВСЕХ СТРАНИЦАХ
   ============================================================ */

/* ------------------------------------------------------------
   ГЛАВА 1 (HERO): ПРОСТРАНСТВЕННЫЙ ВЗЛЁТ (3D PERSPECTIVE BLOOM)
   ------------------------------------------------------------ */
.hero-new.reveal-on-scroll {
    opacity: 0;
    transform: perspective(1000px) rotateX(6deg) translateY(32px) scale(0.97) !important;
    filter: blur(5px) !important;
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.9s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.hero-new.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: perspective(1000px) rotateX(0deg) translateY(0) scale(1) !important;
    filter: blur(0) !important;
}

/* ------------------------------------------------------------
   ГЛАВА 2 (СТАТИСТИКА): BENTO SPRING-POP & СВЕТОВОЙ ЛУЧ
   ------------------------------------------------------------ */
.stats-block.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px) !important;
    transition: opacity 0.6s ease, transform 0.6s ease !important;
}
.stats-block.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.hero-stat.reveal-on-scroll {
    opacity: 0;
    transform: scale(0.72) translateY(28px) !important;
    transition: opacity 0.65s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    transition-delay: calc(var(--stagger-idx, 0) * 0.12s) !important;
}
.hero-stat.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
}

/* Падение бейджа внутри карточки статистики */
.hero-stat.reveal-on-scroll .hero-stat-badge {
    opacity: 0;
    transform: translateY(-18px) scale(0.5);
    transition: opacity 0.45s ease 0.18s, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.18s;
}
.hero-stat.reveal-on-scroll.is-revealed .hero-stat-badge {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Световой луч (Shimmer sweep) по карточке при появлении */
.hero-stat::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
}
.hero-stat.is-revealed::after {
    animation: statShimmerSweep 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}
@keyframes statShimmerSweep {
    0% { left: -120%; opacity: 0; }
    40% { opacity: 1; }
    100% { left: 220%; opacity: 0; }
}

/* ------------------------------------------------------------
   ГЛАВА 3 (АУДИТОРИЯ): ВЕЕР ОРИГАМИ (ORIGAMI FAN-IN)
   ------------------------------------------------------------ */
.audience-section.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px) !important;
    transition: opacity 0.6s ease, transform 0.6s ease !important;
}
.audience-section.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Карточка 1: влетает слева с легким креном */
.audience-card:nth-child(1).reveal-on-scroll {
    opacity: 0;
    transform: translateX(-55px) rotate(-5deg) scale(0.9) !important;
    filter: blur(2px) !important;
    transition: all 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
/* Карточка 2: вырастает по центру из глубины */
.audience-card:nth-child(2).reveal-on-scroll {
    opacity: 0;
    transform: translateY(50px) scale(0.85) !important;
    filter: blur(2px) !important;
    transition: all 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) 0.12s !important;
}
/* Карточка 3: влетает справа с креном */
.audience-card:nth-child(3).reveal-on-scroll {
    opacity: 0;
    transform: translateX(55px) rotate(5deg) scale(0.9) !important;
    filter: blur(2px) !important;
    transition: all 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) 0.24s !important;
}

.audience-card.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateX(0) translateY(0) rotate(0deg) scale(1) !important;
    filter: blur(0) !important;
}

/* ------------------------------------------------------------
   ГЛАВА 4 (КАК ЭТО РАБОТАЕТ): ЛАЗЕРНАЯ ДОРОЖКА & КАСКАД ДОМИНО
   ------------------------------------------------------------ */
.workflow-section.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px) !important;
    transition: opacity 0.6s ease, transform 0.6s ease !important;
}
.workflow-section.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.workflow-steps::before {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}
.workflow-section.is-revealed .workflow-steps::before {
    clip-path: inset(0 0 0 0);
}

.workflow-step.reveal-on-scroll {
    opacity: 0;
    transform: translateY(-45px) scale(0.92) !important;
    transition: opacity 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    transition-delay: calc(var(--stagger-idx, 0) * 0.16s) !important;
}
.workflow-step.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

.workflow-step.is-revealed .workflow-num {
    animation: workflowSonarPulse 2.4s infinite ease-out 0.8s;
}
@keyframes workflowSonarPulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
    70% { box-shadow: 0 0 0 16px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* ------------------------------------------------------------
   ГЛАВА 5 (8 ИНСТРУМЕНТОВ): МАТРИЧНЫЙ ГОЛОГРАФИЧЕСКИЙ ФЛИП
   ------------------------------------------------------------ */
.features.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px) !important;
    transition: opacity 0.6s ease, transform 0.6s ease !important;
}
.features.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.feature-card.reveal-on-scroll {
    opacity: 0;
    transform: perspective(800px) rotateX(18deg) scale(0.88) !important;
    transition: opacity 0.65s cubic-bezier(0.34, 1.45, 0.64, 1),
                transform 0.65s cubic-bezier(0.34, 1.45, 0.64, 1) !important;
    transition-delay: calc(var(--stagger-idx, 0) * 0.07s) !important;
}
.feature-card.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: perspective(800px) rotateX(0deg) scale(1) !important;
}

/* ------------------------------------------------------------
   ГЛАВА 6 (СЦЕНАРИИ): ГОРИЗОНТАЛЬНЫЙ МАГНИТНЫЙ ГЛАЙД
   ------------------------------------------------------------ */
.usecases-section.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px) !important;
    transition: opacity 0.6s ease, transform 0.6s ease !important;
}
.usecases-section.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.usecase-card:nth-child(odd).reveal-on-scroll {
    opacity: 0;
    transform: translateX(-48px) scale(0.94) !important;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) !important;
    transition-delay: calc(var(--stagger-idx, 0) * 0.1s) !important;
}
.usecase-card:nth-child(even).reveal-on-scroll {
    opacity: 0;
    transform: translateX(48px) scale(0.94) !important;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) !important;
    transition-delay: calc(var(--stagger-idx, 0) * 0.1s) !important;
}
.usecase-card.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateX(0) scale(1) !important;
}

/* ------------------------------------------------------------
   ГЛАВА 7 (СРАВНЕНИЕ): ДУЭЛЬ КОНТРАСТОВ & ВЗРЫВ DESVI
   ------------------------------------------------------------ */
.why-new.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px) !important;
    transition: opacity 0.6s ease, transform 0.6s ease !important;
}
.why-new.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.saving-card.saving-old.reveal-on-scroll {
    opacity: 0;
    transform: scale(0.9) translateY(24px) !important;
    filter: grayscale(70%) blur(2px) !important;
    transition: all 0.75s cubic-bezier(0.16, 1, 0.3, 1) !important;
    transition-delay: calc(var(--stagger-idx, 0) * 0.1s) !important;
}
.saving-card.saving-old.reveal-on-scroll.is-revealed {
    opacity: 0.82 !important;
    transform: scale(1) translateY(0) !important;
    filter: grayscale(20%) blur(0) !important;
}

.saving-card.saving-new.reveal-on-scroll {
    opacity: 0;
    transform: scale(0.78) translateY(36px) !important;
    transition: all 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) 0.22s !important;
}
.saving-card.saving-new.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
    animation: shockwaveAura 2s ease-out 0.9s;
}
@keyframes shockwaveAura {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.85); }
    70% { box-shadow: 0 0 0 28px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* ------------------------------------------------------------
   ГЛАВА 8 (ДОПОЛНИТЕЛЬНО): РАСКРЫТИЕ КНИГИ (3D FOLIO)
   ------------------------------------------------------------ */
.features-extra-item:nth-child(1).reveal-on-scroll {
    opacity: 0;
    transform: perspective(1000px) rotateY(-22deg) translateX(-25px) !important;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.features-extra-item:nth-child(2).reveal-on-scroll {
    opacity: 0;
    transform: perspective(1000px) rotateY(22deg) translateX(25px) !important;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.12s !important;
}
.features-extra-item.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: perspective(1000px) rotateY(0deg) translateX(0) !important;
}

/* ------------------------------------------------------------
   ГЛАВА 9 (FAQ): КАСКАДНЫЙ ВОДОПАД СО СВЕТЯЩИМСЯ КАНТОМ
   ------------------------------------------------------------ */
.home-faq.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px) !important;
    transition: opacity 0.6s ease, transform 0.6s ease !important;
}
.home-faq.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.faq-item.reveal-on-scroll {
    opacity: 0;
    transform: translateX(-38px) !important;
    border-left: 3px solid transparent !important;
    transition: all 0.65s cubic-bezier(0.16, 1, 0.3, 1) !important;
    transition-delay: calc(var(--stagger-idx, 0) * 0.08s) !important;
}
.faq-item.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateX(0) !important;
    border-left-color: var(--primary) !important;
}

/* ------------------------------------------------------------
   ГЛАВА 10 (ФИНАЛЬНЫЙ CTA): НЕБУЛА И ВСПЛЕСК КНОПОК
   ------------------------------------------------------------ */
.final-cta-new.reveal-on-scroll {
    opacity: 0;
    transform: scale(0.9) translateY(35px) !important;
    filter: blur(6px) !important;
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.9s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.final-cta-new.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
    filter: blur(0) !important;
}
.final-cta-new.is-revealed .final-cta-actions {
    animation: ctaActionsSpring 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}
@keyframes ctaActionsSpring {
    0% { transform: translateY(18px) scale(0.92); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* ------------------------------------------------------------
   ГЛАВЫ ТАРИФОВ (PRICING): ПЬЕДЕСТАЛ И ВСПЛЕСК
   ------------------------------------------------------------ */
.pricing-hero.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px) scale(0.97) !important;
    transition: all 0.75s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.pricing-hero.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

.pricing-card.pricing-card-free.reveal-on-scroll {
    opacity: 0;
    transform: translateY(45px) translateX(-25px) !important;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.pricing-card.pricing-card-base.reveal-on-scroll {
    opacity: 0;
    transform: translateY(50px) !important;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s !important;
}
.pricing-card.pricing-card-pro.reveal-on-scroll {
    opacity: 0;
    transform: translateY(-40px) scale(0.88) !important;
    transition: all 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.18s !important;
}
.pricing-card.pricing-card-business.reveal-on-scroll {
    opacity: 0;
    transform: translateY(45px) translateX(25px) !important;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.26s !important;
}
.pricing-card.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) translateX(0) scale(1) !important;
}

/* Кому подходит (Pricing Who): каскадное 3D-раскрытие */
.pricing-who-card.reveal-on-scroll {
    opacity: 0;
    transform: perspective(800px) rotateY(-10deg) translateY(30px) scale(0.92) !important;
    transition: all 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    transition-delay: calc(var(--stagger-idx, 0) * 0.12s) !important;
}
.pricing-who-card.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: perspective(800px) rotateY(0deg) translateY(0) scale(1) !important;
}

/* Окупаемость (Pricing ROI): дуэльный вход карточек */
.pricing-roi-card:nth-child(1).reveal-on-scroll {
    opacity: 0;
    transform: translateX(-40px) scale(0.94) !important;
    filter: blur(2px) !important;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.pricing-roi-card:nth-child(2).reveal-on-scroll {
    opacity: 0;
    transform: translateX(40px) scale(0.9) !important;
    transition: all 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s !important;
}
.pricing-roi-card.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateX(0) scale(1) !important;
    filter: blur(0) !important;
}
.pricing-roi-card.pricing-roi-card-accent.is-revealed {
    animation: roiCardGlowPulse 3s infinite alternate ease-in-out 0.8s;
}
@keyframes roiCardGlowPulse {
    0% { box-shadow: 0 10px 30px rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.3); }
    100% { box-shadow: 0 16px 45px rgba(16, 185, 129, 0.35); border-color: rgba(16, 185, 129, 0.6); }
}

.compare-wrap.reveal-on-scroll {
    opacity: 0;
    transform: scale(0.95) translateY(30px) !important;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.compare-wrap.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
}

/* ------------------------------------------------------------
   ГЛАВЫ СТАТЕЙ (ARTICLES): ЖУРНАЛЬНЫЙ 3D РАЗВОРОТ
   ------------------------------------------------------------ */
.articles-header.reveal-on-scroll {
    opacity: 0;
    transform: translateY(-24px) scale(0.97) !important;
    transition: all 0.75s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.articles-header.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

.articles-toolbar.reveal-on-scroll {
    opacity: 0;
    transform: translateY(18px) scale(0.98) !important;
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s !important;
}
.articles-toolbar.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

/* Чередующийся 3D-разворот карточек статей */
.article-card:nth-child(odd).reveal-on-scroll {
    opacity: 0;
    transform: perspective(900px) rotateY(-12deg) scale(0.92) !important;
    transition: all 0.8s cubic-bezier(0.34, 1.5, 0.64, 1) !important;
    transition-delay: calc(var(--stagger-idx, 0) * 0.08s) !important;
}
.article-card:nth-child(even).reveal-on-scroll {
    opacity: 0;
    transform: perspective(900px) rotateY(12deg) scale(0.92) !important;
    transition: all 0.8s cubic-bezier(0.34, 1.5, 0.64, 1) !important;
    transition-delay: calc(var(--stagger-idx, 0) * 0.08s) !important;
}
.article-card.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: perspective(900px) rotateY(0deg) scale(1) !important;
}

/* ------------------------------------------------------------
   ГЛАВЫ «О НАС» (ABOUT): КИНЕМАТОГРАФИЧЕСКИЙ ЗУМ И ПОРТАЛ
   ------------------------------------------------------------ */
.about-hero.reveal-on-scroll {
    opacity: 0;
    transform: scale(0.93) translateY(25px) !important;
    transition: all 0.85s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.about-hero.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
}

.about-contact.reveal-on-scroll {
    opacity: 0;
    transform: scale(0.88) translateY(35px) !important;
    transition: all 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.about-contact.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
    animation: contactPulseHalo 3s infinite alternate ease-in-out 1s;
}
@keyframes contactPulseHalo {
    0% { box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15); }
    100% { box-shadow: 0 18px 45px rgba(99, 102, 241, 0.35); }
}

/* ------------------------------------------------------------
   ГЛАВЫ ЛИЧНОГО КАБИНЕТА (PROFILE): ORBIT GLOW & BENTO
   ------------------------------------------------------------ */
.profile-header-card.reveal-on-scroll {
    opacity: 0;
    transform: translateY(-25px) scale(0.97) !important;
    transition: all 0.75s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.profile-header-card.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

.profile-card.reveal-on-scroll {
    opacity: 0;
    transform: scale(0.92) translateY(20px) !important;
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    transition-delay: calc(var(--stagger-idx, 0) * 0.1s) !important;
}
.profile-card.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
}

/* ------------------------------------------------------------
   ГЛАВЫ КАТАЛОГА ИНСТРУМЕНТОВ (BOT): ТАБЫ & КАРТОЧКИ
   ------------------------------------------------------------ */
.bot-menu-header.reveal-on-scroll,
.bot-toolbar-wrap.reveal-on-scroll {
    opacity: 0;
    transform: translateY(-18px) !important;
    transition: all 0.65s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.bot-menu-header.reveal-on-scroll.is-revealed,
.bot-toolbar-wrap.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.tool-card.reveal-on-scroll {
    opacity: 0;
    transform: perspective(800px) rotateX(14deg) scale(0.9) !important;
    transition: all 0.65s cubic-bezier(0.34, 1.5, 0.64, 1) !important;
    transition-delay: calc(var(--stagger-idx, 0) * 0.05s) !important;
}
.tool-card.reveal-on-scroll.is-revealed {
    opacity: 1 !important;
    transform: perspective(800px) rotateX(0deg) scale(1) !important;
}

/* 2. Анимации главной страницы (Hero, Mockup, Chips) */
.hero-float-1 {
    animation: floatSmooth1 4.5s ease-in-out infinite !important;
}

.hero-float-2 {
    animation: floatSmooth2 5.2s ease-in-out infinite !important;
}

@keyframes floatSmooth1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(1deg); }
}

@keyframes floatSmooth2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(-1.5deg); }
}

.hero-mockup {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease !important;
}

.hero-mockup:hover {
    transform: translateY(-6px) scale(1.01) !important;
    box-shadow: 0 24px 50px -10px rgba(99, 102, 241, 0.25) !important;
}

.hero-mockup-after {
    animation: pulseAfterCard 3.5s infinite alternate ease-in-out !important;
}

@keyframes pulseAfterCard {
    0% { box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15); }
    100% { box-shadow: 0 14px 36px rgba(99, 102, 241, 0.35); }
}

/* Световой блик (Shimmer Sheen) на кнопках и бейджах */
.hero-badge,
.about-hero-badge,
.btn-hero-primary {
    position: relative;
    overflow: hidden;
}

.hero-badge::after,
.about-hero-badge::after,
.btn-hero-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent);
    transform: skewX(-20deg);
    animation: shimmerLight 4s infinite ease-in-out;
    pointer-events: none;
}

@keyframes shimmerLight {
    0%, 45% { left: -100%; }
    100% { left: 200%; }
}

/* 3. Анимации страницы Тарифов */
.pricing-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease !important;
}

.pricing-card:hover {
    transform: translateY(-8px) scale(1.015) !important;
    box-shadow: 0 20px 45px -10px rgba(99, 102, 241, 0.2) !important;
    border-color: var(--primary) !important;
}

/* Пульсирующее свечение тарифа Pro */
.pricing-card-pro {
    position: relative;
    animation: proGlowHalo 4s infinite alternate ease-in-out !important;
}

@keyframes proGlowHalo {
    0% {
        box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2), 0 0 0 1px rgba(99, 102, 241, 0.3);
    }
    100% {
        box-shadow: 0 18px 45px rgba(99, 102, 241, 0.38), 0 0 25px rgba(124, 58, 237, 0.35), 0 0 0 1.5px rgba(99, 102, 241, 0.6);
    }
}

/* Анимация появления плашки экономии */
.pricing-save-pill {
    animation: savePillPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
               savePillGlow 2.5s infinite ease-in-out !important;
}

@keyframes savePillPop {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(6px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 4. Анимации страницы «О нас» */
.about-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.about-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

.about-contact {
    position: relative;
    overflow: hidden;
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-2xl) !important;
    box-shadow: var(--shadow) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.about-contact:hover {
    transform: translateY(-5px) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 20px 45px -8px rgba(99, 102, 241, 0.22) !important;
}

.about-contact-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 64px !important;
    height: 64px !important;
    border-radius: 20px !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(124, 58, 237, 0.15)) !important;
    color: var(--primary) !important;
    margin: 0 auto 16px !important;
    animation: iconBounceSubtle 4s infinite ease-in-out !important;
}

@keyframes iconBounceSubtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* 5. Анимации страницы Статей */
.article-card-cover {
    overflow: hidden !important;
    border-radius: 14px !important;
}

.article-card-cover img {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.article-card:hover .article-card-cover img {
    transform: scale(1.06) !important;
}

.article-card-link svg {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.article-card:hover .article-card-link svg {
    transform: translateX(5px) !important;
}

/* 6. Анимации шагов и карточек возможностей */
.workflow-step:hover .workflow-num {
    transform: scale(1.15) rotate(6deg) !important;
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.45) !important;
}

.workflow-num {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease !important;
}

.feature-card:hover .feature-icon,
.usecase-card:hover .usecase-badge {
    transform: scale(1.18) translateY(-2px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-icon,
.usecase-badge {
    display: inline-flex;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Отключение тяжелых анимаций для пользователей с prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .hero-float-1,
    .hero-float-2,
    .hero-badge::after,
    .btn-hero-primary::after,
    .pricing-card-pro,
    .hero-mockup-after,
    .about-contact-icon,
    .saving-new,
    .brush-pulse-ring {
        animation: none !important;
    }
}

/* ============================================================
   17. ЖИВАЯ НЕОНОВАЯ ВОЛНА И ДИНАМИЧЕСКИЙ КАРАНДАШ
   ============================================================ */
.scroll-brush {
    position: fixed !important;
    right: 28px !important;
    top: 90px !important;
    bottom: 90px !important;
    width: 64px !important;
    z-index: 95 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    opacity: 0;
    transition: opacity 0.4s ease !important;
}

.scroll-brush.visible {
    opacity: 1 !important;
}

@media (max-width: 1200px) {
    .scroll-brush { display: none !important; }
}

.scroll-brush-svg {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: visible !important;
    cursor: pointer !important;
    pointer-events: stroke !important;
}

.scroll-brush-path-bg {
    fill: none !important;
    stroke: var(--border) !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    opacity: 0.4 !important;
    stroke-dasharray: 4 6 !important;
    animation: dashWaveFlow 30s linear infinite !important;
}

@keyframes dashWaveFlow {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: 1000; }
}

.scroll-brush-path-fill {
    fill: none !important;
    stroke: url(#brush-gradient) !important;
    stroke-width: 3.5 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.8)) !important;
}

.scroll-brush-icon {
    position: absolute !important;
    width: 44px !important;
    height: 44px !important;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6, #EC4899) !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.75), 0 0 45px rgba(236, 72, 153, 0.45), 0 0 0 2px rgba(255, 255, 255, 0.4) !important;
    will-change: top, left, transform !important;
    cursor: grab !important;
    pointer-events: auto !important;
    user-select: none;
    touch-action: none;
    transition: top 0.08s ease-out, left 0.08s ease-out, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.scroll-brush-icon:hover {
    transform: translate(-50%, -50%) scale(1.18) !important;
    box-shadow: 0 0 35px rgba(99, 102, 241, 0.95), 0 0 55px rgba(236, 72, 153, 0.6), 0 0 0 3px rgba(255, 255, 255, 0.6) !important;
}

.scroll-brush-icon.is-dragging {
    cursor: grabbing !important;
    transform: translate(-50%, -50%) scale(1.3) !important;
    box-shadow: 0 0 45px rgba(99, 102, 241, 1), 0 0 70px rgba(236, 72, 153, 0.85), 0 0 0 4px rgba(255, 255, 255, 0.9) !important;
    transition: none !important;
}

.scroll-brush-icon.is-drawing {
    filter: brightness(1.2) !important;
}

/* Пульсирующие волны вокруг карандаша */
.brush-pulse-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.6);
    animation: brushWavePulse 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
    pointer-events: none;
}

.brush-pulse-ring-2 {
    animation-delay: 1s;
}

@keyframes brushWavePulse {
    0% {
        transform: scale(0.85);
        opacity: 0.9;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

/* Тултип с процентами скролла */
.brush-tooltip {
    position: absolute;
    left: -48px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    font-family: var(--font-mono);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    white-space: nowrap;
}

/* ============================================================
   18. ПОДПРЫГИВАНИЯ И ПРУЖИНЯЩИЕ ЭФФЕКТЫ (FULL BOUNCE & SPRING)
   ============================================================ */

/* Пружинящие подпрыгивания карточек при наведении */
.tool-card,
.feature-card,
.audience-card,
.workflow-step,
.usecase-card,
.saving-card,
.article-card,
.pricing-card,
.profile-card,
.auth-form,
.faq-item,
.about-contact,
.pricing-who-card,
.pricing-roi-card {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s ease,
                border-color 0.25s ease !important;
}

.tool-card:hover,
.feature-card:hover,
.audience-card:hover,
.workflow-step:hover,
.usecase-card:hover,
.saving-card:hover,
.article-card:hover,
.profile-card:hover,
.about-contact:hover,
.pricing-who-card:hover,
.pricing-roi-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 20px 45px -10px rgba(99, 102, 241, 0.24) !important;
}

/* Иконки внутри маркетинговых карточек плавно приподнимаются */
.feature-icon,
.usecase-badge,
.saving-icon,
.workflow-num,
.pricing-who-icon {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease !important;
    will-change: transform;
}

.feature-card:hover .feature-icon,
.usecase-card:hover .usecase-badge,
.saving-card:hover .saving-icon,
.workflow-step:hover .workflow-num,
.pricing-who-card:hover .pricing-who-icon {
    transform: translateY(-5px) scale(1.1) !important;
}

/* На странице бота (инструменты): спокойные иконки без навязчивой анимации для фокуса на работе */
.tool-card .tool-card-icon,
.bot-page .tool-card .tool-card-icon {
    animation: none !important;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease !important;
}

.tool-card:hover .tool-card-icon,
.bot-page .tool-card:hover .tool-card-icon {
    animation: none !important;
    transform: translateY(-2px) scale(1.03) !important;
}

/* Подпрыгивание кнопок и кликабельных бейджей */
.btn-hero-primary,
.btn-hero-secondary,
.btn-pro,
.btn-free,
.btn-business,
.btn-edit-profile,
.btn-logout-pill,
.tool-tab-btn,
.filter-btn,
.about-contact-btn {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease !important;
}

.btn-hero-primary:hover,
.btn-hero-secondary:hover,
.btn-pro:hover,
.btn-free:hover,
.btn-business:hover,
.btn-edit-profile:hover,
.btn-logout-pill:hover,
.about-contact-btn:hover {
    transform: translateY(-4px) scale(1.035) !important;
}

.btn-hero-primary:active,
.btn-hero-secondary:active,
.btn-pro:active,
.btn-free:active,
.btn-business:active,
.tool-tab-btn:active,
.filter-btn:active {
    transform: scale(0.95) !important;
}

/* Пружинящий интерактивный эффект наведения на текст заголовков */
.section-title,
.hero-new-title,
.about-hero h1,
.pricing-hero h1,
.articles-header h1,
.final-cta-content h2 {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                text-shadow 0.35s ease !important;
    cursor: default;
}

.section-title:hover,
.hero-new-title:hover,
.about-hero h1:hover,
.pricing-hero h1:hover,
.articles-header h1:hover,
.final-cta-content h2:hover {
    transform: translateY(-3px) scale(1.01) !important;
    text-shadow: 0 8px 25px rgba(99, 102, 241, 0.3) !important;
}

/* Пружинящие бейджи и чипсы */
.hero-badge,
.about-hero-badge,
.tool-badge-new,
.featured-card-badge,
.tool-tag,
.trust-pill,
.help-quick-btn,
.btn-color-preset {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease !important;
}

.hero-badge:hover,
.about-hero-badge:hover,
.tool-badge-new:hover,
.featured-card-badge:hover,
.trust-pill:hover,
.help-quick-btn:hover {
    transform: translateY(-4px) scale(1.08) !important;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.32) !important;
}

/* ============================================================
   19. УНИКАЛЬНАЯ СТИЛИЗАЦИЯ КАЖДОГО БЛОКА САЙТА
   ============================================================ */

/* --- БЛОК 2: СТИЛЬНЫЕ BENTO-КАПСУЛЫ И ПРЕМИУМ-ТИПОГРАФИКА (.hero-stats) --- */
.stats-block {
    position: relative !important;
    overflow: visible !important;
}

/* Плавная многослойная неоновая подсветка сзади 4 карточек статистики (бесшовный переход) */
.stats-ambient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 82%;
    max-width: 950px;
    height: 220px;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.16) 0%, rgba(168, 85, 247, 0.10) 40%, rgba(236, 72, 153, 0.05) 65%, transparent 75%);
    filter: blur(80px);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: ambientAuraBreath 8s ease-in-out infinite alternate;
}

body.light-theme .stats-ambient-glow {
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.09) 0%, rgba(192, 132, 252, 0.06) 40%, rgba(244, 114, 182, 0.03) 65%, transparent 75%);
    filter: blur(65px);
}

@keyframes ambientAuraBreath {
    0% {
        transform: translate(-50%, -50%) scale(0.96);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -48%) scale(1.04);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -52%) scale(1.0);
        opacity: 0.75;
    }
}

.hero-stats {
    position: relative;
    z-index: 1;
    margin-top: 55px !important;
    margin-bottom: 45px !important;
    padding: 24px 0 !important;
    gap: 24px !important;
}

.hero-stat {
    border-radius: 24px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 32px 24px 28px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    text-align: center;
    backdrop-filter: blur(12px) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease !important;
}

.hero-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    pointer-events: none;
}

.hero-stat:hover {
    transform: translateY(-8px) scale(1.02) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 18px 36px -10px rgba(99, 102, 241, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* Иконка-бейдж над цифрой */
.hero-stat-badge {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.35s ease,
                box-shadow 0.35s ease !important;
}

/* --- БЛОК 2 (СТАТИСТИКА): Естественная фоновая анимация иконок без дергания при наведении --- */
/* ⚡ 5 сек: импульсный электрический разряд */
.hero-stat:nth-child(1) .hero-stat-badge {
    animation: statZapPulse 3.5s infinite ease-in-out !important;
}
@keyframes statZapPulse {
    0%, 82%, 100% { transform: scale(1) rotate(0); filter: drop-shadow(0 0 0 transparent); }
    86% { transform: scale(1.2) rotate(-8deg); filter: drop-shadow(0 0 10px rgba(234, 179, 8, 0.85)); }
    90% { transform: scale(0.96) rotate(6deg); }
    94% { transform: scale(1.12) rotate(-3deg); }
}

/* 💎 4K Ultra: кристальный призменный перелив граней */
.hero-stat:nth-child(2) .hero-stat-badge {
    animation: diamondPrismGlint 3.2s infinite ease-in-out !important;
}
@keyframes diamondPrismGlint {
    0%, 100% { transform: scale(1) rotate(0); filter: drop-shadow(0 0 4px rgba(99, 102, 241, 0.4)); }
    50% { transform: scale(1.18) rotate(10deg); filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.9)) drop-shadow(0 0 24px rgba(59, 130, 246, 0.7)); }
}

/* 🎛️ 8 в 1: танцующий микшер эквалайзера */
.hero-stat:nth-child(3) .hero-stat-badge {
    animation: consoleSliderBounce 4s infinite ease-in-out !important;
}
@keyframes consoleSliderBounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-4px) rotate(4deg); }
    50% { transform: translateY(0); }
    75% { transform: translateY(3px) rotate(-4deg); }
}

/* 🎁 0 ₽: праздничное покачивание подарка */
.hero-stat:nth-child(4) .hero-stat-badge {
    animation: giftBoxWobble 3.8s infinite ease-in-out !important;
}
@keyframes giftBoxWobble {
    0%, 80%, 100% { transform: rotate(0deg) scale(1); }
    85% { transform: rotate(-12deg) scale(1.16); }
    90% { transform: rotate(10deg) scale(1.16); }
    95% { transform: rotate(-5deg) scale(1.08); }
}

/* При наведении анимация НЕ ускоряется и НЕ сбивается — иконки спокойно продолжают свой цикл */
.hero-stat:hover .hero-stat-badge,
.stats-block .hero-stat:hover .hero-stat-badge {
    transform: none;
    filter: none;
}

/* 4K Ultra постоянная статусная подсветка карточки */
.hero-stat.hero-stat-highlight {
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.16), transparent 75%),
                var(--bg-card) !important;
    border-color: rgba(99, 102, 241, 0.38) !important;
    box-shadow: 0 12px 30px -6px rgba(99, 102, 241, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.hero-stat-badge-ultra {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(236, 72, 153, 0.2)) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 0 18px rgba(99, 102, 241, 0.35) !important;
}

/* Чистый, ультра-современный шрифт без monospace! */
.hero-stat-value {
    font-family: var(--font-display) !important;
    font-size: 34px !important;
    font-weight: 850 !important;
    letter-spacing: -0.035em !important;
    line-height: 1.15 !important;
    margin-bottom: 6px !important;
    background: linear-gradient(135deg, #FFFFFF 20%, #C7D2FE 70%, #818CF8 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    display: inline-block;
    filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.25));
}

body.light-theme .hero-stat-value {
    background: linear-gradient(135deg, #0F172A 15%, #4338CA 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    filter: none !important;
}

.hero-stat-label {
    font-family: var(--font-sans) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--text-muted) !important;
    line-height: 1.4 !important;
}

/* --- БЛОК 3: УНИКАЛЬНЫЕ КАРТОЧКИ АУДИТОРИИ (.audience-card) --- */
.audience-card {
    position: relative;
    z-index: 1;
}

/* Карточка 1: Дизайнеры (Индиго-Неон) */
.audience-card:nth-child(1) {
    background: radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.12), transparent 60%),
                var(--bg-elevated) !important;
    border-color: rgba(99, 102, 241, 0.25) !important;
}
.audience-card:nth-child(1) .audience-icon {
    transition: none !important;
}
.audience-card:nth-child(1):hover .audience-icon {
    transform: none !important;
    filter: none !important;
}

/* Карточка 2: Селлеры (Изумрудный Маркетплейс) */
.audience-card:nth-child(2) {
    background: radial-gradient(circle at 100% 0%, rgba(16, 185, 129, 0.12), transparent 60%),
                var(--bg-elevated) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
}
.audience-card:nth-child(2) .audience-icon {
    transition: none !important;
}
.audience-card:nth-child(2):hover .audience-icon {
    transform: none !important;
    filter: none !important;
}

/* Карточка 3: Фотографы и бренды (Золотой Закат) */
.audience-card:nth-child(3) {
    background: radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.12), transparent 60%),
                var(--bg-elevated) !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
}
.audience-card:nth-child(3) .audience-icon {
    transition: none !important;
}
.audience-card:nth-child(3):hover .audience-icon {
    transform: none !important;
    filter: none !important;
}

/* --- БЛОК 4: ШАГИ РАБОТЫ — СВЯЗУЮЩАЯ ВОЛНА И УНИКАЛЬНЫЕ ИКОНКИ (.workflow-steps) --- */
.workflow-steps {
    position: relative;
}

.workflow-steps::before {
    content: '';
    position: absolute;
    top: 54px;
    left: 12%;
    right: 12%;
    height: 3px;
    background: linear-gradient(90deg, #3B82F6, #6366F1, #8B5CF6, #EC4899);
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
    pointer-events: none;
    z-index: 0;
}

@media (max-width: 850px) {
    .workflow-steps::before { display: none; }
}

.workflow-step {
    position: relative;
    z-index: 1;
}

.workflow-num {
    box-shadow: 0 0 0 6px var(--bg-elevated), 0 8px 25px rgba(99, 102, 241, 0.5) !important;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease !important;
}

/* Шаг 1: Радарный сонар */
.workflow-step:nth-child(1):hover .workflow-num {
    transform: translateY(-4px) scale(1.14) !important;
    box-shadow: 0 0 0 6px var(--bg-elevated), 0 10px 30px rgba(59, 130, 246, 0.85) !important;
}

/* Шаг 2: Шестереночный поворот */
.workflow-step:nth-child(2):hover .workflow-num {
    transform: translateY(-4px) rotate(45deg) scale(1.14) !important;
    box-shadow: 0 0 0 6px var(--bg-elevated), 0 10px 30px rgba(99, 102, 241, 0.85) !important;
}

/* Шаг 3: Ракетный взлёт */
.workflow-step:nth-child(3):hover .workflow-num {
    transform: translateY(-6px) scale(1.16) !important;
    box-shadow: 0 0 0 6px var(--bg-elevated), 0 12px 35px rgba(236, 72, 153, 0.9) !important;
}

/* --- БЛОК 5: 8 ИНСТРУМЕНТОВ (.features-grid) — УНИКАЛЬНАЯ АНИМАЦИЯ КАЖДОЙ ИКОНКИ --- */
.feature-card:nth-child(1) .feature-icon { background: rgba(59, 130, 246, 0.12); color: #3B82F6; }
.feature-card:nth-child(2) .feature-icon { background: rgba(99, 102, 241, 0.12); color: #6366F1; }
.feature-card:nth-child(3) .feature-icon { background: rgba(139, 92, 246, 0.12); color: #8B5CF6; }
.feature-card:nth-child(4) .feature-icon { background: rgba(6, 182, 212, 0.12); color: #06B6D4; }
.feature-card:nth-child(5) .feature-icon { background: rgba(16, 185, 129, 0.12); color: #10B981; }
.feature-card:nth-child(6) .feature-icon { background: rgba(245, 158, 11, 0.12); color: #F59E0B; }
.feature-card:nth-child(7) .feature-icon { background: rgba(239, 68, 68, 0.12); color: #EF4444; }
.feature-card:nth-child(8) .feature-icon { background: rgba(236, 72, 153, 0.12); color: #EC4899; }

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s ease,
                filter 0.35s ease,
                background 0.3s ease !important;
    animation: none !important;
    will-change: transform;
}

/* Наведение: благородный упругий лифт с ярким неоновым свечением */
.feature-card:nth-child(1):hover .feature-icon {
    transform: translateY(-6px) rotate(-6deg) scale(1.12) !important;
    filter: drop-shadow(0 6px 16px rgba(59, 130, 246, 0.75)) !important;
}
.feature-card:nth-child(2):hover .feature-icon {
    transform: translateY(-6px) scale(1.12) !important;
    filter: drop-shadow(0 6px 18px rgba(99, 102, 241, 0.75)) !important;
}
.feature-card:nth-child(3):hover .feature-icon {
    transform: translateY(-6px) perspective(400px) rotateY(10deg) scale(1.12) !important;
    filter: drop-shadow(0 6px 18px rgba(139, 92, 246, 0.75)) !important;
}
.feature-card:nth-child(4):hover .feature-icon {
    transform: translateY(-6px) rotate(8deg) scale(1.12) !important;
    filter: drop-shadow(0 6px 18px rgba(6, 182, 212, 0.75)) !important;
}
.feature-card:nth-child(5):hover .feature-icon {
    transform: translateY(-6px) rotate(6deg) scale(1.12) !important;
    filter: drop-shadow(0 6px 20px rgba(16, 185, 129, 0.85)) !important;
}
.feature-card:nth-child(6):hover .feature-icon {
    transform: translateY(-6px) rotate(10deg) scale(1.12) !important;
    filter: drop-shadow(0 6px 20px rgba(245, 158, 11, 0.85)) !important;
}
.feature-card:nth-child(7):hover .feature-icon {
    transform: translateY(-6px) scale(1.12) !important;
    filter: drop-shadow(0 6px 18px rgba(239, 68, 68, 0.75)) !important;
}
.feature-card:nth-child(8):hover .feature-icon {
    transform: translateY(-6px) rotate(8deg) scale(1.12) !important;
    filter: drop-shadow(0 6px 20px rgba(236, 72, 153, 0.85)) !important;
}

/* --- БЛОК 6: СЦЕНАРИИ (.usecase-card) — УНИКАЛЬНЫЕ ИКОНКИ --- */
.usecase-badge {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease !important;
}
.usecase-card:nth-child(1):hover .usecase-badge {
    transform: translateY(-6px) rotate(-6deg) scale(1.16) !important;
    filter: drop-shadow(0 4px 14px rgba(236, 72, 153, 0.7)) !important;
}
.usecase-card:nth-child(2):hover .usecase-badge {
    transform: translateY(-6px) scale(1.16) !important;
    filter: drop-shadow(0 4px 14px rgba(236, 72, 153, 0.7)) !important;
}
.usecase-card:nth-child(3):hover .usecase-badge {
    transform: translateY(-6px) scale(1.16) !important;
    filter: drop-shadow(0 4px 14px rgba(6, 182, 212, 0.7)) !important;
}
.usecase-card:nth-child(4):hover .usecase-badge {
    transform: translateY(-6px) scale(1.16) !important;
    filter: drop-shadow(0 4px 14px rgba(245, 158, 11, 0.7)) !important;
}

/* --- БЛОК 7: СРАВНЕНИЕ (.saving-card) — ИКОНКИ --- */
.saving-icon {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease !important;
}
.saving-card:nth-child(1):hover .saving-icon {
    transform: translateY(-5px) rotate(15deg) scale(1.15) !important;
    filter: drop-shadow(0 4px 12px rgba(239, 68, 68, 0.5)) !important;
}
.saving-card:nth-child(2):hover .saving-icon {
    transform: translateY(-5px) scale(1.14) !important;
    filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.5)) !important;
}
.saving-card:nth-child(3):hover .saving-icon {
    transform: translateY(-7px) scale(1.18) !important;
    filter: drop-shadow(0 0 20px rgba(234, 179, 8, 0.95)) drop-shadow(0 0 12px rgba(99, 102, 241, 0.8)) !important;
}

/* --- БЛОК 7: ВЫБОР ЛИДЕРОВ — ЖИВОЙ ГРАДИЕНТНЫЙ БОРДЕР (.saving-new) --- */
.saving-new {
    border: 2px solid transparent !important;
    background: linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box,
                linear-gradient(135deg, #6366f1, #06b6d4, #10b981, #ec4899, #6366f1) border-box !important;
    background-size: 300% 300% !important;
    animation: rotateBorderGradient 6s ease infinite !important;
    box-shadow: 0 16px 45px -8px rgba(99, 102, 241, 0.35) !important;
}

@keyframes rotateBorderGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- БЛОК 9: FAQ АККОРДЕОН (.home-faq) --- */
.faq-item {
    border-left: 4px solid var(--border) !important;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease !important;
}

.faq-item[open] {
    border-left-color: var(--primary) !important;
    border-color: rgba(99, 102, 241, 0.35) !important;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.05), transparent 40%),
                var(--bg-elevated) !important;
    box-shadow: 0 8px 24px -6px rgba(99, 102, 241, 0.15) !important;
}

/* Мгновенная плавная смена индикатора при закрытии без зависания */
.faq-item.is-closing {
    border-left-color: var(--border) !important;
    border-color: var(--border) !important;
    box-shadow: none !important;
    background: var(--bg-elevated) !important;
}

.faq-item.is-closing summary::after {
    transform: rotate(0deg) !important;
    background: rgba(99, 102, 241, 0.08) !important;
    color: var(--primary) !important;
}

/* --- БЛОК 10: ФИНАЛЬНЫЙ CTA ПОРТАЛ (.final-cta-new) --- */
.final-cta-new {
    background: radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.22), transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.16), transparent 50%),
                var(--bg-elevated) !important;
    box-shadow: 0 20px 60px -15px rgba(99, 102, 241, 0.3) !important;
    border: 1px solid rgba(99, 102, 241, 0.35) !important;
}

/* ============================================================
   20. НОВАЯ СИСТЕМА НЕОНОВЫХ ПОДСВЕТОК БЛОКОВ (AMBIENT GLOWS)
   ============================================================ */

/* 1. Блок 8 инструментов на главной (.features) */
.features {
    position: relative !important;
}
.features-ambient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 88%;
    max-width: 1100px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.14) 0%, rgba(6, 182, 212, 0.09) 35%, rgba(236, 72, 153, 0.06) 65%, transparent 75%);
    filter: blur(85px);
    pointer-events: none;
    z-index: 0;
    animation: featuresGlowPulse 9s ease-in-out infinite alternate;
}
body.light-theme .features-ambient-glow {
    background: radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.08) 0%, rgba(6, 182, 212, 0.05) 35%, rgba(236, 72, 153, 0.03) 65%, transparent 75%);
    filter: blur(70px);
}
@keyframes featuresGlowPulse {
    0% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.65; }
    50% { transform: translate(-50%, -48%) scale(1.05); opacity: 0.95; }
    100% { transform: translate(-50%, -52%) scale(1.0); opacity: 0.75; }
}

/* 2. Блок сравнения и экономии на главной (.why-new) */
.why-new {
    position: relative !important;
}
.why-ambient-glow {
    position: absolute;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 86%;
    max-width: 1050px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 70% 50%, rgba(16, 185, 129, 0.15) 0%, rgba(99, 102, 241, 0.12) 40%, rgba(6, 182, 212, 0.06) 65%, transparent 75%);
    filter: blur(85px);
    pointer-events: none;
    z-index: 0;
    animation: whyGlowPulse 8s ease-in-out infinite alternate;
}
body.light-theme .why-ambient-glow {
    background: radial-gradient(ellipse at 70% 50%, rgba(16, 185, 129, 0.09) 0%, rgba(99, 102, 241, 0.07) 40%, rgba(6, 182, 212, 0.03) 65%, transparent 75%);
    filter: blur(70px);
}
@keyframes whyGlowPulse {
    0% { transform: translate(-50%, -50%) scale(0.96); opacity: 0.7; }
    100% { transform: translate(-50%, -48%) scale(1.04); opacity: 0.95; }
}

/* 3. Переключатель тарифов (.pricing-toggle-container) */
.pricing-toggle-container {
    position: relative !important;
}
.pricing-toggle-ambient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 360px;
    height: 100px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, rgba(236, 72, 153, 0.14) 50%, transparent 75%);
    filter: blur(45px);
    pointer-events: none;
    z-index: 0;
}
body.light-theme .pricing-toggle-ambient-glow {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(236, 72, 153, 0.07) 50%, transparent 75%);
    filter: blur(35px);
}

/* 4. Тарифная сетка: мощная подсветка Pro-карточки (.pricing-grid) */
.pricing-grid {
    position: relative !important;
}
.pricing-pro-ambient-glow {
    position: absolute;
    top: 45%;
    left: 62%;
    transform: translate(-50%, -50%);
    width: 480px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.24) 0%, rgba(236, 72, 153, 0.14) 45%, transparent 75%);
    filter: blur(85px);
    pointer-events: none;
    z-index: 0;
    animation: proGlowBreath 7s ease-in-out infinite alternate;
}
body.light-theme .pricing-pro-ambient-glow {
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.12) 0%, rgba(236, 72, 153, 0.07) 45%, transparent 75%);
    filter: blur(70px);
}
@keyframes proGlowBreath {
    0% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.75; }
    100% { transform: translate(-50%, -48%) scale(1.06); opacity: 1; }
}

/* 5. Блок окупаемости ROI (.pricing-roi-wrapper) */
.pricing-roi-wrapper {
    position: relative !important;
}
.pricing-roi-ambient-glow {
    position: absolute;
    top: 50%;
    right: 12%;
    transform: translateY(-50%);
    width: 480px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.20) 0%, rgba(6, 182, 212, 0.10) 45%, transparent 75%);
    filter: blur(85px);
    pointer-events: none;
    z-index: 0;
    animation: roiGlowBreath 8s ease-in-out infinite alternate;
}
body.light-theme .pricing-roi-ambient-glow {
    background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.10) 0%, rgba(6, 182, 212, 0.05) 45%, transparent 75%);
    filter: blur(70px);
}
@keyframes roiGlowBreath {
    0% { transform: translateY(-50%) scale(0.96); opacity: 0.7; }
    100% { transform: translateY(-48%) scale(1.05); opacity: 0.95; }
}
/* ============================================================
   TASK 16: ЗАКРЕПЛЁННЫЙ HEADER ПРИ СКРОЛЛЕ
   ============================================================ */
.site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
}

/* ============================================================
   TASK 5: ОТКЛЮЧЕНИЕ ФИОЛЕТОВОГО СВЕЧЕНИЯ В СВЕТЛОЙ ТЕМЕ
   ============================================================ */
body.light-theme .stats-ambient-glow,
[data-theme="light"] .stats-ambient-glow {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* ============================================================
   TASK 13: СЕТКА БОТА "ГОТОВЫЕ РЕШЕНИЯ AI" ПО РАЗМЕРУ КАРТОЧЕК
   ============================================================ */
.bot-featured-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    margin-bottom: 32px !important;
}

/* ============================================================
   TASK 15: HERO ВО ВЕСЬ ЭКРАН + СТУДИЙНЫЙ КИНЕМАТОГРАФИЧНЫЙ ФОН
   ============================================================ */
.hero-new {
    min-height: calc(100vh - 65px) !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    padding: 48px 0 64px !important;
    background: radial-gradient(circle at 50% 18%, rgba(99, 102, 241, 0.14) 0%, rgba(139, 92, 246, 0.06) 38%, transparent 68%),
                radial-gradient(ellipse at 85% 20%, rgba(236, 72, 153, 0.08) 0%, transparent 45%),
                radial-gradient(ellipse at 15% 75%, rgba(37, 99, 235, 0.08) 0%, transparent 45%) !important;
}

body.light-theme .hero-new,
[data-theme="light"] .hero-new {
    background: radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.08) 0%, rgba(243, 244, 246, 0.6) 55%, transparent 80%),
                radial-gradient(ellipse at 85% 25%, rgba(236, 72, 153, 0.05) 0%, transparent 50%),
                radial-gradient(ellipse at 15% 75%, rgba(59, 130, 246, 0.05) 0%, transparent 50%) !important;
}

.hero-new::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at center, black 45%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 45%, transparent 85%);
    z-index: 0;
}

body.light-theme .hero-new::before,
[data-theme="light"] .hero-new::before {
    background-image: linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
}

.hero-new .hero-new-grid {
    width: 100%;
    position: relative;
    z-index: 1;
}

/* ============================================================
   TASK 17: КНОПКА СКРОЛЛА НАВЕРХ В СТИЛЕ КАРАНДАША (БУЛЬК-АНИМАЦИЯ НА МЕСТЕ)
   ============================================================ */
.btn-scroll-top {
    position: fixed !important;
    right: 28px !important;
    bottom: 24px !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
    z-index: 995 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.9);
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-scroll-top.is-visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

.scroll-top-progress {
    position: absolute;
    inset: 0;
    width: 52px !important;
    height: 52px !important;
    transform: rotate(-90deg);
}

.scroll-top-track {
    fill: none !important;
    stroke: var(--border) !important;
    stroke-width: 3.5 !important;
    opacity: 0.35 !important;
}

.scroll-top-circle {
    fill: none !important;
    stroke: #8B5CF6 !important;
    stroke-width: 4 !important;
    stroke-linecap: round !important;
    filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.7)) !important;
    transition: stroke-dashoffset 0.15s linear !important;
}

.scroll-top-core {
    position: relative;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(99, 102, 241, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-top-icon {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.btn-scroll-top:hover .scroll-top-core {
    transform: scale(1.12) !important;
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.98),
                0 0 65px rgba(236, 72, 153, 0.7),
                0 0 0 3px rgba(255, 255, 255, 0.85) !important;
}

/* ОРГАНИЧЕСКОЕ БУЛЬКАНЬЕ НА МЕСТЕ (БЕЗ ПРЫЖКОВ ВВЕРХ) */
/* МГНОВЕННЫЙ ОРГАНИЧЕСКИЙ БУЛЬК БЕЗ ЗАДЕРЖКИ ПРИ НАЖАТИИ */
.btn-scroll-top.is-launching .scroll-top-core {
    animation: scrollTopBubble 0.48s cubic-bezier(0.16, 1, 0.3, 1) both !important;
    transform-origin: center center !important;
    transition: none !important;
}

.btn-scroll-top.is-launching .scroll-top-icon {
    transform: scale(1.08) !important;
    transition: none !important;
}

.btn-scroll-top.is-launching .scroll-top-pulse-ring {
    animation: bubbleSplashRing 0.48s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

@keyframes scrollTopBubble {
    0% {
        transform: scale(1);
    }
    22% {
        transform: scale(1.30, 0.72); /* Мгновенное сочное сплющивание сразу при контакте */
    }
    48% {
        transform: scale(0.82, 1.25); /* Упругий возврат */
    }
    72% {
        transform: scale(1.10, 0.94); /* Легкий отскок */
    }
    100% {
        transform: scale(1);
    }
}

@keyframes bubbleSplashRing {
    0% {
        transform: scale(0.85);
        opacity: 1;
        border-width: 4px;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: scale(1.85);
        opacity: 0;
        border-width: 1px;
    }
}

.scroll-top-pulse-ring {
    position: absolute !important;
    inset: -6px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(99, 102, 241, 0.55) !important;
    animation: brushWavePulse 2.4s infinite cubic-bezier(0.215, 0.61, 0.355, 1) !important;
    pointer-events: none !important;
}

@media (max-width: 768px) {
    .btn-scroll-top {
        right: 18px !important;
        bottom: 18px !important;
        width: 46px !important;
        height: 46px !important;
    }
    .scroll-top-core {
        width: 36px !important;
        height: 36px !important;
    }
}

/* ============================================================
   PRICING 3 LUXURY BLOCKS: CALCULATOR, GUARANTEE, REVIEWS
   ============================================================ */
.pricing-calc-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: 36px 32px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    margin-top: 24px;
}

.calc-slider-wrap {
    margin-bottom: 32px;
}

.calc-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
}

.calc-slider-value {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    padding: 4px 14px;
    border-radius: 999px;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.calc-range-input {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--bg-soft);
    outline: none;
    cursor: pointer;
    accent-color: var(--primary);
}

.calc-slider-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.calc-results-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr 1.3fr;
    gap: 16px;
    align-items: center;
}

@media (max-width: 900px) {
    .calc-results-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .calc-res-vs { display: none; }
}

.calc-res-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 22px 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.calc-res-card:hover {
    transform: translateY(-2px);
}

.calc-res-designer {
    border-color: rgba(239, 68, 68, 0.2);
}

.calc-res-desvi {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.04);
}

.calc-res-summary {
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.08));
    border: 2px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.25);
}

.calc-res-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.calc-badge-green { color: #10B981; }
.calc-badge-gold { color: #8B5CF6; }

.calc-res-price {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.calc-res-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.calc-res-vs {
    font-weight: 800;
    font-size: 14px;
    color: var(--text-muted);
    opacity: 0.6;
}

.calc-savings-val {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    color: #10B981;
    margin-bottom: 6px;
}

.calc-time-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

/* 2. GUARANTEE SHIELD */
.pricing-guarantee-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(139, 92, 246, 0.06));
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-2xl);
    padding: 40px 36px;
    text-align: center;
    max-width: 960px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.pricing-guarantee-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 999px;
    color: #10B981;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 18px;
}

.pricing-guarantee-card h2 {
    font-size: 30px;
    margin-bottom: 14px;
}

.pricing-guarantee-card p {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

.pricing-guarantee-pills {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.guarantee-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 13px;
}

/* 3. REVIEWS / CLIENT STORIES */
.pricing-reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .pricing-reviews-grid {
        grid-template-columns: 1fr;
    }
}

.pricing-review-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-review-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.pricing-review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.pricing-review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: white;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pricing-review-info {
    flex: 1;
}

.pricing-review-name {
    font-weight: 700;
    font-size: 15px;
}

.pricing-review-role {
    font-size: 12px;
    color: var(--text-muted);
}

.pricing-review-rating {
    color: #F59E0B;
    font-size: 13px;
    letter-spacing: 2px;
}

.pricing-review-quote {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 20px;
}

.pricing-review-stat {
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.pricing-review-stat b {
    color: #10B981;
}

.btn-scroll-top.home-scroll-top { right: 90px !important; bottom: 24px !important; }
#live-support-widget.home-live-support { right: 152px !important; bottom: 24px !important; }


/* ============================================================
   BOT ICONS REDESIGN: 2D MODES, PREVIEW SWATCHES, REFRESH BTN
   ============================================================ */

/* 1. Блок режима 2D графики: идентичен .icon-style-card */
.glyph-subtype-wrapper {
    margin-top: 14px !important;
    padding: 14px 16px !important;
    background: var(--bg-soft, rgba(255, 255, 255, 0.02)) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: 14px !important;
}

.glyph-subtype-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    margin-top: 10px !important;
}

@media (max-width: 900px) {
    .glyph-subtype-grid {
        grid-template-columns: 1fr !important;
    }
}

.glyph-subtype-btn {
    position: relative !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 12px 14px !important;
    background: var(--bg-soft, rgba(255, 255, 255, 0.02)) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: 12px !important;
    text-align: left !important;
    cursor: pointer !important;
    outline: none !important;
    transition: all 0.18s ease !important;
    box-shadow: none !important;
}

.glyph-subtype-btn:hover {
    border-color: var(--primary) !important;
    background: var(--bg-elevated) !important;
    transform: translateY(-1px) !important;
}

.glyph-subtype-btn.active {
    border-color: var(--primary) !important;
    background: rgba(37, 99, 235, 0.08) !important;
    box-shadow: 0 0 0 1px var(--primary) !important;
}

[data-theme="dark"] .glyph-subtype-btn.active {
    background: rgba(59, 130, 246, 0.16) !important;
}

.glyph-subtype-ico {
    font-size: 24px !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    margin-top: 2px !important;
}

.glyph-subtype-content {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
}

.glyph-subtype-name {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    line-height: 1.25 !important;
}

.glyph-subtype-desc {
    font-size: 11px !important;
    color: var(--text-muted) !important;
    margin-top: 4px !important;
    line-height: 1.35 !important;
}

/* 2. Свитчер фонов превью сцены */
.bg-switcher {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 4px !important;
    background: var(--bg-soft, rgba(255, 255, 255, 0.04)) !important;
    border: 1.5px solid var(--border, rgba(255, 255, 255, 0.12)) !important;
    border-radius: 10px !important;
}

.bg-switch-btn {
    width: 30px !important;
    height: 30px !important;
    border-radius: 7px !important;
    border: 1.5px solid transparent !important;
    background: rgba(255, 255, 255, 0.04) !important;
    cursor: pointer !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
}

.bg-switch-btn:hover {
    border-color: var(--primary, #3b82f6) !important;
    background: rgba(59, 130, 246, 0.12) !important;
    transform: scale(1.06) !important;
}

.bg-switch-btn.active {
    border-color: var(--primary, #3b82f6) !important;
    background: rgba(59, 130, 246, 0.22) !important;
    box-shadow: 0 0 0 1.5px var(--primary, #3b82f6) !important;
}

.bg-preview-swatch {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
}

.bg-swatch-checker {
    border: 1.5px solid rgba(255, 255, 255, 0.5) !important;
    background-color: #ffffff !important;
    background-image: repeating-conic-gradient(#64748b 0% 25%, #ffffff 0% 50%) !important;
    background-position: 0 0 !important;
    background-size: 8px 8px !important;
}

.bg-swatch-white {
    background: #ffffff !important;
    border: 1.5px solid #94a3b8 !important;
}

.bg-swatch-dark {
    background: #0f172a !important;
    border: 1.5px solid rgba(255, 255, 255, 0.5) !important;
}

/* 3. Кнопка обновления в блоке «Недавние иконки» */
.btn-refresh-history {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    border: 1.5px solid var(--border, rgba(255, 255, 255, 0.12)) !important;
    background: var(--bg-soft, rgba(255, 255, 255, 0.05)) !important;
    color: var(--text-muted, #94a3b8) !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-refresh-history:hover {
    color: #ffffff !important;
    background: var(--bg-elevated, rgba(255, 255, 255, 0.12)) !important;
    border-color: var(--primary, #3b82f6) !important;
    transform: rotate(60deg) !important;
}

.btn-refresh-history:active {
    transform: rotate(240deg) scale(0.95) !important;
}


/* ============================================================
   GRAY THEME (GRAPHITE / SLATE) HIGH CONTRAST & LEGIBILITY
   ============================================================ */
[data-theme="gray"] input[type="text"],
[data-theme="gray"] input[type="number"],
[data-theme="gray"] input[type="email"],
[data-theme="gray"] input[type="password"],
[data-theme="gray"] select,
[data-theme="gray"] textarea {
    background: #242936 !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    color: #f3f4f6 !important;
}

[data-theme="gray"] input[type="text"]::placeholder,
[data-theme="gray"] input[type="number"]::placeholder,
[data-theme="gray"] input[type="email"]::placeholder,
[data-theme="gray"] input[type="password"]::placeholder,
[data-theme="gray"] textarea::placeholder {
    color: #94a3b8 !important;
}

[data-theme="gray"] input[type="text"]:focus,
[data-theme="gray"] input[type="number"]:focus,
[data-theme="gray"] input[type="email"]:focus,
[data-theme="gray"] input[type="password"]:focus,
[data-theme="gray"] select:focus,
[data-theme="gray"] textarea:focus {
    background: #2a3040 !important;
    border-color: #818cf8 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.25) !important;
}

[data-theme="gray"] .hero-card,
[data-theme="gray"] .tool-card,
[data-theme="gray"] .pricing-card,
[data-theme="gray"] .adjust-block,
[data-theme="gray"] .settings-block,
[data-theme="gray"] .bot-panel,
[data-theme="gray"] .article-card,
[data-theme="gray"] .profile-card,
[data-theme="gray"] .card,
[data-theme="gray"] .pricing-table {
    background: #222734;
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

[data-theme="gray"] .tool-card:hover,
[data-theme="gray"] .adjust-block:hover,
[data-theme="gray"] .pricing-card:hover,
[data-theme="gray"] .article-card:hover {
    border-color: rgba(129, 140, 248, 0.6);
    box-shadow: 0 12px 34px -4px rgba(99, 102, 241, 0.24);
}

[data-theme="gray"] .feature-icon {
    background: rgba(99, 102, 241, 0.18);
}

[data-theme="gray"] .badge {
    background: rgba(99, 102, 241, 0.18);
    color: #c7d2fe;
}

[data-theme="gray"] .badge-base { background: rgba(59, 130, 246, 0.22); color: #93c5fd; }
[data-theme="gray"] .badge-pro { background: rgba(245, 158, 11, 0.22); color: #fcd34d; }
[data-theme="gray"] .badge-business { background: rgba(139, 92, 246, 0.22); color: #c4b5fd; }
[data-theme="gray"] .tariff-status-warning { color: #fcd34d; }
[data-theme="gray"] .filter-btn.active { background: #818cf8; color: #ffffff; }
[data-theme="gray"] .article-card-category { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
[data-theme="gray"] .page-btn.active { background: #818cf8; color: #ffffff; }
[data-theme="gray"] .gen-card,
[data-theme="gray"] .gen-result { background: #222734; border-color: rgba(255, 255, 255, 0.10); }
[data-theme="gray"] .admin-tab-btn.active { background: #2a3040; border-color: #818cf8; color: #f3f4f6; }
[data-theme="gray"] .tb-btn:hover { background: #2a3040; }
[data-theme="gray"] .quick-prompt-btn:hover { background: #2a3040; border-color: #818cf8; }
[data-theme="gray"] .icon-style-card.active { border-color: #818cf8; box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.35); }


/* ============================================================
   ARTICLE TYPOGRAPHY FOR GRAY THEME (HIGH CONTRAST & CRISP READABILITY)
   ============================================================ */
[data-theme="gray"] .article {
    color: #f1f5f9;
}

[data-theme="gray"] .article p,
[data-theme="gray"] .article li,
[data-theme="gray"] .article-lead {
    color: #e2e8f0 !important;
}

[data-theme="gray"] .article strong,
[data-theme="gray"] .article b {
    color: #ffffff !important;
}

[data-theme="gray"] .article h1,
[data-theme="gray"] .article h2,
[data-theme="gray"] .article h3,
[data-theme="gray"] .article h4 {
    color: #ffffff !important;
}

[data-theme="gray"] .callout-content,
[data-theme="gray"] .callout-content p {
    color: #f1f5f9 !important;
}

[data-theme="gray"] .article-callout,
[data-theme="gray"] .callout-box {
    background: #242936 !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}

[data-theme="gray"] .article blockquote {
    background: #242936 !important;
    color: #f1f5f9 !important;
    border-left-color: #818cf8 !important;
}

[data-theme="gray"] .article-toc-sidebar {
    background: #222734 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

[data-theme="gray"] .article-toc-item {
    color: #cbd5e1 !important;
}

[data-theme="gray"] .article-toc-item:hover,
[data-theme="gray"] .article-toc-item.active {
    color: #818cf8 !important;
}
