#game-container {
    position: relative;
    width: 100%;
    max-width: 540px; /* Increased from 360px for better high-res visibility */
    aspect-ratio: 9 / 16;
    height: auto;
    max-height: 100vh;
    background: #000;
    margin: auto;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    border: 2px solid #2a2010;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

#top-panel {
    position: relative;
    width: 100%;
    flex: 75; /* 75% height */
    background: #050505;
    overflow: hidden;
    border-bottom: 2px solid #3e2723;
    flex-shrink: 0;
}

#bottom-panel {
    position: relative;
    width: 100%;
    flex: 25; /* 25% height */
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    z-index: 10;
    border-top: 2px solid #2a2010;
    flex-shrink: 0;
    box-sizing: border-box;
}

#game-container::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100px;
    background: linear-gradient(to bottom, rgba(255, 215, 0, 0.05) 0%, transparent 100%);
    pointer-events: none;
    z-index: 140;
    opacity: 0.6;
}

#start-timer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Cinzel', serif;
    font-size: 40px;
    font-weight: 900;
    color: #ff0000;
    text-shadow: 0 0 10px #fff, 0 0 20px #ff0000;
    z-index: 1000;
    display: none;
    pointer-events: none;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 4px;
    animation: timerPulse 1s infinite alternate;
    width: 100%;
    text-align: center;
}

@keyframes timerPulse {
    from { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    to { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto; /* Enable input handling on Canvas */
    z-index: 4;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}
