:root {
    --bg: #0b0d17;
    --panel-bg: rgba(20, 22, 40, 0.85);
    --card-bg: rgba(30, 32, 55, 0.8);
    --text: #e6e0f0;
    --text-light: #b9b0d0;
    --gold: #d4af37;
    --gold-glow: #f0d060;
    --purple: #8e44ad;
    --purple-glow: #a569bd;
    --accent: #c9a0dc;
    --error: #e67e80;
    --border-glow: rgba(200, 150, 220, 0.3);
    --shadow: 0 0 20px rgba(160, 100, 220, 0.15);
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at 50% 0%, rgba(60,30,80,0.8) 0%, rgba(8,5,20,0.98) 70%);
    z-index: -2;
}
.page { width: 100%; }
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
@media (max-width: 600px) {
    .section { padding: 50px 0; }
}
.section-dark { background: rgba(0,0,0,0.3); }
.section-glass { backdrop-filter: blur(10px); background: rgba(255,255,255,0.03); }
h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.8em;
    text-align: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--gold), var(--gold-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
@media (max-width: 600px) {
    h2 {
        font-size: 1.8em;
    }
}
.section-subtitle {
    text-align: center;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* Шапка */
.site-header {
    padding: 18px 0;
    background: rgba(10,8,18,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--gold), var(--gold-glow));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #000;
}
.logo-text { font-size: 1.5em; font-weight: 600; color: var(--text); }
.nav {
    display: flex;
    align-items: center;
}
.nav a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 30px;
    font-weight: 500;
    transition: color 0.3s;
}
.nav a:hover { color: var(--gold); }
/* Гамбургер */
.burger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    flex-direction: column;
    gap: 5px;
    width: 30px;
}
.burger-btn span {
    display: block;
    height: 2px;
    background: var(--text-light);
    border-radius: 2px;
    transition: 0.3s;
}
.burger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger-btn.active span:nth-child(2) { opacity: 0; }
.burger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
@media (max-width: 768px) {
    .burger-btn { display: flex; }
    .nav {
        display: none;
        position: absolute;
        top: 80px; left: 0; right: 0;
        background: rgba(10,8,18,0.95);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        z-index: 99;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .nav.open { display: flex; }
    .nav a { margin-left: 0; font-size: 1.1em; }
}

.hero { padding: 60px 0 100px; }
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    .hero-copy h1 {
        font-size: 2.2em;
    }
}
.hero-copy h1 {
    font-family: var(--font-display);
    font-size: 3.5em;
    line-height: 1.2;
    margin-bottom: 20px;
}
.hero-copy h1 span { color: var(--gold); }
.hero-copy p {
    font-size: 1.2em;
    color: var(--text-light);
    margin-bottom: 30px;
}
.hero-preview {
    text-align: center;
}
.hero-preview img {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(142,68,173,0.3);
}

/* Карточки */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}
.feature-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255,255,255,0.06);
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(160,100,220,0.3);
    border-color: rgba(200,150,220,0.2);
}
.feature-icon { font-size: 3em; margin-bottom: 15px; }
.feature-card h3 { font-size: 1.4em; margin-bottom: 10px; color: var(--gold); }

/* Форма ввода */
.form-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px 36px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 500px) {
    .form-card { padding: 28px 20px; }
}
.step { display: none; animation: fadeInUp 0.4s ease; }
.step.active { display: block; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.95em;
    letter-spacing: 0.02em;
}
input, select {
    width: 100%;
    padding: 12px 16px;
    background: var(--panel-bg);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    color: var(--text);
    font-size: 1em;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    -webkit-appearance: none;
    appearance: none;
}
input:focus, select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}
.gender-selector { display: flex; gap: 20px; margin: 15px 0; }
@media (max-width: 600px) {
    .gender-selector { gap: 10px; }
    .gender-card { padding: 10px; }
    .gender-card svg { width: 35px; height: 50px; }
}
.gender-card {
    flex: 1;
    background: var(--panel-bg);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.gender-card svg { width: 45px; height: 45px; stroke: var(--text-light); fill: none; stroke-width: 2; }
.gender-card.active { border-color: var(--gold); box-shadow: 0 0 20px rgba(212,175,55,0.4); }
.gender-card.active svg { stroke: var(--gold-glow); }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1em;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-top: 20px;
    text-decoration: none;
    font-family: var(--font-body);
}
.btn-primary {
    background: linear-gradient(135deg, var(--purple), #6c3483);
    color: white;
    box-shadow: 0 6px 18px rgba(142,68,173,0.4);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--purple-glow), #7d3c98);
    box-shadow: 0 6px 25px rgba(142,68,173,0.7);
    transform: translateY(-1px);
}
.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    color: var(--text);
    margin-top: 10px;
}
.btn-gold {
    background: linear-gradient(135deg, var(--gold), #b8860b);
    color: #000;
    font-weight: 700;
}
.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-glow), #d4af37);
    box-shadow: 0 6px 20px rgba(200,150,50,0.6);
    transform: translateY(-1px);
}

