/* CSS Variables */
:root {
    --bg-gradient-start: #050509;
    --bg-gradient-end: #181821;
    --accent: #ff4b7d;
    --accent-hover: #ff6b95;
    --text-primary: #ffffff;
    --text-secondary: #d6d6e0;
    --ui-dark: #232332;
    --ui-darker: #2c2c3c;
    --ui-darkest: #1a1a24;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-glow: rgba(255, 75, 125, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Предотвращение масштабирования на iOS */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Поддержка safe-area для iPhone X+ */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    /* Принудительная темная тема */
    color-scheme: dark;
    background-color: #050509;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    background-color: #050509; /* Fallback для темной темы */
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
    /* Предотвращение масштабирования при фокусе на input */
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
    /* Принудительная темная тема */
    color-scheme: dark;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(5, 5, 9, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.logo-text {
    letter-spacing: 1px;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    transition: var(--transition);
    padding: 5px 0;
}

.nav-link:hover {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 75, 125, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* Neon Heart Background */
.hero-neon-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
    animation: neonPulse 3s ease-in-out infinite;
    /* Плавное затухание по краям - вертикальный эллипс для плавного затухания сверху и снизу */
    mask-image: radial-gradient(ellipse 100% 45% at 50% 50%, black 25%, rgba(0, 0, 0, 0.9) 45%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0.3) 75%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 100% 45% at 50% 50%, black 25%, rgba(0, 0, 0, 0.9) 45%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0.3) 75%, transparent 100%);
    mask-mode: alpha;
    -webkit-mask-mode: alpha;
}

.hero-neon-heart svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(255, 75, 125, 0.5)) 
            drop-shadow(0 0 40px rgba(255, 75, 125, 0.3))
            drop-shadow(0 0 60px rgba(255, 75, 125, 0.2));
}

.neon-heart-path {
    animation: neonGlow 2s ease-in-out infinite alternate;
}

.neon-heart-outline {
    animation: neonGlowOutline 2.5s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    0%, 100% {
        opacity: 0.25;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

@keyframes neonGlow {
    0% {
        opacity: 0.6;
        filter: drop-shadow(0 0 10px rgba(255, 75, 125, 0.8)) 
                drop-shadow(0 0 20px rgba(255, 75, 125, 0.6))
                drop-shadow(0 0 30px rgba(255, 75, 125, 0.4));
    }
    100% {
        opacity: 0.9;
        filter: drop-shadow(0 0 20px rgba(255, 75, 125, 1)) 
                drop-shadow(0 0 40px rgba(255, 75, 125, 0.8))
                drop-shadow(0 0 60px rgba(255, 75, 125, 0.6));
    }
}

@keyframes neonGlowOutline {
    0% {
        opacity: 0.4;
        stroke-width: 1.5;
    }
    100% {
        opacity: 0.8;
        stroke-width: 2.5;
    }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 1;
    animation: fadeUp 0.8s ease-out;
}

.hero-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(18px, 2.5vw, 22px);
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--accent);
    color: var(--text-primary);
    border: none;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 75, 125, 0.3);
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-glow);
}

.btn:active {
    transform: translateY(0);
}

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
}

