/* ==========================================================================
 * 1. СБРОС СТИЛЕЙ И БАЗОВЫЕ НАСТРОЙКИ СТРАНИЦЫ
 * ========================================================================== */
* { 
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f4f5f7 0%, #e2e8f0 100%);
    background-attachment: fixed;
    color: #1a202c;
    overflow-x: hidden;
}

/* ==========================================================================
 * 2. ШАПКА И ФИКСИРОВАННЫЕ ССЫЛКИ
 * ========================================================================== */
.site-logo {
    position: fixed;
    top: 25px;
    left: 25px;
    z-index: 1000;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease-in-out;
}
.site-logo:hover { transform: scale(1.03); }
.site-logo img { height: 40px; width: auto; display: block; }

.wiki-button {
    position: fixed;
    top: 25px;
    height: 40px;
    padding: 0 15px;
    background-color: #fff;
    border: 2px solid #111;
    border-radius: 8px;
    color: #111;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}
.wiki-button:not(.lc-button) { right: 90px; }
.wiki-button.lc-button { right: 285px; }
.wiki-button:hover { background-color: #d71921; border-color: #d71921; color: #fff; }

.menu-button {
    position: fixed; top: 25px; right: 25px; width: 40px; height: 40px;
    cursor: pointer; z-index: 1000; display: flex; flex-direction: column;
    justify-content: center; gap: 6px; background: none; border: none;
}
.menu-button span { display: block; width: 100%; height: 4px; background-color: #111; border-radius: 2px; transition: all 0.3s ease-in-out; }

/* ==========================================================================
 * 3. ГЛАВНЫЙ ЭКРАН (HERO SECTION)
 * ========================================================================== */
.hero-content {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    min-height: 100vh; text-align: center; padding: 100px 20px 40px;
}
.hero-content h1 { font-size: 2.8rem; margin-bottom: 10px; letter-spacing: -1px; font-weight: 800; }
.hero-content h1.brand-title { color: #d71921; }
.hero-content h2 { font-size: 1.2rem; color: #4a5568; font-weight: 400; margin-bottom: 20px; }
/* ==========================================================================
 * 4. СТИЛИ СЕЛЕКТОРОВ, КНОПОК И МОДАЛОК
 * ========================================================================== */
.select-container {
    display: flex; gap: 12px; justify-content: center; align-items: center;
    width: 100%; max-width: 1100px; margin: 30px auto 0; flex-wrap: wrap;
}

.dropdown {
    position: relative; flex: 1 1 200px; min-width: 200px;
    background: #fff; border: 2px solid #111; border-radius: 8px;
    text-align: left; box-shadow: 0 4px 12px rgba(0,0,0,0.03); outline: none;
}

.dropdown-trigger {
    padding: 12px 16px; font-weight: 600; font-size: 0.9rem; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; user-select: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dropdown-trigger::after { content: '▼'; font-size: 0.6rem; color: #777; margin-left: 8px; transition: transform 0.2s; }

.dropdown-menu {
    position: absolute; top: 105%; left: -2px; width: calc(100% + 4px);
    max-height: 250px; overflow-y: auto; background: #fff; border: 2px solid #111;
    border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,0.12); z-index: 10; display: none;
}

.dropdown.active .dropdown-menu { display: block !important; }
.dropdown.active .dropdown-trigger::after { transform: rotate(180deg); }

/* Безопасный визуал блокировки: убрали pointer-events, блокировку проверяет JS */
.dropdown.disabled { opacity: 0.35; cursor: not-allowed; }

.dropdown-item { display: block; padding: 10px 16px; color: #111; cursor: pointer; font-size: 0.85rem; text-align: left; transition: background 0.15s; }
.dropdown-item:hover { background-color: #d71921; color: #fff; }
.placeholder-text { display: block; padding: 15px; color: #888; font-size: 0.85rem; text-align: center; }

.btn-go {
    padding: 12px 35px; font-size: 0.95rem; font-weight: 700; color: #fff;
    background-color: #111; border: 2px solid #111; border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); min-width: 120px; transition: all 0.2s;
}
.btn-go[disabled] { background-color: #cbd5e1; border-color: #cbd5e1; color: #94a3b8; cursor: not-allowed; box-shadow: none; pointer-events: none; }
.btn-go.active { background-color: #111; border-color: #111; color: #fff; cursor: pointer; pointer-events: auto; }
.btn-go.active:hover { background-color: #d71921; border-color: #d71921; }

/* Навигация и Модалки */
.modal-menu {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(15, 15, 15, 0.98); z-index: 900;
    display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transform: scale(1.05); transition: all 0.4s;
}
.nav-links { list-style: none; text-align: center; }
.nav-links li { margin: 25px 0; }
.nav-link-btn { background: none; border: none; color: #fff; font-size: 2.3rem; font-weight: 600; cursor: pointer; transition: color 0.2s; }
.nav-link-btn:hover { color: #d71921; }

body.menu-open { overflow: hidden; }
body.menu-open .modal-menu { opacity: 1 !important; visibility: visible !important; transform: scale(1) !important; }
body.menu-open .menu-button span:nth-child(1) { transform: translateY(10px) rotate(45deg); background-color: #fff; }
body.menu-open .menu-button span:nth-child(2) { opacity: 0; }
body.menu-open .menu-button span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); background-color: #fff; }

.about-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px);
    z-index: 2000; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.about-modal.active { opacity: 1; visibility: visible; }
.about-content { background: #fff; padding: 40px; border-radius: 12px; max-width: 550px; width: 90%; box-shadow: 0 20px 40px rgba(0,0,0,0.2); position: relative; border: 2px solid #111; }
.about-content h2 { margin-bottom: 20px; font-size: 1.8rem; }
.about-content p { font-size: 1rem; line-height: 1.6; color: #4a4a4a; margin-bottom: 20px; }
.about-links { display: flex; gap: 15px; margin-top: 25px; flex-wrap: wrap; }
.about-links a { color: #fff; background-color: #111; text-decoration: none; padding: 10px 20px; border-radius: 6px; font-size: 0.9rem; font-weight: 600; }
.about-links a:hover { background-color: #d71921; }
.about-close { position: absolute; top: 15px; right: 20px; background: none; border: none; cursor: pointer; color: #777; display: flex; align-items: center; }
.about-close:hover { color: #111; }

.dropdown-menu::-webkit-scrollbar { width: 6px; }
.dropdown-menu::-webkit-scrollbar-track { background: #f1f1f1; }
.dropdown-menu::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 8px; }

@media (max-width: 900px) { .dropdown { flex: 1 1 45%; } }
@media (max-width: 768px) { .site-logo { top: 20px; left: 20px; } .site-logo img { height: 32px; } .wiki-button { display: none !important; } .menu-button { top: 20px; right: 20px; width: 32px; height: 32px; } .menu-button span { height: 3px; } }
@media (max-width: 680px) { .btn-go { width: 100%; flex: 1 1 100%; } }
@media (max-width: 550px) { .dropdown { flex: 1 1 100%; } }