.clock-wrapper { text-align: center; margin: 20px 0; }
.clock-svg { filter: drop-shadow(0 0 12px rgba(180, 150, 50, 0.5)); max-width: 100%; height: auto; }

/* Улучшение для touch на мобильных */
input, select, .gender-card, .faq-question, button, a { -webkit-tap-highlight-color: transparent; }
@media (hover: none) {
    .feature-card:hover { transform: none; }
}

/* Анимации */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    font-size: 1.2em;
}
.spinner-magnifier {
    display: inline-block;
    font-size: 2em;
    animation: wiggle 1.2s ease-in-out infinite;
    transform-origin: bottom center;
}
@keyframes wiggle {
    0% { transform: rotate(0deg) translate(3px, 0) rotate(0deg); }
    25% { transform: rotate(90deg) translate(3px, 0) rotate(-90deg); }
    50% { transform: rotate(180deg) translate(3px, 0) rotate(-180deg); }
    75% { transform: rotate(270deg) translate(3px, 0) rotate(-270deg); }
    100% { transform: rotate(360deg) translate(3px, 0) rotate(-360deg); }
}
.spinner-hourglass {
    display: inline-block;
    font-size: 2em;
    animation: hourglass 1.5s ease-in-out infinite;
}
@keyframes hourglass {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(10deg) scale(1.05); }
    50% { transform: rotate(0deg) scale(1); }
    75% { transform: rotate(-10deg) scale(1.05); }
    100% { transform: rotate(0deg) scale(1); }
}
.spin-loupe { /* старый класс для обратной совместимости */ }

/* Отзывы */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
@media (max-width: 900px) {
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .reviews-grid {
        grid-template-columns: 1fr;
    }
}
.review-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}
.review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(160,100,220,0.2);
}
.review-card p { margin-bottom: 12px; line-height: 1.6; }
.review-card strong { display: block; margin-top: 12px; color: var(--gold); }
.review-avatar {
    margin: 10px 0;
}
.review-avatar svg {
    display: block;
    margin: 0 auto;
}
.stars { color: var(--gold); }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.3s;
}
.faq-item.active { border-color: rgba(212,175,55,0.25); }
.faq-question {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    gap: 16px;
}
.faq-question h3 { font-size: 1em; font-weight: 600; color: var(--text); }
.faq-answer {
    padding: 0 24px 20px;
    color: var(--text-light);
    display: none;
    line-height: 1.7;
}
.faq-item.active .faq-answer { display: block; }
.faq-toggle { font-size: 1.5em; color: var(--gold); }

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}
.modal.active { display: flex; }
.modal-content-dark {
    background: var(--panel-bg);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}
.solar-system {
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
}
.solar-system svg {
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.3));
}
.timer-text { margin-top: 15px; color: var(--text-light); }

/* Результат */
#result {
    margin-top: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}
