@import url('design_tokens.css');

/* ============================================================
 * 儋州文旅 · 通用组件样式
 * 所有页面共用此类名，保证视觉统一
 * ============================================================ */

/* ---- 全局重置 ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* ---- 页面基础 ---- */
html, body {
  font-family: var(--font-family-base);
  background: var(--bg-base);
  color: var(--color-text-primary);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  font-weight: var(--font-weight-light);
}

/* ---- 手机端容器 ---- */
.page-container {
  max-width: var(--mobile-max-width);
  margin: 0 auto;
  background: var(--bg-base);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ============================================================
 *  HERO 区域
 * ============================================================ */
.hero {
  position: relative;
  height: 400px;
  background: var(--gradient-hero-deep);
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(255,255,255,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.3) 1px, transparent 1px);
  background-size: 40px 40px;
}

.hero-glow {
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
}

.hero-content {
  position: relative;
  z-index: var(--z-base);
  padding: 60px 28px 0;
  color: var(--color-text-inverse);
}

/* ---- 返回按钮 ---- */
.back-btn {
  position: absolute;
  top: calc(var(--safe-top) + 12px);
  left: 20px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: var(--z-overlay);
  transition: all var(--transition-base);
}
.back-btn:active {
  transform: scale(0.92);
}

/* ---- Hero 文字层级 ---- */
.hero-eyebrow {
  font-size: 11px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-gold-light);
  margin-bottom: var(--space-3);
  font-weight: var(--font-weight-medium);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.hero-eyebrow::after {
  content: '';
  flex: 1;
  max-width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--color-gold-light), transparent);
}

.hero-title {
  font-size: 36px;
  font-weight: var(--font-weight-light);
  line-height: 1.2;
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-3);
}
.hero-title strong {
  font-weight: var(--font-weight-semibold);
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: var(--font-weight-light);
  line-height: 1.8;
  max-width: 90%;
}

/* ---- Hero 统计栏 ---- */
.hero-stats {
  position: absolute;
  bottom: var(--space-6);
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  padding: 0 var(--space-6);
  z-index: var(--z-base);
}
.stat-item {
  text-align: center;
}
.stat-number {
  font-size: 26px;
  font-weight: var(--font-weight-semibold);
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-label {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  letter-spacing: var(--tracking-wide);
}

/* ============================================================
 *  SECTION 区块
 * ============================================================ */
.section {
  padding: 44px 28px;
}
.section-header {
  margin-bottom: 28px;
}
.section-num {
  font-size: 11px;
  letter-spacing: var(--tracking-wider);
  color: var(--color-gold);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-3);
}
.section-title {
  font-size: 22px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-2);
}
.section-title::after {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), transparent);
  margin-top: var(--space-3);
}
.section-desc {
  font-size: 13px;
  color: var(--color-text-tertiary);
  line-height: 1.8;
  margin-top: var(--space-2);
}

/* ---- 深色区块 ---- */
.section-dark {
  background: var(--bg-dark);
  color: var(--color-text-inverse);
}
.section-dark .section-title { color: var(--color-text-inverse); }
.section-dark .section-desc { color: rgba(255,255,255,0.5); }
.section-dark .section-num { color: var(--color-gold-light); }
.section-dark .section-title::after {
  background: linear-gradient(90deg, var(--color-gold), transparent);
}

/* ---- 金色区块 ---- */
.section-gold {
  background: var(--bg-gold);
}

/* ============================================================
 *  CARD 卡片
 * ============================================================ */
.heritage-card,
.spot-card,
.base-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
  position: relative;
}
.heritage-card:active,
.spot-card:active,
.base-card:active {
  transform: scale(0.98);
}

/* ---- 卡片封面 ---- */
.card-image,
.spot-cover,
.base-cover {
  position: relative;
  height: 180px;
  overflow: hidden;
}
.card-image-bg,
.spot-cover-bg,
.base-cover-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}
.card-image-overlay,
.spot-cover-overlay,
.base-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.6) 100%);
}

/* ---- 卡片徽章 ---- */
.card-badge {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  padding: 5px var(--space-3);
  background: var(--gradient-gold);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  font-size: 10px;
  color: #fff;
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-wide);
}
.card-level {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  font-size: 10px;
  color: #fff;
}

/* ---- 卡片标题 ---- */
.card-image-title,
.spot-name,
.base-name {
  position: absolute;
  bottom: var(--space-5);
  left: var(--space-5);
  right: var(--space-5);
  color: #fff;
  font-size: 20px;
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--tracking-tight);
  z-index: var(--z-base);
}

/* ---- 卡片内容区 ---- */
.card-body,
.spot-body,
.base-body {
  padding: var(--space-5) var(--space-4);
}

.card-meta {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 11px;
  color: var(--color-text-tertiary);
}

.card-text,
.spot-desc,
.base-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.85;
  font-weight: var(--font-weight-light);
}

/* ---- 卡片标签 ---- */
.card-tags,
.spot-tags,
.base-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.card-tag,
.spot-tag,
.base-feature {
  padding: 4px var(--space-3);
  background: var(--color-primary-bg);
  border-radius: var(--radius-sm);
  font-size: 10px;
  color: var(--color-primary);
}

/* ============================================================
 *  TIMELINE 时间线
 * ============================================================ */
