:root {
    /* Цветовая палитра: глубокий космос + неоновые акценты */
    --bg-gradient: linear-gradient(135deg, #060b19 0%, #0c102b 50%, #050714 100%);
    --card-bg: rgba(13, 20, 43, 0.45);
    --card-border: rgba(99, 102, 241, 0.15);
    --text-light: #f1f5f9;
    --text-muted: #64748b;
    
    /* Неоновые источники света */
    --neon-cyan: #06b6d4;
    --neon-indigo: #6366f1;
    --neon-purple: #d946ef;
    
    --glow-cyan: rgba(6, 182, 212, 0.3);
    --glow-indigo: rgba(99, 102, 241, 0.4);
    
    --success: #10b981;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- ВЕРХНЕЕ МЕНЮ (NAVBAR) --- */
.navbar {
    background: rgba(5, 7, 20, 0.75);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.logo mark {
    background: none;
    color: var(--neon-cyan);
    text-shadow: 0 0 12px var(--glow-cyan);
}

/* Центрированное меню-капсула */
.menu {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-item {
    color: #94a3b8;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
}

.menu-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.menu-item.active {
    background: linear-gradient(90deg, var(--neon-indigo), var(--neon-cyan));
    color: #fff;
    box-shadow: 0 0 15px var(--glow-indigo);
}

.btn-auth {
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    box-shadow: inset 0 0 8px rgba(6, 182, 212, 0.1);
}
.btn-auth:hover {
    background: var(--neon-cyan);
    color: #050714;
    box-shadow: 0 0 15px var(--neon-cyan);
}

/* --- ОСНОВНОЙ КОНТЕНТ --- */
.main-content {
    max-width: 1200px;
    margin: 130px auto 60px auto;
    padding: 0 24px;
}

.page-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}
.page-section.active {
    display: block;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
}
.page-header h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 14px;
    background: linear-gradient(to right, #ffffff, #94a3b8, var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.page-header p {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 650px;
    margin: 0 auto;
}

/* --- ТЕХНОЛОГИЧНЫЕ СТЕКЛЯННЫЕ КАРТОЧКИ --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 35px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}
.card:hover {
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 15px 35px -10px rgba(6, 182, 212, 0.1);
}

/* Генератор сетка */
.generator-container {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 30px;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 13px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input, select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    font-size: 15px;
    background: rgba(5, 7, 20, 0.5);
    color: #fff;
}
input:focus, select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
    background: rgba(5, 7, 20, 0.8);
}

/* Главная кнопка */
button[type="submit"], .btn-primary-action {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, var(--neon-indigo), var(--neon-cyan));
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--glow-indigo);
}
button[type="submit"]:hover, .btn-primary-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(6, 182, 212, 0.5);
}

/* Наш щит-дисклеймер в форме */
.form-disclaimer {
    margin-top: 20px;
    font-size: 12px;
    line-height: 1.6;
    color: #94a3b8;
    background: rgba(239, 68, 68, 0.05);
    border-left: 3px solid var(--danger);
    padding: 12px 16px;
    border-radius: 8px;
}

/* Правая панель статуса */
.status-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-style: dashed;
}

.robot-animation {
    font-size: 60px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
    text-shadow: 0 0 20px var(--glow-indigo);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.success-icon {
    font-size: 60px;
    color: var(--success);
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 15px;
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.12); }

/* --- МОДУЛЬНЫЕ СЕТКИ ДЛЯ КОНТЕНТА --- */
.grid-layout {
    display: grid;
    gap: 24px;
    margin-top: 20px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Элементы функций */
.info-card .card-icon {
    font-size: 36px;
    margin-bottom: 15px;
}
.info-card h3, .template-detail-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #fff;
}
.info-card p, .template-detail-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* Безопасные списки */
.card-list {
    list-style: none;
    margin-top: 15px;
}
.card-list li {
    font-size: 13px;
    color: #cbd5e1;
    margin-bottom: 8px;
    padding-left: 18px;
    position: relative;
}
.card-list li::before {
    content: "•";
    color: var(--neon-cyan);
    position: absolute;
    left: 0;
    font-size: 16px;
}

/* Теги статуса шаблонов */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}
.status-badge.green { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid var(--success); }
.status-badge.red { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid var(--danger); }

.template-detail-card.рискованный {
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.02);
}

/* Тарифы */
.pricing-card {
    text-align: center;
    position: relative;
}
.pricing-card .price {
    font-size: 44px;
    font-weight: 800;
    margin: 15px 0 5px 0;
    color: #fff;
}
.pricing-card .price small { font-size: 14px; color: var(--text-muted); font-weight: 400; }
.pricing-card .price-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.card-hr { border: none; border-top: 1px solid rgba(255,255,255,0.05); margin: 20px 0; }
.pricing-card .card-list { text-align: left; margin-bottom: 25px; }

.pricing-card.featured {
    border-color: var(--neon-purple);
    box-shadow: 0 0 30px rgba(217, 70, 239, 0.15);
    background: linear-gradient(180deg, rgba(217, 70, 239, 0.05) 0%, var(--card-bg) 100%);
}
.ribbon {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--neon-purple);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px var(--neon-purple);
}

/* Страница безопасности и о проекте */
.legal-container h2 { font-size: 22px; margin: 25px 0 12px 0; color: #fff; }
.legal-container h2:first-child { margin-top: 0; }
.legal-container p, .about-container p { font-size: 15px; color: #cbd5e1; line-height: 1.7; margin-bottom: 15px; }

.about-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 35px;
    background: rgba(255,255,255,0.02);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.03);
}
.stat-item .stat-num { font-size: 32px; font-weight: 800; color: var(--neon-cyan); text-shadow: 0 0 10px var(--glow-cyan); }
.stat-item .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

/* --- МОДАЛЬНОЕ ОКНО АВТОРИЗАЦИИ --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 7, 20, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    width: 100%;
    max-width: 450px;
    position: relative;
    border-color: var(--neon-indigo);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.25);
    background: rgba(12, 16, 43, 0.95);
}
.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
}
.close-modal:hover { color: #fff; }

.auth-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 15px;
    margin-bottom: 25px;
}
.auth-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    padding: 5px 10px;
}
.auth-tab-btn.active {
    color: var(--neon-cyan);
    border-bottom: 2px solid var(--neon-cyan);
}

.checkbox-group {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 24px;
}
.checkbox-group input { width: auto; margin-top: 3px; cursor: pointer; }
.checkbox-label { font-size: 12px; color: #cbd5e1; text-transform: none; line-height: 1.5; }
.legal-link { color: var(--neon-cyan); text-decoration: underline; }

.btn-submit-auth {
    width: 100%;
    padding: 14px;
    background: var(--neon-indigo);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.btn-submit-auth:hover { background: #5356e6; box-shadow: 0 0 15px var(--glow-indigo); }

/* --- ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ --- */
.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}