/**
 * Обновленные стили для Silvername.gg
 * Тема: 7 Days to Die - Back To Origins
 */

:root {
    /* Основная цветовая схема, основанная на логотипе */
    --primary-color: #8b2e2e; /* Ржаво-красный */
    --secondary-color: #5a4534; /* Темное дерево */
    --accent-color: #a8a8a8; /* Состаренный металлик */
    --bg-color: #1a1a1a; /* Темный фон */
    --bg-secondary: #222222; /* Чуть светлее фон */
    --bg-card: #2a2a2a; /* Фон для карточек */
    --text-color: #e0e0e0; /* Светлый текст */
    --text-muted: #a0a0a0; /* Приглушенный текст */
    --border-color: #444; /* Цвет границ */
    --error-color: #ff4040; /* Цвет ошибки */
    --success-color: #40ff40; /* Цвет успеха */
    
    /* Дополнительные цвета */
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    
    /* Размеры и отступы */
    --hero-margin-bottom: 30px; /* Отступ снизу hero-секции */
    
    /* Размеры логотипа */
    --logo-max-width: 350px; /* Максимальная ширина логотипа */
    --logo-margin-bottom: 15px; /* Отступ снизу логотипа */
    
    /* Отступы для кнопок */
    --buttons-margin-bottom: 20px; /* Отступ снизу для кнопок */
    
    /* Отступы для блока статуса */
    --status-margin-top: 20px; /* Уменьшен отступ сверху для блока статуса с 60px до 20px */
}

/* Импорт шрифтов */
@import url('https://fonts.googleapis.com/css2?family=Teko:wght@400;500;600;700&display=swap');

/* Базовые стили */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-image: url('/img/concrete512.jpg'); /* Новый фоновый тайл "обугленный бетон" */
    background-repeat: repeat;
    background-size: 512px; /* Увеличен размер тайла до 512px */
    color: #c8c8c8;
}

/* Добавляем псевдоэлемент для создания шума (gritty-эффект) */
body:before {
    content: "";
    position: fixed;
    inset: 0;
    background: url('/img/noise.png') repeat;
    opacity: 0.07; /* Очень слабый */
    pointer-events: none;
    z-index: -1;
}

/* Добавляем псевдоэлемент для создания теплого грязно-коричневого оверлея */
body:after {
    content: "";
    position: fixed;
    inset: 0;
    background: #231b17; /* Теплый грязно-коричневый */
    opacity: 0.3;
    mix-blend-mode: overlay; /* Дает легкий сепия-оттенок без "морозного" эффекта */
    pointer-events: none;
    z-index: -2;
}

/* Стили для блока статуса сервера, указывающие на его кликабельность */
.server-status-section {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Стили для подсказки о кликабельности */
.server-status-hint {
    display: block;
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-top: 10px;
    font-style: italic;
    text-align: center;
}

/* Эффект при наведении для десктопной версии */
.server-status-section:not(.offline-only):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Эффект при нажатии для десктопной версии */
.server-status-section:not(.offline-only):active {
    transform: translateY(1px);
}

@media (max-width: 768px) {
    body {
        background-image:
            image-set(
                url('/img/bg-texture-small.webp') type('image/webp'),
                url('/img/bg-texture-small.png') type('image/png')
            );
    }
    
    /* Скрываем баннер на мобильных устройствах */
    .banner {
        display: none;
    }
    
    /* Скрываем раскрывающийся список игроков онлайн на мобильных устройствах */
    .online-players-container {
        display: none !important; /* !important для переопределения inline-стилей */
    }
    
    /* Убираем подсказку о кликабельности на мобильных устройствах */
    .server-status-hint {
        display: none;
    }
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Teko', sans-serif;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

code {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 3px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.95rem;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
    margin: 0 2px;
    font-weight: bold;
    vertical-align: baseline;
    position: relative;
    white-space: nowrap;
    box-sizing: border-box;
    text-align: center;
}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Заголовок и навигация */
.main-nav {
    background: rgba(34, 34, 34, 0.9);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    color: #E69B40;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    margin: 0 15px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1rem;
    position: relative;
    padding: 5px 0;
    display: flex;
    align-items: center;
    font-family: 'Fira Code', monospace;
}

.nav-links a i {
    margin-right: 8px;
    font-size: 1.2rem;
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #E69B40;
    transition: width 0.3s ease;
}

.nav-links a:hover:after {
    width: 100%;
}

.nav-links a:hover {
    color: #E69B40;
}

.nav-links a.active {
    color: #E69B40;
}

.nav-links a.active:after {
    width: 100%;
}

/* Glitch эффект при наведении */
.nav-links a:hover {
    animation: glitch 0.3s linear;
}

/* Кнопка мобильного меню */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #E69B40;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    z-index: 101;
}

/* Медиа-запросы для мобильных устройств */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background-color: rgba(34, 34, 34, 0.95);
        flex-direction: column;
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        z-index: 100;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
        border-left: 1px solid var(--border-color);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        margin: 15px 0;
        font-size: 1.2rem;
    }
    
    /* Затемнение фона при открытом меню */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 99;
    }
    
    .menu-overlay.active {
        display: block;
    }
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* Стили для модального окна */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    width: 600px;
    max-height: 90vh;
    z-index: 1001;
    background-color: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.modal.active {
    display: block;
    animation: modalFadeIn 0.3s ease;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.modal-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(139, 46, 46, 0.9);
}

.modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}


@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Секции */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.section-header h2 {
    font-size: 2.2rem;
    margin: 0;
    color: var(--accent-color);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.section-header h2 i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* Герой-секция */
.hero-section {
    background-image:
        image-set(
            url('/img/banner-large.webp') type('image/webp'),
            url('/img/banner-large.jpg') type('image/jpeg')
        );
    background-size: cover;
    background-position: center;
    padding: 40px 0; /* Добавлены отступы сверху и снизу */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    margin-bottom: var(--hero-margin-bottom);
    box-shadow: 0 0 20px 10px rgba(0, 0, 0, 0.5); /* Добавлена тень по краям баннера */
    backdrop-filter: blur(2px); /* Размытие фона под баннером */
    -webkit-backdrop-filter: blur(2px); /* Для Safari */
    filter: brightness(1.15) saturate(1.1); /* Подсветка фонаря теплым желто-оранжевым цветом */
}

/* Адаптивные фоновые изображения для hero-section */
@media (max-width: 1280px) {
    .hero-section {
        background-image:
            image-set(
                url('/img/banner-medium.webp') type('image/webp'),
                url('/img/banner-medium.jpg') type('image/jpeg')
            );
    }
}

@media (max-width: 640px) {
    .hero-section {
        background-image:
            image-set(
                url('/img/banner-small.webp') type('image/webp'),
                url('/img/banner-small.jpg') type('image/jpeg')
            );
    }
}

.hero-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3); /* Уменьшена непрозрачность с 0.7 до 0.3 */
}

.hero-content {
    position: relative;
    z-index: 1; /* Не меняем z-index, чтобы не перекрывать баннер */
    max-width: 800px;
    padding: 0 20px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
    padding-top: 0; /* Убран отступ сверху */
    margin-top: -20px; /* Добавлен отрицательный отступ сверху для поднятия контента */
}

.main-logo {
    max-width: var(--logo-max-width);
    margin: 0 auto var(--logo-margin-bottom);
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.8));
    display: block;
    position: relative; /* Добавлено позиционирование */
}

.hero-title {
    font-size: 3.5rem;
    margin: 0 0 20px;
    color: var(--text-color);
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: var(--text-muted);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: var(--buttons-margin-bottom);
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 25px;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 3px;
    font-family: 'Teko', sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.btn:hover:before {
    left: 0;
}

.btn-primary {
    background-color: #b03a32; /* Ржаво-красный вместо var(--primary-color) */
    border-color: #b03a32;
    color: var(--text-color);
}

.btn-primary:hover {
    background-color: #d14b40; /* Более яркий при наведении */
    border-color: #d14b40;
    color: var(--text-color);
}

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

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.4rem;
    display: inline-block;
    margin: 0 auto;
}

/* Баннер */
.banner {
    background: rgba(90, 30, 30, 0.95);
    border: 2px solid #b03a32;
    border-radius: 5px;
    margin: 20px 0;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Исправление вертикального выравнивания для всех inline-элементов в баннере */
.banner a,
.banner strong,
.banner code {
    vertical-align: baseline;
    display: inline;
    line-height: inherit;
    position: relative;
    white-space: normal;
    word-break: normal;
}

/* Добавляем пробелы до и после inline-элементов */
.banner a::before,
.banner strong::before,
.banner a::after,
.banner strong::after {
    content: " ";
    display: inline;
    white-space: pre;
}

/* Убираем псевдоэлементы для code, чтобы не влиять на отступы */
.banner code::before,
.banner code::after {
    content: none;
}

.banner:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 100%;
    background-color: #ff4040;
}

