/* ===================================================
   SwapX — Crypto Exchange
   Dark theme, glassmorphism, gradient accents
   =================================================== */

/* === CSS VARIABLES === */
:root {
    --bg:           #0a0b0f;
    --bg-2:         #0e1018;
    --glass:        rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover:  rgba(255, 255, 255, 0.07);

    --purple:       #7c3aed;
    --purple-light: #9f5ff7;
    --cyan:         #06b6d4;
    --cyan-light:   #22d3ee;
    --green:        #10b981;
    --red:          #ef4444;

    --grad:         linear-gradient(135deg, #7c3aed, #06b6d4);
    --grad-glow:    linear-gradient(135deg, rgba(124,58,237,0.4), rgba(6,182,212,0.4));

    --text:         #f1f5f9;
    --text-2:       #94a3b8;
    --text-3:       #64748b;

    --radius:       16px;
    --radius-sm:    10px;
    --radius-xs:    6px;

    --shadow:       0 8px 40px rgba(0,0,0,0.5);
    --shadow-sm:    0 4px 20px rgba(0,0,0,0.4);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* iOS Safari fix — критично */
}
body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }
img, svg { max-width: 100%; height: auto; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 3px; }

/* === LAYOUT === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}
/* Предотвращаем overflow flex/grid элементов */
.hero__content,
.step,
.rate-card,
.feature,
.review,
.footer__brand,
.footer__col { min-width: 0; }

/*
 * Мобильное меню (#mobileNavRoot): на широких экранах не показываем никогда.
 * Дублируется ниже по файлу — этот блок в начале срабатывает даже при обрезании/кэше хвоста файла.
 */
@media (min-width: 901px) {
    #mobileNavRoot.mobile-nav,
    .mobile-nav {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    #headerBurger,
    .header__burger {
        display: none !important;
    }
}

/* === BACKGROUND ORBS === */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.25;
    /* contain: strict предотвращает влияние filter blur на document scroll */
    contain: layout style;
    will-change: transform;
}
.bg-orb--purple {
    width: 600px; height: 600px;
    background: var(--purple);
    filter: blur(100px);
    top: -200px; left: -200px;
    animation: orbFloat 12s ease-in-out infinite;
}
.bg-orb--cyan {
    width: 500px; height: 500px;
    background: var(--cyan);
    filter: blur(100px);
    bottom: 100px; right: -100px;
    animation: orbFloat 10s ease-in-out infinite reverse;
}
.bg-orb--blue {
    width: 400px; height: 400px;
    background: #3b82f6;
    filter: blur(120px);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: orbFloat 15s ease-in-out infinite;
    opacity: 0.1;
}
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 40px); }
}

/* === GLASS === */
.glass {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* === GRADIENT TEXT === */
.gradient-text {
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-xs);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.btn--primary {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 4px 24px rgba(124, 58, 237, 0.35);
}
.btn--primary:hover {
    box-shadow: 0 6px 32px rgba(124, 58, 237, 0.55);
    transform: translateY(-2px);
}
.btn--ghost {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text);
}
.btn--ghost:hover {
    background: var(--glass-hover);
    border-color: rgba(255,255,255,0.15);
}
.btn--full { width: 100%; }
.btn--lg { padding: 16px 40px; font-size: 1rem; border-radius: var(--radius-sm); }
.btn--xs { padding: 6px 16px; font-size: 0.78rem; border-radius: 4px; }

/* === SECTION COMMON === */
section { position: relative; z-index: 1; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}
.section-sub { color: var(--text-2); font-size: 1rem; }

/* ===================================================
   HEADER
   =================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(10, 11, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 0;
}
.header .container {
    display: flex;
    align-items: center;
    gap: 40px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.logo__icon { display: flex; }
.logo__text {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text);
}
.logo__accent { color: var(--purple-light); }

/* Nav */
.nav {
    display: flex;
    gap: 8px;
    flex: 1;
}
.nav__link {
    padding: 8px 16px;
    border-radius: var(--radius-xs);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-2);
    transition: all 0.2s;
}
.nav__link:hover, .nav__link--active {
    color: var(--text);
    background: var(--glass);
}

.header__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }

@media (min-width: 901px) {
    .header__actions--desktop {
        flex-wrap: nowrap;
        align-items: center;
        gap: 10px;
    }
}

/* Язык: кнопка → модальное окно (POST api/set_locale.php) */
.lang-switch-wrap { display: flex; align-items: center; }
/* Язык в шапке (десктоп): размер как у пунктов навигации */
.lang-open-btn.header__lang-btn {
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    gap: 8px;
    max-width: min(260px, 28vw);
    min-height: 40px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    align-items: center;
}
.lang-open-btn__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lang-open-btn__chev { flex-shrink: 0; opacity: 0.65; }
/* Глобус (опционально, если вызовут swapx_lang_globe_button) */
.lang-globe-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    border-radius: 12px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.lang-globe-btn__icon { display: block; pointer-events: none; }

