/* ===== БАЗОВЫЕ СТИЛИ ===== */
/* Reset, типографика, основные элементы и фоны */

/* CSS Reset */
* {
    box-sizing: border-box;
}

/* Основные стили body */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    background: var(--bg-main-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    line-height: 1.6;
}

/* Градиентный фон с анимацией */
.gradient-bg {
    background: var(--bg-main-gradient);
    min-height: 100vh;
    position: relative;
}

.gradient-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ===== ТИПОГРАФИКА ===== */

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

/* Параграфы */
p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Ссылки */
a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* ===== СПЕЦИАЛЬНЫЕ ТЕКСТОВЫЕ ЭФФЕКТЫ ===== */

/* Градиентный текст */
.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Светящийся текст */
.text-glow {
    text-shadow: var(--neon-glow-sm);
}

/* ===== ОБЩИЕ АНИМАЦИИ ===== */

/* Анимация появления */
.fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

/* Пульсирующая анимация */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.1; }
}

/* ===== ИНТЕРАКТИВНЫЕ ЭЛЕМЕНТЫ ===== */

/* Ховер эффекты для интерактивных элементов */
.interactive {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive:hover {
    transform: scale(1.02);
}

/* Hover lift эффект */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ===== КАСТОМИЗАЦИЯ СКРОЛЛБАРА ===== */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 6px;
    border: 3px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
    background-clip: content-box;
}

/* ===== УЛУЧШЕНИЯ ДЛЯ СВЕТЛОЙ ТЕМЫ ===== */

/* Убеждаемся что все элементы наследуют правильные цвета */
.light {
    color: var(--text-primary);
}

.light h1, .light h2, .light h3, .light h4, .light h5, .light h6 {
    color: var(--text-primary) !important;
}

.light p {
    color: var(--text-secondary) !important;
}

.light a {
    color: var(--accent-primary) !important;
}

.light a:hover {
    color: var(--accent-secondary) !important;
}

/* Особые элементы */
.light .opacity-70 {
    color: var(--text-muted) !important;
}

.light .opacity-50 {
    color: var(--text-muted) !important;
    opacity: 0.7;
}

/* ===== МЕДИА-ЗАПРОСЫ ДЛЯ ДОСТУПНОСТИ ===== */

/* Уменьшение движения для пользователей с ограниченными возможностями */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Высокая контрастность */
@media (prefers-contrast: high) {
    :root {
        --glass-blur: 10px;
        --card-border: rgba(255, 255, 255, 0.2);
    }
    
    .light {
        --card-border: rgba(0, 0, 0, 0.2);
        --text-primary: #000000;
    }
}

/* ===== БАЗОВАЯ АДАПТИВНОСТЬ ===== */

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }
}