/* ============================================
   CAPYBARA GO! - Battle Screen Styles
   ============================================ */

#battle-screen {
    background: linear-gradient(180deg, 
        #2d3436 0%, 
        #636e72 50%,
        #b2bec3 100%);
}

.battle-header {
    padding: var(--space-md);
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
}

.battle-info {
    color: white;
    font-family: var(--font-display);
    font-size: 1.3rem;
}

#battle-type {
    text-transform: uppercase;
    letter-spacing: 2px;
}

.battle-type-elite {
    color: var(--color-purple);
    text-shadow: 0 0 10px var(--color-purple);
}

.battle-type-boss {
    color: var(--color-gold);
    text-shadow: 0 0 15px var(--color-gold);
    animation: bossTextPulse 1s ease-in-out infinite;
}

@keyframes bossTextPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Battle Arena */
.battle-arena {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    position: relative;
}

.battle-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40%;
}

.player-side {
    align-items: flex-start;
}

.enemy-side {
    align-items: flex-end;
}

/* Character Container */
.character-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.character-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 100px;
}

.character-stats .hp-bar {
    width: 100px;
    height: 10px;
}

.character-stats span {
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.enemy-name {
    font-family: var(--font-display);
    font-size: 1rem;
    color: white;
    margin-top: var(--space-xs);
}

/* Companions Display */
.companions-display {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
}

.battle-companion {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Battle Center */
.battle-center {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

/* Turn/Skill Indicator */
#turn-indicator {
    background: linear-gradient(135deg, rgba(0,0,0,0.8), rgba(0,0,0,0.9));
    color: var(--color-gold);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
    animation: skillPop 0.3s ease-out;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

#turn-indicator.hidden {
    display: none;
}

@keyframes skillPop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Battle Result */
.battle-result {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, 
        rgba(0, 0, 0, 0.95) 0%, 
        rgba(0, 0, 0, 0.8) 100%);
    padding: var(--space-xl);
    text-align: center;
    animation: resultSlideUp 0.5s ease-out;
}

@keyframes resultSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#result-title {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.battle-result.victory #result-title {
    color: var(--color-gold);
    text-shadow: 0 0 20px var(--color-gold);
}

.battle-result.defeat #result-title {
    color: var(--color-red);
}

/* Battle Rewards */
.battle-rewards {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.reward-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: white;
    animation: rewardPop 0.5s ease-out backwards;
}

.reward-item:nth-child(1) { animation-delay: 0.1s; }
.reward-item:nth-child(2) { animation-delay: 0.2s; }
.reward-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes rewardPop {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.reward-icon {
    font-size: 1.5rem;
}

.reward-text {
    font-weight: 700;
}

/* Attack Effects */
.attack-effect {
    position: absolute;
    pointer-events: none;
    z-index: 10;
}

.slash-effect {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: slashAnimation 0.3s ease-out forwards;
}

@keyframes slashAnimation {
    0% {
        transform: rotate(-45deg) scale(0);
        opacity: 1;
    }
    100% {
        transform: rotate(-45deg) scale(2);
        opacity: 0;
    }
}

/* Status Effects */
.status-effects {
    display: flex;
    gap: 4px;
    margin-top: var(--space-xs);
}

.status-icon {
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    position: relative;
}

.status-icon .status-duration {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 10px;
    background: var(--color-primary);
    color: white;
    width: 14px;
    height: 14px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Turn Indicator */
.turn-indicator {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
    animation: turnPop 0.3s ease-out;
}

@keyframes turnPop {
    0% { transform: translateX(-50%) scale(0.5); opacity: 0; }
    100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* Battle Start Animation */
.battle-start-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    animation: battleStartFade 1.5s ease-out forwards;
}

@keyframes battleStartFade {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; pointer-events: none; }
}

.battle-start-text {
    font-family: var(--font-display);
    font-size: 3rem;
    color: white;
    text-shadow: 0 0 30px var(--color-primary);
    animation: battleTextZoom 1s ease-out forwards;
}

@keyframes battleTextZoom {
    0% { transform: scale(3); opacity: 0; }
    30% { transform: scale(1); opacity: 1; }
    70% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0; }
}

/* Boss specific styles */
.boss-battle .battle-arena {
    background: radial-gradient(circle at 70% 30%, 
        rgba(255, 100, 100, 0.3) 0%, 
        transparent 50%);
}

.boss-battle .enemy-side .character {
    transform: scale(1.3);
}

/* Elite specific styles */
.elite-battle .battle-arena {
    background: radial-gradient(circle at 70% 30%, 
        rgba(162, 155, 254, 0.3) 0%, 
        transparent 50%);
}

/* Skill activation */
.skill-activation {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
    color: white;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-weight: 700;
    animation: skillActivate 1.5s ease-out forwards;
    z-index: 15;
}

@keyframes skillActivate {
    0% { transform: translateX(-50%) translateY(20px); opacity: 0; }
    20% { transform: translateX(-50%) translateY(0); opacity: 1; }
    80% { transform: translateX(-50%) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(-20px); opacity: 0; }
}

/* Speed lines during attack */
.speed-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.speed-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: speedLineMove 0.3s linear forwards;
}

@keyframes speedLineMove {
    from { transform: translateX(-100%); }
    to { transform: translateX(200%); }
}

