/* ===== 潮汕旅行攻略 - 样式表 v2 ===== */
/* 手机优先设计 */

/* --- 基础变量 --- */
:root {
  --primary: #0f766e;
  --primary-light: #14b8a6;
  --secondary: #0369a1;
  --accent: #f97316;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #ca8a04;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.07), 0 12px 24px rgba(0,0,0,0.08);
}

/* --- Reset & Base --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 72px;
}
@media (min-width: 768px) { body { padding-bottom: 0; } }

/* --- 排版 --- */
.font-serif { font-family: 'Noto Serif SC', 'STSong', Georgia, serif; }
h1, h2, h3, h4 { line-height: 1.3; color: var(--text); }

/* --- Hero --- */
.hero {
  min-height: 60vh;
  background: linear-gradient(160deg, #0f766e 0%, #0369a1 50%, #1e40af 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 2rem 1.25rem;
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) { .hero { min-height: 80vh; padding: 3rem 2rem; } }
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("https://images.unsplash.com/photo-1537531383496-f4749b76ceba?w=1200") center/cover;
  opacity: 0.2;
  mix-blend-mode: overlay;
}
.hero-content { position: relative; z-index: 1; max-width: 600px; }
.hero h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
@media (min-width: 768px) { .hero h1 { font-size: 3.5rem; } }
.hero .subtitle {
  font-size: 0.9rem;
  opacity: 0.95;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}
@media (min-width: 768px) { .hero .subtitle { font-size: 1.1rem; } }
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.hero-tag {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* --- 概览卡片 --- */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 0 1rem;
  max-width: 600px;
  margin: -1.5rem auto 0;
  position: relative;
  z-index: 2;
}
@media (min-width: 768px) {
  .overview-grid { gap: 1rem; max-width: 800px; margin-top: -2rem; }
}
.overview-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 0.875rem 0.75rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.overview-card .emoji { font-size: 1.5rem; margin-bottom: 0.25rem; display: block; }
.overview-card h3 { font-size: 0.75rem; color: var(--text); font-weight: 600; }
.overview-card p { font-size: 0.65rem; color: var(--text-light); margin-top: 0.15rem; }

/* --- Section --- */
.section {
  padding: 2rem 1rem;
  max-width: 800px;
  margin: 0 auto;
}
@media (min-width: 768px) { .section { padding: 3rem 2rem; } }
.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.25rem;
}
@media (min-width: 768px) { .section-title { font-size: 1.75rem; } }
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 0.8rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 768px) { .section-subtitle { font-size: 0.9rem; margin-bottom: 2rem; } }

/* --- 卡片 --- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 0.875rem;
}
.card-header {
  padding: 0.875rem 1rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-header.blue { background: linear-gradient(135deg, var(--secondary), #0284c7); }
.card-header.gradient { background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.card-header.warn { background: linear-gradient(135deg, #ea580c, var(--danger)); }
.card-header h3 { font-size: 0.9rem; font-weight: 700; }
.card-header p { font-size: 0.7rem; opacity: 0.9; margin-top: 0.1rem; }
.card-body { padding: 0.875rem 1rem; }
@media (min-width: 768px) {
  .card { margin-bottom: 1rem; }
  .card-header { padding: 1rem 1.25rem; }
  .card-header h3 { font-size: 1rem; }
  .card-body { padding: 1rem 1.25rem; }
}

/* --- 天气条 --- */
.weather-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.weather-bar::-webkit-scrollbar { display: none; }
.weather-day {
  flex-shrink: 0;
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.7rem;
  text-align: center;
  min-width: 68px;
  box-shadow: var(--shadow);
  font-size: 0.7rem;
}
.weather-day .day { font-weight: 700; color: var(--text); }
.weather-day .icon { font-size: 1.25rem; margin: 0.2rem 0; display: block; }
.weather-day .temp { color: var(--accent); font-weight: 700; }
.weather-day .rain { color: var(--secondary); font-size: 0.65rem; }

