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

#gameUI > * {
    pointer-events: auto;
}

.menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.menu h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.menu h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #FFD700;
}

.menu button {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border: none;
    color: #333;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.menu button:hover {
    background: linear-gradient(45deg, #FFA500, #FFD700);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.instructions {
    margin-top: 20px;
    font-size: 14px;
    color: #ccc;
}

.hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 20px;
    border-radius: 15px;
    color: white;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.hud div {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hud div:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.hud span {
    color: #FFD700;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hud .score { border-left: 3px solid #4CAF50; }
.hud .level { border-left: 3px solid #2196F3; }
.hud .time { border-left: 3px solid #FF9800; }
.hud .target { border-left: 3px solid #9C27B0; }

.hidden {
    display: none !important;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes floatUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px);
        opacity: 0;
    }
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotate(720deg);
        opacity: 0;
    }
}

.achievement {
    font-size: 1.2em;
    color: #FFD700;
    font-weight: bold;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#gameCompletedMenu {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.8));
    border: 3px solid #FFD700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

#gameCompletedMenu h2 {
    font-size: 2.5em;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

#gameCompletedMenu button {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #333;
    font-weight: bold;
    margin: 5px;
}

#exitBtn {
    background: linear-gradient(45deg, #6C757D, #495057);
    color: white;
}

#finalScore {
    font-size: 1.5em;
    color: #FFD700;
    margin: 20px 0;
}

#gameOverTitle {
    color: #FF6B6B;
    margin-bottom: 15px;
}

#gameOverTitle.success {
    color: #4ECDC4;
}