/* Доп-стили поверх Tailwind. Минимум — то, что неудобно делать утилитами. */

html { scroll-behavior: smooth; }

/* ============================================================
   LIQUID GLASS — Apple iOS 26 стиль (на чёрном фоне с pink-отливом)
   ============================================================ */

/* Liquid Glass карточки — яркое стекло поверх цветного фона */
.bg-dark-700\/60,
.bg-dark-700\/30,
.bg-dark-700\/80,
.bg-dark-800\/50,
.bg-dark-800\/60,
.bg-dark-800\/80,
details {
    background: rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -1px 0 rgba(255, 255, 255, 0.04);
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s, border-color 0.3s;
}
.bg-dark-700\/60:hover,
.bg-dark-700\/30:hover {
    background: rgba(255, 255, 255, 0.10) !important;
    border-color: rgba(255, 46, 147, 0.35) !important;
}

/* Шапка — Liquid Glass */
header.bg-dark-900\/80 {
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    background: rgba(255, 255, 255, 0.04) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Усиленный blur для шапки в light теме */
body.theme-light header.bg-dark-900\/80 {
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Liquid Glass кнопки — полупрозрачные с лёгким розовым tint'ом */
.bg-pink-500:not(.w-2):not(.w-3):not(.h-2):not(.h-3) {
    background:
        linear-gradient(135deg,
            rgba(255, 100, 175, 0.22) 0%,
            rgba(255, 46, 147, 0.18) 100%) !important;
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border: 1px solid rgba(255, 100, 175, 0.32) !important;
    box-shadow:
        0 8px 28px -6px rgba(255, 46, 147, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.20),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
/* Лёгкий «блик» сверху для эффекта стекла */
.bg-pink-500:not(.w-2):not(.w-3):not(.h-2):not(.h-3)::before {
    content: '';
    position: absolute;
    inset: 1px 1px auto 1px;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), transparent);
    border-radius: inherit;
    pointer-events: none;
}
.hover\:bg-pink-400:hover {
    background:
        linear-gradient(135deg,
            rgba(255, 130, 190, 0.32) 0%,
            rgba(255, 80, 170, 0.28) 100%) !important;
    border-color: rgba(255, 100, 175, 0.50) !important;
    box-shadow:
        0 12px 36px -6px rgba(255, 46, 147, 0.40),
        inset 0 1px 0 rgba(255, 255, 255, 0.30),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px);
}

/* Маленькие пилюли-бейджи (eyebrow) на стекле */
.bg-pink-500\/10,
.bg-pink-500\/15 {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Поля ввода — стеклянные */
input[type="email"],
input[type="text"] {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: all 0.2s ease;
}
input[type="email"]:focus,
input[type="text"]:focus {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 46, 147, 0.6) !important;
    box-shadow: 0 0 0 4px rgba(255, 46, 147, 0.12);
}

/* Усиленный glow на карточке тарифа */
#tariff > div > div.bg-gradient-to-br {
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
}

