* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f4f6f9 url("images/bg.jpg") center/cover fixed no-repeat;
  color: #1f2a44;
  line-height: 1.6;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  z-index: -1;
}

.topbar {
  background: #1f6feb;
  color: #fff;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.topbar .title { font-size: 20px; font-weight: 700; }
.topbar .summary { font-size: 14px; opacity: .9; }

.tab-bar {
  padding: 10px 20px 0;
  max-width: 1200px;
  margin: 0 auto;
}
.tab-row {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e3e8f0;
}
.tab-row.sub {
  padding-left: 8px;
  border-bottom: none;
  margin-top: 2px;
}
.tab {
  appearance: none;
  border: 1px solid #e3e8f0;
  border-bottom: none;
  background: #eef2f7;
  color: #4a5468;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  position: relative;
  top: 1px;
  transition: background .15s, color .15s;
}
.tab:hover { background: #e2e9f3; }
.tab.active {
  background: #fff;
  color: #1f6feb;
  font-weight: 700;
  border-color: #e3e8f0;
}
/* 第二级 Tab 更小 */
.tab-row.sub .tab {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 6px 6px 0 0;
  border: 1px solid transparent;
  background: transparent;
  color: #6b7890;
}
.tab-row.sub .tab:hover { background: #eef2f7; color: #4a5468; }
.tab-row.sub .tab.active {
  background: #eef4ff;
  color: #1f6feb;
  font-weight: 600;
}

.layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.map-panel { display: flex; flex-direction: column; gap: 14px; }

.map-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  background: #ddd;
}
.map-base {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #cfd8e8;
}

.route-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hotspots { position: absolute; inset: 0; }
.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1f6feb;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: transform .15s, background .15s;
  z-index: 2;
}
.hotspot:hover { transform: translate(-50%, -50%) scale(1.15); }
.hotspot.active { background: #e8533f; }
.hotspot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(31,111,235,.5);
  animation: pulse 1.6s ease-out infinite;
}
.hotspot.active::after { border-color: rgba(232,83,63,.6); }
@keyframes pulse {
  0% { transform: scale(1); opacity: .8; }
  100% { transform: scale(2.2); opacity: 0; }
}

.stepper { display: flex; gap: 8px; flex-wrap: wrap; }
.step {
  flex: 1;
  min-width: 140px;
  background: #fff;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  transition: border-color .15s, background .15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.step-head {
  display: flex;
  align-items: baseline;
  font-weight: 600;
}
.step .num { color: #1f6feb; font-weight: 700; margin-right: 4px; }
.step-time { font-size: 12px; color: #6b7890; }
.step.active { border-color: #1f6feb; background: #eef4ff; }
.step.active .step-time { color: #1f6feb; font-weight: 500; }

.detail-panel {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 20px;
  align-self: start;
}
.node-badge {
  align-self: flex-start;
  background: #eef4ff;
  color: #1f6feb;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.node-photo {
  width: 100%;
  border-radius: 8px;
  display: block;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #eee;
}
.node-title { font-size: 18px; }
.node-desc { font-size: 15px; color: #4a5468; }

.nav-buttons { display: flex; gap: 10px; margin-top: 6px; }
.nav-buttons button {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #1f6feb;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s;
}
.nav-buttons button:hover { background: #1858c4; }
.nav-buttons button:disabled { background: #c5cdda; cursor: not-allowed; }

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .detail-panel { position: static; }
}

/* ========== 景点推荐 ========== */
.attractions {
  max-width: 1200px;
  margin: 28px auto 0;
  padding: 0 20px;
}
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #1f2a44;
  margin-bottom: 12px;
}
.attractions-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
}
.attractions-scroll::-webkit-scrollbar {
  height: 6px;
}
.attractions-scroll::-webkit-scrollbar-thumb {
  background: #c5cdda;
  border-radius: 3px;
}
.attraction-card {
  flex: 0 0 auto;
  width: 240px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  scroll-snap-align: start;
}
.attraction-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.attraction-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: #dfe6f0;
}
.attraction-info { padding: 12px 14px 14px; }
.attraction-name {
  font-size: 15px;
  font-weight: 700;
  color: #1f2a44;
  margin-bottom: 4px;
}
.attraction-summary {
  font-size: 13px;
  color: #6b7890;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 景点详情弹窗 */
.attraction-detail {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.attraction-detail[hidden] { display: none; }
.detail-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background .15s;
}
.detail-close:hover { background: #fff; }
.detail-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 0;
  animation: detailIn .2s ease-out;
}
@keyframes detailIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.detail-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  border-radius: 16px 16px 0 0;
  background: #dfe6f0;
}
.detail-name {
  font-size: 20px;
  font-weight: 700;
  padding: 18px 24px 8px;
  color: #1f2a44;
}
.detail-desc {
  padding: 0 24px;
  font-size: 14px;
  color: #4a5468;
  line-height: 1.7;
  white-space: pre-line;
}
.detail-plans {
  padding: 16px 24px 24px;
}
.detail-plans h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #1f6feb;
}
.plan-item {
  background: #f4f6f9;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #4a5468;
  line-height: 1.6;
}
.plan-item strong { color: #1f2a44; }

.detail-address {
  padding: 0 24px 4px;
  font-size: 13px;
  color: #6b7890;
  line-height: 1.6;
}

.detail-nav {
  display: flex;
  gap: 10px;
  padding: 12px 24px 24px;
}
.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 11px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  transition: opacity .15s, transform .1s;
}
.nav-btn:hover { opacity: .88; transform: translateY(-1px); }
.nav-btn.baidu { background: #2319dc; }
.nav-btn.amap { background: #00b7eb; }

/* 美食区域 */
.foods {
  max-width: 1200px;
  margin: 28px auto 40px;
  padding: 0 20px;
}

.food-card {
  border-top: 3px solid #e8533f;
}
.food-card:hover {
  border-top-color: #d13d28;
}

.food-meta {
  display: flex;
  gap: 12px;
  padding: 10px 24px;
  flex-wrap: wrap;
}
.meta-item {
  background: #f4f6f9;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 13px;
  color: #4a5468;
}
