/* ============================================
   Базовые стили - НОВАЯ ЦВЕТОВАЯ СХЕМА
   ============================================ */
:root {
    /* Основные цвета */
    --primary-dark: #31708f;
    --primary-mid: #5185a5;
    --primary-light: #8fc0e2;
    --primary-bg: #f7fafb;
    --primary-accent: #e94560;
    
    /* Градиенты */
    --gradient-main: linear-gradient(135deg, #31708f 0%, #5185a5 100%);
    --gradient-accent: linear-gradient(135deg, #e94560 0%, #31708f 100%);
    --gradient-light: linear-gradient(135deg, #8fc0e2 0%, #f7fafb 100%);
    --gradient-bg: linear-gradient(135deg, #f7fafb 0%, #e8f4f8 50%, #f7fafb 100%);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(49, 112, 143, 0.08);
    --glass-blur: blur(20px);
    
    /* Тени */
    --shadow-sm: 0 2px 12px rgba(49, 112, 143, 0.06);
    --shadow-md: 0 8px 32px rgba(49, 112, 143, 0.08);
    --shadow-lg: 0 16px 48px rgba(49, 112, 143, 0.12);
    --shadow-xl: 0 24px 64px rgba(49, 112, 143, 0.16);
    
    /* Скругления */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 36px;
    
    /* Шрифты */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
}

body {
    font-family: var(--font-family);
    background: var(--gradient-bg);
    color: #1A1A2E;
    padding: 0;
    margin: 0;
    width: 100%;
    position: relative;
}

/* Анимированный фон */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(233, 69, 96, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(49, 112, 143, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(143, 192, 226, 0.05) 0%, transparent 60%);
    animation: bgFloat 25s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(2%, -2%) rotate(2deg) scale(1.02); }
    66% { transform: translate(-1%, 3%) rotate(-1deg) scale(0.98); }
}

/* ============================================
   Контейнеры
   ============================================ */
.app-container,
.landing-container {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

/* ============================================
   Glassmorphism
   ============================================ */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ============================================
   Кнопки
   ============================================ */
.btn-primary {
    background: var(--gradient-main);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(49, 112, 143, 0.25);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.6);
    color: #1A1A2E;
    border: 2px solid rgba(49, 112, 143, 0.15);
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: var(--glass-blur);
    width: 100%;
}

.btn-secondary:hover {
    background: rgba(49, 112, 143, 0.05);
    border-color: var(--primary-mid);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   Формы
   ============================================ */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: rgba(26, 26, 46, 0.7);
    margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(49, 112, 143, 0.08);
    border-radius: var(--radius-sm);
    color: #1A1A2E;
    font-size: 15px;
    font-family: var(--font-family);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: var(--glass-blur);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-mid);
    box-shadow: 0 0 0 4px rgba(81, 133, 165, 0.06);
    transform: translateY(-2px);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ============================================
   Утилиты
   ============================================ */
.text-center {
    text-align: center;
}

.text-gradient {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-accent {
    color: var(--primary-accent);
}

.hidden {
    display: none !important;
}

.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(49, 112, 143, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-dark);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
