/* 糖心旅行日记与目的地指南 - 主样式表 */
:root {
  --primary: #0096C7;
  --secondary: #CAF0F8;
  --bg: #F8FDFF;
  --card: #FFFFFF;
  --accent: #FF6B6B;
  --text: #2D3748;
  --text-light: #718096;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(0, 150, 199, 0.1);
  --shadow-hover: 0 8px 30px rgba(0, 150, 199, 0.2);
  --font-title: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Serif SC", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --max-width: 1200px;
  --header-height: 72px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.8;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

/* 容器 */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* 头部导航 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 150, 199, 0.1);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo svg {
  width: 32px;
  height: 32px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav a {
  font-family: var(--font-title);
  font-size: 0.95rem;
  color: var(--text);
  position: relative;
  padding: 0.5rem 0;
}

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

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* 首屏英雄区 */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.5) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #ffffff;
  padding: 2rem;
}

.hero-content h1 {
  font-size: 3.5rem;
  color: #ffffff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-content p {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-search {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.hero-search input {
  width: 100%;
  padding: 1rem 1.5rem;
  padding-right: 4rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  background: rgba(255,255,255,0.95);
  color: var(--text);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

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

.hero-search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.hero-search button:hover {
  background: var(--accent);
}

/* 区块通用样式 */
.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
  color: var(--text);
}

.section-header p {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: var(--font-title);
}

.card-body {
  padding: 1.25rem;
}

.card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.card-body p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-light);
}

.card-price {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 700;
}

/* 视频卡片 */
.vlog-card {
  position: relative;
}

.vlog-card .play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

.vlog-card:hover .play-btn {
  transform: translate(-50%, -50%) scale(1.1);
}

/* 达人列表 */
.traveler-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.traveler-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.traveler-card:hover {
  transform: translateY(-4px);
}

.traveler-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px solid var(--secondary);
}

.traveler-card h4 {
  margin-bottom: 0.5rem;
}

.traveler-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.traveler-stats span {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.traveler-stats strong {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--primary);
}

/* 时间线 */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--secondary);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
  padding-left: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--secondary);
  margin-left: -5px;
}

.timeline-item h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* 费用表格 */
.cost-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.cost-table th,
.cost-table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--secondary);
}

.cost-table th {
  background: var(--primary);
  color: #fff;
  font-family: var(--font-title);
  font-weight: 600;
}

.cost-table tr:last-child td {
  border-bottom: none;
}

.cost-table tr:hover td {
  background: var(--secondary);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

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

.btn-primary:hover {
  background: #007bb5;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 150, 199, 0.3);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #e55555;
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

/* 面包屑 */
.breadcrumb {
  padding: 1rem 0;
  margin-top: var(--header-height);
  font-size: 0.9rem;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--text-light);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span {
  margin: 0 0.5rem;
}

/* 页脚 */
.site-footer {
  background: #1a2332;
  color: #a0aec0;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: #a0aec0;
  padding: 0.3rem 0;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--secondary);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: var(--secondary);
}

/* 天气组件 */
.weather-widget {
  background: linear-gradient(135deg, var(--primary), #48CAE4);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.weather-icon {
  font-size: 3rem;
}

.weather-info h4 {
  color: #fff;
  margin-bottom: 0.25rem;
}

.weather-temp {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
}

/* 费用计算器 */
.calculator {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--secondary);
}

.calc-row:last-child {
  border-bottom: none;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.2rem;
}

.calc-input {
  width: 120px;
  padding: 0.5rem;
  border: 1px solid var(--secondary);
  border-radius: 8px;
  font-family: var(--font-mono);
  text-align: right;
}

/* 地图占位 */
.map-placeholder {
  background: var(--secondary);
  border-radius: var(--radius);
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.map-pin {
  position: absolute;
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  cursor: pointer;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(255, 107, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

/* 旅伴卡片 */
.companion-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow);
}

.companion-card .tag {
  display: inline-block;
  background: var(--secondary);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-question {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-title);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: var(--secondary);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  padding: 0 1.5rem 1.25rem;
  max-height: 500px;
}

/* 搜索页 */
.search-box {
  max-width: 600px;
  margin: 2rem auto;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 1rem 1.5rem;
  padding-right: 4rem;
  border: 2px solid var(--secondary);
  border-radius: 50px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-results {
  margin-top: 2rem;
}

.search-result-item {
  padding: 1.5rem;
  border-bottom: 1px solid var(--secondary);
}

.search-result-item h3 a {
  color: var(--text);
}

.search-result-item h3 a:hover {
  color: var(--primary);
}

.search-result-item p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* APP下载页 */
.app-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0;
}

.app-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

/* 合规页 */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.legal-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--secondary);
}

.legal-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal-content ul, .legal-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

/* 404页面 */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 8rem;
  font-weight: 700;
  color: var(--secondary);
  line-height: 1;
}

/* 签证标签 */
.visa-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: var(--font-title);
  font-weight: 600;
}

.visa-tag.free {
  background: #C6F6D5;
  color: #22543D;
}

.visa-tag.on-arrival {
  background: #FEFCBF;
  color: #744210;
}

.visa-tag.required {
  background: #FED7D7;
  color: #742A2A;
}

/* 响应式 */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
  }

  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
  }

  .main-nav a {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--secondary);
    width: 100%;
  }

  .nav-toggle {
    display: block;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .app-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .traveler-list {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-search input {
    padding: 0.75rem 1rem;
    padding-right: 3.5rem;
  }
}

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

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* 数字滚动 */
.counter {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--primary);
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-cloud a {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--secondary);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.tag-cloud a:hover {
  background: var(--primary);
  color: #fff;
}

/* 内页头部 */
.page-hero {
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 3rem;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--bg) 100%);
  text-align: center;
}

.page-hero h1 {
  margin-bottom: 1rem;
}

.page-hero p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}