/* Бургер — только узкая ширина */
.header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    margin-left: auto;
    border: none;
    border-radius: 12px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.header__burger:hover {
    background: var(--glass-hover);
    border-color: rgba(124, 58, 237, 0.35);
}
.header__burger-bar {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.header__burger[aria-expanded="true"] .header__burger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.header__burger[aria-expanded="true"] .header__burger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.header__burger[aria-expanded="true"] .header__burger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Выдвижное меню: по умолчанию выключено (десктоп и закрытое состояние) */
/* Атрибут hidden (ставится JS на десктопе) — сильнее любого display:block в медиазапросах */
#mobileNavRoot.mobile-nav[hidden] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#mobileNavRoot.mobile-nav,
.mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 400;
    pointer-events: none;
}
.mobile-nav--open {
    pointer-events: auto;
}
.mobile-nav__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-nav--open .mobile-nav__backdrop {
    opacity: 1;
}
.mobile-nav__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(100%, 360px);
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    padding: max(20px, env(safe-area-inset-top, 0px)) 20px max(28px, env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 0;
    border-left: 1px solid var(--glass-border);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
}
.mobile-nav--open .mobile-nav__panel {
    transform: translateX(0);
}
html[dir="rtl"] .mobile-nav__panel {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--glass-border);
    transform: translateX(-100%);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.35);
}
html[dir="rtl"] .mobile-nav--open .mobile-nav__panel {
    transform: translateX(0);
}
.mobile-nav__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}
.mobile-nav__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}
.mobile-nav__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: var(--glass);
    color: var(--text-2);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.mobile-nav__close:hover {
    background: var(--glass-hover);
    color: var(--text);
}
.mobile-nav__lang-hint {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    margin: 0 0 8px;
}
.mobile-nav__lang-row {
    margin-bottom: 22px;
}
.mobile-nav__lang-btn.lang-open-btn {
    width: 100%;
    max-width: none;
    min-height: 48px;
    padding: 12px 16px;
    justify-content: center;
    font-size: 0.95rem;
    border-radius: 12px;
    border: 1px solid rgba(124, 58, 237, 0.45);
    background: rgba(124, 58, 237, 0.14);
    color: var(--text);
}
.mobile-nav__lang-btn.lang-open-btn:hover {
    background: rgba(124, 58, 237, 0.22);
    border-color: rgba(124, 58, 237, 0.6);
}
.mobile-nav__links {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch;
    gap: 4px;
    margin-bottom: 24px;
    width: 100%;
}
.mobile-nav__link {
    display: block !important;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s;
}
.mobile-nav__link:hover {
    background: var(--glass);
    border-color: var(--glass-border);
}
.mobile-nav__link.nav__link--active {
    background: rgba(124, 58, 237, 0.12);
    border-color: rgba(124, 58, 237, 0.35);
    color: var(--text);
}
.mobile-nav__auth {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
}
.mobile-nav__btn {
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
}

body.mobile-nav-active {
    overflow: hidden;
    touch-action: none;
}

/* ===================================================
   TICKER
   =================================================== */
.ticker {
    background: rgba(124, 58, 237, 0.08);
    border-bottom: 1px solid var(--glass-border);
    overflow: hidden;
    padding: 10px 0;
    position: relative;
    z-index: 1;
}
.ticker__track {
    display: flex;
    gap: 0;
    animation: tickerScroll 40s linear infinite;
    width: max-content;
}
.ticker__track:hover { animation-play-state: paused; }
.ticker__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 32px;
    font-size: 0.85rem;
    border-right: 1px solid var(--glass-border);
    white-space: nowrap;
}
.ticker__logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 50%;
    flex-shrink: 0;
}
.ticker__name { color: var(--text-2); font-weight: 500; }
.ticker__price { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ticker__change { font-size: 0.78rem; font-weight: 600; }
.ticker__change--up   { color: var(--green); }
.ticker__change--down { color: var(--red); }

@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===================================================
   HERO
   =================================================== */
.hero {
    padding: 80px 0 100px;
    min-height: calc(100vh - 110px);
    display: flex;
    align-items: center;
}
.hero__container {
    display: grid;
    grid-template-columns: 1fr 480px;
    gap: 80px;
    align-items: center;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.25);
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--green);
    margin-bottom: 28px;
}
.hero__badge-dot {
    width: 8px; height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.6); }
    50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}

.hero__title {
    font-size: 3.4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}
.hero__desc {
    font-size: 1.1rem;
    color: var(--text-2);
    margin-bottom: 40px;
    line-height: 1.7;
}

/* Hero stats */
.hero__stats {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.stat__value {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat__label { font-size: 0.78rem; color: var(--text-2); margin-top: 2px; }
.stat__divider {
    width: 1px;
    height: 36px;
    background: var(--glass-border);
}

/* ===================================================
   EXCHANGE WIDGET
   =================================================== */
.widget {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow), 0 0 80px rgba(124,58,237,0.15);
}

.widget__tabs {
    display: flex;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid var(--glass-border);
}
.widget__tab {
    flex: 1;
    padding: 14px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-2);
    transition: all 0.2s;
    position: relative;
}
.widget__tab--active {
    color: var(--text);
    background: var(--glass);
}
.widget__tab--active::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--grad);
}

.widget__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Exchange Field */
/* Exchange Field — Uniswap-style card */
.exchange-field {
    background: rgba(0,0,0,0.28);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 14px 16px 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.exchange-field:focus-within {
    border-color: rgba(124,58,237,0.5);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.exchange-field__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.exchange-field__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.exchange-field__input {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    padding: 0;
    line-height: 1.15;
    min-width: 0;
}
.exchange-field__input::placeholder { color: rgba(255,255,255,0.18); font-weight: 500; }
.exchange-field__input[readonly] { cursor: default; color: var(--text-2); }

/* Скрываем нативные стрелки у number-инпута */
.exchange-field__input::-webkit-outer-spin-button,
.exchange-field__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}
.exchange-field__input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}
.exchange-field__balance {
    font-size: 0.72rem;
    color: var(--text-3);
    margin-top: 8px;
}

