/* ===== 江夏区大学生旅游攻略网站 - 手绘卡通风格 ===== */

/* CSS变量定义 */
:root {
  --primary: #FF6B35;       /* 温暖橙色 */
  --secondary: #4CAF50;     /* 生态绿色 */
  --accent: #87CEEB;        /* 天空蓝 */
  --background: #FFF8E1;    /* 浅黄背景 */
  --card-bg: #FFFFFF;       /* 卡片白色 */
  --text-primary: #333333;  /* 主文字 */
  --text-secondary: #666666; /* 次要文字 */
  --border-radius: 20px;    /* 大圆角 */
  --border-radius-sm: 12px;
  --shadow: 0 8px 24px rgba(255, 107, 53, 0.15);
  --shadow-hover: 0 12px 32px rgba(255, 107, 53, 0.25);
}

/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* 页面容器 */
.container {
  max-width: 428px;
  margin: 0 auto;
  padding: 0 16px;
  padding-bottom: 80px;
}

/* ===== 顶部导航 ===== */
.header {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, var(--primary), #FF8F65);
  padding: 16px;
  border-radius: 0 0 24px 24px;
  box-shadow: var(--shadow);
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 18px;
  font-weight: bold;
}

.logo-icon {
  font-size: 28px;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.icon-btn:hover {
  background: rgba(255,255,255,0.4);
  transform: scale(1.1);
}

.icon-btn:active {
  transform: scale(0.95);
}

/* ===== 搜索栏 ===== */
.search-bar {
  margin-top: 12px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border-radius: 50px;
  border: none;
  background: white;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.search-bar input:focus {
  outline: none;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: 0.5;
}

/* ===== 轮播区域 ===== */
.banner {
  margin: 20px 0;
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.banner-inner {
  display: flex;
  transition: transform 0.5s ease;
}

.banner-slide {
  min-width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  text-align: center;
  color: white;
}

.banner-slide:nth-child(1) {
  background: linear-gradient(135deg, #FF6B35, #FF8F65);
}

.banner-slide:nth-child(2) {
  background: linear-gradient(135deg, #4CAF50, #81C784);
}

.banner-slide:nth-child(3) {
  background: linear-gradient(135deg, #87CEEB, #5DADE2);
}

.banner-emoji {
  font-size: 48px;
}

.banner-title {
  font-size: 20px;
  font-weight: bold;
}

.banner-subtitle {
  font-size: 13px;
  opacity: 0.9;
}

.banner-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.banner-dot.active {
  background: white;
  width: 24px;
  border-radius: 4px;
}

/* ===== 分类标签 ===== */
.categories {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  overflow-x: auto;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
}

.category-btn {
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: 50px;
  border: 2px solid transparent;
  background: var(--card-bg);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.category-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.category-btn.active {
  background: linear-gradient(135deg, var(--primary), #FF8F65);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow);
}

/* ===== 景点卡片列表 ===== */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 16px;
  font-size: 18px;
  font-weight: bold;
  color: var(--text-primary);
}

.section-title-icon {
  font-size: 24px;
}

.spot-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== 景点卡片 ===== */
.spot-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  cursor: pointer;
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.spot-card:nth-child(1) { animation-delay: 0.1s; }
.spot-card:nth-child(2) { animation-delay: 0.2s; }
.spot-card:nth-child(3) { animation-delay: 0.3s; }
.spot-card:nth-child(4) { animation-delay: 0.4s; }
.spot-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.spot-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.spot-card:active {
  transform: scale(0.98);
}

.spot-card-header {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  position: relative;
}

.spot-card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to top, rgba(0,0,0,0.1), transparent);
}

.spot-card-body {
  padding: 16px;
}

.spot-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.spot-name {
  font-size: 16px;
  font-weight: bold;
  color: var(--text-primary);
}

.spot-heat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--primary);
  font-weight: 500;
}

.spot-heat-icon {
  font-size: 14px;
}

.spot-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.spot-tag {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 500;
}

.spot-tag-free {
  background: #E8F5E9;
  color: #4CAF50;
}

.spot-tag-group {
  background: #FFF3E0;
  color: #FF9800;
}

.spot-tag-elder {
  background: #E3F2FD;
  color: #2196F3;
}

.spot-tag-kids {
  background: #FCE4EC;
  color: #E91E63;
}

.spot-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #EEE;
}

.spot-price {
  font-size: 14px;
  color: var(--primary);
  font-weight: bold;
}

.spot-price span {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: normal;
}

.spot-distance {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ===== 详情页 ===== */
.detail-header {
  position: relative;
}

.detail-hero {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 100px;
  position: relative;
}

.detail-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, var(--background), transparent);
}

.back-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 10;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: white;
  transform: scale(1.1);
}

.favorite-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 10;
  transition: all 0.3s ease;
}

.favorite-btn.active {
  background: #FFEBEE;
}

.favorite-btn.animate {
  animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(1); }
  75% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* 详情信息卡片 */
.detail-content {
  margin-top: -20px;
  position: relative;
  z-index: 1;
}

.detail-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.detail-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px dashed #EEE;
}

.detail-card-title-icon {
  font-size: 20px;
}

.detail-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #F5F5F5;
}

.detail-info-row:last-child {
  border-bottom: none;
}

.detail-info-label {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-info-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.detail-info-value.highlight {
  color: var(--primary);
  font-weight: bold;
}

.detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-tag {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
}

.detail-tag-suitable {
  background: #E8F5E9;
  color: #4CAF50;
}

.detail-tag-unsuitable {
  background: #FFEBEE;
  color: #E53935;
}

/* 交通信息 */
.traffic-info {
  background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
  border-radius: var(--border-radius);
  padding: 16px;
  margin-top: 12px;
}

.traffic-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
}

.traffic-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.traffic-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

/* 收藏提示 */
.favorite-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--primary), #FF8F65);
  border-radius: var(--border-radius);
  color: white;
  margin-top: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.favorite-tip:hover {
  transform: scale(1.02);
}

.favorite-tip-icon {
  font-size: 24px;
}

.favorite-tip-text {
  font-size: 14px;
  font-weight: 500;
}

/* ===== 底部导航 ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  border-radius: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-secondary);
}

.nav-item:hover {
  background: #FFF8E1;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item-icon {
  font-size: 22px;
}

.nav-item-text {
  font-size: 11px;
  font-weight: 500;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 14px;
}

/* ===== 加载动画 ===== */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.loading-spinner {
  font-size: 32px;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===== 响应式适配 ===== */
@media (min-width: 768px) {
  .container {
    max-width: 600px;
  }

  .spot-card-header {
    height: 140px;
    font-size: 72px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 800px;
  }

  .spot-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}
