:root {
    --primary-color: #FF4500;
    --secondary-color: #8B0000;
    --text-color: #FFF5F6;
    --accent-color: #aea04b;
    --bg-dark: #0b0b0b;
    --border-color: #2c2c2c;
    --success-color: #4caf50;
    --error-color: #DB1A1A;
    --font-diablo: "Diablo", sans-serif;
}

.battle-arena {
    position: relative;
    padding: 12px;
    background: url('/images/fon_boi.png') no-repeat center/cover;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    max-width: 1200px;
    margin: 0 auto;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.arena-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    gap: 10px;
    width: 100%;
    max-width: 650px; /* Увеличил для 200px манекенов */
    margin: 0 auto !important;
}

.arena-side {
    flex: 1;
    min-width: 200px; /* Увеличил для 200px манекенов */
    max-width: 300px;
    border-radius: 6px;
    padding: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.maneken-wrapper {
    position: relative;
    text-align: center;
}

.maneken-img {
    background: transparent !important;
    max-width: 200px; /* Увеличил до 200px */
    display: block;
    margin: 0 auto;
}

.info {
    text-align: center;
    margin-top: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
}

.arena-side.attacked {
    animation: shake 0.3s ease;
}

/* Эффект крови */
.blood-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(219, 26, 26, 0.7) 0%, transparent 70%);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.arena-side.attacked .blood-effect {
    animation: bloodSplatter 0.6s ease forwards;
}

.arena-side.attacked.crit .blood-effect {
    background: radial-gradient(circle, rgba(219, 26, 26, 0.9) 0%, transparent 60%);
    animation: bloodSplatter 0.8s ease forwards;
}

/* Эффект вспышки для крита */
.arena-side.attacked.crit::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 153, 0, 0.5) 0%, transparent 70%);
    opacity: 0;
    animation: critFlash 0.4s ease forwards;
}

/* Текст урона */
.damage-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--error-color);
    opacity: 0;
    pointer-events: none;
    z-index: 2;
}

.opp-damage.crit, .player-damage.crit {
    color: #ff9900;
    font-size: 1.4rem;
}

.damage-text.show {
    animation: damageFade 1s ease forwards;
}

/* Полоски здоровья */
.health-bar {
    width: 150px; /* Увеличил для 200px манекенов */
    height: 10px;
    background: var(--bg-dark);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    margin: 6px auto;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    background: var(--success-color);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Кнопка атаки */
.arena-controls {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 15px;
    width: 100%;
    max-width: 400px;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
    text-align: center !important;
    position: relative !important;
}

.btn-attack {
    display: inline-block !important;
    padding: 8px 16px;
    background: linear-gradient(145deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    background-image: 
        linear-gradient(45deg, rgba(0,0,0,0.1) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0,0,0,0.1) 25%, transparent 25%);
    background-size: 6px 6px;
    border: 2px solid var(--primary-color);
    color: var(--text-color);
    border-radius: 6px;
    font-family: 'Arial Black', var(--font-diablo);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 6px rgba(139, 0, 0, 0.3), inset 0 1px 2px rgba(255, 69, 0, 0.4);
    margin: 0 auto !important;
    float: none !important;
    text-align: center !important;
    position: relative !important;
}

.btn-attack:hover {
    background: linear-gradient(145deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(139, 0, 0, 0.5), inset 0 1px 2px rgba(255, 69, 0, 0.6);
}

.btn-attack:active {
    transform: scale(0.95);
}

/* Анимации */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    50% { transform: translateX(8px); }
    75% { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

@keyframes damageFade {
    0% { opacity: 1; transform: translate(-50%, -50%); }
    100% { opacity: 0; transform: translate(-50%, -80px); }
}

@keyframes bloodSplatter {
    0% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 0.7; transform: scale(1.3); }
    100% { opacity: 0; transform: scale(1.6); }
}

@keyframes critFlash {
    0% { opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { opacity: 0; }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .arena-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        gap: 5px;
        max-width: 450px; /* Увеличил для 200px манекенов */
        margin: 0 auto !important;
    }
    .arena-side {
        min-width: 150px; /* Увеличил для 200px манекенов */
        max-width: 225px;
        padding: 6px;
    }
    .maneken-img {
        max-width: 150px; /* Уменьшил для мобильных */
    }
    .health-bar {
        width: 120px; /* Уменьшил для мобильных */
        height: 8px;
    }
    .info {
        font-size: 0.8rem;
    }
    .damage-text {
        font-size: 1rem;
    }
    .opp-damage.crit, .player-damage.crit {
        font-size: 1.2rem;
    }
    .btn-attack {
        font-size: 0.9rem;
        padding: 6px 12px;
        margin: 0 auto !important;
        float: none !important;
        text-align: center !important;
    }
}

/* Для сверхузких экранов */
@media (max-width: 400px) {
    .arena-container {
        max-width: 350px; /* Увеличил для 200px манекенов */
        margin: 0 auto !important;
    }
    .arena-side {
        min-width: 125px; /* Увеличил для 200px манекенов */
        max-width: 175px;
    }
    .maneken-img {
        max-width: 125px; /* Уменьшил для сверхузких */
    }
    .health-bar {
        width: 100px; /* Уменьшил для сверхузких */
        height: 6px;
    }
    .info {
        font-size: 0.7rem;
    }
    .damage-text {
        font-size: 0.9rem;
    }
    .opp-damage.crit, .player-damage.crit {
        font-size: 1rem;
    }
    .btn-attack {
        font-size: 0.8rem;
        padding: 5px 10px;
        margin: 0 auto !important;
        float: none !important;
        text-align: center !important;
    }
}

/* Страховочные стили для переопределения конфликтов */
.battle-arena, .arena-container, .arena-controls, .btn-attack {
    float: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
}