/* Currency Select Button — pill */
.currency-select {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px 8px 7px;
    background: rgba(255,255,255,0.09);
    border: 1.5px solid rgba(255,255,255,0.13);
    border-radius: 999px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    transition: background 0.18s, border-color 0.18s, transform 0.15s, box-shadow 0.18s;
    flex-shrink: 0;
    white-space: nowrap;
    cursor: pointer;
}
.currency-select:hover {
    background: rgba(124,58,237,0.2);
    border-color: rgba(124,58,237,0.5);
    box-shadow: 0 4px 16px rgba(124,58,237,0.18);
    transform: translateY(-1px);
}
.currency-select:active { transform: translateY(0); box-shadow: none; }
.currency-select__img {
    width: 30px; height: 30px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}
.currency-select__name {
    font-size: 1rem;
    font-weight: 700;
}
.currency-select__arrow {
    color: var(--text-3);
    flex-shrink: 0;
    transition: transform 0.2s;
    width: 14px; height: 14px;
}
.currency-select:hover .currency-select__arrow { transform: rotate(180deg); }

/* Swap Button */
.swap-btn-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}
.swap-btn-wrap::before {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}
.swap-btn-wrap::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}
.swap-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-2);
    transition: all 0.3s;
    flex-shrink: 0;
}
.swap-btn:hover {
    background: var(--grad);
    border-color: transparent;
    color: #fff;
    transform: rotate(180deg);
    box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}
.rate-badge-stack {
    flex: 1;
    min-width: 0;
    text-align: center;
}
.rate-badge {
    font-size: 0.75rem;
    color: var(--cyan);
    font-weight: 600;
    white-space: nowrap;
}

/* Wallet Field */
.wallet-field {}
.wallet-field__label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.wallet-field__input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    outline: none;
    color: var(--text);
    font-size: 0.9rem;
    transition: border-color 0.2s;
    font-family: 'Courier New', monospace;
}
.wallet-field__input::placeholder { color: var(--text-3); font-family: 'Inter', sans-serif; }
.wallet-field__input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(6,182,212,0.15);
}

/* MEMO поле (XRP, TON и др.) */
.memo-field { margin-top: 0; }

.memo-hint {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 8px;
    padding: 9px 12px;
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.25);
    border-radius: var(--radius-xs);
    font-size: 0.76rem;
    color: #fbbf24;
    line-height: 1.5;
}
.memo-hint svg { flex-shrink: 0; margin-top: 1px; color: #fbbf24; }

/* Widget Info */
.widget__info {
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.widget__info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-2);
}
.widget__info-row span:last-child { color: var(--text); font-weight: 500; }

.widget__note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-3);
}
.widget__note a { color: var(--purple-light); }
.widget__note a:hover { text-decoration: underline; }

/* ===================================================
   RATES SECTION
   =================================================== */
.rates { padding: 100px 0; }

.rates__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.rate-card {
    border-radius: var(--radius);
    padding: 22px 20px 18px;
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
    position: relative;
    overflow: hidden;
    min-width: 0;
}
.rate-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 60%);
    pointer-events: none;
}
.rate-card:hover {
    transform: translateY(-7px);
    border-color: rgba(255,255,255,0.16);
    box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

/* Первая карточка (BTC) — акцентная */
.rate-card--featured {
    background: linear-gradient(145deg,
        rgba(124,58,237,0.14) 0%,
        rgba(6,182,212,0.07)  60%,
        rgba(124,58,237,0.04) 100%);
    border-color: rgba(124,58,237,0.28);
}
.rate-card--featured::before {
    background: linear-gradient(135deg, rgba(124,58,237,0.06) 0%, transparent 60%);
}
.rate-card--featured:hover {
    border-color: rgba(124,58,237,0.5);
    box-shadow: 0 16px 48px rgba(124,58,237,0.2);
}

/* Заголовок: иконка + имя + бадж */
.rate-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 8px;
}
.rate-card__coin {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.rate-card__name {
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rate-card__symbol {
    font-size: 0.72rem;
    color: var(--text-3);
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Бадж % изменения */
.rate-card__badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
}
.rate-card__badge--up   { background: rgba(16,185,129,0.14); color: var(--green); border: 1px solid rgba(16,185,129,0.2); }
.rate-card__badge--down { background: rgba(239,68,68,0.12);  color: var(--red);   border: 1px solid rgba(239,68,68,0.2);  }

/* Строка с ценой и трендом */
.rate-card__price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}
.rate-card__price {
    font-size: 1.38rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    line-height: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rate-card__trend {
    flex-shrink: 0;
    margin-bottom: 1px;
}
.rate-card__trend--up   { color: var(--green); }
.rate-card__trend--down { color: var(--red); }

/* Sparkline */
.rate-card__chart {
    height: 44px;
    margin-bottom: 14px;
}
.rate-card__chart svg { width: 100%; height: 100%; }

/* Футер: объём */
.rate-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
    gap: 6px;
}
.rate-card__vol-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}
.rate-card__vol-val {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Coin Icons */
.coin-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.07);
    flex-shrink: 0;
    overflow: hidden;
}
.coin-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}
.coin-icon--sm { width: 26px; height: 26px; }
.coin-icon--sm img { width: 100%; height: 100%; }

/* ===================================================
   HOW IT WORKS
   =================================================== */
.how {
    padding: 100px 0;
    background: linear-gradient(to bottom, transparent, rgba(124,58,237,0.05), transparent);
}

