/* ============================================= */
/* BATTLE.CSS — Boss Fight HUD Styles             */
/* ============================================= */

/* ---------- Battle Screen ---------- */
#screen-battle {
    padding: 0;
    justify-content: flex-start;
}

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

/* ---------- Battle HUD ---------- */
.battle-hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
}

.battle-hud-top {
    display: flex;
    justify-content: center;
}

.boss-hp-section {
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.boss-name-plate {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neon-red);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 34, 85, 0.5);
    margin-bottom: 4px;
}

.boss-phase {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.boss-hp-bar-outer {
    height: 18px;
    border-radius: 9px;
}

/* ---------- Battle HUD Bottom ---------- */
.battle-hud-bottom {
    display: flex;
    align-items: flex-end;
    gap: 20px;
}

.player-battle-info {
    flex: 0 0 200px;
}

.player-battle-label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: var(--neon-green);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 4px;
}

.player-hp-bar-outer {
    height: 12px;
    border-radius: 6px;
}

/* ---------- Battle Typing Area ---------- */
.battle-typing-area {
    flex: 1;
    text-align: center;
    pointer-events: auto;
    background: rgba(5, 8, 22, 0.7);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.battle-current-word {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: 3px;
    margin-bottom: 4px;
    min-height: 36px;
}

.battle-current-word .char-correct {
    color: var(--neon-green);
}

.battle-current-word .char-wrong {
    color: var(--neon-red);
    text-decoration: underline;
}

.battle-current-word .char-pending {
    color: var(--text-secondary);
}

.battle-typed {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    min-height: 20px;
}

/* ---------- Battle Stats Panel ---------- */
.battle-stats-panel {
    flex: 0 0 150px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.battle-combo {
    text-align: right;
}

.battle-combo .combo-count {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--neon-gold);
    line-height: 1;
}

.battle-combo .combo-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    display: block;
}

.battle-combo.fire .combo-count {
    animation: comboFire 0.5s ease infinite;
}

.battle-multiplier {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--neon-magenta);
    text-shadow: 0 0 10px rgba(255, 0, 170, 0.5);
}

.battle-wpm {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ---------- Phase Overlay ---------- */
.phase-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    background: rgba(5, 8, 22, 0.8);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.phase-overlay.active {
    opacity: 1;
    visibility: visible;
}

.phase-overlay-text {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 900;
    color: var(--neon-magenta);
    letter-spacing: 8px;
    text-shadow: 
        0 0 20px rgba(255, 0, 170, 0.8),
        0 0 60px rgba(255, 0, 170, 0.4),
        0 0 100px rgba(255, 0, 170, 0.2);
    animation: phaseFlash 2s ease-out forwards;
}

/* ---------- Pre-Battle Screen ---------- */
.prebattle-content {
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

.boss-intro-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 6px;
    margin-bottom: 16px;
}

.boss-intro-name {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--neon-magenta);
    letter-spacing: 4px;
    text-shadow: 
        0 0 20px rgba(255, 0, 170, 0.6),
        0 0 60px rgba(255, 0, 170, 0.3);
    margin-bottom: 8px;
    animation: bossEntrance 1.5s ease-out;
}

.boss-intro-subtitle {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text-secondary);
    letter-spacing: 3px;
    margin-bottom: 24px;
}

.boss-intro-divider {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-magenta), transparent);
    margin: 0 auto 24px;
}

.boss-intro-tip {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* ---------- Results Screen ---------- */
.results-content {
    text-align: center;
    animation: scaleInBounce 0.8s ease-out;
}

.results-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 6px;
    margin-bottom: 8px;
}

.results-title.victory {
    color: var(--neon-gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 0 60px rgba(255, 215, 0, 0.3);
}

.results-title.defeat {
    color: var(--neon-red);
    text-shadow: 0 0 20px rgba(255, 34, 85, 0.6), 0 0 60px rgba(255, 34, 85, 0.3);
}

.results-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.results-stars {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.results-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.result-stat {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    backdrop-filter: blur(10px);
}

.result-stat-value {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-bottom: 4px;
}

.result-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* ---------- Damage Numbers (floating) ---------- */
.damage-number {
    position: absolute;
    font-family: var(--font-display);
    font-weight: 900;
    pointer-events: none;
    z-index: 15;
    animation: damageFloat 1s ease-out forwards;
}

.damage-number.player-dmg {
    color: var(--neon-red);
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 34, 85, 0.8);
}

.damage-number.boss-dmg {
    color: var(--neon-cyan);
    font-size: 1.8rem;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.8);
}

.damage-number.critical {
    color: var(--neon-gold);
    font-size: 2.5rem;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.4);
}
