﻿/* 华夏文明 - 第五期功能样式 */

/* 疆域演变导览面板 */
.tour-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #faf6ee;
  border: 1px solid #c9b896;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  z-index: 9999;
  width: 480px;
  max-width: 94vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  font-family: 'Noto Serif SC', serif;
}

.tour-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #e0d5c0;
  font-size: 16px;
  font-weight: 600;
  color: #4a3728;
  background: linear-gradient(135deg, #f5ede0, #ede0cc);
  flex-shrink: 0;
}

.tour-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.tour-desc {
  font-size: 13px;
  color: #6b5344;
  line-height: 1.6;
  margin-bottom: 16px;
  padding: 10px 12px;
  background: #f5ede0;
  border-radius: 6px;
}

.tour-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  align-items: center;
}

.tour-play-btn {
  flex: 1;
  padding: 10px;
  background: linear-gradient(135deg, #8b6914, #6b4423);
  color: #f3eee4;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s;
}

.tour-play-btn:hover {
  transform: translateY(-1px);
}

.tour-speed {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b5344;
}

.tour-speed-select {
  padding: 6px 8px;
  border: 1px solid #c9b896;
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  background: #fff;
}

.tour-progress {
  font-size: 13px;
  color: #8b6914;
  font-weight: 600;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 6px;
  border-left: 3px solid #c9a96e;
  min-height: 20px;
}

.tour-dynasty-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tour-dynasty-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #e8e0d0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 60px;
}

.tour-dynasty-item:hover {
  border-color: #c9a96e;
  background: #f5ede0;
}

.tour-dynasty-item.active {
  background: linear-gradient(135deg, #8b6914, #6b4423);
  border-color: #6b4423;
}

.tour-dynasty-item.active .tour-dynasty-name,
.tour-dynasty-item.active .tour-dynasty-period {
  color: #f3eee4;
}

.tour-dynasty-name {
  font-size: 13px;
  font-weight: 700;
  color: #4a3728;
}

.tour-dynasty-period {
  font-size: 10px;
  color: #8b7355;
  margin-top: 2px;
}

/* 速记口诀面板 */
.mnemonic-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #faf6ee;
  border: 1px solid #c9b896;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  z-index: 9999;
  width: 520px;
  max-width: 94vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  font-family: 'Noto Serif SC', serif;
}

.mnemonic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #e0d5c0;
  font-size: 16px;
  font-weight: 600;
  color: #4a3728;
  background: linear-gradient(135deg, #f5ede0, #ede0cc);
  flex-shrink: 0;
}

.mnemonic-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.mnemonic-item {
  margin-bottom: 8px;
  border: 1px solid #e8e0d0;
  border-radius: 8px;
  overflow: hidden;
}

.mnemonic-title {
  padding: 12px 14px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  color: #4a3728;
  cursor: pointer;
  transition: background 0.2s;
}

.mnemonic-title:hover {
  background: #f5ede0;
}

.mnemonic-content {
  padding: 12px 14px;
  background: #faf6ee;
  border-top: 1px solid #e8e0d0;
}

.mnemonic-text {
  font-family: 'KaiTi', 'STKaiti', serif;
  font-size: 15px;
  line-height: 2;
  color: #4a3728;
  white-space: pre-wrap;
  margin: 0 0 10px 0;
}

.mnemonic-note {
  font-size: 12px;
  color: #8b7355;
  line-height: 1.6;
  padding: 8px 10px;
  background: #f5ede0;
  border-radius: 4px;
}

/* 经典战役面板 */
.battle-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #faf6ee;
  border: 1px solid #c9b896;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  z-index: 9999;
  width: 560px;
  max-width: 94vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  font-family: 'Noto Serif SC', serif;
}

.battle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #e0d5c0;
  font-size: 16px;
  font-weight: 600;
  color: #4a3728;
  background: linear-gradient(135deg, #f5ede0, #ede0cc);
  flex-shrink: 0;
}

.battle-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.battle-item {
  margin-bottom: 8px;
  border: 1px solid #e8e0d0;
  border-radius: 8px;
  overflow: hidden;
}

.battle-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.battle-title-row:hover {
  background: #f5ede0;
}

.battle-name {
  font-size: 15px;
  font-weight: 700;
  color: #4a3728;
}

.battle-year {
  font-size: 12px;
  color: #8b6914;
  font-weight: 600;
}

.battle-detail {
  padding: 14px;
  background: #faf6ee;
  border-top: 1px solid #e8e0d0;
}

.battle-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #6b5344;
}

.battle-meta span {
  background: #fff;
  padding: 4px 10px;
  border-radius: 12px;
}

.battle-result {
  font-size: 13px;
  font-weight: 700;
  color: #8b4513;
  margin-bottom: 10px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 4px;
  border-left: 3px solid #c0392b;
}

.battle-desc {
  font-size: 13px;
  line-height: 1.8;
  color: #4a3728;
  margin-bottom: 10px;
}

.battle-impact {
  font-size: 12px;
  line-height: 1.7;
  color: #6b5344;
  padding: 10px;
  background: #f5ede0;
  border-radius: 4px;
  margin-bottom: 10px;
}

.battle-locate-btn {
  width: 100%;
  padding: 8px;
  background: linear-gradient(135deg, #2d5a3d, #1a3d2a);
  color: #f3eee4;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

/* 面板关闭按钮通用 */
.panel-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #8b7355;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.panel-close:hover {
  background: #e0d5c0;
  color: #4a3728;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .tour-panel, .mnemonic-panel, .battle-panel {
    width: 96vw;
    max-height: 90vh;
  }
  .tour-controls {
    flex-direction: column;
  }
  .tour-play-btn {
    width: 100%;
  }
  .mnemonic-text {
    font-size: 14px;
  }
}