.timeline-section {
  background: var(--bg-dark);
  color: var(--color-text-inverse);
  padding: 52px 28px;
  position: relative;
  overflow: hidden;
}
.timeline-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at top right, rgba(201, 169, 98, 0.08), transparent 60%);
}
.timeline {
  position: relative;
  padding-left: var(--space-8);
  margin-top: var(--space-8);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, var(--color-gold), rgba(201, 169, 98, 0.1));
}
.timeline-item {
  position: relative;
  margin-bottom: var(--space-8);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
  box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.2);
}
.timeline-year {
  font-size: 11px;
  letter-spacing: var(--tracking-wide);
  color: var(--color-gold-light);
  margin-bottom: var(--space-2);
  font-weight: var(--font-weight-medium);
}
.timeline-title {
  font-size: 15px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-inverse);
  margin-bottom: var(--space-2);
}
.timeline-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
}

/* ============================================================
 *  GRID 网格
 * ============================================================ */
.exp-grid,
.city-grid,
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.feature-grid {
  grid-template-columns: repeat(3, 1fr);
}

.exp-card,
.city-item,
.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base);
}
.exp-card:active { transform: scale(0.95); }

.exp-icon,
.feature-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto var(--space-3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: linear-gradient(135deg, var(--color-primary-bg), #D1ECF1);
}
.exp-name,
.feature-name {
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}
.exp-loc,
.feature-num {
  font-size: 10px;
  color: var(--color-text-tertiary);
}

/* ============================================================
 *  标签页 TABS
 * ============================================================ */
.tabs {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-6) var(--space-3);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-5);
  background: var(--bg-card);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--color-text-tertiary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}
.tab.active {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}

/* ============================================================
 *  HONORS 荣誉
 * ============================================================ */
.honors-section {
  background: var(--bg-gold);
  padding: var(--space-8) var(--space-7);
  margin: 0 -28px -44px;
}
.honors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.honor-item {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
  border: 1px solid rgba(201, 169, 98, 0.2);
}
.honor-icon { font-size: 22px; margin-bottom: var(--space-2); }
.honor-text { font-size: 11px; color: var(--color-gold-deep); font-weight: var(--font-weight-medium); }

/* ============================================================
 *  CITY ITEM 市级名录项
 * ============================================================ */
.city-item {
  text-align: left;
  border-left: 3px solid var(--color-gold);
  padding: var(--space-4) var(--space-3);
}
.city-name {
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}
.city-cat {
  font-size: 10px;
  color: var(--color-text-tertiary);
}

/* ============================================================
 *  ROUTE 路线
 * ============================================================ */
.route-section {
  background: var(--bg-card);
  margin: 0 -28px;
  padding: var(--space-10) var(--space-7);
}
.route-card {
  background: linear-gradient(135deg, #F8FAFC 0%, #EEF2F7 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5);
  margin-bottom: var(--space-4);
  border-left: 4px solid var(--color-primary);
  position: relative;
  overflow: hidden;
}
.route-tag {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-3);
}
.route-name {
  font-size: 17px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}
.route-meta {
  display: flex;
  gap: var(--space-6);
  font-size: 11px;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-4);
}
.route-days {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.route-day {
  font-size: 12px;
  color: var(--color-text-secondary);
  padding-left: var(--space-5);
  position: relative;
  line-height: 1.6;
}
.route-day::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-primary-lighter);
}
.route-day strong {
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
}

/* ============================================================
 *  FOOTER
 * ============================================================ */
.footer {
  text-align: center;
  padding: var(--space-8) var(--space-7) var(--space-12);
  color: var(--color-text-tertiary);
  font-size: 11px;
  letter-spacing: var(--tracking-wider);
  border-top: 1px solid #E8EEF3;
}
.footer-brand {
  font-size: 14px;
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-2);
  letter-spacing: var(--tracking-widest);
}

/* ============================================================
 *  浮动按钮
 * ============================================================ */
.float-wrap {
  position: fixed;
  right: 14px;
  bottom: 120px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.float-btn {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  text-align: center;
  line-height: 1.1;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(255, 255, 255, 0.65);
  transition: transform var(--transition-base);
}
.float-btn:active { transform: scale(0.92); }
.float-btn.feiyi {
  background: var(--gradient-gold);
}
.float-btn.yanxue {
  background: var(--gradient-primary);
}
.float-btn.jingqu {
  background: var(--gradient-sunset);
}

/* ============================================================
 *  渐变背景工具类
 * ============================================================ */
.bg-culture { background: linear-gradient(135deg, #1A3A5C 0%, #0D1F33 100%); }
.bg-heritage { background: linear-gradient(135deg, #8B0000 0%, #4A0000 100%); }
.bg-nature { background: linear-gradient(135deg, #2C5F2D 0%, #1A3A1B 100%); }
.bg-ocean { background: linear-gradient(135deg, #0F4C75 0%, #0A2F4A 100%); }
.bg-gold { background: linear-gradient(135deg, #B8860B 0%, #8B6914 100%); }
.bg-sunset { background: linear-gradient(135deg, #E8884C 0%, #C96A2E 100%); }
.bg-forest { background: linear-gradient(135deg, #1E7E6F 0%, #0D4D42 100%); }
.bg-ancient { background: linear-gradient(135deg, #6B3FA0 0%, #3A1F5C 100%); }
.bg-red { background: linear-gradient(135deg, #922B21 0%, #5C1A13 100%); }
.bg-warm { background: linear-gradient(135deg, #8B4513 0%, #5C2E0A 100%); }
