/**
 * 动画效果CSS样式
 * 从map.html中提取的动画相关样式
 */

/* 脉冲动画 */
.pulse-animation {
    animation: pulse 2s infinite;
}

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

/* 弹幕动画 */
.danmaku-floating {
    animation: danmakuMove linear infinite;
}

@keyframes danmakuMove {
    from {
        transform: translateX(100vw);
    }
    to {
        transform: translateX(-100vw);
    }
}

/* 弹幕暂停状态 */
.danmaku-item.paused {
    animation-play-state: paused !important;
}

/* 宝藏标记动画 */
@keyframes treasureGlow {
    0% {
        box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
        transform: scale(1);
        opacity: 1;
    }

    50% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.8), 0 0 30px rgba(212, 175, 55, 0.6);
        transform: scale(1.1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 按钮悬停效果 */
.map-control-btn:hover {
    background: #f9fafb;
    transform: scale(1.05);
}

/* 弹窗样式 */
.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
}

.leaflet-popup-tip {
    background: white !important;
}

.treasure-popup .leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
}

/* 宝藏悬停弹窗样式 */
.treasure-hover-popup {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    min-width: 280px;
    padding: 12px;
    line-height: 1.4;
}

.treasure-hover-popup .space-y-2 > * + * {
    margin-top: 8px;
}

.treasure-hover-popup .flex {
    display: flex;
}

.treasure-hover-popup .items-center {
    align-items: center;
}

.treasure-hover-popup .items-start {
    align-items: flex-start;
}

.treasure-hover-popup .justify-between {
    justify-content: space-between;
}

.treasure-hover-popup .mb-3 {
    margin-bottom: 12px;
}

.treasure-hover-popup .mr-2 {
    margin-right: 8px;
}

.treasure-hover-popup .ml-2 {
    margin-left: 8px;
}

.treasure-hover-popup .pr-2 {
    padding-right: 8px;
}

.treasure-hover-popup .pt-1 {
    padding-top: 4px;
}

.treasure-hover-popup .w-4 {
    width: 16px;
}

.treasure-hover-popup .text-xs {
    font-size: 12px;
}

.treasure-hover-popup .text-sm {
    font-size: 14px;
}

.treasure-hover-popup .text-lg {
    font-size: 18px;
}

.treasure-hover-popup .font-bold {
    font-weight: 700;
}

.treasure-hover-popup .font-medium {
    font-weight: 500;
}

.treasure-hover-popup .font-mono {
    font-family: monospace;
}

.treasure-hover-popup .text-gray-500 {
    color: #6b7280;
}

.treasure-hover-popup .text-gray-600 {
    color: #4b5563;
}

.treasure-hover-popup .text-gray-700 {
    color: #374151;
}

.treasure-hover-popup .text-green-600 {
    color: #059669;
}

.treasure-hover-popup .bg-gray-100 {
    background-color: #f3f4f6;
}

.treasure-hover-popup .px-2 {
    padding-left: 8px;
    padding-right: 8px;
}

.treasure-hover-popup .py-1 {
    padding-top: 4px;
    padding-bottom: 4px;
}

.treasure-hover-popup .rounded-full {
    border-radius: 9999px;
}

.treasure-hover-popup .flex-shrink-0 {
    flex-shrink: 0;
}

.treasure-hover-popup h3 {
    color: #8B4513;
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.treasure-hover-popup .text-treasure-brown {
    color: #8B4513;
}

.treasure-hover-popup .text-treasure-orange {
    color: #FF7F50;
}

.treasure-hover-popup .text-treasure-blue {
    color: #1E90FF;
}

.treasure-hover-popup .text-treasure-gold {
    color: #D4AF37;
}

/* 确保弹窗容器样式正确 */
.treasure-hover-popup-container .leaflet-popup-content-wrapper {
    padding: 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.treasure-hover-popup-container .leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
}

/* 确保宝藏图标能接收鼠标事件 */
.leaflet-marker-icon {
    pointer-events: auto !important;
    cursor: pointer !important;
}

.treasure-marker {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* 弹窗应该在图标上方显示 */
.treasure-hover-popup-container {
    z-index: 1000 !important;
}
