/* Сброс стилей по умолчанию */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Основные стили для body */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 150%;
    background: #0a0a0a;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
    position: relative;
    color: #ffffff;
    padding-top: 80px;
}


/* Контейнер */
.container {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 20px;
    max-width: 1400px;
    width: 100%;
}

/* Заголовок */
.header {
    margin-bottom: 60px;
    animation: fadeInDown 1s ease-out;
}

.header h1 {
    color: #ffffff;
    font-size: 2.24rem;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
    text-transform: none;
}

.header p {
    color: #b0b0b0;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Статус сервера в шапке */
.top-server-info {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 14px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.top-server-info:hover {
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.server-info-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.server-ip-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.server-ip-text {
    color: #ffffff;
    font-size: 1rem;
    letter-spacing: 0.3px;
    user-select: all;
}

.server-info-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
}

.server-players-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: rgba(0, 0, 0, 0.35);
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-width: 110px;
}

.server-players {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.players-loading {
    color: #888888;
    font-style: italic;
}

.players-online {
    color: #4ade80;
}

.players-offline {
    color: #f87171;
}

.server-info-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: lowercase;
}

.copy-hint {
    margin-left: 8px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

.copy-hint.copied {
    color: #4ade80;
}

/* Сетка карт */
.maps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 24px;
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Карточка карты */
.map-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    min-height: 400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.map-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(220, 20, 60, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.map-card:hover::before {
    opacity: 1;
}

.map-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(220, 20, 60, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(220, 20, 60, 0.1);
}

/* Изображение карты */
.map-image {
    width: 90%;
    max-width: 260px;
    height: 190px;
    object-fit: cover;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    border-radius: 12px;
    position: relative;
    z-index: 1;
}

.map-card:hover .map-image {
    border-color: rgba(220, 20, 60, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Заголовок карты */
.map-title {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -0.3px;
    text-transform: none;
    position: relative;
    z-index: 1;
    max-width: 90%;
    text-align: center;
}

/* Описание карты */
.map-description {
    color: #b0b0b0;
    font-size: 0.8rem;
    line-height: 1.6;
    margin-bottom: 30px;
    margin-left: 5%;
    margin-right: 5%;
    position: relative;
    z-index: 1;
    text-align: center;
}

/* Кнопка перехода */
.map-button {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.2) 0%, rgba(220, 20, 60, 0.1) 100%);
    color: #ffffff;
    text-decoration: none;
    border: 1px solid rgba(220, 20, 60, 0.4);
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s;
    border-radius: 8px;
    position: relative;
    z-index: 1;
    text-transform: none;
    letter-spacing: 0.3px;
}

.map-button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.3) 0%, rgba(220, 20, 60, 0.2) 100%);
    border-color: rgba(220, 20, 60, 0.6);
    box-shadow: 0 8px 20px rgba(220, 20, 60, 0.2);
}

.map-button:active {
    transform: translateY(0);
}

.map-button span {
    position: relative;
    z-index: 1;
}

/* Иконка */
.map-icon {
    font-size: 2.3rem;
    margin-bottom: 14px;
    display: block;
    transition: transform 0.3s;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(220, 20, 60, 0.3));
}

.map-card:hover .map-icon {
    transform: scale(1.1);
}

/* Анимации появления */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.map-card:nth-child(1) { animation-delay: 0.1s; }
.map-card:nth-child(2) { animation-delay: 0.3s; }

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(220, 20, 60, 0.3);
    border-color: rgba(220, 20, 60, 0.5);
    transform: scale(1.1);
}

.modal-link-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.modal-link-card .link-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-link-card .link-title {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.3px;
    text-align: left;
}

.modal-link-card .link-description {
    color: #b0b0b0;
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: left;
}

.modal-link-card .link-image {
    width: 250px;
    height: 250px;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.2);
}

.logo {
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* Верхнее меню */
.top-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    gap: 16px;
}

.menu-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    text-transform: none;
    transition: all 0.3s;
}

.menu-logo:hover {
    color: #ffffff;
    opacity: 0.8;
}

.menu-logo-icon {
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 0 5px rgba(220, 20, 60, 0.3));
}

.menu-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    border-radius: 8px;
    text-transform: none;
    letter-spacing: 0.2px;
    cursor: pointer;
}

.menu-item:hover {
    transform: translateY(-2px);
    background: rgba(220, 20, 60, 0.15);
    border-color: rgba(220, 20, 60, 0.4);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.2);
}

