.game-container {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

#game-ui {
    position: relative;
    width: 100%;
    max-width: 360px;
    height: auto;
    aspect-ratio: 360/600;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    overflow: hidden;
    background: #000;
    user-select: none;
}

#game-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: 1;
    touch-action: none;
}

#top-bar {
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    z-index: 10;
    pointer-events: none;
}

#score-label,
#timer-label {
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 20px;
    border-radius: 20px;
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#target-container {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}

#target-container p {
    color: #888;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

#target-color-display {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 3px solid #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    text-align: center;
    padding: 20px;
}

.hidden {
    display: none;
}

.overlay h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.overlay p {
    margin-bottom: 30px;
    color: #ccc;
    font-size: 1.1rem;
}

button {
    padding: 15px 40px;
    font-size: 1.2rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

button:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}


@media (max-width: 400px) {

    #game-ui,
    #game-canvas {
        width: 100%;
        height: 80vh;
    }
}