/* === XRayVless Main Stylesheet === */
/* Цветовая палитра: Gold & Dark Navy (синхронизировано с Flutter-приложением) */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0B0E17;
    --card: #141825;
    --card-light: #1C2033;
    --border: rgba(212, 168, 83, 0.12);
    --border-active: rgba(212, 168, 83, 0.5);
    --accent: linear-gradient(135deg, #DFC06A 0%, #B8943F 100%);
    --accent-solid: #C9A84C;
    --accent-light: #DFC06A;
    --accent-dim: #7A6535;
    --green-on: #34D399;
    --red-off: #EF4444;
    --blue-idle: #6366F1;
    --text: #F0EDE6;
    --muted: #9A96A6;
    --radius: 16px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* === HEADER === */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 16px 0;
    background: rgba(11, 14, 23, 0.95);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}
.header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 700; font-size: 1.3rem; display: flex; align-items: center; gap: 8px; color: var(--text); }
.logo span { color: #C9A84C; }
.nav-btn {
    padding: 10px 22px; border-radius: 14px;
    background: var(--card); border: 1px solid var(--border);
    font-weight: 600; font-size: 0.9rem; color: var(--text);
}
.nav-btn:hover { border-color: #C9A84C; color: var(--accent-solid); }

/* === HERO === */
.hero { padding: 140px 0 60px; text-align: center; }
.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800; line-height: 1.1;
    margin-bottom: 20px; letter-spacing: -0.5px;
    color: var(--text);
}
.hero h1 em {
    font-style: normal;
    color: #C9A84C;
}
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 580px; margin: 0 auto 35px; }

.cta {
    display: inline-flex; padding: 18px 45px; border-radius: 20px;
    background: var(--accent); color: var(--bg);
    font-weight: 800; font-size: 1.1rem;
    transition: var(--transition);
}
.cta:hover { background: var(--accent-light); transform: translateY(-2px); }

/* === NETWORK ANIMATION === */
.network-viz {
    width: 100%; max-width: 700px; height: 300px;
    margin: 30px auto 70px;
    display: flex; justify-content: center; align-items: center;
}
.network-svg { width: 100%; height: auto; min-height: 420px; display: block; }
.node-phone { fill: var(--card); stroke: var(--accent); stroke-width: 2; }
.node-server-main { fill: var(--card-light); stroke: var(--accent); stroke-width: 2.5; }
.node-server-foreign { fill: var(--card); stroke: var(--blue-idle); stroke-width: 2; }
.line-connection { stroke: var(--accent-dim); stroke-width: 2; stroke-dasharray: 8 5; opacity: 0.4; }
.signal-dot { filter: drop-shadow(0 0 6px currentColor); }

/* === FEATURES === */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 90px; }
.feature {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px;
    transition: var(--transition);
    position: relative; overflow: hidden;
}
.feature::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 2px; background: var(--accent); opacity: 0; transition: var(--transition);
}
.feature:hover { border-color: var(--border-active); transform: translateY(-3px); }
.feature:hover::before { opacity: 1; }
.feature-icon { font-size: 2rem; margin-bottom: 14px; }
.feature h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.feature p { color: var(--muted); font-size: 0.9rem; }

/* === PRICING === */
.pricing-title { text-align: center; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 12px; color: var(--text); }
.pricing-subtitle { text-align: center; color: var(--muted); margin-bottom: 45px; }
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 90px; }

.plan {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 32px;
    transition: var(--transition);
    display: flex; flex-direction: column; position: relative;
}
.plan.popular { border-color: var(--border-active); }
.plan.popular::after {
    content: 'ХИТ'; position: absolute; top: 14px; right: 14px;
    background: var(--accent); color: var(--bg);
    font-size: 0.7rem; font-weight: 800; padding: 4px 12px; border-radius: 20px;
}
.plan:hover { border-color: var(--border-active); transform: translateY(-3px); }
.plan-name { font-size: 1rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.plan-price {
    font-size: 2.6rem; font-weight: 800; margin-bottom: 4px;
    color: #C9A84C;
}
.plan-period { color: var(--muted); font-size: 0.85rem; margin-bottom: 22px; }
.plan-features { list-style: none; margin-bottom: 28px; flex-grow: 1; }
.plan-features li { padding: 7px 0; color: var(--muted); font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.plan-features li::before { content: '✓'; color: #C9A84C; font-weight: 700; }

/* === FORMS & BUTTONS === */
.tg-input {
    width: 100%; padding: 14px; margin-bottom: 14px; border-radius: 14px;
    background: var(--bg); border: 1px solid var(--border);
    color: var(--text); font-size: 0.95rem; transition: var(--transition);
}
.tg-input:focus { outline: none; border-color: #C9A84C; }

.pay-btn {
    width: 100%; padding: 16px; border: none; border-radius: 14px;
    background: var(--accent); color: var(--bg);
    font-size: 1rem; font-weight: 700; cursor: pointer;
    transition: var(--transition);
}
.pay-btn:hover { background: var(--accent-light); transform: translateY(-1px); }
.pay-btn:disabled { background: var(--card-light); color: var(--muted); cursor: not-allowed; transform: none; }

.plan-status { display: none; margin-top: 14px; padding: 14px; border-radius: 14px; text-align: center; font-size: 0.85rem; }
.plan-status.loading { background: rgba(212, 168, 83, 0.08); border: 1px solid rgba(212, 168, 83, 0.2); color: var(--accent-light); }
.plan-status.error { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.2); color: #fca5a5; }
.plan-status.active { background: rgba(52, 211, 153, 0.08); border: 1px solid rgba(52, 211, 153, 0.2); }

/* === FOOTER === */
footer {
    border-top: 1px solid var(--border); padding: 45px 0;
    text-align: center; color: var(--muted); font-size: 0.85rem;
    background: var(--bg);
}
footer a { margin: 0 10px; }
footer a:hover { color: #C9A84C; }

/* === TRASH WIDGET === */
.trash-container { text-align: center; margin-top: 12px; padding: 8px; }
.trash-stats { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 8px; }
.trash-label { color: var(--red-off); font-size: 12px; font-weight: bold; }
.trash-value { color: #fca5a5; font-size: 14px; font-weight: bold; font-family: monospace; }
.trash-svg { display: block; margin: 0 auto; }
.trash-detail { color: var(--muted); font-size: 10px; margin-top: 6px; font-family: monospace; }
.trash-particle { fill: var(--red-off); opacity: 0.8; will-change: transform, opacity; transform: translateZ(0); }
@keyframes trash-fall {
    0% { transform: translateY(-30px) scale(1); opacity: 0.9; }
    70% { opacity: 0.7; }
    100% { transform: translateY(90px) scale(0.3); opacity: 0; }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .hero { padding: 110px 0 40px; }
    .network-viz { height: 220px; margin: 20px auto 40px; }
    .cta { width: 100%; justify-content: center; padding: 16px 25px; }
    .plan-price { font-size: 2.2rem; }
    .nav-btn { padding: 8px 14px !important; font-size: 0.8rem !important; }
}

/* Фикс для блока привязки Telegram внутри карточки */
.plan-status { overflow: visible !important; height: auto !important; max-height: none !important; }
