/* ===== Общие стили ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6C5CE7;
    --primary-dark: #5A4BD1;
    --primary-light: #A29BFE;
    --secondary: #00CEC9;
    --accent: #FD79A8;
    --dark: #2D3436;
    --gray: #636E72;
    --light-gray: #DFE6E9;
    --bg: #F8F9FA;
    --white: #FFFFFF;
    --success: #00B894;
    --warning: #FDCB6E;
    --danger: #E17055;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-lg: 20px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Кнопки ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
    display: block;
}

/* ===== Навигация ===== */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
    text-decoration: none;
}

.logo-icon {
    font-size: 28px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.user-name {
    font-weight: 600;
    color: var(--primary);
    padding: 8px 16px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: var(--radius);
}

/* ===== Hero секция ===== */
.hero {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: var(--white);
    padding: 80px 0;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.hero-buttons .btn-outline {
    border-color: var(--white);
    color: var(--white);
}

.hero-buttons .btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 800;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

/* ===== Анимация сканирования лица ===== */
.face-scan-animation {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.face-circle {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.face-scan-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% { top: 0; }
    50% { top: calc(100% - 3px); }
    100% { top: 0; }
}

.face-scan-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
}

.scan-result-card {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: var(--dark);
    border-radius: var(--radius);
    padding: 20px;
    width: 300px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { transform: translateX(-50%) translateY(20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.scan-result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-bottom: 15px;
}

.scan-result-icon {
    font-size: 20px;
}

.bar-row {
    margin-bottom: 10px;
}

.bar-row span {
    display: block;
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 5px;
}

.bar {
    height: 8px;
    background: var(--light-gray);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 1s ease;
}

/* ===== Секции ===== */
.section-title {
    font-size: 36px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 18px;
    margin-bottom: 50px;
}

/* ===== Возможности ===== */
.features {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--gray);
}

/* ===== Как это работает ===== */
.how-it-works {
    background: var(--white);
    padding: 80px 0;
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.step {
    text-align: center;
    padding: 30px;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.step h3 {
    margin-bottom: 10px;
}

.step p {
    color: var(--gray);
}

/* ===== Тарифы ===== */
.pricing {
    padding: 80px 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    transition: transform 0.3s;
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-card.featured {
    border: 3px solid var(--primary);
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

.badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-card h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.price {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 10px;
}

.price span {
    font-size: 18px;
    font-weight: 400;
    color: var(--gray);
}

.save-badge {
    display: inline-block;
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.pricing-card ul {
    list-style: none;
    text-align: left;
    margin: 20px 0 30px;
}

.pricing-card ul li {
    padding: 8px 0;
    color: var(--gray);
}

/* ===== Футер ===== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--light-gray);
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--white);
}

/* ===== Модальное окно ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    position: relative;
    animation: modalSlideIn 0.3s;
}

@keyframes modalSlideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: var(--light-gray);
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary);
    color: var(--white);
}

/* ===== Формы ===== */
.auth-form h2 {
    font-size: 28px;
    margin-bottom: 5px;
}

.form-subtitle {
    color: var(--gray);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius);
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.error-message {
    color: var(--danger);
    font-size: 14px;
    margin-bottom: 15px;
    min-height: 20px;
}

/* ===== Чекбокс согласия ===== */
.checkbox-group {
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.checkbox-label a {
    color: var(--primary);
    text-decoration: underline;
}

.checkbox-label a:hover {
    color: var(--primary-dark);
}

/* ===== Юридические страницы ===== */
.legal-page {
    padding: 60px 0;
    min-height: calc(100vh - 200px);
}

.legal-page h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
}

.legal-updated {
    color: var(--gray);
    margin-bottom: 40px;
}

.legal-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.legal-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary);
}

.legal-section p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--dark);
}

.legal-section ul {
    margin: 10px 0 15px 20px;
    color: var(--dark);
}

.legal-section ul li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.legal-footer {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-top: 40px;
}

.legal-footer p {
    margin-bottom: 8px;
}

/* ===== Дашборд ===== */
.dashboard {
    padding: 60px 0;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.dashboard-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.dashboard-header p {
    color: var(--gray);
    font-size: 18px;
}

/* ===== Загрузка фото ===== */
.upload-section {
    max-width: 600px;
    margin: 0 auto 40px;
    /* Фиксированная высота, чтобы кнопки не сдвигались при загрузке фото */
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area {
    border: 3px dashed var(--primary-light);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(108, 92, 231, 0.05);
    width: 100%;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.1);
}

.upload-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.upload-area h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.upload-area p {
    color: var(--gray);
}

.preview-container {
    text-align: center;
    width: 100%;
}

.preview-container img {
    max-width: 300px;
    max-height: 300px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.preview-container .btn {
    margin: 10px;
    min-width: 180px;
}

/* ===== Загрузка/прогресс ===== */
.loading-container {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--light-gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

.spinner.small {
    width: 20px;
    height: 20px;
    border-width: 3px;
    display: inline-block;
    margin: 0 10px 0 0;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.progress-bar {
    height: 10px;
    background: var(--light-gray);
    border-radius: 5px;
    overflow: hidden;
    margin: 20px 0 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 5px;
    transition: width 0.3s;
}

.progress-text {
    color: var(--gray);
    font-weight: 600;
}

/* ===== Результаты ===== */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.results-header h2 {
    font-size: 28px;
}

.premium-badge {
    background: linear-gradient(135deg, #FDCB6E, #E17055);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.result-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
}

.result-card h3 {
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.personality-card {
    grid-column: span 2;
    background: linear-gradient(135deg, #667EEA, #764BA2);
    color: var(--white);
}

.personality-type {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 20px;
}

.confidence-bar-container {
    margin-bottom: 20px;
}

.confidence-bar-container span {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    opacity: 0.9;
}

.confidence-bar-container .bar {
    background: rgba(255, 255, 255, 0.2);
}

.confidence-bar-container .bar-fill {
    background: var(--secondary);
}

.confidence-text {
    font-weight: 600;
}

.traits-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trait-item {
    background: rgba(108, 92, 231, 0.1);
    padding: 12px 16px;
    border-radius: var(--radius);
    font-weight: 500;
}

.empty-text {
    color: var(--gray);
    font-style: italic;
}

.analysis-text {
    color: var(--dark);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.8;
}

.locked-card {
    position: relative;
}

.lock-icon {
    font-size: 16px;
}

/* ===== Баннер подписки ===== */
.subscription-banner {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-top: 40px;
    color: var(--white);
    text-align: center;
}

.banner-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.banner-content p {
    margin-bottom: 20px;
    opacity: 0.9;
}

/* ===== Страница подписки ===== */
.subscription-page {
    padding: 60px 0;
}

.subscription-header {
    text-align: center;
    margin-bottom: 40px;
}

.subscription-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.subscription-header p {
    color: var(--gray);
    font-size: 18px;
}

.current-subscription {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.current-subscription h3 {
    margin-bottom: 15px;
}

.subscription-status {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 18px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-dot.active {
    background: var(--success);
}

.status-dot.inactive {
    background: var(--danger);
}

/* ===== Оплата ===== */
.payment-modal {
    max-width: 500px;
}

.payment-plan-info {
    background: rgba(108, 92, 231, 0.1);
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.payment-description {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.payment-secure {
    color: var(--gray);
    font-size: 13px;
    text-align: center;
    margin-top: 15px;
    opacity: 0.85;
}

.success-modal {
    text-align: center;
    max-width: 400px;
}

.success-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.success-modal h2 {
    margin-bottom: 10px;
}

.success-modal p {
    color: var(--gray);
    margin-bottom: 30px;
}

/* ===== Toast-уведомления ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    max-width: 360px;
    width: calc(100% - 40px);
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    border-left: 5px solid var(--primary);
    animation: toastIn 0.4s ease;
    margin-bottom: 10px;
}

.toast.toast-success {
    border-left-color: var(--success);
}

.toast.toast-error {
    border-left-color: var(--danger);
}

.toast.toast-warning {
    border-left-color: var(--warning);
}

.toast.toast-info {
    border-left-color: var(--secondary);
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    font-size: 15px;
    line-height: 1.4;
    color: var(--dark);
}

.toast-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--gray);
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--danger);
}

.toast-hide {
    animation: toastOut 0.4s ease forwards;
}

@keyframes toastIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        width: calc(100% - 20px);
        max-width: none;
    }
    
    .toast {
        padding: 14px 16px;
    }
}

/* ===== Модальное окно подтверждения (замена confirm/alert) ===== */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.confirm-overlay.active {
    opacity: 1;
}

.confirm-dialog {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.confirm-overlay.active .confirm-dialog {
    transform: scale(1);
}

.confirm-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.confirm-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.confirm-message {
    color: var(--gray);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-actions .btn {
    min-width: 120px;
}

.confirm-full {
    width: 100%;
}

@media (max-width: 480px) {
    .confirm-dialog {
        padding: 30px 20px;
    }
    
    .confirm-actions {
        flex-direction: column;
    }
    
    .confirm-actions .btn {
        width: 100%;
    }
}

/* ===== Простой серый текст "Контакты" в самом низу страницы слева ===== */
.contacts-float {
    position: fixed;
    left: 16px;
    bottom: 8px;
    z-index: 50;
    display: block;
    text-align: left;
    padding: 4px 8px;
    color: #a0a0a0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.contacts-float:hover {
    color: #666666;
    background: rgba(255, 255, 255, 0.9);
}

.contacts-float .contacts-icon {
    display: none;
}

/* ===== Гарантии ===== */
.guarantees {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.guarantee-item {
    text-align: center;
    padding: 20px;
}

.guarantee-item span {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

.guarantee-item h4 {
    margin-bottom: 5px;
}

.guarantee-item p {
    color: var(--gray);
    font-size: 14px;
}

/* ===== Адаптивность ===== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .pricing-card.featured:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    
    .hero {
        padding: 50px 0;
        min-height: auto;
    }
    
    .hero-content h1 {
        font-size: 34px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
    }
    
    .face-scan-animation {
        min-height: 300px;
    }
    
    .features,
    .pricing,
    .how-it-works,
    .dashboard,
    .subscription-page,
    .legal-page {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 16px;
        margin-bottom: 35px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .results-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .personality-card {
        grid-column: span 1;
    }
    
    .result-card {
        padding: 24px;
    }
    
    .guarantees {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .preview-container .btn {
        min-width: 150px;
        display: block;
        margin: 10px auto;
    }
    
    .scan-result-card {
        width: 260px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
    
    .badge {
        font-size: 12px;
        padding: 4px 14px;
    }
    
    .legal-section,
    .legal-footer {
        padding: 20px;
    }
    
    .legal-page h1,
    .dashboard-header h1,
    .subscription-header h1 {
        font-size: 28px;
    }
    
    .legal-page .legal-updated {
        font-size: 14px;
    }
}

/* ===== Мобильная оптимизация для телефонов ===== */
@media (max-width: 480px) {
    html {
        -webkit-text-size-adjust: 100%;
    }
    
    body {
        font-size: 15px;
    }
    
    .container {
        padding: 0 14px;
    }
    
    .btn {
        padding: 13px 18px;
        font-size: 15px;
        width: 100%;
        max-width: 100%;
    }
    
    .btn-lg {
        padding: 14px 20px;
        font-size: 16px;
    }
    
/* Логотип и навигация */
    .logo {
        font-size: 20px;
    }
    
    .logo-icon {
        font-size: 24px;
    }
    
    .navbar {
        padding: 4px 0;
    }
    
    .nav-container {
        gap: 8px;
    }
    
    .nav-links {
        gap: 8px;
        font-size: 14px;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .nav-links a {
        font-size: 14px;
        padding: 6px 8px;
    }
    
    .nav-links .btn {
        padding: 8px 14px;
        font-size: 13px;
        width: auto;
        max-width: none;
        margin: 0;
        display: inline-block;
        flex: 0 0 auto;
    }
    
    .user-name {
        font-size: 13px;
        padding: 5px 10px;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Hero */
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 15px;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 100%;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    /* Карточка сканирования */
    .face-circle {
        width: 180px;
        height: 180px;
    }
    
    .scan-result-card {
        width: 90%;
        max-width: 260px;
        padding: 15px;
        bottom: -10px;
    }
    
    /* Секции */
    .features,
    .pricing,
    .how-it-works,
    .dashboard,
    .subscription-page,
    .legal-page {
        padding: 30px 0;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .feature-card {
        padding: 22px;
    }
    
    .feature-icon {
        font-size: 32px;
    }
    
    .pricing-card {
        padding: 30px 24px;
        margin-bottom: 15px;
    }
    
    .price {
        font-size: 38px;
    }
    
    .pricing-card h3 {
        font-size: 22px;
    }
    
    .pricing-card ul li {
        font-size: 14px;
    }
    
    .dashboard-header h1,
    .subscription-header h1 {
        font-size: 26px;
    }
    
    .dashboard-header p,
    .subscription-header p {
        font-size: 15px;
    }
    
    /* Загрузка фото */
    .upload-section {
        min-height: 300px;
    }
    
    .upload-area {
        padding: 40px 24px;
    }
    
    .upload-icon {
        font-size: 48px;
    }
    
    .upload-area h3 {
        font-size: 18px;
    }
    
    .preview-container img {
        max-width: 100%;
        max-height: 250px;
    }
    
    .loading-container {
        padding: 20px;
    }
    
    .spinner {
        width: 50px;
        height: 50px;
    }
    
    /* Результаты */
    .results-header h2 {
        font-size: 24px;
    }
    
    .result-card {
        padding: 20px;
    }
    
    .result-card h3 {
        font-size: 18px;
    }
    
    .personality-type {
        font-size: 26px;
    }
    
    .personality-card {
        padding: 24px;
    }
    
    .trait-item {
        font-size: 14px;
        padding: 10px 14px;
    }
    
    .analysis-text {
        font-size: 16px;
    }
    
    .subscription-banner {
        padding: 28px 20px;
    }
    
    .subscription-banner h3 {
        font-size: 20px;
    }
    
    .subscription-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        font-size: 16px;
    }
    
/* Модальные окна */
    .modal {
        align-items: flex-start;
        overflow-y: auto;
        padding: 20px 0;
    }
    
    .modal-content {
        padding: 28px 20px;
        max-width: 100%;
        width: 100%;
        margin: 0 14px;
    }
    
    .payment-modal {
        max-width: 100%;
    }
    
    .supply-modal {
        max-width: 100%;
    }
    
    .auth-form h2 {
        font-size: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-group input {
        font-size: 16px;
        padding: 13px;
        width: 100%;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
.tab-btn {
        padding: 11px;
        font-size: 14px;
    }

    /* Предотвращаем горизонтальную прокрутку */
    body {
        overflow-x: hidden;
    }

    /* Шаги и преимущества */
    .step {
        padding: 20px;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 22px;
        margin-bottom: 15px;
    }

    /* Тарифы */
    .pricing-grid {
        max-width: 100%;
    }

    .pricing-card.featured {
        transform: none;
    }

    .pricing-card .btn {
        font-size: 15px;
        padding: 13px 12px;
    }

    /* Текущая подписка */
    .current-subscription {
        padding: 20px;
    }

    /* Результаты анализа */
    .results-header {
        align-items: flex-start;
    }

    .premium-badge {
        font-size: 13px;
        padding: 6px 14px;
    }

    /* Баннер подписки */
    .subscription-banner .btn {
        width: 100%;
        white-space: normal;
    }

    /* Оплата */
    .payment-plan-info {
        font-size: 15px;
        padding: 12px;
        word-break: break-word;
    }

    /* Логотип чтобы не переносился */
    .logo {
        white-space: nowrap;
    }
    
    /* Юридические страницы */
    .legal-section h2 {
        font-size: 19px;
    }
    
    .legal-section p {
        font-size: 15px;
    }
    
    .legal-page h1 {
        font-size: 25px;
    }
    
    .legal-footer {
        padding: 18px;
        font-size: 14px;
    }
    
    /* Футер */
    .footer {
        padding: 30px 0;
    }
    
    .footer-links a {
        font-size: 14px;
    }
}
