/* Основные стили страницы */
body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #F2F2F7; /* Новый фон страницы */
    display: flex;
    flex-direction: column;
    align-items: center; /* Центрируем содержимое страницы */
}

/* Класс для шрифта Unbounded */
.unbounded-custom {
    font-family: "Unbounded", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700; /* Bold для выразительности */
    font-style: normal;
}

.site-header {
    width: 100%;
    padding: 5px 0;
    background-color: transparent;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.site-header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}

.site-header nav ul li {
    margin: 0 15px;
}

.site-header nav ul li a {
    display: block;
    color: #666;
    text-decoration: none;
    font-family: "Unbounded", sans-serif;
    font-weight: 400;
    font-size: 14px;
    padding: 3px 6px;
    transition: color 0.3s ease, transform 0.2s ease;
    background-color: transparent;
}

.site-header nav ul li a:hover {
    color: #66BB6A;
    transform: scale(1.05);
    background-color: transparent;
}

h1 {
    text-align: center;
    color: transparent; /* Используем прозрачный цвет для градиента */
    background: linear-gradient(180deg, #66BB6AFF 0%, #66BB6A75 100%); /* Линейный градиент сверху вниз */
    -webkit-background-clip: text; /* Для Webkit-браузеров */
    background-clip: text; /* Для остальных браузеров */
    font-family: "Kanit", sans-serif; /* Новый шрифт */
    font-weight: 500; /* Вес 500 */
    margin-top: 145px;
    width: 142%; /* Адаптивная ширина */
    font-size: 90px;
    white-space: nowrap; /* Текст в одну строку на десктопе */
}

h2 {
    text-align: center;
    color: #4B4B4B; /* Цвет подзаголовка */
    font-family: "Kanit", sans-serif; /* Новый шрифт */
    font-weight: 300; /* Вес 300 */
    margin-top: -60px; /* Положительный margin */
    width: 108%; /* Адаптивная ширина */
    height: auto; /* Автоматическая высота */
}

div {
    margin-bottom: 20px;
    text-align: center;
}

.input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
    position: relative; /* Для позиционирования кнопки внутри */
}

input#nickname {
    padding: 10px;
    font-size: 16px;
    font-family: "Unbounded", sans-serif;
    border: 1px solid transparent;
    border-radius: 16px;
    margin-bottom: 5px;
    margin-right: 10px;
    width: 590px;
    padding-right: 40px;
    box-sizing: border-box;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(to bottom, #000000, rgba(0, 0, 0, 0.34)) border-box;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.20);
}

button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: "Unbounded", sans-serif;
    font-weight: 700;
}

button:hover {
    background-color: #66BB6A;
}

#search-button {
    position: absolute;
    right: 18px;
    top: 44%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background-color: #66BB6A;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    background-image: url('/static/barrow.png');
    background-size: 16px 16px;
    background-position: center;
    background-repeat: no-repeat;
}

#search-button:hover {
    background-color: #3E8441;
}

#search-button:disabled {
    background-color: #077D34 !important;
    cursor: not-allowed;
}

#search-button.processing {
    background-color: #66BB6A;
}

#result {
    margin: 20px 0;
    font-family: "Unbounded", sans-serif;
    font-size: 16px;
    text-align: center;
    flex-direction: column;
    align-items: center;
}

#result.error {
    color: #d9534f;
    font-weight: 500;
}

#cooldown-message {
    font-family: "Unbounded", sans-serif;
    font-size: 14px;
    color: #666;
    text-align: center;
    margin: 10px 0;
    display: block;
}

#cooldown-message:empty {
    display: none;
}

.online-count {
    font-family: "Unbounded", sans-serif;
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-top: 20px;
}

.player-block {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 10px; /* Увеличим радиус для соответствия макету */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    position: relative; /* Для абсолютного позиционирования badge и rank */
    width: 100%; /* Адаптивная ширина */
    max-width: 600px; /* Ограничение для больших экранов */
}

