@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-obsidian: #0E0E0E;
    --text-main: #ffffff;
    --text-muted: #a3a3a3;
    --input-bg: #E2E2E2;
    --accent: #9E4A2E;
    --accent-hover: #b55535;
    --card-bg: #151515;
    --border-color: #2a2a2a;
    
    /* Цвета для диаграмм и Нье-па */
    --color-lung: #5A6B7C;
    --color-tripa: #9E4A2E;
    --color-beken: #8C8661;
    --color-norma: #e2e2e2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-obsidian);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* --- Фоновые слои --- */
.bg-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 650px;
    background-size: cover; background-position: center top; z-index: -4;
    opacity: 0.65; transition: opacity 1.5s ease;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%);
}

.bg-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; min-height: 100vh;
    background: linear-gradient(to bottom, rgba(14, 14, 14, 0.2) 0%, rgba(14, 14, 14, 1) 500px); z-index: -3;
}

.tibetan-gradient, .disclaimer-gradient {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -2; opacity: 0; transition: opacity 2s ease;
}
.tibetan-gradient { background: radial-gradient(circle at 50% 30%, rgba(158, 74, 46, 0.15) 0%, rgba(35, 45, 60, 0.1) 40%, rgba(14, 14, 14, 1) 80%); }
.disclaimer-gradient { background: radial-gradient(circle at 50% 40%, rgba(74, 110, 142, 0.25) 0%, rgba(35, 45, 60, 0.1) 40%, rgba(14, 14, 14, 1) 80%); transition: opacity 1s ease; }

#particles-canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }

.container { max-width: 1400px; margin: 0 auto; padding: 60px 50px; position: relative; z-index: 1; }

#disclaimer-link {
    position: absolute; top: 30px; right: 50px; color: #7a8b99;
    font-size: 0.9rem; cursor: pointer; z-index: 100; transition: color 0.3s ease; font-weight: 300;
}
#disclaimer-link:hover { color: #a8c0d6; }

/* --- ВЕРХНЯЯ СЕКЦИЯ --- */
.top-section { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 45px; }
.text-content { flex: 0 0 45%; }
h1 { font-size: 3.5rem; font-weight: 400; margin-bottom: 25px; letter-spacing: -0.5px; line-height: 1.1; white-space: nowrap; }
.subtitle { font-size: 0.95rem; color: var(--text-main); margin-bottom: 35px; font-weight: 300; }
.description { font-size: 1.15rem; color: var(--text-main); line-height: 1.4; margin-bottom: 35px; font-weight: 400; }
.description.small { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; font-weight: 300; }

