/* ===== ROOT ПЕРЕМЕННЫЕ ===== */
:root {
    --l2: #ffd700;
    --l2-glow: rgba(255, 215, 0, 0.3);
    --minecraft: #44bd32;
    --minecraft-glow: rgba(68, 189, 50, 0.3);
    --rust: #e67e22;
    --rust-glow: rgba(230, 126, 34, 0.3);
    --gta5: #4f9da6;
    --gta5-glow: rgba(79, 157, 166, 0.3);
    
    --bg-primary: #0a0c0f;
    --bg-secondary: #14181c;
    --bg-card: rgba(30, 35, 41, 0.85);
    --bg-card-solid: #1e2329;
    --bg-hover: #2a2f36;
    
    --text-primary: #ffffff;
    --text-secondary: #9aa4b3;
    --text-muted: #6b7a8f;
    
    --border-light: rgba(255, 255, 255, 0.1);
    --border-medium: rgba(255, 255, 255, 0.2);
    
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
    
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 24px;
    --radius-full: 60px;
    
    --transition: 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== АНИМИРОВАННЫЙ ФОН ===== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.gradient-1, .gradient-2, .gradient-3 {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.5;
}

.gradient-1 {
    background: radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.2), transparent 60%);
    animation: float1 20s ease-in-out infinite;
}

.gradient-2 {
    background: radial-gradient(circle at 80% 70%, rgba(68, 189, 50, 0.15), transparent 60%);
    animation: float2 25s ease-in-out infinite;
}

.gradient-3 {
    background: radial-gradient(circle at 50% 50%, rgba(230, 126, 34, 0.15), transparent 70%);
    animation: float3 30s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    50% { transform: translate(5%, 5%) scale(1.1); opacity: 0.7; }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
    50% { transform: translate(-5%, -5%) scale(1.15); opacity: 0.6; }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
    50% { transform: translate(3%, -3%) scale(1.05); opacity: 0.6; }
}

/* ===== КОНТЕЙНЕР ===== */
.container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== ХЕДЕР ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 12, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
}

.header__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

/* ===== ЛОГОТИП ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    cursor: pointer;
}

.logo__icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--rust), #f39c12);
    transform: rotate(45deg);
    border-radius: 10px;
    transition: transform 0.3s ease;
    box-shadow: 0 0 15px var(--rust-glow);
    flex-shrink: 0;
}

.logo:hover .logo__icon {
    transform: rotate(135deg);
}

.logo-text-wrapper {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
}

.logo__text {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #ccc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo__text span {
    background: linear-gradient(135deg, var(--rust), #f39c12);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-badge {
    font-size: 15px;
    font-weight: 800;
    padding: 2px 12px;
    background: var(--rust);
    color: var(--bg-primary);
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-block;
    width: fit-content;
}

/* ===== НАВИГАЦИЯ ===== */
.games-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.game-nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.game-nav-btn i {
    margin-right: 8px;
}

.game-nav-btn.active, .game-nav-btn:hover {
    background: var(--rust);
    border-color: var(--rust);
    color: #fff;
    box-shadow: 0 0 15px var(--rust-glow);
    transform: translateY(-2px);
}

