/* Основные стили страницы */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f7f7;
    color: #333;
}

/* Контейнер */
.container {
    width: 100%; /* Занимает всю доступную ширину */
    max-width: 1400px; /* Максимальная ширина стола */
    margin: 0 auto; /* Центрирование контейнера на странице */
    padding: 20px; /* Внутренние отступы для аккуратного вида */
    box-sizing: border-box; /* Учет отступов в ширине */
    display: flex; /* Для адаптивности */
    flex-direction: column; /* Вертикальное выравнивание контента */
    align-items: center; /* Центрирование контента */
    justify-content: center; /* Горизонтальное центрирование */
    background-color: #fff; /* Белый фон (если нужно) */
}


/* Заголовки */
h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 20px;
}

h2, h3 {
    font-size: 20px;
    margin-bottom: 10px;
    text-align: center;
}

/* Кнопки */
button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

button:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

/* Поля ввода текста и текстовые области */
textarea, input[type="text"] {
    width: calc(100% - 20px);
    margin: 10px 0;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Доски с персонажами */
.boards {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
}

.board-section {
    width: 48%;
}

#my-character-container {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

#opponent-characters {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 карточки в ряд */
    gap: 15px;
    justify-items: center;
}

/* Карточки персонажей */
.char {
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
    text-align: center;
    width: 120px;
    height: 200px;
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
}

.char img {
    max-width: 100%;
    max-height: 120px;
    display: block;
    margin: 5px 0;
}

.char p {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
}

.char:hover {
    transform: scale(1.05);
}

/* Карточки персонажей, которые отмечены как "неактивные" */
.char.disabled {
    opacity: 0.5; /* Визуальный эффект "серости" */
    transition: opacity 0.3s; /* Плавный переход */
}

/* Кнопка на карточке */
.char .guess-btn {
    margin-top: auto;
    font-size: 12px;
    padding: 5px 10px;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.char .guess-btn:hover {
    background-color: #218838;
}

.char .guess-btn:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

/* Статус сообщения */
#status {
    margin-top: 20px;
    font-size: 16px;
    font-weight: bold;
    color: #555;
    text-align: center;
}

/* Результаты игры */
#game-result {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#game-result h3, #game-result h4 {
    text-align: center;
}

#result-message {
    margin-bottom: 20px;
}

#final-your-char, #final-opp-char {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 20px;
}

#final-your-char, #final-opp-char {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#final-results-container {
    display: flex;
    justify-content: center;
    align-items: center; /* Выравниваем карточки по вертикали */
    gap: 40px; /* Увеличиваем расстояние между карточками */
    margin-bottom: 30px;
}


#game-result p {
    font-size: 18px;
    margin: 10px 0;
    font-weight: bold;
}

#game-result .boards {
    margin-top: 20px;
}

.hidden {
    display: none;
}

#restart-btn {
    margin-top: 20px;
    display: block; /* Обеспечиваем, что кнопка занимает свою строку */
    margin-left: auto;
    margin-right: auto; /* Центрируем кнопку по горизонтали */
}