.menu-item:active {
    transform: translateY(0);
}

.menu-item-icon {
    font-size: 1.1rem;
}

/* Кнопка гамбургер-меню */
/* Адаптивность */
@media (max-width: 768px) {
    /* Исправляем проблему с лишним отступом */
    body {
        padding-top: 75px;
    }
    
    .container {
        padding-top: 15px;
        padding-bottom: 20px;
    }
    
    .header {
        margin-bottom: 30px;
    }

    .header h1 {
        font-size: 1.6rem;
    }

    .modal-link-card {
        flex-direction: column;
        padding: 30px 20px;
        gap: 25px;
    }

    .modal-link-card .link-title {
        font-size: 1.5rem;
    }

    .modal-link-card .link-description {
        font-size: 1rem;
    }

    .modal-link-card .link-image {
        width: 200px;
        height: 200px;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .server-info-content {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .server-info-divider {
        width: 100%;
        height: 1px;
    }

    .server-info-label {
        font-size: 0.65rem;
    }

    .server-ip-container,
    .server-players-container {
        padding: 8px 15px;
    }

    .server-ip,
    .server-players {
        font-size: 1rem;
    }

    .copy-btn {
        padding: 5px 10px;
        font-size: 0.65rem;
    }

    .maps-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .map-card {
        padding: 25px;
        min-height: 500px;
    }

    .map-image {
        width: 100%;
        max-width: 100%;
        height: 220px;
    }

    .top-menu {
        padding: 15px 20px;
        flex-wrap: nowrap;
    }

    .top-status {
        display: none;
    }

    .top-ip {
        display: none;
    }

    .menu-logo {
        font-size: 1.2rem;
    }

    .menu-logo-icon {
        width: 35px;
        height: 35px;
    }

    /* Гамбургер-меню скрыто */

    /* Скрываем меню по умолчанию на мобильных */
    .menu-right {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 20px;
        gap: 12px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }

    .menu-right.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .menu-item {
        width: 100%;
        padding: 14px 20px;
        font-size: 0.9rem;
        justify-content: flex-start;
    }
}

/* Кнопка-меню для полезных ссылок (компактный режим) */
.links-dropdown-wrapper {
    position: relative;
    display: none;
}

.links-menu-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    border-radius: 8px;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0.2px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.links-menu-button:hover {
    transform: translateY(-2px);
    background: rgba(220, 20, 60, 0.15);
    border-color: rgba(220, 20, 60, 0.4);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.2);
}

.links-menu-button.active {
    background: rgba(220, 20, 60, 0.2);
    border-color: rgba(220, 20, 60, 0.5);
}

.links-menu-icon {
    font-size: 1.1rem;
}

.links-menu-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.links-menu-button.active .links-menu-arrow {
    transform: rotate(180deg);
}

.links-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1002;
    overflow: hidden;
}

.links-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.links-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-transform: none;
    letter-spacing: 0.2px;
}

.links-dropdown-item:last-child {
    border-bottom: none;
}

.links-dropdown-item:hover {
    background: rgba(220, 20, 60, 0.15);
    padding-left: 24px;
}

.links-dropdown-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Адаптивность: показываем кнопку-меню когда не хватает места */
@media (max-width: 1200px) {
    .menu-right {
        display: none !important;
    }
    
    .links-dropdown-wrapper {
        display: block;
    }
}

/* Дополнительные брейкпоинты для разных уровней масштабирования */
@media (max-width: 1400px) and (min-width: 1201px) {
    .menu-right .menu-item span:not(.menu-item-icon) {
        display: none;
    }

    .menu-right .menu-item {
        padding: 10px 12px;
        min-width: 50px;
    }
}

@media (max-width: 1100px) {
    .menu-right {
        display: none !important;
    }
    
    .links-dropdown-wrapper {
        display: block;
    }
}

@media (max-width: 900px) {
    .top-server-info {
        display: none;
    }
    
    /* Уменьшаем отступы когда карты становятся в столбец */
    body {
        padding-top: 75px;
    }
    
    .container {
        padding-top: 25px;
    }
    
    .header {
        margin-bottom: 30px;
    }
}

/* Промежуточный размер между 900px и 768px */
@media (max-width: 850px) and (min-width: 769px) {
    body {
        padding-top: 75px;
    }
    
    .container {
        padding-top: 20px;
    }
    
    .header {
        margin-bottom: 25px;
    }
}

