@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700;900&display=swap');

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

body, html {
    width: 100%; height: 100%;
    overflow: hidden;
    background-color: #050510;
    font-family: 'Outfit', sans-serif;
    user-select: none; touch-action: none;
}

#game-container {
    position: relative;
    width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
}

canvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
}

#ui-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2;
    pointer-events: none; display: flex; flex-direction: column;
}

/* Heads Up Display */
#top-bar {
    position: absolute; top: 10px; left: 0; width: 100%;
    padding: 0 20px; display: flex; justify-content: space-between;
    align-items: center; z-index: 3;
}

#score-display {
    color: rgba(255, 255, 255, 0.9); font-size: 1.2rem; font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

#health-bar-container {
    width: 200px; height: 12px; background: rgba(5, 5, 16, 0.8);
    border: 1px solid #ff0055; border-radius: 6px; overflow: hidden;
}

#health-bar-fill {
    width: 100%; height: 100%; background: #ff0055;
    box-shadow: 0 0 10px #ff0055; transition: width 0.2s ease;
}

#xp-bar-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 6px;
    background: rgba(255, 255, 255, 0.1); z-index: 4;
}

#xp-bar-fill {
    width: 0%; height: 100%; background: #00ffaa;
    box-shadow: 0 0 15px #00ffaa; transition: width 0.3s ease;
}

#level-display {
    position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
    color: #00ffaa; font-weight: 900; font-size: 1.5rem;
    text-shadow: 0 0 10px #00ffaa;
}

/* Screens */
.screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    background: rgba(5, 5, 16, 0.75); backdrop-filter: blur(8px);
    pointer-events: auto; transition: opacity 0.3s ease; z-index: 10;
}

.hidden { opacity: 0; pointer-events: none !important; }

h1 {
    font-size: 4rem; font-weight: 900; color: #fff; text-align: center;
    margin-bottom: 10px; letter-spacing: 5px;
    text-shadow: 0 0 20px #00f3ff, 0 0 40px #00f3ff;
}

h2 {
    font-size: 3rem; font-weight: 900; color: #ff0055; text-align: center;
    margin-bottom: 20px; text-shadow: 0 0 20px #ff0055;
}

#level-up-screen h2 { color: #00ffaa; text-shadow: 0 0 20px #00ffaa; }

p { color: #ddd; font-size: 1.2rem; margin-bottom: 20px; text-align: center; }

.controls-info { font-size: 1rem; color: #aaa; margin-bottom: 40px; }
.stats p { margin-bottom: 10px; font-size: 1.5rem; color: #fff; }

button {
    padding: 15px 40px; font-size: 1.2rem; font-family: 'Outfit', sans-serif;
    font-weight: 700; color: #111; background: #00f3ff; border: none; border-radius: 30px;
    cursor: pointer; box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
    transition: all 0.2s ease; text-transform: uppercase; letter-spacing: 2px;
}

button:hover { transform: scale(1.05); background: #fff; box-shadow: 0 0 30px #fff; }

/* Upgrade Cards */
#upgrade-cards-container {
    display: flex; gap: 20px; flex-wrap: wrap; justify-content: center;
    max-width: 800px; padding: 20px;
}

.upgrade-card {
    background: rgba(10, 10, 30, 0.9); border: 2px solid #00f3ff;
    border-radius: 15px; padding: 20px; width: 220px; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    display: flex; flex-direction: column; align-items: center;
}

.upgrade-card:hover {
    transform: translateY(-10px); box-shadow: 0 10px 30px rgba(0, 243, 255, 0.4);
    background: rgba(20, 20, 50, 0.9);
}

.upgrade-title {
    color: #00f3ff; font-weight: 900; font-size: 1.3rem; margin-bottom: 10px; text-align: center;
}

.upgrade-desc {
    color: #aaa; font-size: 0.95rem; text-align: center; margin-bottom: 0px;
}