/* --- 航班卡片 --- */
.flight-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
}
.flight-card:last-child { border-bottom: none; }
.flight-card.recommended { background: linear-gradient(90deg, rgba(20,184,166,0.08), transparent); }
.flight-time { font-weight: 700; color: var(--text); font-size: 0.9rem; }
.flight-no { font-size: 0.65rem; color: var(--text-light); }
.flight-price { font-weight: 700; color: var(--accent); font-size: 0.85rem; white-space: nowrap; }
.flight-arrow { color: var(--primary); font-size: 0.75rem; }
.recommend-badge {
  background: var(--primary);
  color: white;
  font-size: 0.55rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* --- 酒店卡片 --- */
.hotel-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  margin-bottom: 0.75rem;
  border-left: 3px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s;
}
.hotel-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.hotel-card.rec { border-left-color: var(--success); }
.hotel-card .hotel-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.35rem; }
.hotel-card .hotel-name { font-weight: 700; color: var(--text); font-size: 0.9rem; flex: 1; }
.hotel-card .hotel-price { font-weight: 800; color: var(--accent); font-size: 1rem; }
.hotel-card .hotel-meta { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.35rem; }
.hotel-card .hotel-score { color: var(--primary); font-weight: 700; font-size: 0.8rem; }
.hotel-card .hotel-reviews { color: var(--text-light); font-size: 0.7rem; }
.hotel-card .hotel-info { font-size: 0.75rem; color: var(--text-light); line-height: 1.5; }
.hotel-tag {
  display: inline-block;
  font-size: 0.6rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 600;
  margin-right: 0.35rem;
}
.hotel-tag.rec { background: #dcfce7; color: #166534; }
.hotel-tag.price { background: #fef3c7; color: #92400e; }
.hotel-tag.view { background: #dbeafe; color: #1e40af; }
.hotel-tag.warn { background: #fee2e2; color: #991b1b; }

/* --- 时间线 --- */
.timeline { position: relative; padding-left: 1.75rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0.45rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--primary-light), var(--secondary));
  border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 0.6rem; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -1.45rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--card);
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-dot.meal { background: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.timeline-dot.hotel { background: var(--warning); box-shadow: 0 0 0 2px var(--warning); }
.timeline-dot.drive { background: #8b5cf6; box-shadow: 0 0 0 2px #8b5cf6; }
.timeline-time {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.15rem;
}
.timeline-time.meal { color: var(--accent); }
.timeline-time.hotel { color: var(--warning); }
.timeline-time.drive { color: #8b5cf6; }
.timeline-content {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  box-shadow: var(--shadow);
  font-size: 0.8rem;
}
.timeline-content strong { color: var(--text); }
.timeline-content .detail { font-size: 0.7rem; color: var(--text-light); margin-top: 0.2rem; line-height: 1.5; }

/* --- Day 标签 --- */
.day-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.875rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius);
  color: white;
}
.day-badge {
  background: rgba(255,255,255,0.2);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}
.day-title { font-size: 0.95rem; font-weight: 700; flex: 1; }
.day-date { font-size: 0.75rem; opacity: 0.9; }

/* --- 交通方案卡片 --- */
.transport-option {
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
}
.transport-option.rec {
  background: linear-gradient(135deg, rgba(20,184,166,0.05), rgba(3,105,161,0.05));
  border-color: var(--primary);
}
.transport-option.normal { background: var(--card); }
.transport-option .t-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.2rem; }
.transport-option .t-name { font-weight: 700; color: var(--text); font-size: 0.85rem; }
.transport-option .t-price { font-weight: 700; color: var(--accent); font-size: 0.85rem; }
.transport-option .t-desc { font-size: 0.7rem; color: var(--text-light); line-height: 1.5; }

/* --- 路线条 --- */
.route-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
}
.route-item .r-name { font-weight: 600; color: var(--text); }
.route-item .r-info { color: var(--text-light); font-size: 0.7rem; }
.route-item.total {
  background: linear-gradient(135deg, rgba(20,184,166,0.1), rgba(3,105,161,0.1));
  border: 1px solid rgba(20,184,166,0.2);
}

/* --- 费用网格 --- */
.cost-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
@media (min-width: 768px) { .cost-grid { grid-template-columns: repeat(3, 1fr); } }
.cost-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  text-align: center;
}
.cost-item .label { font-size: 0.65rem; color: var(--text-light); }
.cost-item .value { font-weight: 700; color: var(--text); font-size: 0.9rem; margin-top: 0.1rem; }
.cost-item.total {
  background: linear-gradient(135deg, rgba(249,115,22,0.1), rgba(234,88,12,0.1));
  grid-column: span 2;
}
@media (min-width: 768px) { .cost-item.total { grid-column: span 3; } }
.cost-item.total .value { color: var(--accent); font-size: 1.1rem; }
.cost-item.total .sub { font-size: 0.65rem; color: var(--text-light); }

