body {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #70c5ce;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

/* Контейнер, который держит всё внутри размеров игры */
.game-container {
    position: relative; /* Все абсолютные элементы внутри будут привязаны к нему */
    width: 100%;
    max-width: 450px; 
    height: 100vh;
}

#score {
    position: absolute;
    top: 20px;
    font-size: 40px;
    color: white;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    z-index: 10;
}

#bestScore{
    color: white; 
    margin-bottom: 10px;
}

#retryHint{
    display: none; 
    color: white; 
    margin-top: 15px;
}


canvas {
    width: 100%;
    height: 100%;
    display: block;
    border: none; /* Убираем рамку, чтобы не мешала на весь экран */
    background-color: #87CEEB; /* Светло-синий цвет (SkyBlue) */
    touch-action: manipulation; /* Отключает задержку клика и лишние жесты */
    user-select: none; /* Запрещает выделение текста/картинок при тапах */
    -webkit-tap-highlight-color: transparent; /* Убирает синюю рамку при тапе в Safari/Chrome */
}


/* Меню теперь точно поверх холста */
#menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    background-color: rgba(0, 0, 0, 0.2); /* Легкое затемнение фона меню */
}

#menu h1 {
    font-size: 32px;
    color: #fff;
    text-shadow: 3px 3px 0px #e86101;
    margin: 0 0 30px 0;
    font-family: 'Arial Black', sans-serif;
    text-align: center;
}

#score {
    position: absolute;
    top: 20px;
    width: 100%;
    text-align: center;
    font-size: 40px;
    color: white;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    z-index: 10;
    pointer-events: none;
}

#pauseBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 15;
}

#startBtn {
    padding: 15px 30px;
    font-size: 20px;
    background-color: #f79522;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px #b86b14;
}