/* static/css/ancientMapModal.css */

body, html {
    margin: 0;
    padding: 0;
}

.ancient-map-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    overflow: hidden;
}

.ancient-map-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
}

.ancient-map-modal-content {
    position: relative;
    background-color: transparent;
    border-radius: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    overflow: hidden;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.ancient-map-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 20px;
    background: linear-gradient(135deg, #1f2b21 0%, #1f2b21 100%);
    color: white;
}

.ancient-map-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.ancient-map-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.ancient-map-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ancient-map-modal-body {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    /* 完全透明 */
    background-color: transparent;
}




.ancient-map-image.dragging {
    cursor: grabbing;
}

.ancient-map-image:active {
    cursor: grabbing;
}

.ancient-map-zoom-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.zoom-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.zoom-btn:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ancient-map-title {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
}




/* 根容器：建立定位上下文，所有绝对定位元素以此为基准 */
.ancient-map-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
}

/* 地图图片：居中 + 变换基准 */
/* 地图图片：居中 + 变换基准 */
.ancient-map-image {
  position: absolute;
  /* 👇 把 left/top 改成 auto，让 JS 控制 */
  left: auto;
  top: auto;
  /* 缩放/位移中心固定在元素中心 */
  transform-origin: center center;
  pointer-events: auto;
}


.landmark-badge {

  font-size: 18px;
  color: #960707;
}

/* 黄色标注线：独立变换，不参与地图缩放拖动 */
.ancient-map-highlight-line {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 100%;
  background-color: #ff004a;
  cursor: ew-resize;
  z-index: 10;
}
.ancient-map-line-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  background-color: #ffcc00;
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
}
.ancient-map-line-marker.dragging {
  background-color: #ff9900;
}


/* 黄色标注线 */
.ancient-map-line-marker:hover {
    background: #ffea00;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
}




/* 地图定位标记样式 */
.ancient-map-landmark-marker {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    transform-origin: center center;
}

.circle-dot-marker {
    width: 45px;
    height: 45px;
    border: 2px solid rgba(217, 48, 37, 0.6); /* 红色外圈半透明 */
    border-radius: 50%;
    background: rgba(255,255,255,0.2); /* 背景几乎透明 */
    display: flex;
    align-items: center;
    justify-content: center;
}
.circle-dot-marker::after {
    content: '';
    width: 6px;
    height: 6px;
    background: rgba(217, 48, 37, 0.8); /* 中心点半透明 */
    border-radius: 50%;
}






.ancient-map-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    /* background: rgba(0, 0, 0, 0.8); */
}

.pagination-btn {
    padding: 8px 20px;
    background: rgba(139, 69, 19, 0.9);
    color: #000000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(101, 67, 33, 0.95);
    transform: scale(1.05);
}

.pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 14px;
    color: #666;
    min-width: 60px;
    text-align: center;
}

.ancient-map-modal-footer {
    display: none;
}

.ancient-map-close-btn-large {
    padding: 10px 30px;
    background: #8B4513;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.ancient-map-close-btn-large:hover {
    background: #654321;
}

.territory-polygon {
    cursor: pointer;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .ancient-map-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .ancient-map-container {
        height: 300px;
    }
    
    .ancient-map-modal-header h3 {
        font-size: 16px;
    }
}