/* How It Works Section */
.how-it-works {
    padding: 80px 0;
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    text-align: center;
    margin-bottom: 15px;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.step {
    text-align: center;
    padding: 30px;
    background: var(--ui-dark);
    border-radius: 20px;
    transition: var(--transition);
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.step-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.step-title {
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.step-description {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* Test Section */
.test-section {
    padding: 80px 0;
}

.test-form {
    background: var(--ui-dark);
    border-radius: 24px;
    padding: 40px;
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.question-block {
    margin-bottom: 35px;
    animation: fadeUp 0.5s ease-out;
}

.question-label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: var(--ui-darker);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.radio-label:hover {
    background: var(--ui-darkest);
    border-color: rgba(255, 75, 125, 0.3);
}

.radio-label input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent);
}

.radio-label span {
    flex: 1;
    font-size: 16px;
    color: var(--text-secondary);
}

.radio-label input[type="radio"]:checked + span {
    color: var(--text-primary);
    font-weight: 500;
}

.radio-label:has(input[type="radio"]:checked),
.radio-label.checked {
    background: rgba(255, 75, 125, 0.1);
    border-color: var(--accent);
}

.test-form .btn {
    width: 100%;
    margin-top: 20px;
}

/* Match Result */
/* Test Loading State */
.test-loading {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    animation: fadeIn 0.3s ease-out;
}

.loading-content {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.loading-heart {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    color: var(--accent);
    animation: heartbeat 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 75, 125, 0.6));
}

.loading-heart svg {
    width: 100%;
    height: 100%;
}

.loading-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-primary);
    animation: pulse 2s ease-in-out infinite;
}

.loading-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 50%, var(--accent) 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    animation: loadingProgress 3s ease-out forwards, shimmer 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 75, 125, 0.5);
}

