/* ==================== 漫步中国 - 主样式表 v3 ==================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600;700;900&display=swap');

:root {
  --primary: #0f2847;
  --primary-light: #1e4d8c;
  --primary-lighter: #3b82f6;
  --gold: #b8942e;
  --gold-light: #e8d5a3;
  --gold-dark: #8b6914;
  --bg: #f0f4f8;
  --bg-card: #ffffff;
  --bg-dark: #0f172a;
  --text: #1a202c;
  --text-light: #4a5568;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow: 0 4px 20px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, 'Segoe UI', sans-serif;
  background: #f5f7fa;
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .serif {
  font-family: 'Noto Serif SC', 'SimSun', 'STSong', serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ==================== 导航栏 ==================== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }

.nav-logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15,40,71,0.2);
  flex-shrink: 0;
}

.nav-title {
  font-size: 22px; font-weight: 700; color: var(--primary);
  font-family: 'Noto Serif SC', serif; letter-spacing: 1px;
}

.nav-links { display: flex; gap: 36px; list-style: none; }

.nav-links a {
  text-decoration: none; color: var(--text-light); font-size: 14px;
  font-weight: 500; transition: var(--transition); position: relative;
  padding: 4px 0;
}

.nav-links a:hover, .nav-links a.active { color: var(--primary); }

.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px; background: var(--gold);
  border-radius: 1px; transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* ==================== Hero ==================== */
.hero {
  margin-top: 68px;
  padding: 64px 48px 48px;
  text-align: center;
  background: linear-gradient(180deg, rgba(15,40,71,0.03) 0%, transparent 60%, transparent 100%);
}

.hero-logo {
  display: block; margin: 0 auto 16px;
  height: 100px; width: auto;
  filter: drop-shadow(0 4px 12px rgba(15,40,71,0.12));
}

.hero h1 {
  font-size: 48px; color: var(--primary); margin-bottom: 10px;
  letter-spacing: 3px; font-weight: 900; line-height: 1.3;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 auto 28px;
  line-height: 1.8;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.hero-subtitle-text {
  display: inline-block;
  animation: marquee 25s linear infinite;
  padding-left: 100%;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-200%); }
}

.search-wrapper {
  position: relative; max-width: 500px; margin: 0 auto;
}

.search-input {
  width: 100%; padding: 15px 52px 15px 24px;
  border: 2px solid var(--border); border-radius: 60px;
  font-size: 15px; font-family: inherit; background: #fff;
  transition: all 0.3s ease; outline: none; color: var(--text);
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(184,148,46,0.08), var(--shadow-sm);
}

.search-input::placeholder { color: var(--text-muted); }

.search-icon {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 18px; color: var(--text-muted); pointer-events: none;
}

.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-height: 340px; overflow-y: auto; z-index: 200; display: none;
}

.search-results:not(:empty) { display: block; }

.search-result-item {
  padding: 14px 24px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  transition: background 0.15s; border-bottom: 1px solid var(--border-light);
}

.search-result-item:last-child { border-bottom: none; }

.search-result-item:hover { background: rgba(184,148,46,0.06); }

.result-name { font-weight: 600; color: var(--text); font-size: 14px; }

.result-type {
  font-size: 11px; color: var(--text-muted);
  background: var(--bg); padding: 3px 12px; border-radius: 20px;
}

.search-no-result {
  padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px;
}

/* ==================== 主体内容区 ==================== */
.main-content {
  padding: 32px 48px 72px;
  display: flex; gap: 28px;
  max-width: 1500px; margin: 0 auto; align-items: flex-start;
}

/* 左侧地图 */
.map-section { flex: 1; min-width: 0; }

.map-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  border: 1px solid var(--border);
}

.map-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-bottom: 1px solid var(--border-light);
  background: #fafbfc;
}

.map-breadcrumb {
  font-size: 14px; color: var(--text-light); display: flex; align-items: center; gap: 6px;
}

.breadcrumb-link { color: var(--primary-lighter); cursor: pointer; transition: var(--transition); }

.breadcrumb-link:hover { color: var(--gold); text-decoration: underline; }

.breadcrumb-active { color: var(--primary); font-weight: 600; }

.breadcrumb-sep { color: var(--text-muted); margin: 0 4px; }

.map-controls { display: flex; gap: 8px; align-items: center; }

.map-btn {
  width: 34px; height: 34px;
  border: 1.5px solid var(--border); border-radius: 8px;
  background: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--text-light); transition: var(--transition);
  font-family: inherit; line-height: 1;
}

