/* Үздік педагог - Современный дизайн 2024 */

/* CSS переменные - Новая цветовая палитра */
:root {
    /* Основные цвета - Сине-фиолетовая палитра */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --primary-dark: #4338ca;
    
    --secondary-color: #8b5cf6;
    --secondary-hover: #7c3aed;
    --accent-color: #06b6d4;
    --accent-hover: #0891b2;
    
    /* Градиенты */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --gradient-hero: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 50%, rgba(6, 182, 212, 0.1) 100%);
    
    /* Текст */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-white: #ffffff;
    --text-light: #94a3b8;
    
    /* Фоны */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #0f172a;
    --bg-overlay: rgba(15, 23, 42, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.7);
    
    /* Тени */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 8px rgba(99, 102, 241, 0.1);
    --shadow-md: 0 4px 16px rgba(99, 102, 241, 0.15);
    --shadow-lg: 0 8px 32px rgba(99, 102, 241, 0.2);
    --shadow-xl: 0 16px 64px rgba(99, 102, 241, 0.25);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    
    /* Радиусы */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;
    
    /* Переходы */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Контейнер */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Хедер - Новый стиль */
.header {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.5px;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.logo::before {
    content: "✨";
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.3));
}

.header-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

/* Селектор языка - Новый стиль */
.language-selector {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-secondary);
    padding: 0.25rem;
    border-radius: var(--radius-full);
}

.lang-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
}

.lang-btn:hover {
    color: var(--primary-color);
    background: var(--bg-primary);
}

.lang-btn.active {
    background: var(--gradient-primary);
    color: var(--text-white);
    box-shadow: var(--shadow-sm);
    transform: scale(1.05);
}

/* Главная секция - Hero */
.hero {
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    z-index: 1;
    opacity: 0.5;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-banner {
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
}

.hero-banner img {
    max-width: 100%;
    height: auto;
    max-height: 320px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    transition: var(--transition-slow);
    border: 4px solid rgba(255, 255, 255, 0.8);
}

.hero-banner img:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    letter-spacing: -1px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    font-weight: 500;
    line-height: 1.7;
}

/* Кнопки - Новый стиль */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-align: center;
    min-width: 160px;
    letter-spacing: 0.3px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-primary:active {
    transform: translateY(-2px);
}

.btn-outline {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--gradient-primary);
    color: var(--text-white);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.btn-large {
    padding: 1.375rem 3rem;
    font-size: 1.15rem;
}

.hero-buttons {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Карточки - Новый стиль */
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(99, 102, 241, 0.3);
}

.card-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    padding: 2.5rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    text-align: center;
}

.card-title {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.5px;
}

.card-body {
    padding: 2.5rem;
}

/* Формы - Новый стиль */
.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
    letter-spacing: 0.2px;
}

.form-control {
    width: 100%;
    padding: 1.125rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-primary);
    font-family: inherit;
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: var(--bg-primary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Селекты */
select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236366f1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    padding-right: 3rem;
    appearance: none;
    cursor: pointer;
}

/* Алерты - Новый стиль */
.alert {
    padding: 1.25rem 1.75rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.75rem;
    border-left: 4px solid;
    font-weight: 600;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    border-left-color: #22c55e;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left-color: #ef4444;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #6366f1;
    border-left-color: #6366f1;
}

.alert-info {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-dark);
    border-left-color: var(--primary-color);
}

/* Информационные блоки */
.info-block {
    background: var(--primary-light);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.75rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Прогресс бар */
.progress-bar {
    background: #e2e8f0;
    height: 10px;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 1.25rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* Таймер */
.timer {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: var(--shadow-md), var(--shadow-glow);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: 1px;
}

.timer::before {
    content: "⏱️";
    font-size: 1.5rem;
}

/* Вопросы теста */
.question-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: var(--transition);
}

.question-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.2);
}

.question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 42px;
    padding: 0 18px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: var(--text-white);
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    letter-spacing: 0.5px;
}

.question-text {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
    line-height: 1.7;
    letter-spacing: -0.3px;
}

.options-list {
    list-style: none;
    padding: 0;
}

.option-item {
    margin-bottom: 1.25rem;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.75rem;
    background: var(--bg-primary);
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.option-label:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    transform: translateX(8px);
    box-shadow: var(--shadow-sm);
}

.option-input {
    margin-right: 1.25rem;
    transform: scale(1.3);
    accent-color: var(--primary-color);
    cursor: pointer;
}

.option-input:checked + .option-text {
    color: var(--primary-color);
    font-weight: 700;
}

.option-label:has(.option-input:checked) {
    background: var(--primary-light);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateX(8px);
}

/* Навигация теста */
.test-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 2px solid #e2e8f0;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    transition: var(--transition);
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.nav-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 2px solid #e2e8f0;
}

.nav-btn-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.nav-btn-finish {
    background: var(--gradient-secondary);
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

.nav-btn-finish:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Результаты */
.result-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-xl);
    margin-bottom: 2.5rem;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.result-score {
    font-size: 5rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    line-height: 1;
    letter-spacing: -2px;
}

.result-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.result-description {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.slide-in {
    animation: slideIn 0.8s ease-out;
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        max-width: 100%;
    }
    
    .card-header,
    .card-body {
        padding: 1.75rem;
    }
    
    .question-card {
        padding: 1.75rem;
    }
    
    .question-text {
        font-size: 1.15rem;
    }
    
    .test-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .result-score {
        font-size: 3.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .language-selector {
        order: -1;
    }
    
    .hero {
        padding: 3rem 0 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .card-header,
    .card-body {
        padding: 1.5rem;
    }
}

/* Утилиты */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Скрытие элементов */
.hidden { display: none !important; }
.visible { display: block !important; }

/* Фокус для доступности */
*:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

button:focus,
a:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Дополнительные эффекты */
.glass-effect {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Анимация для элементов при скролле */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
