@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Flex:opsz,wght@6..144,1..1000&display=swap');

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #222;
    font-family: 'Google Sans Flex', sans-serif;
    /* Lock body to viewport to prevent scrolling/overscroll */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Fallback */
    height: 100dvh;
    /* Mobile friendly */
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    /* removed box-shadow as it might look weird on full screen edges */
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: url('assets/background_v2.png') no-repeat center center;
    background-size: cover;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    pointer-events: auto;
}

.screen h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #00ffff;
    font-weight: 700;
    text-align: center;
    /* Ensure text is centered on mobile/wrap */
}

.screen p {
    font-size: 24px;
    cursor: pointer;
}

.hidden {
    display: none;
}

button {
    padding: 10px 20px;
    font-size: 20px;
    cursor: pointer;
    background: #00ffff;
    border: none;
    border-radius: 5px;
    color: #000;
    font-weight: bold;
    transition: transform 0.1s;
    font-family: 'Google Sans Flex', sans-serif;
}

button:hover {
    transform: scale(1.05);
}

#bottom-bar {
    position: fixed;
    /* Changed from absolute to fixed for better mobile safety */
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    /* Allow growth for safe area */
    min-height: 80px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    /* Vertical padding + horizontal */
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    /* Safe area for iPhone home bar */
    box-sizing: border-box;
    /* Ensure padding doesn't affect width */
    font-family: 'Google Sans Flex', sans-serif;
    pointer-events: none;
    z-index: 10;
}

#logo {
    height: auto;
    max-height: 80%;
    /* Fit within bar height with some padding logic if needed, or 100% */
    max-width: 260px;
    width: 40%;
    object-fit: contain;
}

#counter-container {
    font-size: 32px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

#score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Static positioning for flexbox 'space-between' to place it on the right */
    position: static;
    transform: none;
}

.score-label {
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #ccc;
    text-transform: uppercase;
}

#score {
    font-size: 36px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    position: static;
}