/* ============================================
   CAPTURE INDICATOR - Индикатор захвата территории
   Модульные стили для системы захвата
   ============================================ */

/* === КОНТЕЙНЕР ИНДИКАТОРА === */
.effect-item-capture,
.effect-item-fight {
    position: relative;
    min-width: 320px;
    height: auto;
    margin-top: 1px;
    margin-left: 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, 
        rgba(20, 20, 20, 0.95), 
        rgba(40, 40, 40, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    /* animation: slideDown 0.3s ease-out; */ /* Убрано чтобы избежать мерцания */
    transition: all 0.3s ease;
}

.effect-item-fight {
    min-width: 340px;
    padding: 14px 18px;
}

/* Анимация появления */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover эффект */
.effect-item-capture:hover,
.effect-item-fight:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.7),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* === ИКОНКА === */
.effect-item-capture-img {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-50%) scale(1.02);
        opacity: 0.9;
    }
}

/* === ЗАГОЛОВОК === */
.capture-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-left: 48px;
}

.capture-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === ВЛАДЕЛЕЦ И ПРЕТЕНДЕНТ === */
.capture-participants {
    padding-left: 48px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.capture-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.effect-owner,
.effect-target {
    position: relative;
    left: 0;
    top: 0;
    bottom: auto;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.3px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.effect-owner {
    color: #2ecc71;
}

.effect-target {
    color: #e74c3c;
}

.capture-score {
    font-size: 16px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    min-width: 70px;
    text-align: right;
}

.capture-percent {
    font-size: 15px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    min-width: 50px;
    text-align: right;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.4);
}

.capture-percent.owner-percent {
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.capture-percent.target-percent {
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* === ПРОГРЕСС БАР === */
.capture-progress {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
    margin-left: 48px;
    width: calc(100% - 48px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 3px;
}

.progress-owner {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.progress-target {
    background: linear-gradient(90deg, #c0392b, #e74c3c);
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
    right: 0;
    left: auto;
}

/* === ТАЙМЕР === */
.effect-fight-timer {
    position: relative;
    right: 0;
    top: 0;
    font-size: 13px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    min-width: 50px;
    text-align: center;
}

.effect-fight-timer.orange {
    color: #f39c12;
    border-color: rgba(243, 156, 18, 0.3);
    animation: timerPulse 1s ease-in-out infinite;
}

.effect-fight-timer.green {
    color: #2ecc71;
    border-color: rgba(46, 204, 113, 0.3);
}

.effect-fight-timer.red {
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.3);
    animation: timerBlink 0.5s ease-in-out infinite;
}

@keyframes timerPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes timerBlink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 20px rgba(231, 76, 60, 0.8);
    }
}

/* === БИТВА АКТИВНА === */
.effect-item-fight.active {
    border-color: rgba(243, 156, 18, 0.5);
    animation: battlePulse 2s ease-in-out infinite;
}

@keyframes battlePulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6),
                    inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(243, 156, 18, 0.4),
                    inset 0 1px 0 rgba(255, 255, 255, 0.1),
                    0 0 30px rgba(243, 156, 18, 0.3);
    }
}

/* === АДАПТИВНОСТЬ === */
@media screen and (max-width: 768px) {
    .effect-item-capture,
    .effect-item-fight {
        min-width: 280px;
        padding: 10px 12px;
    }
    
    .effect-item-capture-img {
        width: 32px;
        height: 32px;
        left: 10px;
    }
    
    .capture-participants {
        padding-left: 42px;
    }
    
    .effect-owner,
    .effect-target {
        font-size: 12px;
    }
    
    .capture-score {
        font-size: 14px;
        min-width: 60px;
    }
    
    .effect-fight-timer {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .capture-progress {
        margin-left: 42px;
        width: calc(100% - 42px);
    }
}

/* === ПОЗИЦИОНИРОВАНИЕ === */
.effects-list {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 65px; /* Под HP/EP барами */
    left: 50%;
    transform: translateX(-50%);
    gap: 8px;
    z-index: 100;
    pointer-events: none;
}

.effects-list > * {
    pointer-events: auto;
}