.banner-header {
    background-color: rgba(139, 46, 46, 0.9);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Стили для страницы статистики */
.stats-container {
    margin: 30px 0;
}

.stats-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stats-count {
    display: flex;
    align-items: center;
}

.stats-pagination-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stats-pagination-info p {
    margin: 0;
}

.stats-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.stats-search {
    flex: 1;
    min-width: 200px;
}

.search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-color);
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(139, 46, 46, 0.3);
}

.loading-indicator {
    text-align: center;
    padding: 30px;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.loading-indicator i {
    margin-right: 10px;
    color: var(--primary-color);
}

.stats-table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    position: relative;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-card);
    color: var(--text-color);
}

.stats-table th,
.stats-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.stats-table th {
    background-color: rgba(139, 46, 46, 0.8);
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Добавляем тень для заголовка таблицы при прокрутке */
.stats-table th::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: rgba(0, 0, 0, 0.2);
}

.stats-table tbody tr {
    transition: background-color 0.3s ease;
}

.stats-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.stats-table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.2);
}

.stats-table tbody tr:nth-child(even):hover {
    background-color: rgba(255, 255, 255, 0.07);
}

.stats-table .name-column {
    text-align: left;
    font-weight: 600;
    min-width: 200px;
}

.stats-table .rank-column {
    width: 50px;
    font-weight: 700;
}

.stats-table .status-column {
    width: 80px;
}

.sort-column a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    text-decoration: none;
}

.sort-column a:hover {
    color: var(--gold);
}

.sort-column a i {
    margin-left: 5px;
}

.active-sort a {
    color: var(--gold);
}

.rank-medal {
    display: inline-block;
    font-size: 1.2rem;
}

.rank-1 {
    color: var(--gold);
}

.rank-2 {
    color: var(--silver);
}

.rank-3 {
    color: var(--bronze);
}

.stats-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.status-online {
    color: #4CAF50;
    animation: pulse 1.5s infinite;
}

.status-offline {
    color: var(--text-muted);
}

.retry-button {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 10px;
    transition: background-color 0.3s;
}

.retry-button:hover {
    background-color: #a33232;
}

.retry-button i {
    margin-right: 5px;
}

.player-online {
    background-color: rgba(76, 175, 80, 0.1) !important;
}

.player-banned {
    color: var(--error-color);
    margin-left: 5px;
}

/* Стили для пагинации */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    background-color: var(--bg-card);
    color: var(--text-color);
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

/* Стили для мобильной пагинации */
.mobile-pagination {
    flex-direction: column;
    gap: 15px;
}

.pagination-select-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.pagination-select {
    padding: 8px 12px;
    background-color: var(--bg-card);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    width: 150px;
    font-size: 0.9rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 30px;
}

/* Стили для Safari */
@media not all and (min-resolution:.001dpcm) {
    @supports (-webkit-appearance:none) {
        .page-size-select {
            -webkit-appearance: none;
            background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
            background-repeat: no-repeat;
            background-position: right 8px center;
            padding-right: 30px;
        }
    }
}

.pagination-nav-container {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination-link:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
    border-color: var(--primary-color);
}

.pagination-link.current {
    background-color: var(--primary-color);
    color: var(--text-color);
    border-color: var(--primary-color);
    font-weight: 700;
}

.pagination-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Стили для блока управления таблицей */
.table-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Счётчик игроков + номер страницы */
.meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    color: var(--text-muted);
}

/* Поиск + селект */
.filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-input {
    flex: 1 1 auto;
    padding: 0.4rem 0.6rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: #fff;
}

.page-size-select {
    padding: 0.35rem 0.6rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: #fff;
    min-width: 80px;
}

/* Легенда статусов */
.legend {
    display: flex;
    justify-content: space-between;
    margin: 0 0 1rem;
    color: var(--text-muted);
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
}

