html, body {
    margin: 0;
    padding: 0;
}

#bingo-game-container {
    font-family: 'Montserrat', sans-serif;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 50px;
    background-image: url('images/BG_site.jpg');
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: 100% auto; 
    background-color: #54a4c0; /* Заливка для пустого пространства */
    /*border-radius: 15px;
    margin-top: -5px;
    margin-bottom: -5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);*/
    text-align: center;
    overflow: hidden;
    position: relative;
}

#bingo-game-container button {
    font-family: 'Montserrat', sans-serif;
}

#bingo-title-image {

    max-width: 600px;
    width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 15px;
}

#bingo-status {
    color: #ffffff;
    font-size: 1.1em;
    min-height: 20px;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.bingo-main-area {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.bingo-called-item-area,
.bingo-card-area {
    background-color: rgba(255, 255, 255, 0.4);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    flex-basis: 45%; /* Распределяем место */
    min-width: 300px; /* Минимальная ширина для адаптивности */
    -webkit-backdrop-filter: blur(7px); /* Для Safari и старых Chrome/Edge */
    backdrop-filter: blur(7px);       /* Стандартное свойство. Подберите значение размытия (5px) по вкусу. */
                                      /* Например, 3px - легкое размытие, 10px - сильное. */
}

.bingo-called-item-area h2,
.bingo-card-area h2 {
    /* Было color: #ffffff; (Белый цвет текста) */
    color: #ffd60a; /* Желтый, как фон кнопки "БИНГО!" */
    margin-top: 0;
    text-transform: uppercase;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Можно немного ослабить тень для лучшей читаемости желтого */
    margin-bottom: 15px;
}

#bingo-called-item-display {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background-color: #e0e0e0;
    border-radius: 8px; /* Оставляем или корректируем скругление */
    padding: 10px; /* Оставляем или корректируем внутренние отступы */
}

#bingo-called-item-display img {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
    animation: itemAppear 0.5s ease-out;
}

#bingo-called-item-display .item-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}
#bingo-called-item-display .placeholder {
    font-style: italic;
    color: #888;
}

.bingo-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Для карточки 3x3 */
    gap: 10px;
    margin: 20px auto;
    padding: 10px;
    background-color: #e0e0e0;
    border-radius: 8px;
}

.bingo-cell {
    background-color: #fff;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1 / 1; /* Делает ячейки квадратными */
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease;
    border: 1px solid #ccc;
    overflow: hidden;
}

.bingo-cell:hover {
    transform: scale(1.05);
}

.bingo-cell img {
    max-width: 60%;
    max-height: 60%;
    object-fit: contain;
}

.bingo-cell .item-name-on-card {
    font-size: 0.7em;
    margin-top: 5px;
    color: #555;
    text-align: center;
}

.bingo-cell.marked {
    background-color: #83c5be; /* Приятный бирюзовый */
    transform: scale(0.95);
}

.bingo-cell.marked img {
    opacity: 0.6;
}
.bingo-cell.marked .item-name-on-card {
    color: #fff;
    text-decoration: line-through;
}

.bingo-actions button,
#bingo-next-item-button,
#bingo-play-again-button {
    padding: 12px 25px;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 25px; /* Более круглые кнопки */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin: 5px;
}

#bingo-start-button, #bingo-play-again-button {
    font-family: 'Montserrat', sans-serif;
    background-color: #fb5607; /* Оранжевый */
    color: white;
}
#bingo-start-button:hover, #bingo-play-again-button:hover {
    /*background-color: #54a4c0;*/
    transform: translateY(-2px);
}
#bingo-start-button:hover {
    background-color: #54a4c0;
}
#bingo-play-again-button {
    font-family: 'Montserrat', sans-serif; /* Если не задано в более общем селекторе */
    background-color: #fb5607; /* Оранжевый, как #bingo-next-item-button */
    color: white;
}
#bingo-play-again-button:hover {
    background-color: #d44806; /* Темнее оранжевый для hover, как у #bingo-next-item-button */
    transform: translateY(-2px); /* Если не унаследовано */
}

#bingo-next-item-button {
    background-color: #fb5607; /* Оранжевый */
    color: white;
}
#bingo-next-item-button:hover {
    background-color: #d44806;
    transform: translateY(-2px);
}
#bingo-next-item-button:disabled {
    background-color: #83c5be;
    color: rgba(255, 255, 255, 0.7); /* Можно сделать текст немного приглушенным белым, чтобы показать неактивность */
                                     /* Или оставить color: white; если контраст достаточный */
    cursor: not-allowed;
    transform: none; /* Убираем эффект при наведении для неактивной кнопки */
    box-shadow: none; /* Если у активной кнопки есть тень, для неактивной ее можно убрать */
    opacity: 0.8; /* Можно добавить легкую прозрачность для индикации неактивности */
}

#bingo-check-button {
    background-color: #ffd60a; /* Желтый */
    color: #333;
}
#bingo-check-button:hover {
    background-color: #e6a000;
    transform: translateY(-2px);
}

/* Popup стили */
#bingo-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
#bingo-popup-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

#bingo-popup {
    background: white;
    padding: 30px 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transform: scale(0.7);
    transition: transform 0.3s ease-out;
}
#bingo-popup-overlay:not(.hidden) #bingo-popup {
     transform: scale(1);
}

#bingo-popup-message {
    color: #fb5607;
    font-size: 2em;
    margin-bottom: 15px;
}
#bingo-popup-celebration {
    font-size: 3em; /* Размер эмодзи */
    margin-bottom: 20px;
}


/* Анимация появления предмета */
@keyframes itemAppear {
    from {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Для конфетти (опционально) */
#bingo-confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Чтобы не мешал кликам */
    z-index: 999;
}