body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #000;
    width: 100%;
    height: 100vh;
}

#game-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

canvas {
    display: block;
}

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

#game-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #FFFF00;
    font-family: 'Arial', sans-serif;
    pointer-events: auto;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 2rem;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
}

#game-title h1 {
    font-size: 4rem;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.8);
    margin: 0;
    color: #FFFF00;
}

#game-title p {
    font-size: 1.5rem;
    margin: 1rem 0;
    color: #FFFFFF;
}

#start-game {
    background-color: #FFFF00;
    color: #000000;
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
    padding: 1rem 2rem;
    margin-top: 2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1000;
    position: relative;
    pointer-events: auto;
}

#start-game:hover {
    background-color: #FFFFFF;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
}

#start-game:active {
    background-color: #FF9900;
    transform: scale(0.95);
}

/* Game HUD Styles */
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

.reward-popup {
    animation: fadeOut 2s ease-out, bounce 1s ease-out;
}

.game-over {
    animation: fadeIn 1s ease-out;
}

.pickup-text {
    animation: pulse 2s infinite;
}

.time-warning {
    animation: blink 0.5s infinite;
}

/* Mobile/Desktop instruction switching */
.desktop-instructions {
    display: block;
}

.mobile-instructions {
    display: none;
}

@media (pointer: coarse), (hover: none) {
    .desktop-instructions {
        display: none;
    }
    
    .mobile-instructions {
        display: block;
    }
}

/* Touch controls responsive sizing */
@media (max-width: 600px) {
    #game-title h1 {
        font-size: 2.5rem;
    }
    
    #game-title p {
        font-size: 1rem;
    }
    
    #start-game {
        font-size: 1.2rem;
        padding: 0.8rem 1.5rem;
    }
}
