* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    background: #000;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#ui-overlay {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 100;
    pointer-events: none;
}

#score, #wave, #high-score {
    color: #ff6600;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px #ff6600, 0 0 20px #ff6600;
    letter-spacing: 2px;
}

#wave {
    color: #ffcc00;
    text-shadow: 0 0 10px #ffcc00, 0 0 20px #ffcc00;
}

#player-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 100px;
    z-index: 100;
    pointer-events: none;
}

.arrow {
    color: #ff6600;
    font-size: 40px;
    text-shadow: 0 0 10px #ff6600, 0 0 20px #ff6600;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.arrow.active {
    opacity: 1;
    animation: arrow-pulse 0.3s ease-in-out;
}

@keyframes arrow-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

#start-screen, #game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(ellipse at center, rgba(30, 10, 0, 0.9) 0%, rgba(0, 0, 0, 0.95) 100%);
    z-index: 200;
}

#start-screen h1, #game-over-screen h1 {
    font-size: 64px;
    color: #ff6600;
    text-shadow: 0 0 20px #ff6600, 0 0 40px #ff6600, 0 0 60px #ff6600;
    margin-bottom: 20px;
    letter-spacing: 5px;
    animation: cosmic-glow 3s ease-in-out infinite alternate;
}

@keyframes cosmic-glow {
    from {
        text-shadow: 0 0 20px #ff6600, 0 0 40px #ff6600, 0 0 60px #ff6600;
    }
    to {
        text-shadow: 0 0 30px #ff6600, 0 0 60px #ff6600, 0 0 90px #ff6600, 0 0 120px #ff6600;
    }
}

#game-over-screen h1 {
    color: #ff0000;
    animation: danger-glow 2s ease-in-out infinite alternate;
}

@keyframes danger-glow {
    from {
        text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000, 0 0 60px #ff0000;
    }
    to {
        text-shadow: 0 0 30px #ff0000, 0 0 60px #ff0000, 0 0 90px #ff0000, 0 0 120px #ff0000;
    }
}

#start-screen p, #game-over-screen p {
    color: #ffcc88;
    font-size: 18px;
    margin: 10px 0;
    text-shadow: 0 0 5px rgba(255, 204, 136, 0.5);
}

#final-score {
    font-size: 36px !important;
    color: #ff6600 !important;
    text-shadow: 0 0 15px #ff6600, 0 0 30px #ff6600;
    margin: 15px 0 !important;
}

#time-survived {
    font-size: 24px !important;
    color: #ffcc00 !important;
}

#waves-cleared {
    font-size: 20px !important;
    color: #00ff88 !important;
}

button {
    margin-top: 25px;
    padding: 15px 50px;
    font-size: 18px;
    font-weight: bold;
    color: #000;
    background: linear-gradient(135deg, #ff6600, #ff3300);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.5);
}

button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 102, 0, 0.8), 0 0 60px rgba(255, 102, 0, 0.5);
}

button:active {
    transform: scale(0.95);
}

/* Wave announcement */
#wave-announcement {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: #ffcc00;
    text-shadow: 0 0 20px #ffcc00, 0 0 40px #ffcc00, 0 0 60px #ffcc00;
    letter-spacing: 5px;
    z-index: 150;
    pointer-events: none;
    animation: wave-pop 2s ease-out forwards;
}

@keyframes wave-pop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Shield effect */
#shield-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    border: 3px solid #00ffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px #00ffff, inset 0 0 20px #00ffff;
    pointer-events: none;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.1s;
}

@media (max-width: 768px) {
    #start-screen h1, #game-over-screen h1 {
        font-size: 36px;
    }

    #score, #wave, #high-score {
        font-size: 16px;
    }

    #player-indicator {
        gap: 60px;
    }

    .arrow {
        font-size: 30px;
    }
}