/* --- 避坑条目 --- */
.trap-item {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}
.trap-badge {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: var(--danger);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  flex-shrink: 0;
}
.trap-text .trap-title { font-weight: 700; color: var(--text); font-size: 0.8rem; margin-bottom: 0.1rem; }
.trap-text .trap-desc { font-size: 0.7rem; color: var(--text-light); line-height: 1.5; }

/* --- 美食网格 --- */
.food-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 768px) { .food-grid { grid-template-columns: repeat(2, 1fr); } }
.food-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
  box-shadow: var(--shadow);
}
.food-card .food-area { font-weight: 700; color: var(--text); font-size: 0.85rem; margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.35rem; }
.food-card .food-area::before { content: ''; width: 3px; height: 1em; background: var(--primary); border-radius: 2px; }
.food-card .food-item { font-size: 0.75rem; color: var(--text); padding: 0.2rem 0; display: flex; justify-content: space-between; }
.food-card .food-shop { color: var(--primary); font-weight: 600; }

/* --- 预算 --- */
.budget-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.budget-row .b-label { color: var(--text-light); }
.budget-row .b-value { font-weight: 700; color: var(--text); }
.budget-row.total { border-bottom: none; border-top: 2px solid var(--primary); padding-top: 0.875rem; margin-top: 0.25rem; }
.budget-row.total .b-value { color: var(--accent); font-size: 1.15rem; }

/* --- 提示卡片 --- */
.tip-card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  border-left: 3px solid var(--primary);
}
.tip-card .tip-num { font-weight: 700; color: var(--primary); margin-right: 0.3rem; }

/* --- 底部导航 --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}
@media (min-width: 768px) { .bottom-nav { display: none; } }
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0;
  font-size: 0.6rem;
  color: var(--text-light);
  text-decoration: none;
  min-height: 52px;
  transition: all 0.2s;
  position: relative;
}
.nav-item.active { color: var(--primary); }
.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
}
.nav-item .nav-icon { font-size: 1.2rem; margin-bottom: 0.15rem; }

/* --- 分隔线 --- */
.section-divider {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}
.section-divider::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

/* --- 提示框 --- */
.info-box {
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  font-size: 0.75rem;
  margin-top: 0.5rem;
  border-left: 3px solid;
}
.info-box.blue { background: #eff6ff; color: var(--secondary); border-color: var(--secondary); }
.info-box.orange { background: #fff7ed; color: #c2410c; border-color: var(--accent); }
.info-box.green { background: #f0fdf4; color: #166534; border-color: var(--success); }

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-light);
  font-size: 0.75rem;
  background: var(--bg);
}
@media (min-width: 768px) { .footer { padding: 3rem 2rem; } }

/* --- 雨季标签 --- */
.rain-tag {
  display: inline-block;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  font-size: 0.6rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
}

/* --- 滚动条美化 --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* --- 选中样式 --- */
::selection { background: var(--primary); color: white; }

/* --- 动画 --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.card, .hotel-card, .food-card { animation: fadeIn 0.3s ease-out; }
