
/* ========================================
   BATTLE ANIMATION STYLES
   ======================================== */

/* Battle Arena Container */
.battle-arena {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 30px 20px;
    margin: 20px 0;
    min-height: 600px;
    position: relative;
}

/* Battle Controls */
.battle-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.battle-btn {
    background: rgba(122, 162, 247, 0.2);
    border: 1px solid rgba(122, 162, 247, 0.5);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.battle-btn:hover {
    background: rgba(122, 162, 247, 0.4);
    transform: translateY(-2px);
}

.battle-btn:active {
    transform: scale(0.95);
}

/* Battle Matchup Info */
.battle-matchup-info {
    text-align: center;
    margin-bottom: 30px;
}

#matchup-status {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

#consecutive-counter {
    font-size: 18px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Consecutive Win Effects */
.consecutive-glow {
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    font-weight: bold;
    animation: pulse-glow 0.5s ease-in-out;
}

.rampage {
    color: #ff4444;
    text-shadow: 0 0 20px rgba(255, 68, 68, 1);
    font-size: 24px;
    font-weight: 900;
    animation: rampage-shake 0.5s;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes rampage-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* Fighter Cards Container */
.battle-fighters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 0 10px;
}

/* VS Indicator */
.vs-indicator {
    font-size: 32px;
    font-weight: bold;
    color: var(--accent-color);
    text-align: center;
    line-height: 1.2;
    min-width: 50px;
    text-shadow: 0 0 10px rgba(224, 175, 104, 0.5);
}

/* Fighter Card */
.fighter-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    border: 2px solid transparent;
}

.fighter-a {
    border-color: rgba(122, 162, 247, 0.3);
}

.fighter-b {
    border-color: rgba(247, 118, 142, 0.3);
}

.fighter-card.attacking {
    transform: scale(1.05);
    animation: attack-pulse 0.3s ease-in-out;
}

.fighter-card.hit {
    animation: shake 0.3s ease-in-out;
}

.fighter-card.winner {
    animation: victory-pulse 1s ease-in-out;
    border-color: #00ff88 !important;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
}

.fighter-card.loser {
    opacity: 0.4;
    filter: grayscale(80%);
    transform: scale(0.95);
}

@keyframes attack-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05) translateX(5px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes victory-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Fighter Header */
.fighter-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Fighter Content */
.fighter-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fighter-name {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fighter-stats {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fighter-tier {
    background: rgba(122, 162, 247, 0.2);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
}

.fighter-level {
    background: rgba(224, 175, 104, 0.2);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    color: var(--accent-color);
}

.fighter-position {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
}

/* HP Bar */
.hp-bar {
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00cc66);
    transition: width 0.5s ease-out, background-color 0.3s;
    border-radius: 15px;
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.3);
}

.hp-text {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    margin-top: 5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Damage Number */
.damage-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: 900;
    color: #ff4444;
    text-shadow: 0 0 10px #ff0000, 0 2px 5px rgba(0, 0, 0, 0.8);
    animation: damage-float 1.5s ease-out forwards;
    pointer-events: none;
    z-index: 100;
}

@keyframes damage-float {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -150%) scale(1.5);
    }
}

/* Battle Log Mini */
.battle-log-mini {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
    max-height: 150px;
    overflow-y: auto;
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
}

/* Final Result */
.final-result {
    font-size: 24px;
    font-weight: bold;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    line-height: 1.6;
    animation: result-appear 0.5s ease-out;
}

.final-result.victory {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 204, 102, 0.2));
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
    border: 2px solid #00ff88;
}

.final-result.defeat {
    background: linear-gradient(135deg, rgba(247, 118, 142, 0.2), rgba(200, 80, 100, 0.2));
    color: #f7768e;
    text-shadow: 0 0 20px rgba(247, 118, 142, 0.8);
    border: 2px solid #f7768e;
}

.final-result.draw {
    background: linear-gradient(135deg, rgba(122, 162, 247, 0.2), rgba(86, 95, 137, 0.2));
    color: #7aa2f7;
    text-shadow: 0 0 20px rgba(122, 162, 247, 0.8);
    border: 2px solid #7aa2f7;
}

@keyframes result-appear {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Speed Slider */
#battle-speed {
    width: 100px;
}