/* Цвета категорий */
.game-nav-btn[data-game="rust"]:hover,
.game-nav-btn[data-game="rust"].active { background: #e67e22; border-color: #e67e22; box-shadow: 0 0 20px rgba(230, 126, 34, 0.4); }

.game-nav-btn[data-game="gta5"]:hover,
.game-nav-btn[data-game="gta5"].active { background: #4f9da6; border-color: #4f9da6; box-shadow: 0 0 20px rgba(79, 157, 166, 0.4); }

.game-nav-btn[data-game="l2"]:hover,
.game-nav-btn[data-game="l2"].active { background: #ffd700; border-color: #ffd700; box-shadow: 0 0 20px rgba(255, 215, 0, 0.4); color: #1a1a2e; }
.game-nav-btn[data-game="l2"]:hover i,
.game-nav-btn[data-game="l2"].active i { color: #1a1a2e; }

.game-nav-btn[data-game="minecraft"]:hover,
.game-nav-btn[data-game="minecraft"].active { background: #44bd32; border-color: #44bd32; box-shadow: 0 0 20px rgba(68, 189, 50, 0.4); }

.servers-link {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    color: var(--rust);
    padding: 8px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.servers-link:hover {
    background: var(--rust);
    color: #fff;
    box-shadow: 0 0 15px var(--rust-glow);
    transform: translateY(-2px);
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.guides-header {
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease;
}

.guides-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #fff, var(--rust));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.search-sort {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 12px 20px;
    flex: 1;
    max-width: 400px;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--rust);
    box-shadow: 0 0 0 2px var(--rust-glow);
}

.search-bar i {
    color: var(--text-muted);
    margin-right: 12px;
}

.search-bar input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    width: 100%;
    outline: none;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.sort-options {
    display: flex;
    gap: 12px;
}

.sort-btn {
    background: none;
    border: 1px solid var(--border-light);
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.sort-btn.active, .sort-btn:hover {
    background: var(--rust);
    border-color: var(--rust);
    color: #fff;
}

/* ===== СЕТКА КАРТОЧЕК ===== */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin-bottom: 40px;
}

.guide-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    cursor: pointer;
    animation: fadeInUp 0.5s ease backwards;
}

.guide-card:nth-child(1) { animation-delay: 0.05s; }
.guide-card:nth-child(2) { animation-delay: 0.1s; }
.guide-card:nth-child(3) { animation-delay: 0.15s; }
.guide-card:nth-child(4) { animation-delay: 0.2s; }

.guide-card:hover {
    transform: translateY(-8px);
    border-color: var(--rust);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--rust-glow);
}

.guide-card__image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.guide-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.guide-card:hover .guide-card__image img {
    transform: scale(1.05);
}

.guide-card__content {
    padding: 20px;
}

.guide-card__category {
    font-size: 11px;
    font-weight: 700;
    color: var(--rust);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.guide-card__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--text-primary);
}

.guide-card__desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.guide-card__stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.guide-card__stats i {
    margin-right: 6px;
}

/* Цвета категорий для карточек */
.guide-card[data-category="rust"]:hover { border-color: #e67e22; box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(230,126,34,0.3); }
.guide-card[data-category="rust"] .guide-card__category { color: #e67e22; }

.guide-card[data-category="gta5"]:hover { border-color: #4f9da6; box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(79,157,166,0.3); }
.guide-card[data-category="gta5"] .guide-card__category { color: #4f9da6; }

.guide-card[data-category="l2"]:hover { border-color: #ffd700; box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(255,215,0,0.3); }
.guide-card[data-category="l2"] .guide-card__category { color: #ffd700; }

.guide-card[data-category="minecraft"]:hover { border-color: #44bd32; box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(68,189,50,0.3); }
.guide-card[data-category="minecraft"] .guide-card__category { color: #44bd32; }

/* ===== ПУСТОЕ СОСТОЯНИЕ ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.empty-state i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-state p {
    color: var(--text-secondary);
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination__link {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    padding: 10px 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.pagination__link.active, .pagination__link:hover {
    background: var(--rust);
    color: #fff;
    border-color: var(--rust);
}

/* ===== ФУТЕР ===== */
.footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.footer__inner p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal__content--split {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
}

.modal__header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    background: var(--bg-card);
}

.modal__close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    padding: 0 8px;
    transition: var(--transition);
}

.modal__close:hover {
    color: var(--rust);
    transform: scale(1.1);
}

.modal__body-split {
    display: flex;
    flex: 1;
    overflow-y: auto;
}

.modal__main {
    flex: 2;
    padding: 30px;
    overflow-y: auto;
}

.modal__sidebar {
    flex: 1;
    padding: 30px;
    border-left: 1px solid var(--border-light);
    overflow-y: auto;
    background: var(--bg-card);
}

/* ===== СТИЛИ ДЛЯ КОНТЕНТА ГАЙДА ===== */
.guide-article__header {
    margin-bottom: 30px;
}

.guide-category-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(230, 126, 34, 0.2);
    border: 1px solid rgba(230, 126, 34, 0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--rust);
    margin-bottom: 16px;
}

.guide-article__header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
}

.guide-meta {
    display: flex;
    gap: 24px;
    color: var(--text-muted);
    font-size: 14px;
}

.guide-article__content {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.guide-article__content h2 {
    font-size: 24px;
    margin: 30px 0 16px;
    color: var(--text-primary);
}

.guide-article__content h3 {
    font-size: 20px;
    margin: 24px 0 12px;
    color: var(--text-primary);
}

.guide-article__content p {
    margin-bottom: 16px;
}

.guide-article__content ul, .guide-article__content ol {
    margin: 16px 0 16px 24px;
}

.guide-article__content li {
    margin-bottom: 8px;
}

.sidebar-block {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
}

.sidebar-block h3 {
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.sidebar-block h3 i {
    color: var(--rust);
}

.similar-guides-list, .top-guides-list {
    list-style: none;
}

.similar-guides-list li, .top-guides-list li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.similar-guides-list a, .top-guides-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
    transition: var(--transition);
}

.similar-guides-list a:hover, .top-guides-list a:hover {
    color: var(--rust);
}

.similar-views {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== ТРЕХКОЛОНОЧНЫЙ МАКЕТ ===== */
.guide-detail-layout-three {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.guide-sidebar-left {
    flex: 1;
    position: sticky;
    top: 100px;
}

.guide-article {
    flex: 2;
    min-width: 0;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.guide-article__header {
    padding: 30px 30px 0 30px;
    margin-bottom: 0;
}

.guide-article__content {
    padding: 0 30px 30px 30px;
}

.guide-sidebar-right {
    flex: 1;
    position: sticky;
    top: 100px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: 40px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.back-button:hover {
    background: var(--rust);
    border-color: var(--rust);
    color: #fff;
    transform: translateX(-4px);
}

.toc-list {
    list-style: none;
}

.toc-list li {
    margin-bottom: 8px;
}

.toc-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 6px 0;
    transition: var(--transition);
}

.toc-list a:hover {
    color: var(--rust);
    padding-left: 4px;
}

/* Адаптив */
@media (max-width: 1024px) {
    .guide-detail-layout-three {
        flex-direction: column;
    }
    .guide-sidebar-left,
    .guide-sidebar-right {
        position: static;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .guide-article__header {
        padding: 20px 20px 0 20px;
    }
    .guide-article__content {
        padding: 0 20px 20px 20px;
    }
}

/* ===== СЕРВЕРА ===== */
.servers-list {
    list-style: none;
}

.server-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.server-item a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
}

.server-item strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.vip-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1a1a2e;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
}

.server-rating {
    display: inline-block;
    font-size: 12px;
    color: #ffd700;
    margin: 4px 0;
}

.server-rating i {
    font-size: 10px;
}

.server-online {
    display: inline-block;
    font-size: 11px;
    color: #44bd32;
    margin-left: 8px;
}

.server-online i {
    font-size: 10px;
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== СКРОЛЛБАР ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--rust); }
::selection { background: var(--rust); color: var(--bg-primary); }

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1024px) {
    .guide-detail-layout-three { flex-direction: column; }
    .guide-sidebar-left, .guide-sidebar-right { position: static; width: 100%; }
}

@media (max-width: 768px) {
    .container { padding: 30px 16px; }
    .header__inner { flex-direction: column; gap: 16px; }
    .guides-title { font-size: 28px; }
    .guide-article__header h1 { font-size: 24px; }
    .modal__body-split { flex-direction: column; }
    .modal__sidebar { border-left: none; border-top: 1px solid var(--border-light); }
    .modal__content--split { width: 95%; max-height: 95vh; }
}

@media (max-width: 480px) {
    .guides-grid { grid-template-columns: 1fr; }
    .guides-title { font-size: 24px; }
    .search-sort { flex-direction: column; align-items: stretch; }
    .search-bar { max-width: 100%; }
    .sort-options { justify-content: center; }
    .logo__text { font-size: 18px; }
    .logo__icon { width: 28px; height: 28px; }
}

/* ===== ССЫЛКИ В ГАЙДАХ ===== */
.guide-link, .guide-article__content a, .formatted-content a {
    color: #e67e22 !important;
    text-decoration: none;
}

.guide-link:hover, .guide-article__content a:hover, .formatted-content a:hover {
    color: #f39c12 !important;
    text-decoration: underline;
}

/* ===== ЦЕНТРАЛЬНЫЙ БЛОК ГАЙДА ===== */
.guide-article {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
    padding: 0;
}

.guide-article__header {
    padding: 30px 30px 0 30px;
    margin-bottom: 0;
}

.guide-article__content {
    padding: 0 30px 30px 30px;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .guide-article__header {
        padding: 20px 20px 0 20px;
    }
    .guide-article__content {
        padding: 0 20px 20px 20px;
    }
}