:root {
    --bg-color: #020203;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    
    /* Цвета: Mystic Violet & Cyan */
    --accent-glow: #7c3aed; 
    --accent-secondary: #2dd4bf; 
    
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased; /* Сглаживание шрифтов для Apple */
}

/* --- Фон --- */
.ambient-light {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: radial-gradient(circle at 50% -20%, #1a103c, #020203);
}
.blob {
    position: fixed; border-radius: 50%; filter: blur(80px); opacity: 0.4; z-index: -1;
    animation: float 15s infinite alternate ease-in-out;
    will-change: transform; /* Оптимизация для телефонов */
}
.blob-1 { top: -10%; left: -10%; width: 45vw; height: 45vw; background: rgba(124, 58, 237, 0.2); }
.blob-2 { bottom: -10%; right: -10%; width: 50vw; height: 50vw; background: rgba(45, 212, 191, 0.15); animation-delay: -5s; }

@keyframes float { 0% { transform: translate(0, 0); } 100% { transform: translate(30px, 50px); } }

/* --- Header --- */
.glass-header {
    position: fixed; top: 0; width: 100%; height: 70px; padding: 0 5%;
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(2, 2, 3, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border); z-index: 1000;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { width: 32px; height: 32px; fill: #fff; }
.brand-name { font-weight: 700; font-size: 1.2rem; color: #fff; }

nav { display: flex; align-items: center; }
nav a { margin: 0 1rem; text-decoration: none; color: var(--text-secondary); font-size: 0.9rem; transition: 0.3s; }
nav a:hover { color: #fff; }

.btn-header {
    padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.85rem;
    background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; border: 1px solid var(--glass-border);
    transition: 0.3s; white-space: nowrap;
}
.btn-header:hover { background: #fff; color: #000; }

/* --- Hero --- */
.hero {
    min-height: 85vh; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 120px 20px 40px;
}
.hero h1 {
    /* Адаптивный шрифт: меняется от 2.5rem до 4rem в зависимости от ширины */
    font-size: clamp(2.5rem, 8vw, 4.5rem); 
    font-weight: 800; line-height: 1.1; margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #fff 0%, #94a3b8 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 1.1rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 2.5rem; }

.btn-primary {
    padding: 1rem 2.5rem; border-radius: 14px; background: #fff; color: #000;
    text-decoration: none; font-weight: 700; display: inline-block;
    box-shadow: 0 0 25px rgba(255,255,255,0.15); transition: 0.3s;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 0 40px rgba(255,255,255,0.3); }

/* --- Section Titles --- */
section { padding: 5rem 5%; max-width: 1200px; margin: 0 auto; }
section h2 { font-size: clamp(2rem, 5vw, 2.5rem); text-align: center; margin-bottom: 1rem; color: #fff; }
.section-desc { text-align: center; color: var(--text-secondary); margin-bottom: 3rem; max-width: 700px; margin-left: auto; margin-right: auto; padding: 0 10px;}

/* --- Technologies Grid --- */
.tech-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}
.tech-card {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    padding: 2rem; border-radius: 16px; display: flex; flex-direction: column; gap: 15px;
    transition: 0.3s; position: relative; overflow: hidden;
}
.tech-card:hover { border-color: rgba(124, 58, 237, 0.3); background: rgba(255,255,255,0.04); }
.tech-icon { width: 36px; height: 36px; color: var(--accent-secondary); margin-bottom: 5px; }
.tech-card h3 { color: #fff; font-size: 1.2rem; }
.tech-card p { font-size: 0.95rem; color: #ccc; line-height: 1.5; }

/* --- Pricing --- */
.payment-methods {
    display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 3rem;
}
.pay-tag {
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
    padding: 6px 14px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; color: #fff;
    display: flex; align-items: center; gap: 6px;
}
.pay-tag span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-secondary); }

.pricing-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.price-card {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    padding: 2rem; border-radius: 16px; text-align: center; display: flex; flex-direction: column;
    transition: 0.3s; position: relative;
}
.price-card.popular {
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.08), rgba(0,0,0,0));
    border-color: rgba(124, 58, 237, 0.4);
}
.badge {
    background: var(--accent-glow); color: #fff; padding: 4px 10px; font-size: 0.7rem; font-weight: 700;
    border-radius: 20px; margin-bottom: 10px; align-self: center;
}
.price { font-size: 2rem; font-weight: 700; color: #fff; margin: 10px 0 20px; }
.features-list { list-style: none; text-align: left; padding-left: 10px; margin-bottom: 20px; flex-grow: 1; }
.features-list li { margin-bottom: 8px; font-size: 0.9rem; color: #ccc; display: flex; gap: 8px; }
.check { color: var(--accent-secondary); }

.btn-plan {
    width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--glass-border);
    color: #fff; text-decoration: none; font-size: 0.9rem; transition: 0.3s;
}
.btn-plan:hover { background: #fff; color: #000; }
.btn-popular { background: var(--accent-glow); border-color: var(--accent-glow); }

/* --- TERMS PAGE STYLES --- */
.terms-hero {
    text-align: center; padding: 120px 20px 40px;
    background: radial-gradient(circle at center, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
}
.terms-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 10px; color: #fff; }
.update-date { color: var(--text-secondary); font-size: 0.9rem; font-family: 'JetBrains Mono', monospace; opacity: 0.7; }

.doc-wrapper {
    display: grid; grid-template-columns: 260px 1fr; gap: 50px;
    max-width: 1100px; margin: 0 auto; padding: 0 5% 100px;
}
.doc-sidebar {
    position: sticky; top: 100px; height: fit-content;
    padding-right: 20px; border-right: 1px solid var(--glass-border);
}
.doc-nav-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.doc-nav-list a { text-decoration: none; color: #888; font-size: 0.9rem; transition: 0.3s; }
.doc-nav-list a:hover { color: #fff; }

.doc-content {
    background: rgba(255, 255, 255, 0.02); border: 1px solid var(--glass-border);
    border-radius: 20px; padding: 40px; backdrop-filter: blur(10px);
}
.doc-section { margin-bottom: 40px; scroll-margin-top: 90px; }
.doc-section h2 { font-size: 1.4rem; color: #fff; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
.doc-num { color: var(--accent-glow); font-family: 'JetBrains Mono', monospace; font-right: 10px; }
.doc-section p, .doc-section li { color: #d1d5db; font-size: 0.95rem; line-height: 1.7; margin-bottom: 15px; }

/* --- Footer --- */
footer {
    border-top: 1px solid var(--glass-border); padding: 3rem 5%; margin-top: 2rem;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px;
    font-size: 0.9rem; color: #666;
}
footer a { color: #888; text-decoration: none; margin-left: 20px; transition: 0.2s; }

/* ========================================= */
/*       MOBILE OPTIMIZATION (Media Queries) */
/* ========================================= */
@media (max-width: 900px) {
    /* Общее */
    .hero { padding-top: 100px; min-height: auto; padding-bottom: 60px; }
    
    /* Шапка */
    .glass-header { padding: 0 20px; height: 60px; }
    nav { display: none; } /* Скрываем ссылки меню на планшетах и телефонах */
    .btn-header { font-size: 0.8rem; padding: 0.4rem 0.8rem; }
    
    /* Сетки */
    .tech-grid { grid-template-columns: 1fr; } /* Одна колонка */
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    
    /* Terms Page Mobile */
    .doc-wrapper { grid-template-columns: 1fr; gap: 30px; padding: 0 20px 60px; }
    .doc-sidebar { display: none; } /* Скрываем боковое меню, оставляем контент */
    .doc-content { padding: 25px 20px; }
    .terms-hero { padding-top: 100px; }
}

@media (max-width: 480px) {
    /* Телефоны (iPhone, Android) */
    .hero h1 { font-size: 2.5rem; }
    .brand-name { font-size: 1rem; } /* Уменьшаем лого, чтобы влезла кнопка */
    
    .tech-card, .price-card { padding: 1.5rem; } /* Меньше отступов внутри карт */
    
    .payment-methods { gap: 8px; }
    .pay-tag { font-size: 0.7rem; padding: 4px 10px; }
    
    footer { flex-direction: column; text-align: center; padding-bottom: 80px; }
    footer a { margin: 0 10px; display: inline-block; margin-bottom: 10px; }
    
    /* Кнопки больше для пальца */
    .btn-primary, .btn-plan, .btn-header { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
}