/* FAQ-блоки — стекло */
details {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* ─── СВЕТЛАЯ ТЕМА: Liquid Glass на белом ───────── */
body.theme-light .bg-dark-700\/60,
body.theme-light .bg-dark-700\/30,
body.theme-light .bg-dark-700\/80,
body.theme-light .bg-dark-800\/50,
body.theme-light .bg-dark-800\/60,
body.theme-light .bg-dark-800\/80,
body.theme-light details {
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow:
        0 12px 40px -10px rgba(0, 0, 0, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.04);
}
body.theme-light input[type="email"],
body.theme-light input[type="text"] {
    background: rgba(255, 255, 255, 0.6) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(20px);
}
body.theme-light input[type="email"]:focus,
body.theme-light input[type="text"]:focus {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(255, 46, 147, 0.6) !important;
    box-shadow: 0 0 0 4px rgba(255, 46, 147, 0.1);
}

/* ============================================================
   СВЕТЛАЯ ТЕМА — переопределяем тёмные классы Tailwind через CSS
   ============================================================ */
body.theme-light {
    background-color: #fafafa !important;
    color: #0a0a0a !important;
}
body.theme-light::before { display: none; } /* убрать тёмный шумовой overlay */

body.theme-light .bg-dark-900,
body.theme-light .bg-dark-900\/80 { background-color: #ffffff !important; }
body.theme-light .bg-dark-800,
body.theme-light .bg-dark-800\/50,
body.theme-light .bg-dark-800\/60,
body.theme-light .bg-dark-800\/80 { background-color: #f5f5f7 !important; }
body.theme-light .bg-dark-700,
body.theme-light .bg-dark-700\/30,
body.theme-light .bg-dark-700\/60,
body.theme-light .bg-dark-700\/80 { background-color: #ffffff !important; border-color: rgba(0,0,0,0.08) !important; }

/* фон body */
body.theme-light {
    background-image:
        radial-gradient(circle at 15% 0%, rgba(255, 46, 147, 0.06), transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(255, 46, 147, 0.04), transparent 35%) !important;
}

/* Тексты */
body.theme-light .text-white,
body.theme-light .text-white\/95 { color: #0a0a0a !important; }
body.theme-light .text-white\/85 { color: rgba(10,10,10,0.85) !important; }
body.theme-light .text-white\/70 { color: rgba(10,10,10,0.7) !important; }
body.theme-light .text-white\/65 { color: rgba(10,10,10,0.7) !important; }
body.theme-light .text-white\/60 { color: rgba(10,10,10,0.65) !important; }
body.theme-light .text-white\/55 { color: rgba(10,10,10,0.6) !important; }
body.theme-light .text-white\/50 { color: rgba(10,10,10,0.55) !important; }
body.theme-light .text-white\/40 { color: rgba(10,10,10,0.5) !important; }
body.theme-light .text-white\/30 { color: rgba(10,10,10,0.4) !important; }

/* Границы */
body.theme-light .border-white\/10,
body.theme-light .border-white\/15 { border-color: rgba(0,0,0,0.1) !important; }
body.theme-light .border-white\/5 { border-color: rgba(0,0,0,0.06) !important; }

/* Шапка */
body.theme-light header.bg-dark-900\/80 { background-color: rgba(255,255,255,0.85) !important; }

/* Розовые акценты остаются такими же — они и так работают на светлом */

/* Поля ввода */
body.theme-light input[type="email"],
body.theme-light input[type="text"] {
    background-color: #ffffff !important;
    border-color: rgba(0,0,0,0.1) !important;
    color: #0a0a0a !important;
}
body.theme-light input::placeholder { color: rgba(0,0,0,0.4) !important; }

/* Гра́диенты на тёмное обыграть */
body.theme-light .bg-gradient-to-br.from-dark-700\/80,
body.theme-light .bg-gradient-to-br.from-dark-700\/60 {
    background: linear-gradient(to bottom right, #ffffff, #f5f5f7) !important;
    border-color: rgba(0,0,0,0.08) !important;
}
body.theme-light .bg-gradient-to-br.from-pink-500\/15,
body.theme-light .bg-gradient-to-br.from-pink-500\/10 {
    background: linear-gradient(to bottom right, rgba(255,46,147,0.08), #ffffff, #f8f8f8) !important;
    border-color: rgba(255,46,147,0.3) !important;
}

/* Кадры/плейсхолдеры (пруфы, видеокарточка) */
body.theme-light .from-pink-500\/15,
body.theme-light .from-pink-500\/10 { --tw-gradient-from: rgba(255,46,147,0.05) !important; }
body.theme-light .to-dark-800 { --tw-gradient-to: #f5f5f7 !important; }

/* FAQ */
body.theme-light details summary:hover { background-color: #f0f0f3 !important; }

/* Section dividers */
body.theme-light .section-divider { background: linear-gradient(90deg, transparent, rgba(255,46,147,0.4), transparent); }

/* Таблица «Хаос vs Система» — иконки крестиков */
body.theme-light .glow-card svg.text-white\/30 { color: rgba(0,0,0,0.3) !important; }


body {
    background-image:
        radial-gradient(circle at 15% 0%, rgba(255, 46, 147, 0.10), transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(255, 46, 147, 0.06), transparent 35%);
    background-attachment: fixed;
}

/* Лёгкая «зернистость» для тёмной премиум-эстетики */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
    opacity: 0.025;
    mix-blend-mode: overlay;
    z-index: 1;
}

/* Hero-цифры — крупный mono, лёгкое свечение */
.hero-number {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    letter-spacing: -0.04em;
    text-shadow: 0 0 40px rgba(255, 46, 147, 0.35);
}

/* Pink scanline под секциями-разделителями */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 46, 147, 0.5), transparent);
}

/* Стиль карточек с тонкой розовой подсветкой при ховере */
.glow-card {
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.glow-card:hover {
    border-color: rgba(255, 46, 147, 0.5);
    box-shadow: 0 10px 40px -10px rgba(255, 46, 147, 0.25);
    transform: translateY(-2px);
}

/* FAQ details */
details summary { list-style: none; cursor: pointer; }
details summary::-webkit-details-marker { display: none; }
details[open] summary .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform 0.2s; }

/* ============================================
   Платёжная модалка (iframe Prodamus)
   ============================================ */
.pay-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.pay-modal.is-open { display: flex; }

.pay-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 7, 7, 0.78);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.pay-modal__panel {
    position: relative;
    width: 100%;
    max-width: 720px;
    height: min(86vh, 820px);
    background: rgba(20, 20, 22, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6),
                0 0 60px -15px rgba(255, 46, 147, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: payModalIn 0.25s cubic-bezier(0.2, 0.7, 0.3, 1);
}

@keyframes payModalIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.pay-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.15s, border-color 0.15s;
}
.pay-modal__close:hover {
    background: rgba(255, 46, 147, 0.18);
    border-color: rgba(255, 46, 147, 0.4);
}

/* Состояния — по умолчанию все скрыты, активное показывается */
.pay-modal__loading,
.pay-modal__iframe,
.pay-modal__success,
.pay-modal__error { display: none; }

.pay-modal__loading.is-active,
.pay-modal__success.is-active,
.pay-modal__error.is-active {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pay-modal__iframe.is-active {
    display: block;
    flex: 1;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

/* Light theme — корректные оттенки */
body.theme-light .pay-modal__backdrop { background: rgba(255, 255, 255, 0.6); }
body.theme-light .pay-modal__panel {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(0, 0, 0, 0.08);
}
body.theme-light .pay-modal__close {
    background: rgba(0, 0, 0, 0.06);
    color: #1a1a1a;
    border-color: rgba(0, 0, 0, 0.1);
}

/* Mobile: подгоняем размеры */
@media (max-width: 640px) {
    .pay-modal { padding: 0; }
    .pay-modal__panel {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        max-width: 100%;
    }
}
