/* 커스텀 스크롤바 */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* 전장 맵 애니메이션 설정 */
#battle-map {
    position: relative;
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 20px 20px;
    overflow: hidden;
}
.character-marker {
    position: absolute;
    transition: all 0.5s ease-in-out;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}
.character-marker.attacking {
    animation: bump 0.3s ease-in-out;
    z-index: 20;
}
.character-marker.dodging {
    animation: dodgeAnim 0.4s ease-in-out;
}
.character-marker.dead {
    opacity: 0.3;
    filter: grayscale(100%);
    z-index: 1;
    transition: opacity 2s;
}

/* 떠오르는 대미지 효과 */
.floating-damage {
    position: absolute;
    color: #ef4444;
    font-weight: 900;
    font-size: 1.1rem;
    pointer-events: none;
    animation: floatDamage 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    z-index: 30;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
}

.team-1 { border: 3px solid #3b82f6; } /* Blue */
.team-2 { border: 3px solid #ef4444; } /* Red */
.team-3 { border: 3px solid #10b981; } /* Green */
.team-4 { border: 3px solid #f59e0b; } /* Yellow */
.team-0 { border: 3px solid #64748b; } /* None/FFA */

@keyframes bump {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.3); }
    100% { transform: translate(-50%, -50%) scale(1); }
}
@keyframes dodgeAnim {
    0% { transform: translate(-50%, -50%); }
    25% { transform: translate(-70%, -50%); opacity: 0.7;}
    75% { transform: translate(-30%, -50%); opacity: 0.7;}
    100% { transform: translate(-50%, -50%); opacity: 1;}
}
@keyframes floatDamage {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -250%) scale(1.4); opacity: 0; }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
.log-entry { animation: fadeIn 0.3s ease-out; }
