/* ===== 现代风格主题 (theme-modern.css) ===== */
/* 气质:旅行杂志感 × 信息设计精度
   参考:National Geographic + 精致设计系统
   字体:全程 Noto Sans SC(含正文),这是与另两个模板的核心区分 */

/* ─── 1. 页面背景 ─────────────────────────────────────── */
body[data-theme="modern"] {
  background: var(--bg);
}

/* ─── 2. 行程标题 ─────────────────────────────────────── */
body[data-theme="modern"] .trip-header h1 {
  font-family: var(--sans);
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--primary);
}

/* ─── 3. 副标题(#trip-sub):主色分割线在文字上方 ──────── */
body[data-theme="modern"] .trip-header p {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  color: #555;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px solid var(--primary);
  display: inline-block;  /* 让 border-top 仅贴着文字宽度 */
}

/* ─── 4. 数据横幅 ─────────────────────────────────────── */
body[data-theme="modern"] .stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
  margin: 24px 0 12px;
}

body[data-theme="modern"] .stat {
  padding: 16px 6px;
  position: relative;
}

/* 相邻格之间加竖线分隔 */
body[data-theme="modern"] .stat + .stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--line);
}

body[data-theme="modern"] .stat-v {
  font-family: var(--sans);
  font-size: 32px;
  font-weight: 900;
  color: var(--primary);
}

body[data-theme="modern"] .stat-u {
  font-size: 13px;
  font-weight: 400;
  color: var(--primary);
  opacity: 0.7;
}

body[data-theme="modern"] .stat-label {
  font-family: var(--sans);
  font-size: 12px;
  color: #888;
  margin-top: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ─── 5. 天标签:主色实心胶囊 ─────────────────────────── */
body[data-theme="modern"] .day-label {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  padding: 3px 18px;
  border-radius: 999px;
}

/* ─── 6. 天元信息 ─────────────────────────────────────── */
body[data-theme="modern"] .day-meta {
  font-family: var(--sans);
  font-size: 13px;
  color: #888;
}

/* ─── 7. 天概括:左侧主色竖线 ─────────────────────────── */
body[data-theme="modern"] .day-summary {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  color: #555;
  line-height: 1.8;
  border-left: 3px solid var(--primary);
  padding-left: 12px;
  margin-bottom: 24px;
}

/* ─── 8. 停留点卡片 ───────────────────────────────────── */
body[data-theme="modern"] .entry {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
  padding: 32px 28px 28px;
  /* 入场动画:现代模板无斜转,保持水平 */
  transform: translateY(18px);
}

body[data-theme="modern"] .entry.in {
  transform: none;
}

/* 暗色模式下卡片背景 */
@media (prefers-color-scheme: dark) {
  body[data-theme="modern"] .entry {
    background: var(--surface);
  }
}

/* ─── 9. 地名标签(washi):主色圆角胶囊,去掉胶带毛边 ─── */
body[data-theme="modern"] .washi {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border-radius: 999px;
  padding: 4px 14px;
  transform: rotate(-2deg);
  opacity: 1;
  box-shadow: 0 2px 6px rgba(46, 122, 94, .28);
  -webkit-mask-image: none;
  mask-image: none;
}

/* ─── 10. 邮戳:主色实心,白字,小圆角 ──────────────────── */
body[data-theme="modern"] .stamp {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 6px;
  padding: 3px 9px;
  transform: rotate(2deg);
  opacity: 1;
  /* 重置手帐风的圆形邮戳尺寸 */
  width: auto;
  height: auto;
  display: block;
  text-align: left;
  white-space: nowrap;
  word-break: normal;
  line-height: 1.4;
}

/* ─── 11. 拍立得:交错旋转,hover 复位 + 微缩放 ─────────── */
body[data-theme="modern"] .polaroid {
  background: #fff;
  padding: 7px 7px 20px;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  transition: transform .22s ease, box-shadow .22s ease;
}

body[data-theme="modern"] .polaroid:nth-child(odd) {
  transform: rotate(-1.5deg);
}

body[data-theme="modern"] .polaroid:nth-child(even) {
  transform: rotate(1.2deg);
}

body[data-theme="modern"] .polaroid:hover {
  transform: rotate(0) scale(1.03);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
  z-index: 2;
}

/* ─── 12. 拍立得图片比例 ──────────────────────────────── */
body[data-theme="modern"] .polaroid img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* ─── 13. 游记正文:Noto Sans SC,较宽行距 ────────────── */
body[data-theme="modern"] .entry-text {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.95;
  color: var(--text);
  margin-top: 8px;
}

/* ─── 14. 步行间隔:主色,细虚线连接视觉 ──────────────── */
body[data-theme="modern"] .walk-gap {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--primary);
  letter-spacing: 1px;
  text-align: center;
  margin: 4px 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* 两侧细虚线 */
body[data-theme="modern"] .walk-gap::before,
body[data-theme="modern"] .walk-gap::after {
  content: '';
  flex: 1;
  height: 1px;
  border-top: 1px dashed rgba(46, 122, 94, .35);
}

/* ─── 15. 收尾语 ──────────────────────────────────────── */
body[data-theme="modern"] .closing {
  font-family: var(--sans);
  font-size: 18px;
  color: var(--primary);
  text-align: center;
  border-top: 1px dashed var(--line);
  padding-top: 32px;
  margin-top: 24px;
  font-weight: 500;
}

/* ─── 16. 地图字幕:白色胶囊,深字,无胶带装饰 ────────── */
body[data-theme="modern"] .map-caption {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  color: #2B2723;
  background: rgba(255, 255, 255, .97);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  /* 重置手帐风的斜转 */
  transform: translateY(-4px);
}

body[data-theme="modern"] .map-caption.show {
  transform: none;
}

body[data-theme="modern"] .map-caption::before {
  display: none;
}

/* 暗色模式下字幕文字颜色保持深色(背景已是白色) */
@media (prefers-color-scheme: dark) {
  body[data-theme="modern"] .map-caption {
    background: rgba(255, 255, 255, .97);
    color: #2B2723;
  }
}

/* ─── 17. 地图停留点圆点 ─────────────────────────────── */
body[data-theme="modern"] .map-dot {
  background: var(--primary);
  color: #fff;
  border: 2px solid #fff;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 12px;
}

/* ─── 18. 移动端响应式 ───────────────────────────────── */
@media (max-width: 600px) {
  body[data-theme="modern"] .trip-header h1 {
    font-size: 27px;
  }

  body[data-theme="modern"] .trip-header p {
    font-size: 13px;
  }

  body[data-theme="modern"] .stat-v {
    font-size: 22px;
  }

  body[data-theme="modern"] .stat-label {
    font-size: 10px;
  }

  body[data-theme="modern"] .day-label {
    font-size: 15px;
    padding: 2px 14px;
  }

  body[data-theme="modern"] .day-summary {
    font-size: 14px;
  }

  body[data-theme="modern"] .entry {
    padding: 26px 16px 20px;
  }

  body[data-theme="modern"] .washi {
    font-size: 12px;
    padding: 3px 11px;
  }

  body[data-theme="modern"] .entry-text {
    font-size: 14px;
    line-height: 1.85;
  }

  body[data-theme="modern"] .closing {
    font-size: 15px;
    padding-top: 24px;
  }

  body[data-theme="modern"] .map-caption {
    font-size: 12px;
  }
}