.loading-text {
    font-size: 16px;
    color: var(--text-secondary);
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    25% {
        transform: scale(1.1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
    75% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

@keyframes loadingProgress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

.match-result {
    margin-top: 40px;
    animation: fadeUp 0.5s ease-out;
}

.match-card {
    background: linear-gradient(135deg, rgba(255, 75, 125, 0.15) 0%, rgba(255, 75, 125, 0.05) 100%);
    border: 2px solid var(--accent);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.match-title {
    font-size: 26px;
    margin-bottom: 25px;
    font-weight: 700;
}

.match-text {
    font-size: 18px;
    color: var(--text-secondary);
    margin-top: 25px;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Persona Details */
.persona-details {
    text-align: left;
    margin-bottom: 20px;
}

.persona-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.persona-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(255, 75, 125, 0.4);
    overflow: hidden;
    position: relative;
}

.persona-avatar-large svg {
    width: 45px;
    height: 45px;
}

.persona-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.persona-info {
    flex: 1;
    text-align: left;
}

.persona-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.persona-match {
    font-size: 16px;
    color: var(--accent);
    font-weight: 600;
}

.persona-characteristics {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.characteristic-item {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.characteristic-item:last-child {
    border-bottom: none;
}

.characteristic-label {
    font-weight: 600;
    color: var(--accent);
    font-size: 14px;
    min-width: 140px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.characteristic-value {
    color: var(--text-secondary);
    font-size: 15px;
    flex: 1;
    line-height: 1.5;
}

/* Chat Panel (Slide-in from right) */
.chat-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.chat-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.chat-panel {
    width: 100%;
    max-width: 500px;
    height: 100vh;
    height: -webkit-fill-available;
    height: 100dvh; /* Dynamic viewport height для мобильных */
    background: var(--ui-dark);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px var(--shadow);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    /* Предотвращение масштабирования */
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.chat-panel-overlay.active .chat-panel {
    transform: translateX(0);
}

.chat-header {
    padding: 20px 24px;
    padding-top: calc(20px + env(safe-area-inset-top));
    background: var(--ui-darker);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.chat-header-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.chat-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition);
    flex-shrink: 0;
}

.chat-close:hover {
    background: var(--ui-darkest);
    color: var(--text-primary);
}

.chat-close svg {
    width: 24px;
    height: 24px;
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.chat-avatar svg {
    width: 28px;
    height: 28px;
}

.chat-avatar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chat-info {
    flex: 1;
}

.chat-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}

.chat-match {
    font-size: 14px;
    color: var(--text-secondary);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Предотвращение масштабирования при прокрутке */
    touch-action: pan-y;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--ui-darkest);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--ui-darker);
    border-radius: 3px;
}

.message {
    display: flex;
    animation: fadeInSlide 0.3s ease-out;
    max-width: 75%;
}

.message.bot {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-bubble {
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.bot .message-bubble {
    background: rgba(255, 75, 125, 0.2);
    border-bottom-left-radius: 4px;
    color: var(--text-primary);
}

.message.user .message-bubble {
    background: var(--ui-darker);
    border-bottom-right-radius: 4px;
    color: var(--text-primary);
}

.chat-typing {
    padding: 0 24px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.typing-indicator {
    display: inline-flex;
    gap: 4px;
}

.typing-indicator::before,
.typing-indicator::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator::after {
    animation-delay: 0.2s;
}

.chat-input-container {
    padding: 20px 24px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    background: var(--ui-darker);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.chat-input {
    flex: 1;
    background: var(--ui-darkest);
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 12px 18px;
    color: var(--text-primary);
    font-size: 16px; /* Минимум 16px для предотвращения зума на iOS */
    font-family: inherit;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    line-height: 1.5;
    transition: var(--transition);
    /* Предотвращение масштабирования при фокусе */
    touch-action: manipulation;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent);
    /* Предотвращение зума на iOS при фокусе */
    font-size: 16px;
}

.chat-input::placeholder {
    color: var(--text-secondary);
}

.chat-send {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--accent);
    color: var(--text-primary);
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.chat-send:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.chat-send svg {
    width: 18px;
    height: 18px;
}

.chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Continue Chat Button */
.continue-chat-button-container {
    margin-top: 20px;
    text-align: center;
    padding: 20px 0;
}

.continue-chat-button-container .btn {
    width: 100%;
    max-width: 300px;
    font-size: 16px;
    padding: 14px 28px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--ui-dark);
    border-radius: 24px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: fadeUp 0.4s ease-out;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--ui-darker);
    color: var(--text-primary);
}

.modal-title {
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: 700;
}

.profile-summary {
    margin-bottom: 30px;
}

.profile-item {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-item:last-child {
    border-bottom: none;
}

.profile-item-label {
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 5px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-item-value {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

.modal-content .btn {
    width: 100%;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
    display: none;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: linear-gradient(180deg, #000000 0%, var(--ui-darkest) 100%);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu-panel {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #000000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.mobile-menu-logo .logo-icon {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.mobile-menu-logo .logo-text {
    letter-spacing: 1px;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: var(--transition);
}

.mobile-menu-close svg {
    width: 24px;
    height: 24px;
}

.mobile-menu-close:hover {
    opacity: 0.7;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 0;
    background: var(--ui-darkest);
    flex: 1;
}

.mobile-menu-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 18px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    display: block;
}

.mobile-menu-link:last-child {
    border-bottom: none;
}

.mobile-menu-link:hover {
    color: var(--accent);
    padding-left: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .mobile-menu-overlay {
        display: block;
    }

    .hero {
        min-height: 85vh;
        padding: 80px 0 40px;
    }

    .hero-neon-heart {
        width: 400px;
        height: 400px;
        opacity: 0.2;
    }

    .test-form {
        padding: 30px 20px;
    }

    .chat-panel {
        max-width: 100%;
        height: 100vh;
        height: -webkit-fill-available;
        height: 100dvh;
    }

    .chat-header {
        padding-top: calc(20px + env(safe-area-inset-top));
    }

    .chat-input-container {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }

    .chat-input {
        font-size: 16px; /* Важно: минимум 16px для предотвращения зума на iOS */
    }

    .steps {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .match-card {
        padding: 30px 20px;
    }

    .persona-header {
        flex-direction: column;
        text-align: center;
    }

    .persona-info {
        text-align: center;
    }

    .characteristic-item {
        flex-direction: column;
        gap: 5px;
    }

    .characteristic-label {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .btn-large {
        padding: 16px 32px;
        font-size: 16px;
    }

    .message {
        max-width: 85%;
    }

    .chat-send span {
        display: none;
    }

    .chat-send {
        padding: 12px;
        border-radius: 50%;
    }
}

