/* === Unified Modern Dark-Blue Fintech Theme v2 (2026-12-03) === */
:root {
    --sx-bg: #060b14;
    --sx-surface: #0f1c31;
    --sx-surface-2: #0a1425;
    --sx-border: rgba(82, 132, 196, 0.28);
    --sx-border-strong: rgba(96, 165, 250, 0.48);
    --sx-blue: #3b82f6;
    --sx-blue-soft: #60a5fa;
    --sx-green: #34d399;
    --sx-red: #f87171;
}

@keyframes sxFadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

html {
    background: var(--sx-bg) !important;
    -webkit-font-smoothing: antialiased;
}

body {
    background:
        radial-gradient(ellipse 460px 360px at 92% 4%, rgba(59, 130, 246, 0.16), transparent 72%),
        radial-gradient(ellipse 380px 320px at 8% 82%, rgba(16, 185, 129, 0.08), transparent 70%),
        #070d18 !important;
    color: #edf5ff;
}

/* Sticky Glass Header */
.header {
    background: rgba(9, 17, 31, 0.84) !important;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid rgba(82, 132, 196, 0.22) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
}

.header:before {
    border-radius: 13px !important;
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 60%, #1d4ed8 100%) !important;
    box-shadow: 0 6px 22px rgba(59, 130, 246, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

.header h1 {
    letter-spacing: -0.4px !important;
}

.ref-online {
    background: var(--sx-green) !important;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.7) !important;
}

.ref-language {
    background: rgba(8, 16, 30, 0.92) !important;
    border: 1px solid var(--sx-border) !important;
    border-radius: 11px !important;
    padding: 3px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ref-language button {
    border-radius: 8px !important;
    transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ref-language button[aria-pressed=true] {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    color: #ffffff !important;
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

/* Hero Banner (Рынки) */
.ref-hero {
    background:
        radial-gradient(circle at 88% 12%, rgba(59, 130, 246, 0.22), transparent 50%),
        radial-gradient(circle at 15% 90%, rgba(56, 189, 248, 0.08), transparent 45%),
        linear-gradient(160deg, #13243d 0%, #0a1424 100%) !important;
    border: 1px solid var(--sx-border) !important;
    border-radius: 22px !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    animation: sxFadeUp 0.28s ease-out;
}

.ref-eyebrow span {
    background: #38bdf8 !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.8) !important;
    border-radius: 50% !important;
}

.ref-stats > div {
    background: rgba(9, 18, 33, 0.72) !important;
    border: 1px solid rgba(82, 132, 196, 0.24) !important;
    border-left: 2px solid var(--sx-blue-soft) !important;
    border-radius: 13px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Market Category Cards */
#categories-grid .card-btn,
#categories-grid .card-btn:last-child {
    border: 1px solid var(--sx-border) !important;
    border-radius: 19px !important;
    background:
        radial-gradient(circle at 85% 15%, rgba(59, 130, 246, 0.1), transparent 55%),
        linear-gradient(155deg, #12223a 0%, #0b1525 100%) !important;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s ease, background 0.2s ease;
}

#categories-grid .card-btn:active {
    transform: scale(0.975);
    border-color: var(--sx-border-strong) !important;
    background: linear-gradient(155deg, #183052 0%, #101f37 100%) !important;
}

#categories-grid .icon {
    filter: drop-shadow(0 6px 14px rgba(59, 130, 246, 0.28)) !important;
}

/* Unified Cards Across Signals / Info / Profile */
.card,
.signal-card,
.access-level,
.copy-survey-card,
#copy-public-offer {
    border-radius: 21px !important;
    border: 1px solid var(--sx-border) !important;
    background:
        radial-gradient(circle at 90% 8%, rgba(59, 130, 246, 0.14), transparent 48%),
        linear-gradient(165deg, #12223a 0%, #0b1526 100%) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.access-elite {
    border-color: rgba(96, 165, 250, 0.45) !important;
    background:
        radial-gradient(circle at 92% 8%, rgba(251, 191, 36, 0.12), transparent 45%),
        radial-gradient(circle at 12% 92%, rgba(59, 130, 246, 0.16), transparent 45%),
        linear-gradient(165deg, #162a47 0%, #0c1729 100%) !important;
}

/* Signal Result Card Polish */
.result-v3 {
    border-radius: 22px !important;
    border: 1px solid var(--sx-border) !important;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
    animation: sxFadeUp 0.25s ease-out;
}

.result-v3.is-buy {
    background:
        radial-gradient(circle at 90% 10%, rgba(16, 185, 129, 0.18), transparent 50%),
        linear-gradient(165deg, #102438 0%, #0a1626 100%) !important;
    border-color: rgba(52, 211, 153, 0.38) !important;
}

.result-v3.is-sell {
    background:
        radial-gradient(circle at 90% 10%, rgba(239, 68, 68, 0.18), transparent 50%),
        linear-gradient(165deg, #1a1e34 0%, #0d1424 100%) !important;
    border-color: rgba(248, 113, 113, 0.38) !important;
}

/* Inputs & Focus Rings */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--sx-blue-soft) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

/* Primary Buttons */
.btn-primary,
.survey-submit-btn,
#copy-public-offer button.copy-buy-bot-btn,
.al-btn-primary {
    border-radius: 14px !important;
    border: 0 !important;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 55%, #60a5fa 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
    transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:active,
.survey-submit-btn:active,
#copy-public-offer button.copy-buy-bot-btn:active {
    transform: scale(0.98);
}

/* Modal Sheet */
#copy-host-modal .sheet {
    background:
        radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.14), transparent 40%),
        #0d1b30 !important;
    border: 1px solid rgba(82, 132, 196, 0.36) !important;
    border-radius: 24px 24px 0 0 !important;
}

/* Floating Glass Bottom Navigation */
.nav-tabs {
    background: rgba(9, 18, 33, 0.88) !important;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid rgba(82, 132, 196, 0.3) !important;
    border-radius: 21px !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.nav-tab {
    border-radius: 15px !important;
    color: #8aa5c6 !important;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.nav-tab.active {
    background: linear-gradient(145deg, #255286, #1a3b64) !important;
    color: #f0f7ff !important;
    box-shadow: inset 0 1px 0 rgba(147, 197, 253, 0.3), 0 4px 14px rgba(15, 23, 42, 0.35) !important;
}

.nav-tab.active svg {
    transform: scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
    .ref-hero, .result-v3 { animation: none !important; }
}
