/* --- СТИЛИ СПЕЦИАЛЬНО ДЛЯ ИГРЫ BLOCKBAST --- */

body {
    overflow: hidden; /* Запрещаем скролл на странице с игрой */
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    padding: 1rem;
    position: relative;
    animation: fadeInScale 0.8s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.game-header {
    width: 100%;
    max-width: 480px; /* Та же ширина, что и у игры */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.score-display, .lives-display {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.back-button {
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent-color-1);
    padding: 0.5rem;
    transition: color 0.2s;
}
.back-button:hover {
    color: var(--text-color);
}

#gameCanvas {
    background-color: #000;
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    cursor: none; /* Скрываем курсор над игровым полем */
}

/* Стили для оверлеев (Game Over / Win) */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none; /* Скрываем по умолчанию */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.overlay-content {
    text-align: center;
}

.overlay-content h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}
.game-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Расстояние между счетом и жизнями */
}
/* Адаптивность для мобильных */
@media (max-width: 520px) {
    #gameCanvas {
        width: 100%;
        height: auto;
    }
    .game-header {
        max-width: 100%;
    }
    .overlay-content h2 {
        font-size: 2rem;
    }
}