.steps {
    display: flex;
    align-items: center;
    gap: 0;
}

.step {
    flex: 1;
    border-radius: var(--radius);
    padding: 32px 24px;
    position: relative;
    transition: all 0.3s;
}
.step:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,0.14);
}
.step__num {
    font-size: 3rem;
    font-weight: 900;
    color: var(--glass-border);
    line-height: 1;
    margin-bottom: 16px;
    font-variant-numeric: tabular-nums;
}
.step__icon {
    margin-bottom: 16px;
}
.step__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.step__text {
    font-size: 0.88rem;
    color: var(--text-2);
    line-height: 1.6;
}

.step__arrow {
    flex-shrink: 0;
    padding: 0 8px;
    display: flex;
    align-items: center;
    opacity: 0.5;
}

/* ===================================================
   FEATURES
   =================================================== */
.features { padding: 100px 0; }

.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature {
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: all 0.3s;
}
.feature:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,0.14);
    box-shadow: var(--shadow-sm);
}

.feature__icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.feature__icon--1 { background: rgba(124,58,237,0.15); color: var(--purple-light); }
.feature__icon--2 { background: rgba(245,158,11,0.15); color: #f59e0b; }
.feature__icon--3 { background: rgba(6,182,212,0.15);  color: var(--cyan); }
.feature__icon--4 { background: rgba(16,185,129,0.15); color: var(--green); }
.feature__icon--5 { background: rgba(239,68,68,0.15);  color: var(--red); }
.feature__icon--6 { background: rgba(59,130,246,0.15); color: #3b82f6; }

.feature__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.feature__text {
    font-size: 0.88rem;
    color: var(--text-2);
    line-height: 1.6;
}

/* ===================================================
   POPULAR PAIRS
   =================================================== */
.pairs {
    padding: 100px 0;
    background: linear-gradient(to bottom, transparent, rgba(6,182,212,0.04), transparent);
}

/* ===================================================
   PAIR CARDS — карточки популярных направлений
   =================================================== */
.pairs-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.pair-card {
    border-radius: var(--radius);
    padding: 20px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    cursor: default;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.pair-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.16);
    box-shadow: var(--shadow-sm);
}

.pair-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.pair-card__icons {
    display: flex;
    align-items: center;
}
.pair-card__icons .coin-icon {
    outline: 2px solid var(--card-bg, #13141a);
    outline-offset: 0;
}
.pair-card__icons .coin-icon:last-child { margin-left: -10px; }

.pair-card__label {
    font-size: .92rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pair-card__rate {
    font-size: .78rem;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pair-card__change {
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.pair-card__change--up   { color: var(--green); }
.pair-card__change--down { color: var(--red); }

.pair-card__btn {
    margin-top: 4px;
    font-size: .82rem;
    padding: 9px 12px;
    gap: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pair-card__btn svg { flex-shrink: 0; }

/* ===================================================
   REVIEWS
   =================================================== */
.reviews { padding: 100px 0; }

.reviews__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.review {
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: all 0.3s;
}
.review:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,0.14);
}
.review__stars {
    font-size: 1.1rem;
    color: #f59e0b;
    margin-bottom: 16px;
    letter-spacing: 2px;
}
.review__text {
    font-size: 0.92rem;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: 24px;
    font-style: italic;
}
.review__author { display: flex; align-items: center; gap: 12px; }
.review__avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--grad);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.review__name { font-weight: 600; font-size: 0.9rem; }
.review__date { font-size: 0.75rem; color: var(--text-3); }

/* ===================================================
   FAQ
   =================================================== */
.faq { padding: 100px 0; }

.faq__list {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq__item {
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.2s;
}
.faq__item[data-open="true"] { border-color: rgba(124,58,237,0.35); }

.faq__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    transition: color 0.2s;
}
.faq__question:hover { color: var(--purple-light); }

.faq__arrow {
    flex-shrink: 0;
    color: var(--text-3);
    transition: transform 0.3s;
}
.faq__item[data-open="true"] .faq__arrow { transform: rotate(180deg); color: var(--purple-light); }

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 24px;
}
.faq__item[data-open="true"] .faq__answer {
    max-height: 200px;
    padding: 0 24px 20px;
}
.faq__answer p {
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.7;
    border-top: 1px solid var(--glass-border);
    padding-top: 16px;
}

/* ===================================================
   CTA
   =================================================== */
.cta { padding: 80px 0 100px; }

.cta__card {
    border-radius: 24px;
    padding: 70px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta__glow {
    position: absolute;
    width: 400px; height: 400px;
    background: var(--grad-glow);
    border-radius: 50%;
    filter: blur(80px);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.cta__title {
    font-size: 2.4rem;
    font-weight: 900;
    margin-bottom: 16px;
    position: relative;
}
.cta__text {
    font-size: 1.05rem;
    color: var(--text-2);
    margin-bottom: 40px;
    position: relative;
}
.cta__btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    position: relative;
}

/* ===================================================
   FOOTER
   =================================================== */
.footer {
    background: var(--bg-2);
    border-top: 1px solid var(--glass-border);
    padding: 60px 0 32px;
}

.footer__top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--glass-border);
}

.footer__brand .logo { margin-bottom: 16px; display: inline-flex; }
.footer__desc {
    font-size: 0.88rem;
    color: var(--text-2);
    line-height: 1.6;
    max-width: 280px;
    margin-bottom: 0;
}

.footer__col-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 18px;
}
.footer__link {
    display: block;
    font-size: 0.88rem;
    color: var(--text-2);
    margin-bottom: 10px;
    transition: color 0.2s;
}
.footer__link:hover { color: var(--text); }