.legend-per-page {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.status-online {
    color: #4CAF50;
    animation: pulse 1.5s infinite;
}

.status-offline {
    color: var(--text-muted);
}

/* Класс для визуально скрытых элементов (доступных для скрин-ридеров) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.error-message,
.no-data-message {
    background-color: var(--bg-card);
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
    text-align: center;
    border: 1px solid var(--border-color);
}

.error-message {
    border-left: 4px solid var(--error-color);
}

.no-data-message {
    border-left: 4px solid var(--accent-color);
}

@media (max-width: 768px) {
    .stats-table th,
    .stats-table td {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .pagination-link {
        width: 35px;
        height: 35px;
        margin: 0 3px;
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .legend {
        flex-direction: column;
        gap: 1rem;
    }
    
    .legend-items {
        align-items: center;
    }
    
    .legend-per-page {
        justify-content: center;
    }
    
    .page-size-select {
        min-width: 150px;
    }
}
    
    .stats-info p {
        margin: 5px 0;
    }
    
    .pagination-link {
        width: 35px;
        height: 35px;
        margin: 0 3px;
        font-size: 0.9rem;
    }
    
    .stats-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .stats-search {
        width: 100%;
    }
    
    .per-page-selector {
        width: 100%;
        margin-left: 0;
    }
    
    .per-page-wrapper {
        width: 100%;
        max-width: 200px;
    }

/* Для очень маленьких экранов скрываем некоторые колонки */
@media (max-width: 480px) {
    .stats-table .kills-players-column,
    .stats-table .deaths-column {
        display: none;
    }
}

.banner-header i {
    color: #fff;
    font-size: 1.5rem;
    margin-right: 12px;
    animation: pulse 2s infinite;
    -webkit-animation: pulse 2s infinite;
}

.banner-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.banner-content {
    padding: 15px;
}

.banner-content p {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.update-link {
    color: #d4b3ff;
    text-decoration: underline;
    font-weight: bold;
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
}

.update-link:hover {
    color: #e6d0ff;
    text-shadow: 0 0 5px rgba(212, 179, 255, 0.7);
}

.update-steps {
    margin: 15px 0;
    padding-left: 0;
    list-style-type: none;
    counter-reset: step-counter;
}

.update-steps li {
    margin-bottom: 12px;
    position: relative;
    display: flex;
    align-items: flex-start;
    padding-left: 35px;
    counter-increment: step-counter;
}

.update-steps li::before {
    content: counter(step-counter) ".";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
    color: #ff9999;
    font-size: 1.1rem;
    width: 25px;
    text-align: right;
}

.step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
    position: relative;
    top: 0;
    left: 0;
}

.update-steps li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.update-steps li::before {
    margin-right: 5px;
}

.step-icon i {
    font-size: 0.9rem;
    color: #ff9999;
}

.banner-warning {
    margin-top: 15px;
    padding: 12px;
    background-color: rgba(255, 64, 64, 0.2);
    border-left: 4px solid #ff4040;
    font-weight: bold;
    font-size: 1.05rem;
}

/* Анимация пульсации для всех браузеров */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@-webkit-keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Медиа-запрос для мобильных устройств */
@media (max-width: 768px) {
    .banner-header h3 {
        font-size: 1.2rem;
    }
    
    .update-steps li {
        padding-left: 30px;
    }
    
    .step-icon {
        width: 22px;
        height: 22px;
    }
}

/* Статус сервера */
.server-status-section {
    background-color: var(--bg-secondary);
    border-radius: 5px;
    padding: 30px;
    margin-top: var(--status-margin-top);
    margin-bottom: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    clear: both; /* Предотвращает наложение */
    cursor: pointer; /* Указывает, что блок кликабельный */
    transition: all 0.3s ease;
}

.server-status-section:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.server-status-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.server-status-right {
    display: flex;
    align-items: center;
}

.status-indicator {
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-indicator .players-count {
    margin-left: 10px;
    font-size: 0.85rem;
    opacity: 0.9;
}

.status-indicator.online {
    background-color: rgba(64, 255, 64, 0.2);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.status-indicator.offline {
    background-color: rgba(255, 64, 64, 0.2);
    color: var(--error-color);
    border: 1px solid var(--error-color);
    isolation: isolate; /* Изоляция для предотвращения наследования фильтров */
    position: relative; /* Для правильной работы isolation */
    z-index: 1; /* Для правильной работы isolation */
    filter: none; /* Убираем фильтр "погасил" */
}

.server-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Выпадающий список онлайн-игроков */
.online-players-container {
    background-color: var(--bg-card);
    border-radius: 5px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.online-players-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
    position: relative; /* Добавлено для правильного позиционирования в Safari */
}

.online-players-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--accent-color);
    flex: 1; /* Занимает доступное пространство */
}

.close-players-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    position: absolute; /* Абсолютное позиционирование для Safari */
    right: 15px; /* Отступ справа */
    top: 50%; /* По центру по вертикали */
    transform: translateY(-50%); /* Центрирование по вертикали */
    width: 30px; /* Фиксированная ширина */
    height: 30px; /* Фиксированная высота */
    display: flex; /* Для центрирования иконки */
    align-items: center; /* Центрирование по вертикали */
    justify-content: center; /* Центрирование по горизонтали */
    z-index: 10; /* Увеличенный z-index для лучшей доступности */
    -webkit-appearance: none; /* Для Safari */
    -webkit-tap-highlight-color: transparent; /* Убираем подсветку при тапе в Safari */
    touch-action: manipulation; /* Улучшаем отзывчивость на мобильных устройствах */
}

