/* =========================================================================
   DBV RUSH (T-Rex Clone) CSS - CHROME REPLICA
   ========================================================================= */

html, body {
    margin: 0; padding: 0; overflow: hidden;
    background: #f7f7f7;
    width: 100vw; height: 100vh;
}

.game-container {
    width: 100vw;
    height: 100dvh; /* Usa dynamic viewport height para não ser cortado pelas barras de navegação */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.page-top-logo {
    position: absolute;
    top: 20px;
    width: 80px;
    opacity: 0.8;
    z-index: 100;
}

#game-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 45vh; /* Aumentado de 35vh para 45vh para dar mais escala no mobile */
    max-height: 450px;
    image-rendering: pixelated; 
}

@media (min-width: 768px) {
    #gameCanvas {
        height: 50vh; /* Maior no desktop */
        max-height: 500px;
    }
}

/* UI Elements */
#score-display {
    position: absolute;
    top: 25px; /* Movido para o topo */
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.8rem;
    font-weight: 800;
    color: #333;
    z-index: 10;
    background: rgba(255, 255, 255, 0.7);
    padding: 5px 15px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    right: 30px;
}

/* Overlay Screens - Chrome Style */
.overlay-screen {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: transparent; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

.overlay-screen.hidden {
    display: none !important;
}

.pixel-logo {
    width: 180px;
    margin-bottom: 25px;
    image-rendering: pixelated;
}

.pixel-text {
    width: 250px;
    margin-bottom: 25px;
    image-rendering: pixelated;
}

.btn-chrome-restart {
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 10px;
}
.btn-chrome-restart:hover {
    transform: scale(1.1);
}

/* Mobile Controls */
#mobile-controls {
    position: absolute;
    bottom: max(5vh, 20px);
    padding-bottom: env(safe-area-inset-bottom, 10px);
}
#mobile-controls button {
    touch-action: manipulation;
}
#mobile-controls button:active {
    transform: translateY(4px);
    box-shadow: 0 0px 0 #535353 !important;
}

@media (max-width: 768px) {
    #mobile-controls:not(.hidden) {
        display: flex !important;
    }
}