/* Ссылка "Создать заявку" — небольшой акцент */
.footer__link--scroll {
    color: var(--purple-light);
}
.footer__link--scroll:hover { color: #a78bfa; }

/* Ссылка с иконкой Telegram */
.footer__link--tg {
    display: flex;
    align-items: center;
    gap: 7px;
}
.footer__link--tg:hover { color: #229ED9; }

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-3);
}
.footer__disclaimer { max-width: 400px; text-align: right; }

/* ===================================================
   RESPONSIVE
   =================================================== */
/* ===================================================
   COIN PICKER MODAL
   =================================================== */
.coin-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.coin-modal.open {
    opacity: 1;
    pointer-events: all;
}
.coin-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
}
.coin-modal__box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    border-radius: var(--radius);
    overflow: hidden;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s ease;
}
.coin-modal.open .coin-modal__box {
    transform: translateY(0) scale(1);
}
.coin-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--glass-border);
}
.coin-modal__title {
    font-size: 1rem;
    font-weight: 700;
}
.coin-modal__close {
    width: 32px; height: 32px;
    border-radius: var(--radius-xs);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    transition: all 0.2s;
}
.coin-modal__close:hover { background: var(--glass-hover); color: var(--text); }
.coin-modal__search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-3);
}
.coin-modal__search {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: 0.9rem;
    color: var(--text);
}
.coin-modal__search::placeholder { color: var(--text-3); }
/* Обёртка списка — содержит fade и подсказку */
.coin-modal__list-wrap {
    position: relative;
    overflow: hidden;
}
/* Градиентный fade снизу — сигнал что список скроллится */
.coin-modal__list-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 96px;
    background: linear-gradient(to bottom, transparent 0%, #0a0b0f 100%);
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.35s ease;
}
.coin-modal__list-wrap.at-bottom::after {
    opacity: 0;
}

/* Подсказка «ещё монеты ниже» */
.coin-modal__scroll-hint {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    z-index: 2;
    background: rgba(124, 58, 237, 0.18);
    border: 1px solid rgba(124, 58, 237, 0.35);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.74rem;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    animation: hint-bounce 2.4s ease-in-out infinite;
}
.coin-modal__scroll-hint svg {
    opacity: 0.7;
    animation: hint-arrow 2.4s ease-in-out infinite;
}
.coin-modal__list-wrap.at-bottom .coin-modal__scroll-hint {
    opacity: 0;
    transform: translateX(-50%) translateY(6px);
}

@keyframes hint-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(-5px); }
}
@keyframes hint-arrow {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(3px); }
}

