/**
 * 跨时空双屏并行对比与圣经历史地图样式
 * Parallel Historical Atlas & Bible Map Stylesheet
 */

:root {
  --parallel-bg: #f5efe6;
  --parallel-card-bg: rgba(255, 253, 249, 0.94);
  --china-accent: #8b261e;
  --china-border: #d4a373;
  --bible-accent: #1e3d59;
  --bible-gold: #c59b27;
  --parallel-text: #2b2b2b;
  --parallel-text-muted: #666055;
  --parallel-shadow: 0 4px 18px rgba(40, 30, 20, 0.08);
}

/* 全屏双屏并行布局容器 */
.parallel-layout {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  background-color: var(--parallel-bg);
  color: var(--parallel-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  overflow: hidden;
  box-sizing: border-box;
}

/* 顶部导航与模式切换栏 */
.parallel-header {
  height: 52px;
  background: #fdfbf7;
  border-bottom: 1px solid #e3dac9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  z-index: 100;
}

.parallel-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.parallel-brand-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #3e2723;
  margin: 0;
}

.parallel-brand-badge {
  font-size: 11px;
  padding: 2px 8px;
  background: #ecd9c6;
  color: #795548;
  border-radius: 4px;
  font-weight: 600;
}

.parallel-nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-mode-btn {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #d4c5b3;
  background: #fff;
  color: #4a3e36;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-mode-btn:hover {
  background: #f4ece2;
  border-color: #bfa892;
}

.nav-mode-btn.active {
  background: #3e2723;
  color: #fff;
  border-color: #3e2723;
}

/* 中部双视窗主体容器 (Split Viewport) */
.parallel-split-body {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}

.viewport-panel {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #dfd4c4;
  background: #f7f3ec;
  overflow: hidden;
}

.viewport-panel:last-child {
  border-right: none;
}

.viewport-title-bar {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.viewport-icon {
  font-size: 14px;
}

.viewport-title-text {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

/* 图层控制条与路线选择器 */
.viewport-layer-strip {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 11.5px;
}

.layer-toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: #555;
  user-select: none;
}

.layer-toggle-chip input[type="checkbox"] {
  cursor: pointer;
}

.map-view-canvas-container {
  width: 100%;
  height: 100%;
  position: relative;
}

/* SVG 地图元素样式 */
.bible-map-canvas, .china-map-canvas {
  width: 100%;
  height: 100%;
  user-select: none;
}

.bible-water-body {
  transition: fill 0.3s;
}

.bible-settlement circle {
  transition: r 0.2s, stroke-width 0.2s;
}

.bible-settlement:hover circle {
  r: 7;
  stroke: #ffeb3b;
  stroke-width: 2.5;
}

/* 考古实证标记动画与悬停 */
.bible-archaeology-proof-pin polygon {
  transition: transform 0.2s, fill 0.2s;
  transform-origin: center;
}

.bible-archaeology-proof-pin:hover polygon {
  fill: #ffeb3b;
  stroke: #b8860b;
  stroke-width: 2.2;
}

/* 浮动中央时间控制台 (Floating Master Timeline Console) */
.parallel-timeline-console {
  position: absolute;
  bottom: 230px;
  left: 50%;
  transform: translateX(-50%);
  width: min(920px, 94vw);
  background: var(--parallel-card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid #dcd1bf;
  border-radius: 12px;
  box-shadow: var(--parallel-shadow);
  padding: 12px 20px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.year-badge-pill {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #8b261e;
  background: #faece6;
  border: 1px solid #f2cfc6;
  padding: 4px 14px;
  border-radius: 20px;
}

.timeline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ctrl-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #c9bbaa;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
}

.ctrl-btn:hover {
  background: #f0e6d8;
}

.timeline-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.timeline-range-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 8px;
  border-radius: 4px;
  background: #e2d7c5;
  outline: none;
  cursor: pointer;
}

.timeline-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #8b261e;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: grab;
  transition: transform 0.1s;
}

.timeline-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}

/* 里程碑快捷按钮横向滚动栏 */
.milestones-quick-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.milestones-quick-bar::-webkit-scrollbar {
  height: 4px;
}

.milestones-quick-bar::-webkit-scrollbar-thumb {
  background: #d4c5b3;
  border-radius: 4px;
}

.milestone-chip-btn {
  white-space: nowrap;
  font-size: 11px;
  padding: 3px 9px;
  border: 1px solid #ded3c1;
  background: #f8f4ec;
  color: #554a3e;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.milestone-chip-btn:hover {
  background: #ede2d0;
  border-color: #bfae98;
  color: #2e261d;
}

/* 底部中西文明时空并置对照看板 (Parallel Chronicle Deck) */
.parallel-chronicle-deck {
  height: 215px;
  background: #fcf9f2;
  border-top: 1px solid #dfd4c4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 12px 20px;
  gap: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  z-index: 40;
}

.chronicle-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e7ded0;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.chronicle-card.china-card {
  border-top: 3px solid var(--china-accent);
}

.chronicle-card.bible-card {
  border-top: 3px solid var(--bible-accent);
}

.card-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-dynasty-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.china-card .card-dynasty-badge {
  background: #faece6;
  color: var(--china-accent);
}

.bible-card .card-dynasty-badge {
  background: #e3edf5;
  color: var(--bible-accent);
}

.card-event-headline {
  font-size: 14.5px;
  font-weight: 700;
  color: #222;
  line-height: 1.35;
  margin: 0;
}

.card-event-details {
  font-size: 12.5px;
  color: #555;
  line-height: 1.5;
  margin: 0;
  overflow-y: auto;
}

/* 跨文明深度解析条 (Insight Banner) */
.parallel-insight-container {
  grid-column: 1 / -1;
  background: #f4ecdf;
  border-left: 4px solid var(--bible-gold);
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 12px;
  color: #4a3e30;
  line-height: 1.5;
  font-style: normal;
  display: flex;
  align-items: center;
}

/* 详情弹窗 */
.detail-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.detail-modal-overlay.active {
  display: flex;
}

.detail-modal-box {
  width: min(540px, 92vw);
  background: #fff;
  border-radius: 10px;
  border: 1px solid #dfd4c4;
  padding: 22px 26px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.modal-sub {
  font-size: 12.5px;
  color: #666;
  line-height: 1.4;
}

.modal-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: #444;
}

.modal-close-btn {
  align-self: flex-end;
  padding: 6px 16px;
  font-size: 13px;
  background: #3e2723;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
