/* CSS Reset & Variables */
:root {
    --primary: #2563EB;
    --primary-hover: #1d4ed8;
    --secondary: #7C3AED;
    --accent: #F43F5E;
    
    /* MALE GRADIENTS (Stronger Contrast, Tech Blue) */
    --bg-hero: linear-gradient(180deg, #F8FAFC 0%, #DBEAFE 100%);      /* Slate-50 -> Blue-100 */
    --bg-block-1: linear-gradient(180deg, #DBEAFE 0%, #FFFFFF 100%);    /* Blue-100 -> White */
    --bg-block-2: linear-gradient(180deg, #FFFFFF 0%, #E2E8F0 100%);    /* White -> Slate-200 */
    --bg-block-3: linear-gradient(180deg, #E2E8F0 0%, #BFDBFE 100%);    /* Slate-200 -> Blue-200 */
    --bg-block-4: linear-gradient(180deg, #BFDBFE 0%, #FFFFFF 100%);    /* Blue-200 -> White */
    --bg-block-5: linear-gradient(180deg, #FFFFFF 0%, #DBEAFE 100%);    /* White -> Blue-100 */
    --bg-pricing: linear-gradient(180deg, #DBEAFE 0%, #F1F5F9 100%);    /* Blue-100 -> Slate-100 */
    --bg-reviews: linear-gradient(180deg, #F1F5F9 0%, #BFDBFE 100%);    /* Slate-100 -> Blue-200 */
    --bg-faq: linear-gradient(180deg, #BFDBFE 0%, #F1F5F9 100%);        /* Blue-200 -> Slate-100 */
    --bg-footer: linear-gradient(180deg, #F1F5F9 0%, #FFFFFF 100%);     /* Slate-100 -> White */
}

body.gender-female {
    --primary: #ec4899;
    --primary-hover: #db2777;
    --secondary: #f97316;
    --accent: #8b5cf6;
    
    /* FEMALE GRADIENTS (Richer, Deeper Tones) */
    --bg-hero: linear-gradient(180deg, #FFF1F2 0%, #E9D5FF 100%);      /* Rose-50 -> Purple-200 */
    --bg-block-1: linear-gradient(180deg, #E9D5FF 0%, #FFFFFF 100%);    /* Purple-200 -> White */
    --bg-block-2: linear-gradient(180deg, #FFFFFF 0%, #FECDD3 100%);    /* White -> Rose-200 */
    --bg-block-3: linear-gradient(180deg, #FECDD3 0%, #E9D5FF 100%);    /* Rose-200 -> Purple-200 */
    --bg-block-4: linear-gradient(180deg, #E9D5FF 0%, #FFFFFF 100%);    /* Purple-200 -> White */
    --bg-block-5: linear-gradient(180deg, #FFFFFF 0%, #FFE4E6 100%);    /* White -> Rose-100 */
    --bg-pricing: linear-gradient(180deg, #FFE4E6 0%, #F3E8FF 100%);    /* Rose-100 -> Purple-100 */
    --bg-reviews: linear-gradient(180deg, #F3E8FF 0%, #FECDD3 100%);    /* Purple-100 -> Rose-200 */
    --bg-faq: linear-gradient(180deg, #FECDD3 0%, #F3E8FF 100%);        /* Rose-200 -> Purple-100 */
    --bg-footer: linear-gradient(180deg, #F3E8FF 0%, #FFFFFF 100%);     /* Purple-100 -> White */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #F8FAFC;
    color: #111827;
}

/* Animations */
@keyframes float {
    0% { transform: translate(0px, 0px); }
    33% { transform: translate(30px, -50px); }
    66% { transform: translate(-20px, 20px); }
    100% { transform: translate(0px, 0px); }
}

@keyframes float-delayed {
    0% { transform: translate(0px, 0px); }
    33% { transform: translate(-30px, 30px); }
    66% { transform: translate(20px, -20px); }
    100% { transform: translate(0px, 0px); }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-down {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scan {
    0% { top: 0%; opacity: 0; }
    15% { opacity: 1; }
    50% { top: 100%; opacity: 1; }
    85% { opacity: 1; }
    100% { top: 0%; opacity: 0; }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-fade-in-up { animation: fade-in-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; opacity: 0; }
.animate-fade-in-down { animation: fade-in-down 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; opacity: 0; }
.animate-slide-in-right { animation: slide-in-right 0.5s ease-out forwards; }
.animate-spin-slow { animation: spin-slow 3s linear infinite; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-700 { animation-delay: 0.7s; }
.delay-1000 { animation-delay: 1s; }

/* Blob Backgrounds - REMOVED */


/* Custom Components */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%) !important;
    position: relative;
    overflow: hidden;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.gender-female .btn-primary {
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
    filter: brightness(1.1);
}

body.gender-female .btn-primary:hover {
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.5);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
}

.gender-btn {
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 700;
    color: #6B7280;
    transition: all 0.3s ease;
}

.gender-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .blob { opacity: 0.1; }
    
    /* Ensure content fits on small screens without scroll if possible, or allow natural scroll */
    /* For min-h-dvh layouts, we need to handle content overflow gracefully */
}

/* Scrollbar hide for cleaner UI in chat */
.overflow-y-auto::-webkit-scrollbar {
    width: 4px;
}
.overflow-y-auto::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.1);
    border-radius: 4px;
}

/* =========================================
   AUTH PAGE STYLES (Страница Входа)
   ========================================= */

.auth-container {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hero); /* Используем тот же градиент, что и на главной */
    padding: 20px;
}

/* Стеклянная карточка */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1), 
                0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

/* Адаптация под женскую тему */
body.gender-female .glass-card {
    background: rgba(255, 245, 245, 0.75);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Поля ввода */
.auth-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1f2937;
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

body.gender-female .auth-input:focus {
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.15);
}

/* Состояния валидации */
.auth-input.error {
    border-color: #EF4444 !important;
    background-color: #FEF2F2 !important;
    color: #991B1B;
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.auth-input.error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.auth-input.success {
    border-color: #10B981 !important;
    background-color: #F0FDF4 !important;
}

/* Анимация раскрытия поля Имени */
.auth-form-expanded {
    height: 82px !important; /* Высота поля с лейблом и отступом */
    opacity: 1 !important;
    margin-bottom: 0.5rem;
}

/* Анимация тряски (Shake) при ошибке */
@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
    40%, 60% { transform: translate3d(3px, 0, 0); }
}

/* Кнопки соцсетей - фиксы для мобильных */
.social-btn:active {
    transform: scale(0.95);
}