/* 遇见花开 Web 端 - 公共样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

/* 页面容器 */
.container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px 16px 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 顶部标题 */
.header {
  text-align: center;
  padding: 18px 0 14px;
  color: #fff;
}

.title {
  font-size: 28px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.date {
  display: inline-block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 12px;
  margin-top: 8px;
}

/* 白色卡片区 */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.title-text {
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

.link-text {
  font-size: 13px;
  color: #667eea;
  cursor: pointer;
  background: rgba(102, 126, 234, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
  text-decoration: none;
}

/* 横向花卉滚动 */
.flowers-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.flower-item {
  flex: 0 0 120px;
  background: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.flower-item .flower-image-wrapper {
  width: 120px;
  height: 80px;
  overflow: hidden;
}

.flower-item .flower-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #e9ecef;
}

.flower-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flower-name {
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

.flower-location {
  font-size: 12px;
  color: #666;
}

.flower-period {
  font-size: 11px;
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
  padding: 2px 6px;
  border-radius: 8px;
  align-self: flex-start;
}

/* 搜索框 */
.search-container {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border-radius: 25px;
  padding: 0 15px;
  height: 46px;
}

.search-container input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: #333;
  height: 100%;
}

.search-icon {
  font-size: 16px;
  margin-right: 8px;
  color: #666;
}

/* 地图容器 */
.map-container {
  width: 100%;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e9ecef;
  z-index: 0;
}

.map-instruction {
  font-size: 12px;
  color: #666;
  text-align: center;
  margin-top: 12px;
  line-height: 1.4;
}

/* 花卉网格 */
.flowers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 375px) {
  .flowers-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.flower-card {
  background: #f8f9fa;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.2s;
}

.flower-card:active {
  transform: scale(0.98);
}

.flower-image-container {
  position: relative;
  width: 100%;
  height: 110px;
  overflow: hidden;
}

.flower-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #e9ecef;
}

.flower-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(102, 126, 234, 0.9);
  color: #fff;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: bold;
}

.flower-content {
  padding: 12px;
}

.flower-period-line {
  display: block;
  font-size: 13px;
  color: #333;
  margin-bottom: 4px;
  font-weight: 500;
}

.flower-location-line {
  display: block;
  font-size: 12px;
  color: #666;
}

/* 详情页 */
.detail-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.detail-hero img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  background: #e9ecef;
}

.detail-info {
  padding: 16px;
}

.detail-info h1 {
  font-size: 22px;
  color: #333;
  margin-bottom: 6px;
}

.detail-info .period {
  font-size: 13px;
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.detail-row {
  display: flex;
  margin-bottom: 10px;
  font-size: 14px;
}

.detail-row .label {
  color: #999;
  flex: 0 0 60px;
}

.detail-row .value {
  color: #333;
  flex: 1;
  line-height: 1.5;
}

/* 城市列表 */
.cities-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.city-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.city-card:active {
  transform: scale(0.98);
}

.city-name {
  font-size: 15px;
  font-weight: bold;
  color: #333;
  display: block;
  margin-bottom: 4px;
}

.city-tip {
  font-size: 11px;
  color: #999;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 30px 16px;
}

.empty-icon {
  font-size: 44px;
  margin-bottom: 10px;
}

.empty-text {
  display: block;
  font-size: 15px;
  color: #666;
  margin-bottom: 6px;
}

.empty-tip {
  display: block;
  font-size: 12px;
  color: #999;
}

/* 返回按钮 */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 14px;
}

/* 页面头部（子页面） */
.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 16px;
  border-radius: 0 0 20px 20px;
  margin: -16px -16px 16px;
}

.page-header h2 {
  font-size: 22px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header .page-sub {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 4px;
}

/* 底部导航 */
.bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-top: 1px solid #e9ecef;
  z-index: 100;
}

.bottom-nav a {
  flex: 1;
  text-align: center;
  padding: 8px 0 10px;
  font-size: 12px;
  color: #666;
  text-decoration: none;
}

.bottom-nav a.active {
  color: #667eea;
  font-weight: bold;
}

.bottom-nav .nav-icon {
  display: block;
  font-size: 20px;
  margin-bottom: 2px;
}

/* 加载状态 */
.loading {
  text-align: center;
  padding: 30px;
  color: #999;
  font-size: 14px;
}

/* 图片加载失败占位 */
img.img-fallback {
  background: #e9ecef;
}
