

@font-face {
    font-family: 'PixelGame';
    src: url('assets/pixelGame.otf') format('opentype');
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #ffffff;
    color: white;
    font-family: 'PixelGame', Arial, sans-serif;
}

#banner-container {
    width: 100%;
    max-width: 525px;
    margin-bottom: -5px;
    display: flex;
    justify-content: center;
}

#game-banner {
    width: 101.525%;
    height: auto;
}

#game-container {
    position: relative;
    width: 525px;
    height: 700px;
    background-image: url('assets/outline.png'), url('assets/sky.png');
    background-position: bottom, top;
    background-repeat: no-repeat, repeat;
    background-size: contain, contain;
    border: 4px solid #018059;
    overflow: hidden;
}

#grid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column-reverse;
}

.row {
    display: flex;
    height: 90px;
    width: 100%;
    position: relative;
}

.block {
    width: 52.5px;
    height: 90px;
    background-image: url('assets/sage_block.PNG');
    background-size: cover;
    background-position: center;
    border: 1px solid #222;
    box-sizing: border-box;
    position: absolute;
    }

.row.moving .block {
    background-color: #19ce80;
}

#score {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 50px;
    text-shadow: 
        -2px -2px 0 #000,
         2px -2px 0 #000,
        -2px  2px 0 #000,
         2px  2px 0 #000;
}

#message, #high-score-input, #scoreboard, #start-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 30px;
    background: rgba(1, 128, 89, 0.62);
    padding: 20px;
    border-radius: 10px;
    display: none;
    z-index: 100;
    width: 250px;
}

#start-screen {
    display: block; /* Show initially */
}

#start-button, #save-score {
    padding: 10px 20px;
    font-size: 20px;
    font-family: 'PixelGame', Arial, sans-serif;
    background-color: #19ce80;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

#start-button:hover, #save-score:hover {
    background-color: #0e8753;
}

#high-scores-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

#high-scores-list li {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    margin: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

#player-name {
    width: 80%;
    padding: 5px;
    font-size: 18px;
    font-family: 'PixelGame', Arial, sans-serif;
    margin-bottom: 10px;
}

.player-name-display {
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

.player-score-display {
    text-align: right;
    font-weight: bold;
}