.coin-modal__list {
    max-height: 380px;
    overflow-y: auto;
    padding: 8px 0 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(124,58,237,0.4) transparent;
}
.coin-modal__list::-webkit-scrollbar { width: 5px; }
.coin-modal__list::-webkit-scrollbar-track { background: transparent; }
.coin-modal__list::-webkit-scrollbar-thumb {
    background: rgba(124,58,237,0.4);
    border-radius: 3px;
}
.coin-modal__list::-webkit-scrollbar-thumb:hover {
    background: rgba(124,58,237,0.7);
}
.coin-modal__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 24px;
    cursor: pointer;
    transition: background 0.15s;
}
.coin-modal__item:hover { background: rgba(255,255,255,0.05); }
.coin-modal__item.selected { background: rgba(124,58,237,0.12); }
.coin-modal__item-logo {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.coin-modal__item-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.coin-modal__item-info { flex: 1; min-width: 0; }
.coin-modal__item-name { font-weight: 600; font-size: 0.9rem; }
.coin-modal__item-symbol { font-size: 0.78rem; color: var(--text-2); }
.coin-modal__item-price { text-align: right; }
.coin-modal__item-price-val { font-weight: 700; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.coin-modal__item-price-change { font-size: 0.75rem; font-weight: 600; }
.coin-modal__item-price-change.up   { color: var(--green); }
.coin-modal__item-price-change.down { color: var(--red); }

/* Модалка языка — те же отступы, что у монет, выше по z-index */
.coin-modal.lang-modal { z-index: 550; }
.lang-modal__form { margin: 0; padding: 0; }
.lang-modal__item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 24px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    text-align: left;
    transition: background 0.15s;
    border-radius: 0;
}
.lang-modal__item:hover { background: rgba(255, 255, 255, 0.05); }
.lang-modal__item--current { background: rgba(124, 58, 237, 0.12); }
.lang-modal__item-flag {
    font-size: 1.35rem;
    line-height: 1;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}
.lang-modal__item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lang-modal__item-name { font-weight: 600; }
.lang-modal__item-code {
    font-size: 0.72rem;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.lang-modal__check {
    width: 28px;
    text-align: center;
    color: var(--purple-light);
    font-weight: 700;
    flex-shrink: 0;
}
.lang-modal__check--sp { visibility: hidden; }

/* ===================================================
   RESPONSIVE — ПОЛНАЯ АДАПТИВНОСТЬ
   Брейкпоинты: 1200 → 1024 → 900 → 768 → 600 → 480 → 360
   =================================================== */

/* ── 1200px ───────────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .hero__container { grid-template-columns: 1fr 440px; gap: 56px; }
    .rates__grid { grid-template-columns: repeat(4, 1fr); }
    .footer__top { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
}

/* ── 1024px ───────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .hero__container { grid-template-columns: 1fr 380px; gap: 40px; }
    .hero__title { font-size: 2.8rem; }
    .rates__grid { grid-template-columns: repeat(3, 1fr); }
    .footer__top { grid-template-columns: 1fr 1fr 1fr; gap: 28px; }
    .footer__brand { grid-column: 1 / -1; }
    /* orbs уменьшаем на планшете */
    .bg-orb--purple { width: 400px; height: 400px; }
    .bg-orb--cyan   { width: 350px; height: 350px; }
}

/* Десктоп / планшет: мобильная разметка в DOM не показываем вообще */
@media (min-width: 901px) {
    #mobileNavRoot.mobile-nav,
    .mobile-nav {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    .header__burger {
        display: none !important;
    }
}

/* ── 900px ────────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    /* Шапка: только логотип + бургер; навигация в выезжающем меню */
    #mobileNavRoot.mobile-nav,
    .mobile-nav {
        display: block !important;
    }
    /* Закрыто: слой невидим и не кликается (контент не в потоке страницы) */
    #mobileNavRoot.mobile-nav:not(.mobile-nav--open),
    .mobile-nav:not(.mobile-nav--open) {
        visibility: hidden !important;
        pointer-events: none !important;
    }
    /* Открыто: полноэкранный оверлей */
    #mobileNavRoot.mobile-nav.mobile-nav--open,
    .mobile-nav.mobile-nav--open {
        visibility: visible !important;
        pointer-events: auto !important;
    }
    .header__burger {
        display: inline-flex;
    }
    .nav--desktop,
    .header__actions--desktop {
        display: none !important;
    }
    .ticker.ticker--desktop-bar {
        display: none !important;
    }
    .header .container {
        flex-wrap: nowrap;
        gap: 12px;
        align-items: center;
        justify-content: space-between;
    }
    .header .logo {
        min-width: 0;
    }
    .header { padding: 12px 0; }

    /* Hero — одна колонка */
    .hero { padding: 52px 0 68px; min-height: auto; }
    .hero__container { grid-template-columns: 1fr; gap: 40px; }
    .hero__content { text-align: center; }
    .hero__badge { justify-content: center; }
    .hero__stats { justify-content: center; gap: 16px; }
    .hero__title { font-size: 2.5rem; }
    .hero__desc { font-size: .96rem; }
    .widget { max-width: 500px; margin: 0 auto; width: 100%; }

    /* Sections */
    .section-title { font-size: 1.8rem; }
    .section-head { margin-bottom: 40px; }
    .rates { padding: 80px 0; }
    .how   { padding: 80px 0; }
    .features { padding: 80px 0; }
    .pairs    { padding: 80px 0; }
    .reviews  { padding: 80px 0; }
    .faq      { padding: 80px 0; }

    /* Rates */
    .rates__grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }

    /* Steps — вертикально */
    .steps { flex-direction: column; gap: 0; align-items: stretch; }
    .step__arrow { transform: rotate(90deg); padding: 6px 0; align-self: center; flex-shrink: 0; }

    /* Features */
    .features__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

    /* Pairs — 4 колонки */
    .pairs-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }

    /* Reviews */
    .reviews__grid { grid-template-columns: 1fr; max-width: 540px; margin: 0 auto; }

    /* CTA */
    .cta { padding: 60px 0 80px; }
    .cta__card { padding: 48px 32px; }
    .cta__title { font-size: 2rem; }

    /* Footer */
    .footer__top { grid-template-columns: 1fr 1fr; gap: 28px; }
    .footer__brand { grid-column: 1 / -1; }
    .footer__desc { max-width: 100%; }
    .footer__bottom { flex-direction: column; gap: 8px; text-align: center; }
    .footer__disclaimer { text-align: center; max-width: 100%; }

    /* Orbs — меньше на мобиле */
    .bg-orb--purple { width: 300px; height: 300px; top: -100px; left: -100px; opacity: 0.18; }
    .bg-orb--cyan   { width: 260px; height: 260px; right: -60px; opacity: 0.18; }
    .bg-orb--blue   { width: 200px; height: 200px; opacity: 0.06; }
}

/* ── 768px ────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Hero */
    .hero { padding: 40px 0 56px; }
    .hero__title { font-size: 2.2rem; }
    .hero__desc { font-size: .92rem; }

    /* Rates — 2 колонки */
    .rates__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .rate-card { padding: 16px 14px 14px; }
    .rate-card__price { font-size: 1.15rem; }
    .rate-card__chart { height: 34px; }

    /* Steps */
    .step { padding: 24px 20px; }

    /* Pairs — 3 колонки */
    .pairs-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .pair-card { padding: 16px 14px 14px; gap: 8px; }

    /* CTA */
    .cta__card { padding: 40px 24px; }
    .cta__btns { flex-direction: column; align-items: stretch; gap: 10px; }
    .cta__btns .btn { justify-content: center; }

    /* Footer */
    .footer__top { grid-template-columns: 1fr; gap: 24px; }
    .footer { padding: 40px 0 24px; }
}

