* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #1a1a1a;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.map-container {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: default;
    overflow: hidden;
    background: #000;
}

.map-container.grab-cursor {
    cursor: grab;
}

.map-container.dragging {
    cursor: grabbing !important;
}

#mapImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    user-select: none;
    transition: transform 0.1s ease-out;
    transform-origin: center center;
}

#hotspots {
    position: absolute;
    /* top, left, width, height 将由 JavaScript 动态设置以匹配实际图片显示区域 */
    pointer-events: none;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
}

.hotspot {
    position: absolute;
    cursor: pointer !important;
    z-index: 10;
    pointer-events: auto;
}

.hotspot * {
    cursor: pointer !important;
}

.hotspot-area {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 去掉悬浮高亮效果 */
.hotspot:hover .hotspot-area {
    background: transparent;
    border: none;
}

.hotspot-label {
    font-size: 12px;
    font-weight: bold;
    color: #2d3748;
    text-align: center;
    padding: 5px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 3px;
    display: none;
    white-space: nowrap;
    pointer-events: none;
}

.hotspot:hover .hotspot-label {
    display: block;
}

/* 缩放控制按钮 */
.zoom-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    backdrop-filter: blur(10px);
}

.zoom-controls button {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 20px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.zoom-controls button:hover {
    background: #fff;
    transform: scale(1.1);
}

.zoom-controls button:active {
    transform: scale(0.95);
}

.zoom-level {
    color: white;
    font-size: 12px;
    text-align: center;
    margin-top: 5px;
    font-weight: bold;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 600px;
    animation: slideDown 0.4s ease;
    position: relative;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #e53e3e;
}

#modal-title {
    color: #2d3748;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #4299e1;
    font-size: 1.8em;
}

#modal-body {
    color: #4a5568;
    line-height: 1.8;
    font-size: 1.1em;
}

#modal-body p {
    margin-bottom: 15px;
}

#modal-body ul {
    list-style: none;
    padding-left: 0;
}

#modal-body li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

#modal-body li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #4299e1;
    font-weight: bold;
}

/* 加载提示 */
#loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    z-index: 2000;
    font-size: 1.2em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .zoom-controls {
        top: 10px;
        right: 10px;
        padding: 5px;
    }
    
    .zoom-controls button {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    #modal-title {
        font-size: 1.4em;
    }
    
    #modal-body {
        font-size: 1em;
    }
}

/* 美化滚动条 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
