@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    font-family: 'Press Start 2P', cursive;
    background-color: #111625;
    color: #9D2053;
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
}
.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    position: relative;
}
canvas {
    background-color: #000000;
    display: block;
    margin: 0 auto 20px auto;
    width: auto;
    height: auto;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(157, 32, 83, 0.2);
}
#messageBox, #saveMessage { 
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background-color: rgba(52, 25, 49, 0.95); color: #9D2053; padding: 25px;
    border-radius: 15px; box-shadow: 0 0 25px rgba(122, 30, 72, 0.5);
    z-index: 1000; text-align: center; display: none; font-size: 1.1em; border: 2px solid #9D2053;
}
#messageText { margin-bottom: 15px; }

.highscore-container {
    background-color: #341931; padding: 15px; border-radius: 15px;
    box-shadow: 0 0 20px rgba(157, 32, 83, 0.3); text-align: center;
    width: 100%; max-width: 510px;
    display: none;
}
.highscore-container h2 { color: #9D2053; font-size: 1.2em; margin-bottom: 10px; }

#highScoreList {
    display: block;
    position: absolute;
    top: 50%;
    width: fit-content; 
    min-width: auto;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    padding: 20px;
    border-radius: 10px;
    list-style: none;
    color: #fff;
    font-family: monospace;
    font-size: 20px;
    text-align: left;
    z-index: 100;
}
#highScoreList li {
    background-color: #571B3C; color: #F0F2EB; padding: 5px 10px; margin-bottom: 5px;
    border-radius: 5px; font-size: 0.9em; display: flex; justify-content: space-between;
}
button, .button-style { 
    font-family: 'Press Start 2P', cursive;
    background-color: #7A1E48; color: #F0F2EB; border: none;
    padding: 8px 15px; font-size: 0.9em; border-radius: 8px; cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    box-shadow: 0 3px #571B3C; margin-top: 8px; margin-right: 5px;
}
button:hover, .button-style:hover { background-color: #9D2053; }
button:active, .button-style:active { background-color: #571B3C; transform: translateY(1px); box-shadow: 0 2px #571B3C;}

#pauseButton {
    position: fixed; 
    z-index: 9999;
    font-size: 0.7em;
    padding: 8px 12px;
    display: none;
    background-color: rgba(0, 0, 0, 0.1);
    color: rgba(240, 242, 235, 0.8);
    border: none;
    border-radius: 4px;
    box-shadow: none;
    transition: all 0.3s;
}
#pauseButton:hover {
    background-color: rgba(0, 0, 0, 0.2);
    color: rgba(240, 242, 235, 1.0);
}
* { outline: none; -webkit-tap-highlight-color: transparent; }
:focus { outline: none; }
::-moz-focus-inner { border: 0; }
canvas:focus { outline: none; }