/* ── 600px ────────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .container { padding: 0 16px; }

    /* Hero */
    .hero { padding: 32px 0 48px; }
    .hero__title { font-size: 1.95rem; letter-spacing: -.5px; }
    .hero__desc { font-size: .9rem; }
    .hero__badge { font-size: .76rem; padding: 6px 12px; }
    .hero__stats { gap: 12px; }
    .stat__value { font-size: 1.25rem; }
    .stat__label { font-size: .72rem; }
    .stat__divider { height: 28px; }

    /* Widget */
    .widget { border-radius: 12px; width: 100%; }
    .widget__body { padding: 16px; gap: 12px; }
    .exchange-field { padding: 12px 14px 10px; }
    .exchange-field__input { font-size: 1.6rem; }
    .exchange-field__balance { font-size: .7rem; }
    .currency-select { padding: 7px 12px 7px 6px; gap: 7px; font-size: .95rem; }
    .currency-select__img { width: 26px; height: 26px; }
    .swap-btn { width: 38px; height: 38px; }
    .swap-btn-wrap { gap: 8px; }
    .rate-badge { font-size: .7rem; }
    .wallet-field__input { font-size: .85rem; padding: 12px 14px; }
    .widget__info { padding: 10px 14px; }
    .widget__info-row { font-size: .8rem; }
    #exchangeBtn { padding: 14px; font-size: .9rem; }
    .widget__note { font-size: .72rem; }

    /* Sections */
    .section-title { font-size: 1.65rem; }
    .section-head { margin-bottom: 30px; }
    .section-sub { font-size: .9rem; }

    /* Steps */
    .step { padding: 20px 16px; }
    .step__num { font-size: 2rem; }
    .step__title { font-size: .94rem; }
    .step__text { font-size: .84rem; }
    .step__arrow { padding: 4px 0; }

    /* Features */
    .features__grid { grid-template-columns: 1fr; gap: 12px; }
    .feature { padding: 22px 18px; }

    /* Reviews */
    .review { padding: 22px 18px; }
    .review__text { font-size: .88rem; }

    /* CTA */
    .cta__card { padding: 32px 18px; }
    .cta__title { font-size: 1.65rem; }
    .cta__text { font-size: .92rem; }
}

/* ── 480px ────────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .header .container { padding: 0 14px; }
    .header { padding: 12px 0; }
    .logo__text { font-size: 1.1rem; }

    /* Hero */
    .hero { padding: 28px 0 40px; }
    .hero__title { font-size: 1.7rem; line-height: 1.15; letter-spacing: -.3px; }
    .hero__desc { font-size: .85rem; margin-bottom: 28px; }
    .hero__stats { gap: 10px; }
    .stat__value { font-size: 1.15rem; }

    /* Widget */
    .widget__body { padding: 14px; gap: 10px; }
    .exchange-field { padding: 11px 12px 9px; }
    .exchange-field__input { font-size: 1.4rem; }
    .exchange-field__label { font-size: .7rem; }
    .wallet-field__input { font-size: .82rem; padding: 10px 12px; }
    .widget__info-row { font-size: .76rem; }
    #exchangeBtn { font-size: .88rem; padding: 13px; }
    .btn-spinner { width: 12px; height: 12px; }

    /* Sections */
    .section-title { font-size: 1.45rem; }
    .section-sub { font-size: .84rem; }

    /* Rates — 2 узкие колонки */
    .rates__grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .rate-card { padding: 12px 10px 10px; }
    .rate-card__header { margin-bottom: 10px; }
    .rate-card__price { font-size: .88rem; letter-spacing: 0; }
    .rate-card__price-row { gap: 4px; margin-bottom: 6px; }
    .rate-card__name { font-size: .78rem; }
    .rate-card__symbol { font-size: .66rem; }
    .rate-card__badge { font-size: .64rem; padding: 2px 6px; }
    .rate-card__chart { height: 26px; margin-bottom: 8px; }
    .rate-card__meta { padding-top: 8px; }
    .rate-card__vol-label { font-size: .62rem; }
    .rate-card__vol-val { font-size: .7rem; }
    .coin-icon { width: 32px; height: 32px; }

    /* Steps */
    .step { padding: 16px 14px; }
    .step__num { font-size: 1.5rem; }
    .step__icon { margin-bottom: 8px; }
    .step__icon svg { width: 26px; height: 26px; }

    /* FAQ */
    .faq__question { font-size: .86rem; padding: 14px 16px; gap: 10px; }
    .faq__answer, .faq__item[data-open="true"] .faq__answer { padding-left: 16px; padding-right: 16px; }
    .faq__answer p { font-size: .84rem; }
    .faq__list { gap: 8px; }

    /* CTA */
    .cta__card { padding: 26px 14px; }
    .cta__title { font-size: 1.45rem; }
    .cta__text { font-size: .86rem; margin-bottom: 24px; }
    .btn--lg { padding: 13px 24px; font-size: .9rem; }

    /* Footer */
    .footer__top { gap: 20px; }
    .footer__col-title { margin-bottom: 12px; font-size: .76rem; }
    .footer__link { font-size: .82rem; margin-bottom: 8px; }
    .footer { padding: 36px 0 20px; }

    /* Ticker */
    .ticker { padding: 8px 0; }
    .ticker__item { gap: 5px; padding: 0 16px; }
    .ticker__logo { width: 14px; height: 14px; }
    .ticker__name, .ticker__price { font-size: .76rem; }
    .ticker__change { font-size: .7rem; }

    /* Limit error */
    #limitError { font-size: .78rem; }

    /* Coin modal */
    .coin-modal__box { max-width: calc(100vw - 16px); border-radius: 12px; }
    .coin-modal__header { padding: 14px 14px; }
    .coin-modal__search-wrap { padding: 10px 14px; }
    .coin-modal__item { padding: 10px 14px; gap: 10px; }
    .coin-modal__item-price { display: none; }
    .coin-modal__list { max-height: 56vh; }
    /* Градиент под мобильный цвет фона */
    .coin-modal__list-wrap::after {
        background: linear-gradient(to bottom, transparent 0%, #0a0b0f 100%);
        height: 80px;
    }
    .coin-modal__scroll-hint { font-size: .7rem; padding: 5px 12px; bottom: 10px; }
    .coin-modal__item-logo { width: 30px; height: 30px; }
    .coin-modal__item-name { font-size: .86rem; }

    /* Pairs — 2 колонки */
    .pairs-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .pair-card { padding: 14px 12px 12px; gap: 7px; }
    .pair-card__label { font-size: .85rem; }
    .pair-card__rate  { font-size: .72rem; }
    .coin-icon--sm { width: 20px; height: 20px; }
    .pair-card__btn { font-size: .78rem; padding: 8px 10px; }
}