#result.show { opacity: 1; transform: translateY(0); }
.result-header { text-align: center; margin-bottom: 25px; }
.title { font-family: var(--font-display); font-size: 2.5em; color: var(--gold); }
.ascendant {
    display: inline-block;
    background: rgba(255,255,255,0.05);
    padding: 10px 20px;
    border-radius: 20px;
    margin-top: 10px;
}
.planet-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
@media (max-width: 600px) {
    .planet-grid {
        grid-template-columns: 1fr;
    }
}
#conclusion {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 25px;
    margin-top: 25px;
    border-left: 4px solid var(--gold);
    line-height: 1.7;
}
#conclusion h4 { color: var(--gold-glow); font-size: 1.2em; margin-top: 1.2em; margin-bottom: 0.5em; }
.export-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0 20px;
}
.export-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--card-bg);
    border: 2px solid var(--gold);
    color: var(--gold);
    padding: 18px 20px;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    width: 100%;
    cursor: pointer;
}
.export-btn:hover, .export-btn:active {
    background: var(--gold);
    color: #000;
}
.export-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    fill: currentColor;
}
.report-link-box {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 12px;
    margin-top: 10px;
    word-break: break-all;
    text-align: center;
}
.report-link-box a {
    color: var(--gold-glow);
    text-decoration: none;
}
.warning-text {
    font-size: 0.9em;
    margin-top: 15px;
}
.seo-grid {
    max-width: 900px;
    margin: 30px auto 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    font-size: 0.95em;
    color: var(--text-light);
    line-height: 1.7;
}
@media (max-width: 600px) {
    .seo-grid {
        grid-template-columns: 1fr;
    }
}

.hidden { display: none; }
#alertModal .modal-content-dark p {
    margin-bottom: 20px;
    font-size: 1.1em;
}
#alertModal .btn {
    width: auto;
    padding: 10px 30px;
}

/* ── Результат: светила ── */
.luminaries {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
}
@media (max-width: 600px) { .luminaries { grid-template-columns: 1fr; } }
.luminary {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 1em;
    border: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    gap: 8px;
}
.luminary strong { color: var(--gold-glow); }

/* ── Стеллиумы ── */
.stelliums {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}
.stellium {
    background: linear-gradient(135deg, rgba(142,68,173,0.25), rgba(108,52,131,0.25));
    border: 1px solid rgba(165,105,189,0.4);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.95em;
    color: var(--accent);
}
.stellium strong { color: var(--gold-glow); }

/* ── Секции результата ── */
.planets, .aspects, .extras {
    margin-top: 24px;
}
.planets h3, .aspects h3, .extras h3 {
    font-family: var(--font-display);
    font-size: 1.5em;
    color: var(--gold);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(212,175,55,0.2);
}

/* ── Карточка планеты ── */
.planet-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid rgba(255,255,255,0.06);
    border-left: 3px solid var(--purple);
}
.planet-name { font-weight: 700; color: var(--gold); font-size: 1.05em; }
.planet-sign { color: var(--text); font-size: 0.9em; line-height: 1.5; }
.planet-house { color: var(--text-light); font-size: 0.88em; line-height: 1.5; }
.emoji { margin-right: 4px; }

/* ── Аспекты ── */
.aspect {
    background: var(--card-bg);
    padding: 12px 16px;
    border-radius: 12px;
    margin: 8px 0;
    border: 1px solid rgba(255,255,255,0.06);
}
.aspect-type { font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.aspect-type .desc { font-weight: 400; color: var(--text-light); font-size: 0.9em; }
.aspect-links { color: var(--text-light); font-size: 0.9em; line-height: 1.6; }

/* ── Доп. точки ── */
.extras {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 16px 20px;
    border: 1px solid rgba(255,255,255,0.06);
}
.extra-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.88em;
    margin: 4px;
    color: var(--text-light);
}
.extra-item .name { color: var(--accent); font-weight: 600; }

/* Юридические страницы (Политика конфиденциальности / Пользовательское соглашение) */
.legal-page { max-width: 820px; }
.legal-page h3 {
    font-family: var(--font-display);
    color: var(--gold-glow);
    font-size: 1.4em;
    margin: 28px 0 10px;
}
.legal-page p, .legal-page li {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 10px;
}
.legal-page ul { padding-left: 22px; margin-bottom: 10px; }
.legal-page a { color: var(--gold); }

/* Чекбокс согласия с политикой/соглашением */
.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    margin: 16px 0;
    font-size: 0.9em;
    color: var(--text-light);
    line-height: 1.5;
}
.consent-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--gold);
    cursor: pointer;
    appearance: auto;
}
.consent-check input[type="checkbox"]:checked {
    accent-color: var(--gold);
    background-color: var(--gold);
}
.consent-check label { cursor: pointer; }
.consent-check a { color: var(--gold); text-decoration: underline; }

/* Прогресс бар */
.progress-container {
    width: 100%;
}
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-glow), var(--gold));
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}
.progress-label {
    text-align: center;
    margin-top: 8px;
    font-size: 0.85em;
    color: var(--text-light);
    font-weight: 500;
}
