/* 状态悬停工具提示 */
.state-tooltip {
    background: rgba(37, 99, 235, 0.9) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    backdrop-filter: blur(10px);
    animation: tooltipFade 0.3s ease-out;
}

.state-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid rgba(37, 99, 235, 0.9);
}

@keyframes tooltipFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 自定义标记样式 */
.marker-pin {
    font-size: 24px;
    filter: drop-shadow(0 2px 8px rgba(239, 68, 68, 0.4));
    animation: markerFloat 3s ease-in-out infinite;
}

@keyframes markerFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* 弹出窗口样式 */
.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
    padding: 15px !important;
}

.leaflet-popup-tip {
    background: white !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    color: var(--text-color);
}

.popup-content {
    padding: 5px;
}

/* 状态高亮动画 */
.state-highlight {
    animation: statePulse 2s infinite;
}

@keyframes statePulse {
    0% {
        stroke-width: 2;
        stroke-opacity: 0.8;
    }
    50% {
        stroke-width: 4;
        stroke-opacity: 1;
    }
    100% {
        stroke-width: 2;
        stroke-opacity: 0.8;
    }
}

/* 边界框动画 */
.bounding-box {
    animation: boxGlow 3s infinite;
}

@keyframes boxGlow {
    0%, 100% {
        stroke-width: 3;
        stroke-opacity: 0.8;
    }
    50% {
        stroke-width: 5;
        stroke-opacity: 1;
    }
}
