/* 中国地图的样式 */
.china-map {
    position: relative;
    width: 100%;
    height: 600px;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    background-color: #f5f9ff; /* 添加浅蓝色背景 */
}

.china-map img {
    background-color: transparent !important; /* 确保图片背景透明 */
}

/* 加载指示器 */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.loading-indicator .spinner {
    border: 4px solid rgba(255, 102, 0, 0.1);
    border-left-color: #ff6600;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 地图标题 */
.map-title {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: bold;
    color: #333;
    z-index: 5;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* 图例样式 */
.map-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 5px;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.legend-color {
    width: 15px;
    height: 15px;
    margin-right: 8px;
    border-radius: 2px;
}

.legend-text {
    font-size: 12px;
    color: #333;
}

/* 网格背景 */
.map-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.1;
    pointer-events: none;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, #aaa 1px, transparent 1px),
        linear-gradient(to bottom, #aaa 1px, transparent 1px);
}

/* 指南针装饰 */
.map-compass {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    z-index: 5;
    opacity: 0.7;
    pointer-events: none;
}

/* 媒体查询 */
@media (max-width: 768px) {
    .china-map {
        height: 450px;
    }
    
    .map-title {
        font-size: 16px;
    }
    
    .map-compass {
        width: 40px;
        height: 40px;
        bottom: 20px;
        left: 20px;
    }
    
    .map-legend {
        bottom: 10px;
        right: 10px;
        padding: 5px;
    }
}

/* 地图主要省份样式 */
.china-map path.province {
    fill: #e8edf5;
    stroke: #cfd8e6;
    stroke-width: 1;
    transition: all 0.3s ease;
}

.china-map path.province:hover {
    fill: #d9e5f5;
    stroke: #b1c9e8;
    stroke-width: 1.5;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
}

/* 城市标记样式 */
.city-marker {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #ff6600;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.city-marker:hover {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.city-marker:hover::after {
    content: attr(title);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 20;
}

/* 地图装饰元素 */
.map-decoration {
    position: absolute;
    opacity: 0.07;
    pointer-events: none;
}

.map-decoration.grid {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(100, 120, 140, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(100, 120, 140, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
}

.map-decoration.compass {
    bottom: 40px;
    right: 40px;
    width: 100px;
    height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='45' fill='none' stroke='%23000' stroke-width='1'/%3E%3Cline x1='50' y1='5' x2='50' y2='20' stroke='%23000' stroke-width='1'/%3E%3Cline x1='50' y1='80' x2='50' y2='95' stroke='%23000' stroke-width='1'/%3E%3Cline x1='5' y1='50' x2='20' y2='50' stroke='%23000' stroke-width='1'/%3E%3Cline x1='80' y1='50' x2='95' y2='50' stroke='%23000' stroke-width='1'/%3E%3Ctext x='50' y='15' font-size='10' text-anchor='middle' fill='%23000'%3EN%3C/text%3E%3Ctext x='50' y='90' font-size='10' text-anchor='middle' fill='%23000'%3ES%3C/text%3E%3Ctext x='15' y='53' font-size='10' text-anchor='middle' fill='%23000'%3EW%3C/text%3E%3Ctext x='85' y='53' font-size='10' text-anchor='middle' fill='%23000'%3EE%3C/text%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.2;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .china-map {
        height: 480px;
    }
    
    .map-decoration.compass {
        width: 70px;
        height: 70px;
        bottom: 20px;
        right: 20px;
    }
    
    .map-title {
        font-size: 16px;
    }
} 