.timeline-container { flex: 1; display: flex; justify-content: flex-end; margin-top: 140px; }
.timeline-wrapper { width: 100%; max-width: 800px; display: flex; flex-direction: column; align-items: center; }
.timeline-title { font-size: 1.1rem; margin-bottom: 30px; color: var(--text-main); text-align: center; }
.timeline { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.timeline-step { font-size: 0.8rem; color: var(--text-main); text-align: center; position: relative; line-height: 1.3; cursor: default; transition: color 0.3s ease, text-shadow 0.3s ease; flex: 0 0 auto; }
.timeline-step.active-step { color: var(--accent); text-shadow: 0 0 10px rgba(158, 74, 46, 0.6); }
.timeline-line { flex-grow: 1; height: 1px; background-color: var(--text-muted); margin: 0 15px; position: relative; max-width: 60px; display: flex; align-items: center; }
.timeline-line::after { content: ''; position: absolute; right: 0; width: 4px; height: 4px; background-color: var(--text-main); border-radius: 50%; }

/* --- ФОРМЫ --- */
.form-section { width: 100%; }
.form-grid { display: grid; grid-template-columns: 320px 320px 1fr; column-gap: 65px; row-gap: 75px; align-items: end; }
.form-group { display: flex; flex-direction: column; gap: 12px; }
.form-label { font-size: 1rem; color: var(--text-main); font-weight: 400; }

.group-gender { grid-column: 1; grid-row: 1; }
.group-dob { grid-column: 2; grid-row: 1; }
.group-blood { grid-column: 1; grid-row: 2; }
.group-season { grid-column: 2; grid-row: 2; }
.group-btn { grid-column: 3; grid-row: 2; display: flex; align-items: flex-end; justify-content: flex-end; padding-bottom: 0; }

.form-control { width: 100%; height: 50px; background-color: var(--input-bg); border: none; border-radius: 4px; padding: 0 16px; font-family: 'Inter', sans-serif; font-size: 0.95rem; color: #000; outline: none; transition: background-color 0.3s ease; }
.form-control::placeholder { color: #888; }
.form-control:focus { background-color: #ffffff; }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; background-size: 14px auto; cursor: pointer; padding-right: 40px;
}

.radio-group { display: flex; gap: 15px; height: 50px; }
.radio-label { flex: 1; background-color: var(--input-bg); border-radius: 4px; display: flex; align-items: center; justify-content: flex-start; padding-left: 15px; cursor: pointer; color: #000; font-size: 0.95rem; font-weight: 500; transition: all 0.3s ease; }
.radio-label input { display: none; }
.radio-dot { width: 10px; height: 10px; border-radius: 50%; background-color: #999; margin-right: 10px; transition: background-color 0.3s ease; }
.radio-label.active { background-color: var(--input-bg); }
.radio-label.active .radio-dot { background-color: var(--accent); }

.btn-submit { background-color: var(--accent); color: var(--text-main); border: none; border-radius: 6px; font-size: 0.95rem; font-weight: 400; cursor: pointer; transition: all 0.3s ease; height: 50px; padding: 0 40px; white-space: nowrap; }
.btn-submit:hover { background-color: var(--accent-hover); box-shadow: 0 5px 15px rgba(158, 74, 46, 0.4); transform: translateY(-1px); }
.btn-submit:active { transform: scale(0.98); }
.btn-large { display: block; margin: 0 auto; padding: 16px 40px; height: auto; }
.btn-submit:disabled { background-color: #555; cursor: not-allowed; box-shadow: none; transform: none; }

.nav-arrows { position: fixed; bottom: 35px; right: 40px; display: flex; gap: 15px; z-index: 100; display: none; }
.nav-arrow-btn { width: 50px; height: 50px; border-radius: 50%; background-color: rgba(21, 21, 21, 0.8); border: 1px solid var(--border-color); color: var(--text-main); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.5rem; transition: all 0.3s ease; backdrop-filter: blur(5px); }
.nav-arrow-btn:hover { background-color: var(--accent); border-color: var(--accent); box-shadow: 0 5px 15px rgba(158, 74, 46, 0.4); transform: translateY(-2px); }

/* --- VIEWS --- */
#intro-view { display: block; }
#step1-result-view, #step2-view, #step2-result-view, #step3-view, #paywall-view, #step3-result-view { display: none; animation: fadeIn 0.8s ease forwards; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.results-header { text-align: center; margin-bottom: 60px; }
.results-header h2 { font-size: 2.5rem; font-weight: 400; margin-bottom: 20px; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; margin-bottom: 30px; }
.result-card { background: rgba(21, 21, 21, 0.4); border: 1px solid var(--border-color); border-radius: 8px; padding: 30px; transition: all 0.3s ease; display: flex; flex-direction: column; backdrop-filter: blur(5px); position: relative; }
.result-card:hover { border-color: rgba(158, 74, 46, 0.4); }

.results-grid > p {display: none !important;}

.card-title { font-size: 1.2rem; color: var(--accent); margin-bottom: 20px; font-weight: 400; border-bottom: 1px solid var(--border-color); padding-bottom: 12px; }
.data-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.95rem; }
.data-label { color: var(--text-muted); }
.data-value { color: var(--text-main); font-weight: 500; text-align: right; max-width: 55%; }
.data-block { margin-bottom: 16px; }
.data-block-text { color: var(--text-main); font-size: 0.95rem; line-height: 1.6; margin-top: 8px; }

/* Карточка PDF и архетип */
.personality-card { margin-bottom: 60px; background: rgba(21, 21, 21, 0.6); padding-top: 40px; }
.pdf-btn { position: absolute; top: 20px; right: 20px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-color); border-radius: 6px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; color: var(--text-muted); z-index: 10; }
.pdf-btn:hover { background: var(--accent); border-color: var(--accent); color: white; transform: translateY(-2px); }

.archetype-container { display: flex; flex-direction: column; align-items: center; margin-bottom: 60px; padding-bottom: 40px; border-bottom: 1px solid var(--border-color); }
.archetype-visual { width: 380px; height: 380px; border-radius: 50%; position: relative; display: flex; align-items: center; justify-content: center; margin-bottom: 35px; z-index: 1; }
.archetype-visual::before, .archetype-visual::after { content: ''; position: absolute; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: -1; }
.archetype-visual::before { width: 100%; height: 100%; border: 2px dashed rgba(255,255,255,0.2); animation: spin-slow 15s linear infinite; }
.archetype-visual::after { width: 75%; height: 75%; border: 1px solid rgba(255,255,255,0.4); animation: spin-slow-reverse 10s linear infinite; }
.archetype-icon { font-size: 7rem; color: #fff; text-shadow: 0 0 25px rgba(255,255,255,0.5); z-index: 2; }
.archetype-text-badge { text-align: center; font-size: 1.8rem; font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; }
.archetype-text-sub { font-size: 1rem; color: var(--text-muted); margin-top: 5px; font-weight: 400; }

@keyframes spin-slow { 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes spin-slow-reverse { 100% { transform: translate(-50%, -50%) rotate(-360deg); } }

/* Эффекты стихий */
.effect-fire { animation: pulse-fire 2s infinite alternate; border: 1px solid rgba(230, 81, 0, 0.4); }
.visual-fire { background: radial-gradient(circle, rgba(230, 81, 0, 0.8) 0%, rgba(230, 81, 0, 0) 70%); box-shadow: 0 0 30px rgba(230, 81, 0, 0.6); }
.effect-water { animation: wave-water 3s infinite alternate; border: 1px solid rgba(0, 100, 255, 0.3); }
.visual-water { background: radial-gradient(circle, rgba(0, 100, 255, 0.6) 0%, rgba(0, 100, 255, 0) 70%); box-shadow: 0 0 30px rgba(0, 100, 255, 0.4); border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; animation: morph-water 4s ease-in-out infinite alternate !important; }
@keyframes morph-water { 0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; } 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; } }
.effect-earth { border-color: rgba(218, 165, 32, 0.4); box-shadow: 0 4px 20px rgba(218, 165, 32, 0.15); }
.visual-earth { background: radial-gradient(circle, rgba(218, 165, 32, 0.7) 0%, rgba(218, 165, 32, 0) 70%); border-radius: 20px !important; box-shadow: 0 0 30px rgba(218, 165, 32, 0.5); }
.visual-earth::before { border-radius: 25px !important; border: 3px solid rgba(218, 165, 32, 0.4) !important; }
.visual-earth::after { border-radius: 15px !important; border: 2px dashed rgba(218, 165, 32, 0.6) !important; }
.effect-metal { transition: all 0.4s ease; border-color: rgba(200, 200, 200, 0.3); }
.visual-metal { background: radial-gradient(circle, rgba(220, 220, 220, 0.8) 0%, rgba(220, 220, 220, 0) 70%); box-shadow: inset 0 0 20px rgba(255,255,255,0.8), 0 0 30px rgba(255,255,255,0.3); }
.effect-wood { animation: breathe-wood 4s infinite alternate; }
.visual-wood { background: radial-gradient(circle, rgba(34, 139, 34, 0.7) 0%, rgba(34, 139, 34, 0) 70%); box-shadow: 0 0 30px rgba(34, 139, 34, 0.5); }

.anim-structured::before { animation: spin-slow 25s linear infinite !important; border-style: dotted !important; border-width: 4px !important; opacity: 0.6; }
.anim-structured::after { animation: spin-slow-reverse 20s steps(12) infinite !important; border-radius: 10px !important; border-color: rgba(255,255,255,0.8) !important; }
.anim-active::before { animation: spin-slow 6s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite !important; border-style: dashed !important; border-width: 3px !important; }
.anim-active::after { animation: spin-slow-reverse 4s ease-in-out infinite alternate !important; transform: translate(-50%, -50%) scale(1.1); }
.anim-fluid::before { animation: spin-slow 18s ease-in-out infinite alternate !important; border-radius: 40% 60% 70% 30% / 40% 50% 60% 50% !important; }
.anim-fluid::after { animation: spin-slow-reverse 14s ease-in-out infinite alternate !important; border-radius: 60% 40% 30% 70% / 60% 30% 70% 40% !important; }
.anim-light::before { animation: spin-slow 8s linear infinite !important; border: 1px solid rgba(255,255,255,0.6) !important; box-shadow: inset 0 0 10px rgba(255,255,255,0.2); }
.anim-light::after { animation: spin-slow-reverse 12s linear infinite !important; border: 1px dashed rgba(255,255,255,0.3) !important; }

/* Тексты сил */
.personality-text-wrapper { display: flex; flex-direction: column; align-items: center; }
.force-block { width: 100%; max-width: 65ch; margin-bottom: 15px; border-radius: 6px; }
.force-title { font-size: 1.15rem; font-weight: 500; color: var(--text-main); border-left: 3px solid var(--force-color, var(--accent)); padding: 14px 18px; background: rgba(255,255,255,0.02); cursor: pointer; transition: all 0.3s ease; display: flex; justify-content: space-between; align-items: center; border-radius: 0 6px 6px 0; user-select: none; }
.force-title:hover { background: rgba(255,255,255,0.06); box-shadow: inset 120px 0 80px -80px var(--force-color, var(--accent)); }
.force-title::after { content: '+'; font-size: 1.5rem; color: var(--text-muted); transition: transform 0.3s ease; line-height: 1; }
.force-title.active::after { transform: rotate(45deg); color: var(--text-main); }
.force-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, opacity 0.4s ease, margin 0.4s ease; opacity: 0; margin-left: 15px; }
.force-desc { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 12px; }
.force-text { font-size: 0.95rem; line-height: 1.6; color: #d1d1d1; margin-bottom: 10px; }
.force-text strong { color: var(--text-main); font-weight: 500; }

/* Survey */
.survey-container { max-width: 900px; margin: 0 auto 60px auto; }
.survey-group { margin-bottom: 30px; background: rgba(21, 21, 21, 0.5); border: 1px solid var(--border-color); border-radius: 8px; padding: 35px; transition: border-color 0.3s ease; backdrop-filter: blur(5px); }
.survey-group:hover { border-color: rgba(255, 255, 255, 0.1); }
.survey-q-title { font-size: 1.15rem; color: var(--text-main); margin-bottom: 25px; font-weight: 400; }
.survey-options { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.survey-opt { background-color: var(--input-bg); color: #000; padding: 18px 24px; border-radius: 6px; cursor: pointer; border: 2px solid transparent; font-size: 0.95rem; font-weight: 500; line-height: 1.4; transition: all 0.3s ease; display: flex; align-items: center; }
.survey-opt input { display: none; }
.survey-opt:hover { background-color: #ffffff; transform: translateY(-2px); }
.survey-opt.selected { background-color: var(--accent); border-color: var(--accent); color: #ffffff !important; box-shadow: 0 5px 15px rgba(158, 74, 46, 0.4); }

/* Charts */
.chart-wrapper { display: flex; align-items: center; justify-content: center; margin-top: 20px; margin-bottom: 20px; }
.chart-legend { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.legend-item { display: flex; align-items: center; font-size: 0.85rem; color: var(--text-muted); }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; margin-right: 10px; }

/* Meals */
.meal-time-container { max-width: 600px; margin: 0 auto 60px auto; background: rgba(21, 21, 21, 0.5); border: 1px solid var(--border-color); border-radius: 8px; padding: 40px; backdrop-filter: blur(5px); }
.meal-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid var(--border-color); }
.meal-row:last-child { border-bottom: none; }
.meal-checkbox-wrapper { display: flex; align-items: center; gap: 15px; cursor: pointer; }
.meal-checkbox-wrapper input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; }
.meal-name { font-size: 1.1rem; color: var(--text-main); }
.meal-time-input { background-color: var(--input-bg); border: none; border-radius: 4px; padding: 10px 15px; font-family: 'Inter', sans-serif; font-size: 1rem; color: #000; outline: none; width: 120px; cursor: pointer; }
.meal-time-input:disabled { opacity: 0.3; cursor: not-allowed; }
.product-tag { display: inline-block; padding: 8px 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 30px; font-size: 0.95rem; color: #e2e2e2; margin: 0 10px 10px 0; transition: all 0.2s ease; }
.product-tag:hover { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.3); }

/* --- НОВОЕ: СТИЛЬ УНИКАЛЬНОЙ ССЫЛКИ --- */
.unique-link-box {
    margin: 20px auto; max-width: 500px; padding: 15px; background: rgba(158, 74, 46, 0.1); 
    border: 1px dashed var(--accent); border-radius: 6px; color: #fff; font-size: 0.95rem; word-break: break-all;
}

@media (max-width: 1200px) { h1 { font-size: 3rem; white-space: normal; } }
@media (max-width: 1100px) { .form-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; column-gap: 40px; } .group-btn { grid-column: 1 / -1; grid-row: 3; justify-content: flex-start; } .timeline-line { max-width: 30px; } }
@media (max-width: 900px) { .top-section { flex-direction: column; } .text-content, .timeline-container { flex: none; width: 100%; } .timeline-container { justify-content: flex-start; margin-top: 50px; } .timeline-title { text-align: left; } .timeline-wrapper { align-items: flex-start; } .timeline { justify-content: flex-start; flex-wrap: wrap; gap: 15px 0; } }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } .group-gender, .group-dob, .group-blood, .group-season, .group-btn { grid-column: 1; grid-row: auto; } .container { padding: 40px 25px; } h1 { font-size: 2.5rem; } .timeline-line { display: none; } .timeline-step { width: 100%; margin-bottom: 10px; padding-left: 15px; border-left: 2px solid var(--text-muted); text-align: left;} .survey-options { grid-template-columns: 1fr; } .survey-group { padding: 25px 20px; } .meal-row { flex-direction: column; align-items: flex-start; gap: 15px; } .meal-time-input { width: 100%; } .nav-arrows { bottom: 20px; right: 20px; } .archetype-visual { width: 280px; height: 280px; } .archetype-icon { font-size: 5rem; } #disclaimer-link { top: 15px; right: 20px; } }