/* Asteroid Forge — space theme */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0a0a12;
    --purple: #a78bfa;
    --cyan: #67e8f9;
    --green: #4ade80;
    --orange: #fb923c;
    --pink: #f472b6;
    --text: #e4e4f0;
    --font: 'Press Start 2P', monospace;
}

body {
    background: var(--bg);
    overflow: hidden;
    font-family: var(--font);
    color: var(--text);
}

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

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* HUD */
#hud {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    font-size: 10px;
    pointer-events: none;
    text-shadow: 0 0 6px var(--purple);
}

#resource-bar-container {
    position: relative;
    width: 140px;
    height: 14px;
    border: 1px solid var(--cyan);
    border-radius: 3px;
    overflow: hidden;
    background: rgba(103, 232, 249, 0.08);
}

#resource-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--purple), var(--cyan));
    transition: width 0.3s ease;
    border-radius: 2px;
}

#resource-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
}

#shield-display {
    color: var(--cyan);
}

#shield-display.off {
    color: #555;
    text-decoration: line-through;
}

/* Overlays */
.overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 18, 0.92);
    z-index: 10;
    gap: 16px;
}

.game-title {
    font-size: 32px;
    text-align: center;
    line-height: 1.4;
    background: linear-gradient(135deg, var(--purple), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 0 20px rgba(167, 139, 250, 0.4));
}

.subtitle {
    font-size: 9px;
    color: var(--cyan);
    opacity: 0.8;
}

.game-btn {
    font-family: var(--font);
    font-size: 12px;
    padding: 14px 32px;
    border: 2px solid var(--purple);
    background: transparent;
    color: var(--purple);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.game-btn:hover {
    background: var(--purple);
    color: var(--bg);
    box-shadow: 0 0 24px rgba(167, 139, 250, 0.5);
}

.controls-hint {
    font-size: 8px;
    color: #888;
}

.final-score, .final-wave {
    font-size: 12px;
    color: var(--cyan);
}

/* Upgrade screen */
.upgrade-title {
    font-size: 20px;
    color: var(--green);
    text-shadow: 0 0 12px rgba(74, 222, 128, 0.4);
}

.upgrade-sub {
    font-size: 9px;
    color: #999;
}

#upgrade-cards {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.upgrade-card {
    font-family: var(--font);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 18px;
    border: 2px solid rgba(167, 139, 250, 0.3);
    background: rgba(167, 139, 250, 0.06);
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    width: 140px;
}

.upgrade-card:hover {
    border-color: var(--purple);
    background: rgba(167, 139, 250, 0.15);
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.25);
    transform: translateY(-4px);
}

.upgrade-icon { font-size: 24px; }
.upgrade-name { font-size: 8px; color: var(--purple); }
.upgrade-desc { font-size: 7px; color: #999; }

/* Badge */
#badge {
    position: absolute;
    bottom: 10px;
    right: 14px;
    font-size: 7px;
    color: #555;
    z-index: 5;
}

#badge a {
    color: var(--purple);
    text-decoration: none;
}

#badge a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    .game-title { font-size: 22px; }
    .game-btn { font-size: 10px; padding: 10px 20px; }
    #upgrade-cards { flex-direction: column; gap: 10px; }
    .upgrade-card { width: 200px; flex-direction: row; padding: 12px; }
    #hud { font-size: 8px; padding: 8px 10px; }
    #resource-bar-container { width: 80px; }
}
