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

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

#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, #high-score {
    color: #ffcc00;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px #ffcc00, 0 0 20px #ffcc00;
    letter-spacing: 2px;
}

#combo {
    color: #00ff88;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 0 0 10px #00ff88, 0 0 20px #00ff88;
    letter-spacing: 2px;
    animation: combo-pulse 0.5s ease-in-out;
}

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

#tower-info {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    z-index: 100;
    pointer-events: none;
}

#tower-info div {
    color: #88ccff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 0 5px #88ccff;
}

#tower-info span {
    color: #ffffff;
    font-size: 20px;
}

#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: rgba(0, 0, 0, 0.85);
    z-index: 200;
    backdrop-filter: blur(5px);
}

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

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

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

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

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

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

#final-height {
    font-size: 24px !important;
    color: #88ccff !important;
}

#perfect-drops {
    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, #ffcc00, #ff8800);
    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, 204, 0, 0.5);
}

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

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

/* Floating score popup */
.score-popup {
    position: absolute;
    color: #00ff88;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px #00ff88;
    pointer-events: none;
    animation: float-up 1s ease-out forwards;
    z-index: 150;
}

@keyframes float-up {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(1.2);
    }
}

.perfect-text {
    color: #ffcc00 !important;
    text-shadow: 0 0 15px #ffcc00;
    font-size: 32px !important;
}

/* Camera flash */
#flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 180;
    transition: opacity 0.1s;
}

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

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

    #combo {
        font-size: 20px;
    }

    #tower-info {
        flex-direction: column;
        gap: 10px;
        top: 60px;
    }
}
