/* hex_attack.css */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
    --bg-main: #020617;
    --text-neon: #22c55e;
    --text-danger: #ef4444;
    --text-ui: #f8fafc;
}

body {
    background-color: var(--bg-main);
    color: var(--text-ui);
    font-family: 'Fira Code', monospace;
    /* Fallback */
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.game-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #334155;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.font-arcade {
    font-family: 'Press Start 2P', cursive;
}

.health-bar {
    width: 200px;
    height: 20px;
    background: #334155;
    border: 2px solid #fff;
    position: relative;
}

.health-fill {
    width: 100%;
    height: 100%;
    background: var(--text-neon);
    transition: width 0.2s, background-color 0.2s;
}

.health-fill.low {
    background: var(--text-danger);
}

.stats {
    display: flex;
    gap: 30px;
    font-size: 1.2rem;
}

/* Game Area */
#game-container {
    flex-grow: 1;
    position: relative;
    background: radial-gradient(circle at center, #1e293b 0%, #020617 100%);
    overflow: hidden;
}

/* Falling Numbers */
.target {
    position: absolute;
    font-family: 'Press Start 2P', cursive;
    color: var(--text-neon);
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
    transform: translateX(-50%);
    white-space: nowrap;
}

.target.hex {
    color: #a855f7;
    /* Purple for Hex */
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.8);
}

.target.danger {
    color: #ef4444;
    /* Red when close */
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0% {
        transform: translateX(-50%) scale(1);
    }

    50% {
        transform: translateX(-50%) scale(1.1);
    }

    100% {
        transform: translateX(-50%) scale(1);
    }
}

/* Input Zone */
.input-zone {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    text-align: center;
    z-index: 20;
}

#answer-input {
    background: rgba(0, 0, 0, 0.8);
    border: 4px solid var(--text-neon);
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 2rem;
    padding: 20px;
    text-align: center;
    width: 100%;
    outline: none;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.3);
    border-radius: 8px;
}

#answer-input:focus {
    box-shadow: 0 0 50px rgba(34, 197, 94, 0.6);
}

/* Overlay (Start/Game Over) */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    backdrop-filter: blur(5px);
}

.overlay h1 {
    font-size: 4rem;
    color: var(--text-neon);
    margin-bottom: 20px;
    text-shadow: 4px 4px 0 #000;
}

.btn-start {
    font-family: 'Press Start 2P', cursive;
    background: var(--text-neon);
    color: black;
    border: none;
    padding: 20px 40px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 0 #15803d;
    transition: transform 0.1s;
}

.btn-start:active {
    transform: translateY(5px);
    box-shadow: 0 5px 0 #15803d;
}

.hidden {
    display: none !important;
}

.explosion {
    position: absolute;
    width: 50px;
    height: 50px;
    pointer-events: none;
    background: radial-gradient(circle, #fff 0%, transparent 60%);
    animation: explode 0.3s ease-out forwards;
    transform: translate(-50%, -50%);
}

@keyframes explode {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}