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

body {
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 50%, #0a0a2a 100%);
    min-height: 100vh;
    color: #fff;
    overflow: hidden;
}

#game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Start Screen */
#start-screen, #game-over-screen, #victory-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

#start-screen h1, #game-over-screen h1, #victory-screen h1 {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 900;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    margin-bottom: 10px;
}

#start-screen h2 {
    font-size: clamp(1rem, 4vw, 1.5rem);
    color: #ff6b35;
    margin-bottom: 30px;
    font-weight: 400;
}

.instructions {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 30px;
    line-height: 2;
}

.instructions p {
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    margin: 5px 0;
}

#play-btn, #retry-btn, #play-again-btn {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 15px 40px;
    background: linear-gradient(45deg, #00ffff, #00ccff);
    border: none;
    border-radius: 5px;
    color: #0a0a1a;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 255, 0.4); }
    50% { box-shadow: 0 0 40px rgba(0, 255, 255, 0.8); }
}

#play-btn:hover, #retry-btn:hover, #play-again-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.8);
}

.tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #666;
    margin-top: 20px;
    font-style: italic;
}

/* Game Screen */
#game-screen {
    width: 100%;
    max-width: 900px;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

#hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 5px;
    margin-bottom: 10px;
}

#hud-left, #hud-right {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

#wave-counter {
    color: #ff6b35;
}

#gold-counter {
    color: #ffd700;
}

#health-bar-container {
    width: 150px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

#health-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #00ff00, #88ff00);
    transition: width 0.3s ease;
}

#health-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    text-shadow: 0 0 5px #000;
}

#canvas {
    flex: 1;
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 5px;
    background: #0a0a1a;
    cursor: crosshair;
}

#controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 0;
}

#tower-panel {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tower-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.tower-btn.affordable {
    opacity: 1;
}

.tower-btn:hover {
    border-color: rgba(0, 255, 255, 0.5);
    background: rgba(0, 255, 255, 0.1);
}

.tower-btn.selected {
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.tower-btn.strawberry {
    border-color: #ff1493;
    animation: rainbowBorder 1s infinite;
}

@keyframes rainbowBorder {
    0% { border-color: #ff1493; box-shadow: 0 0 10px #ff1493; }
    50% { border-color: #ff69b4; box-shadow: 0 0 20px #ff69b4; }
    100% { border-color: #ff1493; box-shadow: 0 0 10px #ff1493; }
}

.tower-icon {
    font-size: 1.5rem;
    margin-bottom: 3px;
}

.tower-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #aaa;
}

.tower-cost {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: #ffd700;
}

#action-panel {
    display: flex;
    gap: 10px;
    align-items: center;
}

#start-wave-btn {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    padding: 10px 20px;
    background: linear-gradient(45deg, #00ff00, #00cc00);
    border: none;
    border-radius: 5px;
    color: #0a0a1a;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

#start-wave-btn:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

#start-wave-btn:not(:disabled):hover {
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

#speed-btn, #sound-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

#speed-btn:hover, #sound-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

#tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #00ffff;
    padding: 10px 15px;
    border-radius: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #fff;
    pointer-events: none;
    z-index: 1000;
    max-width: 200px;
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    gap: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #666;
}

footer a {
    color: #ff6b35;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.footer-joke {
    font-style: italic;
}

/* Game Over / Victory */
#game-over-screen h1 {
    color: #ff4444;
    -webkit-text-fill-color: #ff4444;
}

#victory-screen h1 {
    animation: rainbow 2s infinite;
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

#final-wave, #victory-score {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    color: #00ffff;
    margin: 20px 0;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    #hud {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    #hud-center {
        order: 3;
        width: 100%;
    }
    
    #health-bar-container {
        width: 100%;
    }
    
    .tower-btn {
        padding: 8px 12px;
    }
    
    .tower-icon {
        font-size: 1.2rem;
    }
    
    #start-wave-btn {
        font-size: 0.8rem;
        padding: 8px 15px;
    }
    
    footer {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
}