/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --primary-color: #2c5f2d;
  --primary-light: #4a7c59;
  --secondary-color: #97bc62;
  --text-dark: #2d2d2d;
  --text-gray: #666;
  --text-light: #999;
  --bg-color: #f5f5f5;
  --card-bg: #fff;
  --border-color: #eee;
  --success-color: #52c41a;
  --warning-color: #faad14;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  max-width: 750px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul, li {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* 顶部导航栏 */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.header-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-dark);
}

.header-back {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-dark);
}

.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
}

/* 内容区域 */
.main-content {
  padding-bottom: 70px;
  min-height: calc(100vh - 50px);
}

/* ========== 首页 Banner ========== */
.banner-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.banner-container {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.4s ease-in-out;
}

.banner-item {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.banner-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s;
}

.banner-dot.active {
  width: 18px;
  border-radius: 3px;
  background: #fff;
}

/* ========== 导航按钮 ========== */
.nav-section {
  background: #fff;
  padding: 20px 12px;
  margin-top: -20px;
  border-radius: 20px 20px 0 0;
  position: relative;
  z-index: 5;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 8px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

.nav-item:active {
  transform: scale(0.95);
}

.nav-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
}

.nav-icon.reserve { background: linear-gradient(135deg, #ff6b6b, #ee5a5a); }
.nav-icon.exhibit { background: linear-gradient(135deg, #4ecdc4, #3db8b0); }
.nav-icon.cooperate { background: linear-gradient(135deg, #ffa726, #fb8c00); }
.nav-icon.news { background: linear-gradient(135deg, #ab47bc, #8e24aa); }

.nav-text {
  font-size: 12px;
  color: var(--text-dark);
}

/* ========== 热门文章 ========== */
.section {
  background: #fff;
  margin-top: 10px;
  padding: 16px;
}

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

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--primary-color);
  border-radius: 2px;
}

.section-more {
  font-size: 12px;
  color: var(--text-light);
}

/* 文章卡片 - 图文模式 */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.article-card {
  display: flex;
  gap: 12px;
  padding: 4px 0;
  cursor: pointer;
}

.article-img {
  width: 120px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f0f0f0;
}

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

.article-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.article-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-desc {
  font-size: 12px;
  color: var(--text-gray);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 6px;
}

.article-tag {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(44, 95, 45, 0.1);
  color: var(--primary-color);
  border-radius: 4px;
  font-size: 10px;
}

/* ========== 底部导航栏 ========== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 750px;
  margin: 0 auto;
  height: 56px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid var(--border-color);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: var(--text-light);
  cursor: pointer;
  padding: 6px 0;
}

.tab-item.active {
  color: var(--primary-color);
}

.tab-icon {
  font-size: 22px;
}

/* ========== 预约页面 ========== */
.reserve-container {
  padding: 16px;
}

.reserve-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 16px;
  padding: 24px 20px;
  color: #fff;
  margin-bottom: 20px;
}

.reserve-header h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
}

.reserve-header p {
  font-size: 13px;
  opacity: 0.85;
}

.reserve-info {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.reserve-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

/* 表单 */
.form-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px 16px;
  margin-bottom: 16px;
}

.form-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-title .required {
  color: #ff4d4f;
  margin-left: 4px;
}

.form-item {
  margin-bottom: 18px;
}

.form-item:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 13px;
  color: var(--text-gray);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-dark);
  background: #fafafa;
  transition: all 0.2s;
  outline: none;
  font-family: inherit;
}

.form-input:focus {
  border-color: var(--primary-color);
  background: #fff;
}

.form-input::placeholder {
  color: #bbb;
}

textarea.form-input {
  height: 80px;
  padding: 10px 12px;
  resize: none;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-item {
  flex: 1;
}

/* 日期时间选择 */
.datetime-picker {
  display: flex;
  gap: 10px;
}

.datetime-picker .form-input {
  flex: 1;
}

/* 人数选择 */
.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stepper-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.2s;
}

.stepper-btn:active {
  background: #e0e0e0;
}

.stepper-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.stepper-value {
  min-width: 50px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
}

/* 提交按钮 */
.submit-btn {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  border-radius: 24px;
  margin-top: 24px;
  transition: all 0.2s;
}

.submit-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

/* 规则说明 */
.rules {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.8;
  padding: 0 4px;
}

.rules-title {
  color: var(--text-gray);
  font-size: 13px;
  margin-bottom: 6px;
}

/* ========== Toast 提示 ========== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.toast.show {
  opacity: 1;
}

/* ========== 成功弹窗 ========== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  width: 80%;
  max-width: 320px;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--success-color);
  color: #fff;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 13px;
  color: var(--text-gray);
  margin-bottom: 24px;
}

.modal-btn {
  width: 100%;
  height: 40px;
  background: var(--primary-color);
  color: #fff;
  border-radius: 20px;
  font-size: 14px;
}

/* ========== 响应式适配 ========== */
@media (min-width: 375px) {
  .banner-wrapper { height: 220px; }
  .article-img { width: 130px; height: 98px; }
}

@media (min-width: 414px) {
  .banner-wrapper { height: 240px; }
  .article-img { width: 140px; height: 105px; }
}

@media (min-width: 480px) {
  .banner-wrapper { height: 260px; }
  .nav-icon { width: 52px; height: 52px; font-size: 26px; }
  .article-img { width: 150px; height: 112px; }
}