.licensed-player {
    background-color: #e6ffe6;
}

.pirate-player {
    background-color: white;
    margin: auto;
}

.player-skin-face {
    width: 128px;
    height: 128px;
    margin-right: 10px;
    image-rendering: pixelated;
}

.player-info-text {
    flex: 1;
    text-align: left;
    font-family: "Unbounded", sans-serif; /* Заменяем monospace на Unbounded */
    font-size: 14px; /* Уменьшаем размер текста */
    color: #333; /* Тёмно-серый цвет для читаемости */
    line-height: 1.5; /* Улучшаем читаемость */
    white-space: pre-wrap; /* Сохраняем переносы строк */
}

.player-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white; /* Белый текст */
    padding: 5px 10px;
    border-radius: 12px; /* Скруглённые углы */
    font-family: "Unbounded", sans-serif;
    font-size: 12px;
    font-weight: 500;
}

.licensed-player .player-badge {
    background-color: #66BB6A; /* Зелёный фон для Official */
}

.pirate-player .player-badge {
    background-color: #B1B1B1; /* Серый фон для Cracked */
}

.player-rank {
    position: absolute;
    bottom: 10px;
    right: 10px; /* Номер в правом нижнем углу */
    font-family: "Unbounded", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #666; /* Серый цвет для ранга */
}

/* Плашка уведомления */
.disclaimer-banner {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 8px 15px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-family: "Kanit", sans-serif;
    font-size: 12px;
    color: #555;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in, visibility 0s linear 0.5s;
    max-width: 90%;
    text-align: center;
}

.disclaimer-banner.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-in;
}

/* Медиа-запрос для планшетов (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    h1 {
        font-size: 70px;
        width: 100%;
    }
    h2 {
        font-size: 24px;
        width: 100%;
    }
    input#nickname {
        width: 100%;
        max-width: 500px;
    }
    .player-block {
        max-width: 100%;
    }
    .disclaimer-banner {
        padding: 6px 12px;
        font-size: 10px;
        max-width: 85%;
    }
}

/* Медиа-запрос для экранов до 768px */
@media (max-width: 768px) {
    /* Навигация */
    .site-header nav ul {
        flex-direction: column;
        align-items: center;
    }
    .site-header nav ul li {
        margin: 5px 0;
    }
    .site-header nav ul li a {
        font-size: 12px;
    }

    /* Заголовки */
    h1 {
        font-size: 26px;
        margin-top: 20px;
        white-space: normal; /* Разрешаем перенос текста */
    }
    h2 {
        font-size: 18px;
        margin-top: 10px;
    }

    /* Поле ввода */
    input#nickname {
        width: 100%;
        max-width: 400px;
        font-size: 14px;
    }

    /* Блоки игроков */
    .player-block {
        max-width: 100%;
        padding: 5px;
    }
    .player-skin-face {
        width: 64px;
        height: 64px;
    }
    .player-info-text {
        font-size: 12px;
    }
    .player-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
    .player-rank {
        font-size: 12px;
    }

    /* Счётчик онлайн-игроков */
    .online-count {
        font-size: 12px;
    }

    .disclaimer-banner {
        padding: 6px 12px;
        font-size: 10px;
        max-width: 85%;
    }
}

/* Медиа-запрос для экранов до 480px */
@media (max-width: 480px) {
    /* Заголовки */
    h1 {
        font-size: 26px;
    }
    h2 {
        font-size: 16px;
    }

    /* Поле ввода */
    input#nickname {
        font-size: 12px;
    }

    /* Блоки игроков */
    .player-info-text {
        font-size: 10px;
    }
    .player-badge {
        font-size: 8px;
        padding: 3px 6px;
    }
    .player-rank {
        font-size: 10px;
    }

    /* Навигация */
    .site-header nav ul li a {
        font-size: 10px;
    }
    .disclaimer-banner {
        padding: 5px 10px;
        font-size: 9px;
        max-width: 80%;
    }
}