/* === ЦВЕТОВАЯ ПАЛИТРА И ПЕРЕМЕННЫЕ === */
:root {
    --bg-main: #0E1117;
    --bg-card: #161B26;
    --bg-card-hover: #1E2433;
    --border-color: #262E3D;
    --border-active: #F5D76E;
    
    --accent-gold: #F5D76E;
    --accent-dough: #E0A96D;
    --accent-green: #55FF55;
    --accent-discord: #5865F2;
    
    --text-main: #F0F3F8;
    --text-muted: #8C9BA5;
    
    --font-main: 'Montserrat', sans-serif;
    --font-pixel: 'Press Start 2P', monospace;
}

/* === БАЗОВЫЕ НАСТРОЙКИ === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* === НАВИГАЦИЯ (HEADER) === */
header.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 8%;
    background-color: #0E1117;
    border-bottom: 2px solid var(--border-color);
    z-index: 1000;
}

a.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.2s;
}

a.brand:hover {
    opacity: 0.8;
}

.brand-logo {
    width: 36px;
    height: 36px;
    image-rendering: pixelated;
}

.brand-title {
    font-family: var(--font-pixel);
    font-size: 0.95rem;
    color: var(--accent-gold);
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 24px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent-gold);
}

.btn-discord {
    background-color: var(--accent-discord);
    color: #FFFFFF;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-discord:hover {
    background-color: #4752C4;
    transform: translateY(-2px);
}

/* === ГЛАВНЫЙ ЭКРАН (HERO) === */
.hero {
    position: relative;
    min-height: 100vh;
    padding: 120px 8% 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-main);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(14, 17, 23, 0.4);
}

.hero-card {
    position: relative;
    z-index: 2;
    background: rgba(22, 27, 38, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 50px 60px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    max-width: 800px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 4px;
    font-family: var(--font-pixel);
    font-size: 0.75rem;
    color: var(--accent-dough);
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    color: #FFFFFF;
}

.hero h1 span {
    color: var(--accent-gold);
}

.hero p {
    max-width: 620px;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 35px;
}

.ip-card {
    background-color: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px 10px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
    margin-bottom: 15px;
    width: fit-content;
}

.ip-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
}

.ip-text-wrap {
    text-align: left;
}

.ip-hint {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

.ip-domain {
    font-family: var(--font-pixel);
    font-size: 1.05rem;
    color: #FFFFFF;
    letter-spacing: 0.5px;
}

.btn-copy {
    background-color: var(--accent-gold);
    color: #111111;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}

.btn-copy:hover {
    background-color: #ffe07a;
}

.server-status {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 9px;
    height: 9px;
    background-color: var(--accent-green);
    border-radius: 50%;
    display: inline-block;
}

.status-count {
    color: var(--text-main);
    font-weight: 700;
}

/* === СЕКЦИИ (ОБЩИЕ СТИЛИ) === */
section {
    padding: 90px 8%;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 10px;
}

.section-title span {
    color: var(--accent-gold);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 550px;
    margin: 0 auto;
}

.section-action {
    text-align: center;
    margin-top: 40px;
}

/* === КНОПКИ ДЕЙСТВИЙ === */
.btn-primary, .btn-secondary, .btn-map {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: 700;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: #111111;
}

.btn-primary:hover {
    background-color: #ffe07a;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.btn-map {
    background-color: var(--accent-dough);
    color: #111111;
}

.btn-map:hover {
    background-color: #f0b87c;
    transform: translateY(-2px);
}

/* === ЧИСТАЯ СЕТКА (БЕЗ КАРТОЧЕК) === */
.clean-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
}

.feature-block, .step-block {
    padding: 10px;
    text-align: center;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: transparent;
    border: 2px solid var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin: 0 auto 20px;
}

.step-number {
    font-family: var(--font-pixel);
    font-size: 2rem;
    color: var(--border-color);
    margin-bottom: 15px;
}

.feature-block h3, .step-block h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: #FFFFFF;
}

.feature-block p, .step-block p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* === ГАЛЕРЕЯ СКРИНШОТОВ === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background-color: var(--bg-card);
    aspect-ratio: 16/10;
    cursor: pointer;
    transition: border-color 0.2s;
}

.gallery-item:hover {
    border-color: var(--accent-gold);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(0deg, rgba(14,17,23,0.95) 0%, rgba(14,17,23,0) 100%);
    font-size: 0.9rem;
    font-weight: 600;
    color: #FFFFFF;
}

/* === ИНТЕРАКТИВНАЯ КАРТА (ДВЕ КОЛОНКИ) === */
.map-section {
    background-color: #0B0E14;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

.map-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.map-text h2 {
    text-align: left;
    margin-bottom: 20px;
}

.map-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 30px;
}

.map-preview img {
    border-radius: 12px;
    border: 2px solid var(--border-color);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.map-preview img:hover {
    transform: rotate(2deg) scale(1.02);
    border-color: var(--accent-gold);
}

/* === БАЗА ЗНАНИЙ === */
.info-card-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 860px;
    margin: 0 auto;
}

