/* ==========================================================================
   БАЗОВЫЕ НАСТРОЙКИ И ЦВЕТА
   ========================================================================== */
:root {
    --bg-main: #0a0c10;          /* Глубокий темный фон сайта */
    --bg-card: #121622;          /* Фон для карточек */
    --bg-input: #1a202c;         /* Фон для полей ввода */
    --cyan: #00f0ff;             /* Неоновый акцент */
    --cyan-glow: rgba(0, 240, 255, 0.2);
    --text-main: #f5f7fa;        /* Яркий текст */
    --text-muted: #8a99ad;       /* Серый текст */
    --border: rgba(255, 255, 255, 0.05);
    --red: #ff0055;
    --green: #00ff66;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   ШАПКА САЙТА (NAVBAR)
   ========================================================================== */
.navbar {
    background: rgba(10, 12, 16, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon { font-size: 24px; }
.logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #fff, var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover { color: #fff; }

/* ==========================================================================
   КНОПКИ
   ========================================================================== */
.btn-primary, .btn-primary-small, .btn-primary-full, .btn-primary-buy {
    background: linear-gradient(135deg, #00b8ff, var(--cyan));
    color: #000 !important;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary { padding: 14px 28px; font-size: 16px; }
.btn-primary-small { padding: 8px 16px; font-size: 14px; }
.btn-primary-full { padding: 14px; width: 100%; font-size: 15px; }
.btn-primary-buy { padding: 16px; width: 100%; font-size: 16px; margin-top: 20px; text-transform: uppercase; }

.btn-primary:hover, .btn-primary-small:hover, .btn-primary-full:hover, .btn-primary-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.btn-secondary, .btn-outline-small, .btn-outline-full {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-secondary { padding: 14px 28px; font-size: 16px; }
.btn-outline-small { padding: 8px 16px; font-size: 14px; }
.btn-outline-full { padding: 12px; width: 100%; display: block; font-size: 15px; }

.btn-secondary:hover, .btn-outline-small:hover, .btn-outline-full:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(0, 240, 255, 0.03);
}

/* ==========================================================================
   ГЛАВНЫЙ ЭКРАН (HERO) И СТАТИСТИКА
   ========================================================================== */
.hero {
    padding: 150px 20px 60px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, #fff, var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 35px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    border-top: 1px solid var(--border);
    padding-top: 40px;
    width: 100%;
    max-width: 800px;
}

.stat { display: flex; flex-direction: column; gap: 5px; }
.stat-number { font-size: 32px; font-weight: 800; color: var(--cyan); }
.stat-label { font-size: 14px; color: var(--text-muted); text-transform: uppercase; }

/* ==========================================================================
   СЕКЦИИ И СЕТКИ ФИЧ / ТАРИФОВ (INDEX.HTML)
   ========================================================================== */
.features, .tariffs { padding: 80px 0; }
.features { background: rgba(255, 255, 255, 0.01); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-title { font-size: 28px; font-weight: 700; text-align: center; margin-bottom: 40px; color: #fff; }

.features-grid, .tariffs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

/* Карточки фич */
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
}
.feature-icon { font-size: 36px; margin-bottom: 15px; }
.feature-card h3 { font-size: 18px; margin-bottom: 10px; color: #fff; }
.feature-card p { color: var(--text-muted); font-size: 14px; }

/* Карточки тарифов лендинга */
.tariff-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 35px 25px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.tariff-card.popular { border-color: var(--cyan); box-shadow: 0 0 20px rgba(0, 240, 255, 0.05); }
.popular-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--cyan); color: #000; font-size: 11px; font-weight: 800; padding: 3px 12px; border-radius: 20px; text-transform: uppercase; }

.tariff-card h3 { font-size: 20px; margin-bottom: 10px; }
.price { font-size: 36px; font-weight: 800; color: var(--cyan); margin-bottom: 20px; }
.tariff-card ul { list-style: none; text-align: left; margin-bottom: 25px; }
.tariff-card li { font-size: 14px; color: #cbd5e1; padding: 6px 0; }

/* ==========================================================================
   СТРАНИЦЫ АВТ / РЕГ (LOGIN & REGISTER)
   ========================================================================== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at center, #111622 0%, var(--bg-main) 100%);
    padding: 20px;
}
.auth-container { width: 100%; max-width: 420px; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 24px; padding: 35px; }
.auth-logo { display: flex; flex-direction: column; align-items: center; text-decoration: none; margin-bottom: 25px; }
.auth-logo .logo-icon { font-size: 40px; margin-bottom: 5px; }
.auth-logo h2 { font-size: 22px; font-weight: 800; color: #fff; }
.auth-card h3 { text-align: center; font-size: 16px; color: var(--text-muted); margin-bottom: 25px; text-transform: uppercase; letter-spacing: 0.5px; }

.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; letter-spacing: 0.5px; }
.input-group input { width: 100%; padding: 12px 16px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 12px; color: #fff; font-size: 15px; transition: border-color 0.2s; }
.input-group input:focus { outline: none; border-color: var(--cyan); }

.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }
.auth-footer a { color: var(--cyan); text-decoration: none; }

/* ТГ Кнопки */
.btn-telegram-auth { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px; margin-top: 15px; background: #229ED9; color: #fff; font-weight: 600; border: none; border-radius: 12px; cursor: pointer; font-size: 14px; transition: background 0.2s; }
.btn-telegram-auth:hover { background: #1c82b6; }
.auth-divider { text-align: center; margin: 20px 0 10px; position: relative; }
.auth-divider span { background: var(--bg-card); padding: 0 10px; color: var(--text-muted); font-size: 11px; position: relative; z-index: 2; }
.auth-divider::before { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1px; background: var(--border); z-index: 1; }

/* ==========================================================================
   ЛИЧНЫЙ КАБИНЕТ (DASHBOARD) И КОРЗИНА
   ========================================================================== */
.dashboard-body { padding-top: 90px; background: radial-gradient(circle at 50% 0%, #111625 0%, var(--bg-main) 60%); }
.dashboard-container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.welcome-text { font-size: 16px; }

/* Двухколоночный грид */
.dashboard-grid { display: grid; grid-template-columns: 350px 1fr; gap: 30px; align-items: start; }

.neon-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 24px; margin-bottom: 20px; }
.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.card-header h3 { font-size: 15px; font-weight: 700; text-transform: uppercase; color: #fff; letter-spacing: 0.5px; }

.stat-value { font-size: 28px; font-weight: 800; color: #fff; }
.stat-small { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.highlight-cyan { color: var(--cyan); font-weight: 600; }

.balance-actions { display: flex; gap: 10px; margin-top: 15px; }
.balance-actions * { flex: 1; }
.telegram-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.telegram-row:last-child { border-bottom: none; }
.mt-10 { margin-top: 10px; } .mt-20 { margin-top: 20px; }

/* Стили корзины в кабинете */
.cart-subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.checkout-tariff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.checkout-tariff-item { background: rgba(255, 255, 255, 0.01); border: 1px solid var(--border); border-radius: 16px; padding: 20px 12px; text-align: center; cursor: pointer; transition: all 0.2s ease; position: relative; }
.checkout-tariff-item:hover { background: #161c2a; border-color: rgba(255, 255, 255, 0.15); }
.checkout-tariff-item.selected { background: rgba(0, 240, 255, 0.03); border-color: var(--cyan); }

.tariff-days { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.tariff-cost { font-size: 22px; font-weight: 800; color: var(--cyan); margin-bottom: 8px; }
.tariff-badge { font-size: 11px; color: var(--text-muted); text-transform: uppercase; }
.tariff-popular-label { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--cyan); color: #000; font-size: 9px; font-weight: 800; padding: 1px 8px; border-radius: 20px; }

.error-box { display: flex; align-items: center; gap: 10px; background: rgba(255, 0, 85, 0.05); border: 1px solid var(--red); padding: 12px; border-radius: 10px; margin-top: 15px; }
.error-text { color: #ffcbdc; font-size: 13px; }

.link-box { display: flex; gap: 8px; margin-top: 10px; }
.link-box code { flex: 1; background: #000; padding: 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 12px; color: var(--cyan); word-break: break-all; }

/* ==========================================================================
   УВЕДОМЛЕНИЯ И ФУТЕР
   ========================================================================== */
.toast { position: fixed; bottom: 20px; right: 20px; padding: 12px 24px; border-radius: 10px; color: #fff; font-size: 14px; font-weight: 600; z-index: 9999; animation: slideIn 0.2s ease forwards; }
.footer { text-align: center; padding: 40px 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 14px; }
.footer a { color: var(--cyan); text-decoration: none; }

@keyframes slideIn { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ МОБИЛОК
   ========================================================================== */
@media (max-width: 850px) {
    .nav-container { padding: 10px 20px; }
    .hero { padding-top: 120px; }
    .hero-buttons { flex-direction: column; width: 100%; max-width: 300px; }
    .hero-stats { gap: 20px; flex-wrap: wrap; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .checkout-tariff-grid { grid-template-columns: 1fr; }
}