.map-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.map-btn.reset-btn {
  width: auto; padding: 0 16px; font-size: 13px; font-weight: 600; gap: 4px;
}

.map-container {
  width: 100%; height: 580px; position: relative;
  background: linear-gradient(160deg, #f8fafc 0%, #eef2f7 50%, #f5f8fc 100%);
}

.map-loading {
  position: absolute; inset: 0; background: rgba(255,255,255,0.88);
  display: flex; align-items: center; justify-content: center;
  z-index: 10; flex-direction: column; gap: 16px;
}

.map-loading .spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border); border-top-color: var(--gold);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.map-loading span { color: var(--text-muted); font-size: 13px; }

.map-copyright {
  position: absolute; bottom: 10px; right: 20px;
  font-size: 11px; color: var(--text-muted); z-index: 5; pointer-events: none;
}

/* ==================== 数据面板 ==================== */
.data-panel {
  width: 380px; flex-shrink: 0;
  position: sticky; top: 96px;
}

.data-panel-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--border);
  overflow: hidden;
}

.data-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px 16px; border-bottom: 1px solid var(--border-light);
}

.data-panel-title {
  font-size: 24px; color: var(--primary); font-weight: 700;
  letter-spacing: 1px;
}

.data-panel-badge {
  font-size: 11px; font-weight: 600; padding: 5px 14px; border-radius: 20px;
  background: rgba(15,40,71,0.06); color: var(--primary-light);
}

.city-badge { background: rgba(184,148,46,0.1); color: var(--gold-dark); }

.data-panel-body { padding: 20px 24px; }

.data-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 18px;
}

.data-card {
  background: #f8fafc; border-radius: var(--radius-sm);
  padding: 16px 12px; text-align: center;
  transition: var(--transition); border: 2px solid transparent;
  cursor: default;
}

.data-card:hover {
  border-color: var(--gold-light);
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.data-card.highlight {
  background: linear-gradient(135deg, rgba(15,40,71,0.04) 0%, rgba(184,148,46,0.06) 100%);
  border-color: rgba(184,148,46,0.25);
}

.data-card-icon { font-size: 22px; margin-bottom: 4px; }

.data-card-value {
  font-size: 26px; font-weight: 700; color: var(--primary);
  font-family: 'Noto Serif SC', serif; line-height: 1.2;
}

.data-card-value small {
  font-size: 11px; font-weight: 400; color: var(--text-muted); margin-left: 2px;
}

.data-card-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; font-weight: 500; }

/* 面积+美食区 */
.data-panel-section {
  margin-bottom: 16px;
}

.data-panel-section-title {
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px;
  padding-left: 2px;
}

.info-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: #f8fafc; border-radius: var(--radius-sm);
  margin-bottom: 8px; font-size: 13px; color: var(--text-light);
}

.info-row .info-icon { font-size: 18px; flex-shrink: 0; }

.info-row .info-value { font-weight: 600; color: var(--primary); margin-right: 4px; }

.info-row .info-label { color: var(--text-muted); font-size: 12px; }

.food-tags-panel {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 14px; background: #f8fafc; border-radius: var(--radius-sm);
}

.food-tag-panel {
  padding: 5px 13px; background: #fff;
  border: 1px solid var(--border); border-radius: 20px;
  font-size: 12px; color: var(--text-light); font-weight: 500;
  transition: var(--transition);
}

.food-tag-panel:hover {
  border-color: var(--gold-light); color: var(--gold-dark);
  background: rgba(184,148,46,0.04);
}

.btn-detail {
  width: 100%; padding: 15px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, #1a4a7a 100%);
  color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: var(--transition); font-family: 'Noto Serif SC', serif;
  letter-spacing: 1px; margin-top: 4px;
}

.btn-detail:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(15,40,71,0.28);
}

/* 操作提示 */
.map-legend-tip {
  margin-top: 14px; padding: 12px 16px;
  background: rgba(184,148,46,0.04); border-radius: var(--radius-sm);
  font-size: 12px; color: var(--text-muted); text-align: center; line-height: 1.8;
}

.map-legend-tip strong { color: var(--gold-dark); }

/* ==================== 页脚 ==================== */
.footer {
  background: var(--bg-dark); color: #cbd5e1;
  padding: 36px 48px; text-align: center;
}

.footer-content { max-width: 800px; margin: 0 auto; }

.footer-team {
  font-size: 15px; font-weight: 600; color: var(--gold-light);
  margin-bottom: 6px; font-family: 'Noto Serif SC', serif;
}