.close-players-btn:hover {
    color: var(--text-color);
}

.online-players-table-container {
    overflow-x: auto; /* Горизонтальный скролл для маленьких экранов */
    padding: 0 5px;
}

.online-players-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.online-players-table th,
.online-players-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap; /* Предотвращает перенос текста */
}

.online-players-table th {
    position: sticky;
    top: 0;
    background-color: var(--bg-card);
    z-index: 10;
}

.level-col {
    width: 80px;
    text-align: center;
}

.stats-col {
    width: 120px;
    text-align: right;
}

.loading-data {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center; /* Добавлено для Safari */
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap; /* Для корректного переноса на маленьких экранах */
    min-height: 60px; /* Минимальная высота для Safari */
}

.pagination-btn {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 5px 10px;
    margin: 0 5px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex; /* Для Safari */
    align-items: center; /* Для Safari */
    justify-content: center; /* Для Safari */
    min-width: 30px; /* Минимальная ширина для Safari */
    min-height: 30px; /* Минимальная высота для Safari */
    text-align: center; /* Для Safari */
}

.pagination-btn:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
}

.pagination-btn.active {
    background-color: var(--primary-color);
    color: var(--text-color);
    font-weight: bold;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    margin: 0 5px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    min-height: 30px;
}

.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.info-card {
    background-color: var(--bg-card);
    border-radius: 5px;
    padding: 20px;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.info-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.5rem;
}

.info-content h3 {
    margin: 0 0 5px;
    font-size: 1.2rem;
}

/* Safari-специфичные стили */
@media not all and (min-resolution:.001dpcm) {
    @supports (-webkit-appearance:none) {
        /* Стили для Safari */
        .close-players-btn {
            -webkit-appearance: none;
            appearance: none;
            right: 10px !important;
            top: 15px !important;
            transform: none !important;
            position: absolute !important;
        }
        
        .pagination {
            display: -webkit-box;
            display: -webkit-flex;
            display: flex;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            justify-content: center;
            -webkit-box-align: center;
            -webkit-align-items: center;
            align-items: center;
        }
        
        .pagination-btn {
            -webkit-appearance: none;
            appearance: none;
            display: -webkit-inline-box;
            display: -webkit-inline-flex;
            display: inline-flex;
            -webkit-box-align: center;
            -webkit-align-items: center;
            align-items: center;
            -webkit-box-pack: center;
            -webkit-justify-content: center;
            justify-content: center;
        }
        
        /* Исправление для flexbox в Safari */
        .online-players-header {
            display: -webkit-box;
            display: -webkit-flex;
            display: flex;
            -webkit-box-pack: justify;
            -webkit-justify-content: space-between;
            justify-content: space-between;
            -webkit-box-align: center;
            -webkit-align-items: center;
            align-items: center;
        }
    }
}

.info-value {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    font-family: 'Teko', sans-serif;
}


table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.rank-col {
    width: 60px;
    text-align: center;
}

.kills-col {
    width: 150px;
    text-align: right;
}


/* Новости */
.news-section {
    margin-bottom: 50px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.news-item {
    background-color: rgba(37, 29, 25, 0.6); /* Теплее фон вместо var(--bg-secondary) */
    border-radius: 5px;
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8); /* Теплая тень */
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.news-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background-color: var(--primary-color);
}

