body {
    font-family: 'Press Start 2P', cursive;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    color: #e2e8f0;
    overflow: hidden;
    touch-action: manipulation;
}

#game-wrapper {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 800px; /* Largura máxima do jogo */
    aspect-ratio: 800 / 640;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #2d3748;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#title {
    position: absolute;
    top: 5%;
    width: 100%;
    text-align: center;
}

.text-shadow {
    text-shadow: 3px 3px #000000;
}

.button-style {
    background-color: #975A16;
    border: 2px solid #F6E05E;
    color: #FFF;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 4px #744210;
    transition: all 0.1s ease;
}

.button-style:active {
    transform: translateY(4px);
    box-shadow: 0 0 #744210;
}

.selection-container {
    padding: 4px;
    border: 3px solid #744210;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: rgba(0,0,0,0.4);
    width: 64px;
    height: auto;
    max-height: 80px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.selection-container.selected {
    border-color: #F6E05E;
    transform: scale(1.1);
}

.selection-container canvas {
    display: block;
    position: relative;
    image-rendering: pixelated;
    margin: 0 auto;
    max-width: 100%;
}

.selection-container p {
    font-size: 8px;
    margin-top: 4px;
}

.fade-out { animation: fadeOut 0.5s forwards; }
.fade-in { animation: fadeIn 0.5s forwards; }

@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes glow {
    0% { text-shadow: 0 0 5px #FFF, 0 0 10px #FFF, 0 0 15px #FDE047, 0 0 20px #FDE047; }
    50% { text-shadow: 0 0 10px #FFF, 0 0 15px #FBBF24, 0 0 20px #FBBF24, 0 0 25px #FBBF24; }
    100% { text-shadow: 0 0 5px #FFF, 0 0 10px #FDE047, 0 0 15px #FDE047, 0 0 20px #FDE047; }
}

.text-glow {
    animation: glow 1.5s ease-in-out infinite alternate;
}

#pauseButton {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(0,0,0,0.5);
    border: 2px solid #F6E05E;
    border-radius: 50%;
    color: #F6E05E;
    font-size: 20px;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
    z-index: 100;
}

#timerBar {
    width: 100%;
    height: 10px;
    background-color: #4a5568;
    border-radius: 5px;
    overflow: hidden;
}

#timerBarInner {
    height: 100%;
    background-color: #4299e1;
    width: 100%;
    transition: width 0.1s linear;
}