.info-card {
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.info-card h4 {
    font-size: 1.1rem;
    color: #FFFFFF;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}

.info-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* === ОСНОВНОЙ КОНТЕНТ И СТРАНИЦЫ ЗАГЛУШКИ === */
main {
    flex: 1;
}

.page-content {
    padding-top: 140px;
    padding-bottom: 80px;
}

.page-header {
    text-align: center;
    border-bottom: none;
    padding-bottom: 40px;
}

/* === ПОДВАЛ (FOOTER) === */
footer {
    background-color: #07090C;
    padding: 50px 8% 30px;
    text-align: center;
    border-top: 2px solid var(--border-color);
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-main);
    transition: all 0.2s;
}

.social-link:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* === ВСПЛЫВАЮЩЕЕ УВЕДОМЛЕНИЕ (TOAST) === */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--bg-card);
    border: 2px solid var(--accent-gold);
    color: #FFFFFF;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    opacity: 0;
    pointer-events: none;
    transform: translateY(15px);
    transition: all 0.25s ease;
    z-index: 2000;
}

.toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.toast i {
    color: var(--accent-green);
}

/* === МОДАЛЬНОЕ ОКНО ГАЛЕРЕИ (LIGHTBOX) === */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(14, 17, 23, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 3000;
    padding: 20px;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 2rem;
    color: #FFFFFF;
    cursor: pointer;
}

/* === АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ === */
@media (max-width: 900px) {
    .map-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .map-text h2 { 
        text-align: center; 
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-card { padding: 40px 20px; }
    .hero h1 { font-size: 2.2rem; }
    .ip-card { flex-direction: column; width: 100%; max-width: 320px; }
    .btn-copy { width: 100%; justify-content: center; }
    .ip-text-wrap { text-align: center; }
}

/* === БАЗА ЗНАНИЙ (WIKI СТРАНИЦА) === */
.wiki-container {
    display: flex;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: flex-start;
}

/* Левая колонка с кнопками */
.wiki-sidebar {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 100px; /* Фиксирует меню при прокрутке длинного списка */
}

.wiki-tab {
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 2px solid var(--border-color);
    padding: 14px 20px;
    border-radius: 8px;
    text-align: left;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wiki-tab:hover {
    border-color: var(--accent-gold);
}

.wiki-tab.active {
    background-color: var(--accent-gold);
    color: #111111;
    border-color: var(--accent-gold);
}

/* Правая колонка с контентом */
.wiki-content {
    flex: 1;
    min-width: 0;
}

.wiki-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.wiki-section.active {
    display: block;
}

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

/* Список правил */
.rules-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rule-item {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.rule-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.rule-item h3 {
    color: var(--accent-gold);
    margin-bottom: 8px;
    font-size: 1.15rem;
}

/* Сетка плагинов и датапаков */
.wiki-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.wiki-card {
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.wiki-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-3px);
}

.wiki-card-img {
    aspect-ratio: 16/10;
    overflow: hidden;
    background-color: var(--bg-main);
}

.wiki-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wiki-card-title {
    padding: 14px 16px;
    font-weight: 700;
    font-size: 1.05rem;
    text-align: center;
    color: #FFFFFF;
}

/* === МОДАЛЬНОЕ ОКНО WIKI === */
.wiki-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(11, 14, 20, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 4000;
    padding: 20px;
}

.wiki-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.wiki-modal-window {
    background-color: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh; /* Ограничиваем высоту для скролла */
    overflow-y: auto; /* Включаем внутренний скролл */
    position: relative;
    transform: scale(0.95);
    transition: transform 0.25s ease;
}

.wiki-modal-overlay.active .wiki-modal-window {
    transform: scale(1);
}

.wiki-modal-close {
    position: absolute;
    top: 15px; right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: #FFF;
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}

.wiki-modal-close:hover {
    background: var(--accent-gold);
    color: #000;
}

.wiki-modal-header img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-bottom: 2px solid var(--border-color);
}

.wiki-modal-body {
    padding: 30px;
}

.wiki-modal-body h3 {
    font-size: 1.5rem;
    color: #FFFFFF;
    margin-bottom: 12px;
}

.wiki-modal-body p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Блокировка внешнего скролла */
body.modal-open {
    overflow: hidden;
}

/* Адаптивность для телефонов */
@media (max-width: 768px) {
    .wiki-container {
        flex-direction: column;
    }

    .wiki-sidebar {
        flex: none;
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
        top: 80px;
    }

    .wiki-tab {
        flex: 1 0 auto;
        white-space: nowrap;
    }
}
/* === БАЗА ЗНАНИЙ (НА ГЛАВНОЙ) === */
.home-knowledge-section {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--bg-main);
}

.home-rules-container {
    max-width: 800px;
    margin: 40px auto 0;
    text-align: left;
}

.home-rules-list {
    list-style-type: disc; /* Те самые классические точки */
    padding-left: 20px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Делаем маркеры (точки) золотыми */
.home-rules-list li::marker {
    color: var(--accent-gold);
    font-size: 1.2rem;
}

.home-rules-list li {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.home-rules-list strong {
    color: #FFFFFF; /* Выделяем заголовки пунктов белым */
    font-weight: 600;
}

.home-rules-action {
    text-align: center;
    margin-top: 30px;
}

/* === МОДАЛЬНОЕ ОКНО WIKI === */
.modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 15, 0.85); /* Темный фон с затемнением */
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Когда скрипт добавляет класс active, окно появляется */
.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-main); /* Используем основной цвет фона твоего сайта */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh; /* Ограничиваем высоту, чтобы не вылезало за экран */
    overflow-y: auto; /* Добавляем внутренний скролл, если текста много */
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

/* Кнопка закрытия (крестик) */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--accent-gold);
}

/* Блокировка прокрутки основного сайта, когда окно открыто */
body.modal-open {
    overflow: hidden;
}

#modal-text {
    white-space: pre-wrap;
    line-height: 1.6;
}