/* css/pages/index.css - ВСЕ стили для главной страницы */
/* ====================================================== */

/* 1. CSS ПЕРЕМЕННЫЕ */
:root {
    /* Основные цвета фона */
    --dark-bg: #1C2129;
    --darker-bg: #161b22;
    --modal-bg: #252A34;
    --card-bg: #2d3748;
    
    /* Основной зеленый цвет */
    --green: #13873a;
    --green-hover: #16a34a;
    --green-light: rgba(19, 135, 58, 0.1);
    
    /* Telegram цвета */
    --tg-blue: #2AABEE;
    --tg-blue-hover: #229ed9;
    --tg-blue-light: rgba(42, 171, 238, 0.1);
    
    /* Цвета текста и границ */
    --white: #FFFFFF;
    --white-90: rgba(255, 255, 255, 0.9);
    --white-70: rgba(255, 255, 255, 0.7);
    --white-50: rgba(255, 255, 255, 0.5);
    
    --gray: #adb5bd;
    --gray-dark: #6c757d;
    --gray-light: #ced4da;
    
    --border: #444;
    --border-light: #555;
    --border-hover: #666;
    
    /* Системные цвета */
    --red: #ff6b6b;
    --red-hover: #ff5252;
    --red-light: rgba(255, 107, 107, 0.1);
    
    /* Тени */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    
    /* Скругления */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Анимации */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

/* 2. СБРОС И БАЗОВЫЕ СТИЛИ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    height: 100%;
}

body {
    background: var(--dark-bg);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 3. Vanta.js фон */
.vanta-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

/* 4. HEADER */
.site-header {
    background: rgba(28, 33, 41, 0.98);
    color: var(--white);
    padding: 1rem 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 70px;
    border-bottom: 2px solid var(--green);
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo i {
    font-size: 1.5rem;
}

.logo:hover {
    color: var(--green-hover);
}

/* 5. НАВИГАЦИЯ */
.main-nav {
    flex: 1;
    margin: 0 20px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 5px;
    background: rgba(22, 27, 34, 0.8);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.main-nav a {
    color: var(--white-70);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    transform: translateY(-1px);
}

.main-nav a.active {
    background: var(--green);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.main-nav a.active:hover {
    background: var(--green-hover);
}

/* 6. ОСНОВНОЙ КОНТЕЙНЕР */
.index-main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 5%;
    min-height: calc(100vh - 140px);
}

/* 7. ФУТЕР */
.site-footer {
    background: var(--darker-bg);
    padding: 40px 5%;
    border-top: 2px solid var(--green);
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section h4 i {
    color: var(--green);
}

.footer-section p {
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 15px;
}

/* 8. МОСКОВСКОЕ ВРЕМЯ */
#corner-time-container {
    position: fixed;
    bottom: 5px;
    right: 5px;
    font-size: 0.9em;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid rgba(19, 135, 58, 0.4);
    background: rgba(22, 27, 34, 0.95);
    color: #13873a;
    font-family: monospace;
    z-index: 1000;
}

#moscow-time {
    font-size: 0.9rem;
}

/* 9. SCROLLBAR */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--darker-bg);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--green);
    border-radius: var(--radius-sm);
    border: 2px solid var(--darker-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--green-hover);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--green) var(--darker-bg);
}

/* 10. ТИПОГРАФИЯ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

a {
    color: var(--green);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--green-hover);
    text-decoration: underline;
}

/* 11. АНИМАЦИИ И СОСТОЯНИЯ */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--green);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-data {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--gray);
}

/* 12. АДАПТИВНОСТЬ */
@media (max-width: 1024px) {
    .site-header {
        flex-wrap: wrap;
        padding: 12px 3%;
    }
    
    .logo {
        order: 1;
        margin-right: 0;
        font-size: 1.5rem;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        margin: 15px 0 0 0;
    }
    
    .main-nav ul {
        justify-content: center;
        flex-wrap: wrap;
        padding: 8px;
    }
}

@media (max-width: 768px) {
    .index-main-container {
        padding: 20px 3%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.3rem;
    }
    
    .main-nav a {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .index-main-container {
        padding: 15px 2%;
    }
}

/* 13. ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.w-100 { width: 100%; }
.w-50 { width: 50%; }
.w-25 { width: 25%; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }

.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* 14. СТИЛИ ДЛЯ ВЫДЕЛЕННОГО ТЕКСТА */
::selection {
    background-color: rgba(20,135,59,0.1);
    color: #98ee50;
}