/* ── 360px ────────────────────────────────────────────────────────────────── */
@media (max-width: 360px) {
    .container { padding: 0 12px; }
    .hero { padding: 24px 0 36px; }
    .hero__title { font-size: 1.5rem; }
    .section-title { font-size: 1.3rem; }
    .stat__value { font-size: 1rem; }
    .exchange-field { padding: 10px 11px 9px; }
    .exchange-field__input { font-size: 1.25rem; }
    .currency-select { padding: 6px 11px 6px 5px; gap: 6px; font-size: .88rem; }
    .currency-select__name { font-size: .88rem; }
    .currency-select__img { width: 24px; height: 24px; }
    .widget__body { padding: 12px; gap: 8px; }
    .rates__grid { grid-template-columns: 1fr; gap: 8px; }
    .btn--lg { padding: 12px 20px; font-size: .86rem; }
    .cta__title { font-size: 1.3rem; }
    .logo__text { font-size: 1rem; }
    .hero__badge { font-size: .7rem; padding: 5px 10px; }
    /* Pairs — 2 колонки компактные */
    .pairs-grid { gap: 8px; }
    .pair-card { padding: 12px 10px 10px; gap: 6px; }
    .pair-card__label { font-size: .82rem; }
    .pair-card__btn { font-size: .75rem; padding: 7px 8px; gap: 4px; }
    .pair-card__btn svg { width: 11px; height: 11px; }
}

/* ── Анимации обновления цен ──────────────────────────────────────────────── */
@keyframes flashGreen {
    0%   { color: inherit; }
    30%  { color: #10b981; text-shadow: 0 0 8px rgba(16,185,129,0.6); }
    100% { color: inherit; }
}
@keyframes flashRed {
    0%   { color: inherit; }
    30%  { color: #ef4444; text-shadow: 0 0 8px rgba(239,68,68,0.6); }
    100% { color: inherit; }
}
.flash-up   { animation: flashGreen .9s ease forwards; }
.flash-down { animation: flashRed   .9s ease forwards; }

/* ── Живая точка "●" у счётчика обновления ───────────────────────────────── */
.live-dot {
    display: inline-block;
    width: 7px; height: 7px;
    background: var(--green);
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
    animation: pulse-dot 2s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(16,185,129,0.6);
}
@keyframes pulse-dot {
    0%,100% { opacity: 1; transform: scale(1);    }
    50%      { opacity: .5; transform: scale(0.7); }
}

/* ── Скелетон-заглушки при первой загрузке ───────────────────────────────── */
.rate-card-skeleton {
    border-radius: var(--radius);
    height: 210px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    position: relative;
}
.rate-card-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.05) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.6s infinite;
}
@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Скелетон для карточек pairs ──────────────────────────────────────────── */
.pair-card-skeleton {
    border-radius: var(--radius);
    height: 178px;
    overflow: hidden;
    position: relative;
}
.pair-card-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.6s infinite;
}

/* ===================================================
   FLOATING TELEGRAM SUPPORT BUTTON
   =================================================== */
.tg-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

/* Кнопка */
.tg-float__btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #229ED9 0%, #1a7fb5 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(34,158,217,0.45);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: tg-pulse 2.8s ease-in-out infinite;
    position: relative;
    flex-shrink: 0;
}
.tg-float__btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(34,158,217,0.65);
    animation-play-state: paused;
}
.tg-float__btn:active { transform: scale(0.96); }

/* Пульсирующее кольцо */
@keyframes tg-pulse {
    0%   { box-shadow: 0 4px 20px rgba(34,158,217,0.45), 0 0 0 0 rgba(34,158,217,0.45); }
    60%  { box-shadow: 0 4px 20px rgba(34,158,217,0.45), 0 0 0 14px rgba(34,158,217,0); }
    100% { box-shadow: 0 4px 20px rgba(34,158,217,0.45), 0 0 0 0 rgba(34,158,217,0); }
}

/* Popup */
.tg-float__popup {
    background: rgba(18,19,28,0.97);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 18px 20px;
    width: 240px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transform: translateY(10px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    transform-origin: bottom right;
}
.tg-float__popup--open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.tg-float__popup-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #fff;
}
.tg-float__popup-text {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 14px;
    line-height: 1.45;
}
.tg-float__popup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #229ED9, #1a7fb5);
    color: #fff;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.18s, transform 0.15s;
}
.tg-float__popup-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.tg-float__popup-btn--disabled {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.35);
    cursor: default;
    font-size: 0.82rem;
}

@media (max-width: 480px) {
    .tg-float { bottom: 16px; right: 16px; }
    .tg-float__btn { width: 52px; height: 52px; }
    .tg-float__popup { width: 210px; }
}