.news-item.featured {
    grid-column: span 2;
    background-color: rgba(139, 46, 46, 0.1);
}

/* Стили для загрузки новостей */
.loading-news {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 18px;
}

.loading-news i {
    margin-right: 10px;
}

.no-news {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-style: italic;
}

.news-item.featured:before {
    background-color: var(--accent-color);
}

.news-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.news-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.news-link {
    display: inline-block;
    margin-top: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.news-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.news-link:hover i {
    transform: translateX(5px);
}

/* Особенности */
.features-section {
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-card {
    background-color: var(--bg-secondary);
    border-radius: 5px;
    padding: 30px 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background-color: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.feature-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* CTA секция */
.cta-section {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
        image-set(
            url('/img/banner-large.webp') type('image/webp'),
            url('/img/banner-large.jpg') type('image/jpeg')
        );
    background-size: cover;
    background-position: center;
    padding: 80px 20px;
    text-align: center;
    margin-bottom: 50px;
    border-radius: 5px;
    overflow: hidden;
}

/* Адаптивные фоновые изображения для cta-section */
@media (max-width: 1280px) {
    .cta-section {
        background-image:
            linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
            image-set(
                url('/img/banner-medium.webp') type('image/webp'),
                url('/img/banner-medium.jpg') type('image/jpeg')
            );
    }
}

@media (max-width: 640px) {
    .cta-section {
        background-image:
            linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
            image-set(
                url('/img/banner-small.webp') type('image/webp'),
                url('/img/banner-small.jpg') type('image/jpeg')
            );
    }
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

/* Стили для страницы Инструкция */
.guide-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.guide-sidebar {
    background-color: #2A2A2A;
    border-radius: 5px;
    padding: 20px;
    position: sticky;
    top: 80px;
    height: fit-content;
    border: 1px solid #444;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.guide-sidebar h3 {
    margin-top: 0;
    color: #E69B40;
    font-size: 18px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.guide-sidebar ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.guide-sidebar li {
    margin-bottom: 10px;
}

.guide-sidebar a {
    color: #CCCCCC;
    text-decoration: none;
    display: block;
    padding: 5px 10px;
    border-radius: 3px;
    transition: all 0.3s ease;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
}

.guide-sidebar a:hover {
    background-color: rgba(230, 155, 64, 0.2);
    color: #E69B40;
}

.guide-sidebar a.active {
    background-color: rgba(230, 155, 64, 0.3);
    color: #E69B40;
    border-left: 3px solid #E69B40;
    padding-left: 7px;
}

.guide-content {
    background-color: #2A2A2A;
    border-radius: 5px;
    padding: 30px;
    border: 1px solid #444;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Добавляем отступ для якорей, чтобы учесть фиксированное меню */
.guide-section {
    scroll-margin-top: 100px; /* Отступ сверху для якорей */
}

.guide-content h1 {
    color: #E69B40;
    font-size: 32px;
    margin-top: 0;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.guide-content h2 {
    color: #E69B40;
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.guide-content p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.guide-section {
    margin-bottom: 40px;
}

.guide-steps {
    counter-reset: step-counter;
    margin: 20px 0;
    padding: 0;
    list-style-type: none;
}

.guide-steps li {
    position: relative;
    padding-left: 40px;
    margin-bottom: 20px;
    counter-increment: step-counter;
}

.guide-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    background-color: rgba(230, 155, 64, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E69B40;
    font-weight: bold;
}

.guide-note {
    background-color: rgba(230, 155, 64, 0.1);
    border-left: 4px solid #E69B40;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
}

.guide-warning {
    background-color: rgba(212, 92, 92, 0.1);
    border-left: 4px solid #D45C5C;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
}

.guide-code {
    background-color: #1A1A1A;
    padding: 15px;
    border-radius: 5px;
    font-family: 'Fira Code', monospace;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #444;
}

.guide-code code {
    color: #E69B40;
    display: block;
    line-height: 1.5;
}

.mod-block {
    background-color: rgba(230, 155, 64, 0.1);
    border: 1px solid #E69B40;
    border-radius: 5px;
    padding: 10px 15px;
    margin-bottom: 20px;
    font-weight: bold;
    color: #E69B40;
    display: inline-block;
}

.important {
    background-color: rgba(212, 92, 92, 0.1);
    border: 1px solid #D45C5C;
    border-radius: 5px;
    padding: 20px;
    margin: 30px 0;
}

.important h3 {
    color: #D45C5C;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
}

.important ul {
    margin-bottom: 0;
}

.important li {
    margin-bottom: 10px;
}

.important li:last-child {
    margin-bottom: 0;
}

.top-link {
    font-size: 14px;
    color: #a0a0a0;
    text-decoration: none;
    margin-left: 10px;
}

.top-link:hover {
    color: #E69B40;
}

.note {
    color: #a0a0a0;
    font-size: 14px;
}

.code {
    font-family: 'Fira Code', monospace;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 14px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
    margin: 0 2px;
    font-weight: bold;
    text-align: center;
}

.mod-name {
    color: #E69B40;
    font-weight: bold;
}

/* Адаптивность для страницы инструкции */
@media (max-width: 768px) {
    .guide-container {
        grid-template-columns: 1fr;
    }
    
    .guide-sidebar {
        position: static;
        margin-bottom: 20px;
    }
}

.cta-section h2 {
    font-size: 3rem;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text-color);
}

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

/* Сообщения об ошибках */
.error-message {
    background-color: rgba(255, 64, 64, 0.1);
    border: 1px solid var(--error-color);
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    display: flex;
    align-items: center;
}

.error-message i {
    color: var(--error-color);
    font-size: 1.5rem;
    margin-right: 15px;
}

.error-message p {
    margin: 0;
    color: var(--error-color);
}

/* Социальные ссылки */
.social-links {
    margin: 20px 0;
    text-align: center;
}

.social-links a {
    display: inline-block;
    margin: 0 10px;
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Подвал */
footer {
    background: var(--bg-secondary);
    padding: 40px 0 20px;
    margin-top: 40px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

/* Адаптивность */
@media (max-width: 992px) {
    :root {
        --logo-max-width: 300px;
        --hero-margin-bottom: 20px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .news-item.featured {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    :root {
        --hero-margin-bottom: 20px;
        --logo-max-width: 250px; /* Размер логотипа для планшетов */
        --logo-margin-bottom: 10px;
        --buttons-margin-bottom: 15px;
        --status-margin-top: 15px;
    }
    
    header {
        flex-direction: column;
        padding: 15px 10px;
    }
    
    header h1 {
        margin-bottom: 15px;
    }
    
    nav {
        width: 100%;
        justify-content: center;
    }
    
    nav a {
        margin: 0 10px;
        font-size: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .server-info {
        grid-template-columns: 1fr;
    }
    
    .cta-section h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    :root {
        --hero-margin-bottom: 20px;
        --logo-max-width: 200px; /* Размер логотипа для мобильных */
        --logo-margin-bottom: 10px;
        --buttons-margin-bottom: 15px;
        --status-margin-top: 15px;
    }
    
    body {
        font-size: 0.9rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .btn {
        width: 100%;
        text-align: center;
        box-sizing: border-box; /* Добавлено для учета padding и border в ширине */
        max-width: 100%; /* Ограничение максимальной ширины */
    }
    
    /* Исправление для кнопки в cta-section */
    .cta-content .btn {
        width: auto; /* Автоматическая ширина вместо 100% */
        min-width: 200px; /* Минимальная ширина */
        max-width: 90%; /* Максимальная ширина */
        margin: 0 auto; /* Центрирование */
        display: block; /* Блочное отображение для центрирования */
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .status-indicator {
        margin-top: 10px;
    }
    
    th, td {
        padding: 8px;
    }
    
    /* Адаптивность для выпадающего списка игроков */
    .online-players-table th,
    .online-players-table td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .level-col {
        width: 60px;
    }
    
    .stats-col {
        width: 90px;
    }
    
    .pagination-btn {
        padding: 4px 8px;
        font-size: 0.85rem;
    }
}

/* Стили для состояния "оффлайн" */
.server-status-section.offline-only {
    padding: 15px 20px;
    margin-bottom: 30px;
}

.server-status-section.offline-only .server-info,
.server-status-section.offline-only .online-players-container {
    display: none;
}

.server-status-section.offline-only .section-header {
    margin-bottom: 0;
    border-bottom: none;
}