.footer-copyright { font-size: 12px; color: #64748b; }

.footer-disclaimer {
  font-size: 11px; color: #475569; max-width: 560px; margin: 10px auto 0; line-height: 1.7;
}

/* ==================== 响应式 ==================== */
@media (max-width: 1200px) {
  .data-panel { width: 340px; }
  .main-content { padding: 24px 32px 56px; gap: 20px; }
}

/* 平板 */
@media (max-width: 1024px) {
  .main-content { flex-direction: column; padding: 20px; }
  .data-panel { width: 100%; position: static; }
  .map-container { height: 480px; }
  .hero { padding: 48px 32px 40px; }
  .hero h1 { font-size: 34px; letter-spacing: 2px; }
  .hero-logo { height: 72px; }
  .navbar { padding: 0 24px; }
  .nav-links { gap: 24px; }
}

/* 手机横屏 */
@media (max-width: 768px) {
  .hero { padding: 40px 20px 32px; margin-top: 60px; }
  .hero h1 { font-size: 28px; letter-spacing: 1.5px; }
  .hero-logo { height: 60px; }
  .hero-subtitle { font-size: 13px; max-width: 100%; }
  .hero-subtitle-text { animation-duration: 18s; }
  .map-container { height: 380px; }
  .map-toolbar { flex-wrap: wrap; gap: 8px; padding: 10px 16px; }
  .map-breadcrumb { font-size: 12px; }
  .nav-links { display: none; }
  .navbar { padding: 0 16px; height: 56px; }
  .nav-title { font-size: 16px; }
  .nav-logo-icon { width: 30px; height: 30px; }
  .data-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .data-card { padding: 12px 8px; }
  .data-card-value { font-size: 20px; }
  .data-card-label { font-size: 11px; }
  .data-panel-body { padding: 14px 16px; }
  .data-panel-header { padding: 16px 16px 12px; }
  .data-panel-title { font-size: 20px; }
  .main-content { padding: 12px; gap: 14px; }
  .info-row { padding: 8px 10px; font-size: 12px; }
  .food-tags-panel { padding: 8px 10px; gap: 4px; }
  .food-tag-panel { font-size: 11px; padding: 4px 10px; }
  .btn-detail { padding: 12px; font-size: 14px; }
  .search-input { padding: 12px 44px 12px 16px; font-size: 14px; }
  .search-wrapper { max-width: 100%; }
  .map-btn { width: 30px; height: 30px; font-size: 15px; }
  .map-btn.reset-btn { font-size: 12px; padding: 0 12px; }
  .footer { padding: 28px 20px; }
  .footer-team { font-size: 13px; }
  .footer-copyright { font-size: 11px; }
  .footer-disclaimer { font-size: 10px; }
}

/* 手机竖屏 */
@media (max-width: 480px) {
  .hero { padding: 32px 14px 24px; margin-top: 52px; }
  .hero h1 { font-size: 23px; letter-spacing: 1px; }
  .hero-logo { height: 48px; margin-bottom: 10px; }
  .hero-subtitle { font-size: 12px; }
  .hero-subtitle-text { animation-duration: 15s; }
  .map-container { height: 320px; }
  .map-toolbar { padding: 8px 12px; }
  .map-breadcrumb { font-size: 11px; }
  .navbar { padding: 0 10px; height: 48px; }
  .nav-title { font-size: 15px; }
  .nav-logo-icon { width: 26px; height: 26px; }
  .nav-brand { gap: 8px; }
  .data-grid { gap: 6px; }
  .data-card { padding: 10px 6px; }
  .data-card-value { font-size: 18px; }
  .data-card-value small { font-size: 10px; }
  .data-card-label { font-size: 10px; }
  .data-panel-body { padding: 10px 12px; }
  .data-panel-header { padding: 14px 12px 10px; }
  .data-panel-title { font-size: 18px; }
  .main-content { padding: 8px; gap: 10px; }
  .search-input { padding: 10px 38px 10px 14px; font-size: 13px; }
  .search-icon { font-size: 15px; right: 12px; }
  .btn-detail { padding: 10px; font-size: 13px; border-radius: 10px; }
  .map-btn { width: 28px; height: 28px; font-size: 14px; border-radius: 6px; }
  .map-btn.reset-btn { font-size: 11px; padding: 0 10px; }
}

/* ==================== 动画 ==================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero { animation: fadeInUp 0.6s ease both; }
.main-content { animation: fadeInUp 0.6s 0.12s ease both; }
.footer { animation: fadeInUp 0.6s 0.24s ease both; }
