/* ==================== CSS 变量 / 设计系统 ==================== */
:root {
  --primary: #07C160;
  --primary-light: #e8f8ef;
  --primary-dark: #059c4e;
  --gold: #ff9500;
  --gold-light: #fff8ed;
  --red: #fa5151;
  --red-light: #fff0f0;
  --blue: #576b95;
  --blue-light: #eef2f8;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --text-white: #ffffff;
  --bg-page: #f5f5f5;
  --bg-card: #ffffff;
  --bg-input: #f7f7f7;
  --border: #eeeeee;
  --border-light: #f0f0f0;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ==================== 重置 & 全局 ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font);
  background: #e8e8e8;
  color: var(--text-primary);
  line-height: 1.5;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 20px;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
input, textarea, select, button { font-family: inherit; font-size: inherit; outline: none; border: none; }
button { cursor: pointer; background: none; }
ul, ol { list-style: none; }

/* ==================== 手机框架 ==================== */
.phone-frame {
  width: 375px;
  min-height: 812px;
  max-height: 812px;
  background: var(--bg-page);
  border-radius: 44px;
  overflow: hidden;
  box-shadow: 0 0 0 10px #1a1a1a, 0 0 0 12px #333, var(--shadow-lg);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* 状态栏 */
.status-bar {
  height: 44px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
}
.status-bar .time { font-size: 15px; font-weight: 700; }
.status-bar .icons { position: absolute; right: 20px; display: flex; gap: 4px; font-size: 12px; }

/* ==================== 导航栏 ==================== */
.nav-bar {
  height: 44px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  padding: 0 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 99;
  border-bottom: 0.5px solid var(--border-light);
}
.nav-bar .back-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-bar .nav-title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  margin: 0 32px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-bar .nav-right {
  width: 32px;
  flex-shrink: 0;
  text-align: right;
  font-size: 14px;
  color: var(--primary);
}

/* ==================== 页面容器 ==================== */
.page-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.page-container::-webkit-scrollbar { display: none; }

.page {
  display: none;
  min-height: 100%;
}
.page.active { display: block; }
.page-content { padding-bottom: 20px; }

/* ==================== 底部Tab栏 ==================== */
.tab-bar {
  height: 56px;
  background: var(--bg-card);
  display: flex;
  align-items: stretch;
  border-top: 0.5px solid var(--border);
  flex-shrink: 0;
  padding-bottom: var(--safe-bottom);
  position: relative;
  z-index: 100;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-tertiary);
  font-size: 10px;
  transition: color 0.2s;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.tab-item .tab-icon { font-size: 22px; line-height: 1; }
.tab-item.active { color: var(--primary); }
.tab-item.active .tab-icon { transform: scale(1.1); }

/* ==================== 轮播图 ==================== */
.swiper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 12px;
}
.swiper-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.swiper-slide {
  min-width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 600;
  padding: 20px;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.swiper-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.swiper-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: all 0.3s;
}
.swiper-dot.active {
  background: white;
  width: 18px;
  border-radius: 3px;
}

/* ==================== 通用卡片 ==================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  margin: 0 12px 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 14px 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}
.card-more {
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 2px;
}
.card-body { padding: 12px 16px 16px; }

/* ==================== 通知列表 ==================== */
.notice-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border-light);
}
.notice-item:last-child { border-bottom: none; }
.notice-dot {
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}
.notice-text { flex: 1; font-size: 14px; line-height: 1.5; }
.notice-time { font-size: 11px; color: var(--text-tertiary); flex-shrink: 0; }

/* ==================== 比赛卡片 ==================== */
.comp-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  margin: 0 12px 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s;
}
.comp-card:active { transform: scale(0.98); }
.comp-card-banner {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 600;
  position: relative;
  padding: 0 16px;
}
.comp-card-banner .comp-type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(4px);
}
.comp-card-info { padding: 12px 16px; }
.comp-card-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.comp-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-tertiary);
}
.comp-card-meta span { display: flex; align-items: center; gap: 3px; }
.comp-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 0.5px solid var(--border-light);
}
.comp-card-count {
  font-size: 12px;
  color: var(--text-tertiary);
}
.comp-card-count strong {
  color: var(--primary);
  font-size: 16px;
}

/* ==================== 标签 / 徽章 ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-gold { background: var(--gold-light); color: var(--gold); }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-gray { background: #f0f0f0; color: var(--text-tertiary); }

.status-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 500;
}
.status-ongoing { background: var(--primary-light); color: var(--primary); }
.status-ended { background: #f0f0f0; color: var(--text-tertiary); }
.status-registered { background: var(--gold-light); color: var(--gold); }

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn:active { opacity: 0.8; transform: scale(0.97); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border: 1px solid var(--primary); color: var(--primary); background: white; }
.btn-gold { background: var(--gold); color: white; }
.btn-danger { background: var(--red); color: white; }
.btn-gray { background: #f0f0f0; color: var(--text-tertiary); }
.btn-lg { padding: 12px 32px; font-size: 16px; }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled, .btn-disabled { opacity: 0.5; cursor: not-allowed; }

/* ==================== 筛选栏 ==================== */
.filter-bar {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-tag {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  background: var(--bg-card);
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.filter-tag.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ==================== 搜索栏 ==================== */
.search-bar {
  margin: 12px;
  position: relative;
}
.search-bar input {
  width: 100%;
  height: 36px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  padding: 0 16px 0 36px;
  font-size: 14px;
  color: var(--text-primary);
}
.search-bar input::placeholder { color: var(--text-tertiary); }
.search-bar .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-tertiary);
}

/* ==================== 比赛详情 ==================== */
.detail-banner {
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 20px;
  color: white;
  position: relative;
}
.detail-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(transparent, rgba(0,0,0,0.4));
}
.detail-banner > * { position: relative; z-index: 1; }
.detail-banner .detail-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.detail-banner .detail-topic { font-size: 13px; opacity: 0.9; }

.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
}
.detail-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.detail-info-label { font-size: 12px; color: var(--text-tertiary); }
.detail-info-value { font-size: 14px; font-weight: 500; }

.detail-section { padding: 0 16px 16px; }
.detail-section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-section-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
}

.detail-bottom-bar {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-top: 0.5px solid var(--border-light);
  position: sticky;
  bottom: 0;
}

/* ==================== 排名列表 ==================== */
.rank-tabs {
  display: flex;
  background: var(--bg-card);
  border-bottom: 0.5px solid var(--border);
}
.rank-tab {
  flex: 1;
  padding: 12px 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-tertiary);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}
.rank-tab.active { color: var(--primary); font-weight: 600; }
.rank-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-bottom: 0.5px solid var(--border-light);
}
.rank-num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.rank-num.top1 { color: #FFD700; font-size: 18px; }
.rank-num.top2 { color: #C0C0C0; font-size: 17px; }
.rank-num.top3 { color: #CD7F32; font-size: 16px; }
.rank-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  flex-shrink: 0;
}
.rank-info { flex: 1; }
.rank-name { font-size: 14px; font-weight: 500; }
.rank-extra { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.rank-score { font-size: 16px; font-weight: 700; color: var(--gold); flex-shrink: 0; }

/* ==================== 商城 ==================== */
.mall-category-bar {
  display: flex;
  background: var(--bg-card);
  border-bottom: 0.5px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
}
.mall-category-bar::-webkit-scrollbar { display: none; }
.mall-cat-item {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.mall-cat-item.active { color: var(--primary); font-weight: 600; }
.mall-cat-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.mall-sub-cats {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  background: var(--bg-page);
}
.mall-sub-cats::-webkit-scrollbar { display: none; }
.mall-sub-cat {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  background: var(--bg-card);
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}
.mall-sub-cat.active { background: var(--primary-light); color: var(--primary); }

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 12px;
}
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s;
}
.product-card:active { transform: scale(0.97); }
.product-img {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, #f8f8f8, #eee);
}
.product-info { padding: 10px; }
.product-name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.product-price-row { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.product-price { font-size: 16px; font-weight: 700; color: var(--red); }
.product-price-unit { font-size: 11px; color: var(--red); }
.product-points { font-size: 11px; color: var(--gold); }
.product-stock { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; }

/* 商品详情 */
.pd-images {
  height: 300px;
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
}
.pd-main { padding: 16px; background: var(--bg-card); }
.pd-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.pd-price { font-size: 24px; font-weight: 700; color: var(--red); }
.pd-points-price { font-size: 13px; color: var(--gold); }
.pd-name { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.pd-stock { font-size: 12px; color: var(--text-tertiary); }

.pd-section {
  background: var(--bg-card);
  margin-top: 10px;
  padding: 16px;
}
.pd-section-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.pd-spec-group { margin-bottom: 12px; }
.pd-spec-label { font-size: 13px; color: var(--text-tertiary); margin-bottom: 8px; }
.pd-spec-options { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-spec-option {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.pd-spec-option.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.pd-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

.pd-bottom-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-top: 0.5px solid var(--border-light);
}

/* ==================== 支付弹窗 ==================== */
.pay-modal-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: flex-end;
}
.pay-modal-mask.show { display: flex; }
.pay-modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  padding: 20px 16px 30px;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.pay-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.pay-modal-title { font-size: 17px; font-weight: 600; }
.pay-modal-close { font-size: 20px; color: var(--text-tertiary); cursor: pointer; padding: 4px; }
.pay-total {
  text-align: center;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-input);
  border-radius: var(--radius);
}
.pay-total-label { font-size: 13px; color: var(--text-tertiary); margin-bottom: 4px; }
.pay-total-amount { font-size: 28px; font-weight: 700; color: var(--red); }
.pay-points-control {
  margin-bottom: 20px;
  padding: 14px;
  background: var(--gold-light);
  border-radius: var(--radius);
}
.pay-points-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pay-points-label { font-size: 14px; }
.pay-points-label strong { color: var(--gold); }
.pay-switch {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #ccc;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}
.pay-switch.active { background: var(--primary); }
.pay-switch::after {
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.pay-switch.active::after { transform: translateX(20px); }
.pay-points-input {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pay-points-input input {
  flex: 1;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}
.pay-points-input span { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; }
.pay-summary { margin-bottom: 20px; font-size: 14px; }
.pay-summary-row { display: flex; justify-content: space-between; padding: 6px 0; }
.pay-summary-row.total { font-weight: 600; font-size: 15px; border-top: 0.5px solid var(--border); padding-top: 10px; margin-top: 4px; }

/* ==================== 我的页面 ==================== */
.profile-header {
  background: linear-gradient(135deg, var(--primary), #05a34d);
  padding: 30px 20px 24px;
  color: white;
}
.profile-user {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 2px solid rgba(255,255,255,0.4);
}
.profile-name { font-size: 18px; font-weight: 600; }
.profile-role {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 2px 10px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  margin-top: 4px;
}
.profile-stats {
  display: flex;
  gap: 20px;
}
.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}
.profile-stat-num { font-size: 20px; font-weight: 700; }
.profile-stat-label { font-size: 12px; opacity: 0.85; }

.profile-menu { margin: 12px; }
.menu-group {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--border-light);
  cursor: pointer;
  transition: background 0.15s;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--bg-input); }
.menu-icon { font-size: 20px; width: 28px; text-align: center; }
.menu-text { flex: 1; font-size: 15px; }
.menu-arrow { color: var(--text-tertiary); font-size: 14px; }
.menu-extra { font-size: 13px; color: var(--text-tertiary); }

/* ==================== 订单列表 ==================== */
.order-tabs {
  display: flex;
  background: var(--bg-card);
  border-bottom: 0.5px solid var(--border);
  overflow-x: auto;
}
.order-tabs::-webkit-scrollbar { display: none; }
.order-tab {
  flex: 1;
  min-width: 70px;
  padding: 12px 8px;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.order-tab.active { color: var(--primary); font-weight: 600; }
.order-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.order-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  margin: 10px 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--border-light);
}
.order-merchant { font-size: 14px; font-weight: 500; }
.order-status { font-size: 13px; font-weight: 500; }
.order-status.s-pay { color: var(--red); }
.order-status.s-ship { color: var(--gold); }
.order-status.s-recv { color: var(--blue); }
.order-status.s-done { color: var(--primary); }
.order-status.s-cancel { color: var(--text-tertiary); }
.order-product {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
}
.order-product-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #f5f5f5, #eee);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.order-product-info { flex: 1; }
.order-product-name { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.order-product-spec { font-size: 12px; color: var(--text-tertiary); margin-bottom: 4px; }
.order-product-price { font-size: 14px; font-weight: 600; color: var(--red); }
.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 0.5px solid var(--border-light);
}
.order-total { font-size: 13px; color: var(--text-secondary); }
.order-total strong { color: var(--text-primary); }
.order-actions { display: flex; gap: 8px; }

/* ==================== 团队管理 ==================== */
.team-header {
  background: linear-gradient(135deg, var(--blue), #3f5180);
  padding: 24px 20px;
  margin: 12px;
  border-radius: var(--radius-lg);
  color: white;
}
.team-name-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.team-name { font-size: 20px; font-weight: 700; }
.team-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  opacity: 0.85;
}
.team-leader {
  font-size: 13px;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 4px;
}

.member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-bottom: 0.5px solid var(--border-light);
}
.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  flex-shrink: 0;
}
.member-info { flex: 1; }
.member-name { font-size: 14px; font-weight: 500; }
.member-extra { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }

/* ==================== 积分页面 ==================== */
.points-header {
  background: linear-gradient(135deg, var(--gold), #e68600);
  padding: 30px 20px;
  margin: 12px;
  border-radius: var(--radius-lg);
  color: white;
  text-align: center;
}
.points-label { font-size: 14px; opacity: 0.85; margin-bottom: 4px; }
.points-value { font-size: 36px; font-weight: 700; }
.points-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.points-record {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-bottom: 0.5px solid var(--border-light);
}
.points-record-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.points-record-icon.earn { background: var(--primary-light); }
.points-record-icon.spend { background: var(--red-light); }
.points-record-info { flex: 1; }
.points-record-desc { font-size: 14px; }
.points-record-time { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.points-record-amount { font-size: 16px; font-weight: 600; flex-shrink: 0; }
.points-record-amount.earn { color: var(--primary); }
.points-record-amount.spend { color: var(--red); }

.points-rule-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-bottom: 0.5px solid var(--border-light);
}
.points-rule-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.points-rule-info { flex: 1; }
.points-rule-title { font-size: 14px; font-weight: 500; }
.points-rule-desc { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.points-rule-value { font-size: 14px; font-weight: 600; color: var(--gold); flex-shrink: 0; }

/* ==================== 二维码 ==================== */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
}
.qr-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  width: 260px;
}
.qr-code {
  width: 180px;
  height: 180px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.qr-code-pattern {
  width: 160px;
  height: 160px;
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  grid-template-rows: repeat(15, 1fr);
  gap: 1px;
}
.qr-code-pattern span {
  border-radius: 1px;
}
.qr-label { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.qr-sublabel { font-size: 12px; color: var(--text-tertiary); }

/* ==================== 登录页 ==================== */
.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 40px 30px;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg-page) 50%);
}
.login-logo {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: white;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(7, 193, 96, 0.3);
}
.login-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.login-subtitle { font-size: 14px; color: var(--text-tertiary); margin-bottom: 40px; }
.login-btn {
  width: 100%;
  max-width: 280px;
  margin-bottom: 12px;
}
.login-agreement {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 20px;
  text-align: center;
}
.login-agreement a { color: var(--blue); }

/* ==================== 提交作品弹窗 ==================== */
.submit-form { padding: 0; }
.submit-form .form-group { margin-bottom: 16px; }
.submit-form .form-label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}
.submit-form .form-input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 14px;
  transition: border-color 0.2s;
}
.submit-form .form-input:focus { border-color: var(--primary); }
.submit-form .form-hint { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }
.submit-form .form-hint.error { color: var(--red); }
.platform-options { display: flex; gap: 10px; flex-wrap: wrap; }
.platform-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.platform-option.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* ==================== 报名记录 ==================== */
.record-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  margin: 10px 12px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.record-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.record-card-name { font-size: 15px; font-weight: 600; flex: 1; margin-right: 8px; }
.record-info { font-size: 13px; color: var(--text-secondary); }
.record-info-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }

/* ==================== 表单 ==================== */
.form-page { padding: 16px; }
.form-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.form-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--border-light);
}
.form-row:last-child { border-bottom: none; }
.form-row-label { width: 80px; font-size: 14px; color: var(--text-secondary); flex-shrink: 0; }
.form-row-input {
  flex: 1;
  height: 36px;
  border: none;
  font-size: 14px;
  text-align: right;
  background: transparent;
}
.form-row-input::placeholder { color: var(--text-tertiary); }

/* ==================== Toast ==================== */
.toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 300;
  animation: toastIn 0.3s ease;
  pointer-events: none;
  max-width: 80%;
  text-align: center;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ==================== 空状态 ==================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-text { font-size: 14px; }

/* ==================== 签到弹窗 ==================== */
.checkin-result {
  text-align: center;
  padding: 20px 0;
}
.checkin-icon { font-size: 48px; margin-bottom: 12px; }
.checkin-points { font-size: 24px; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.checkin-tip { font-size: 14px; color: var(--text-tertiary); }

/* ==================== 申请团长表单 ==================== */
.member-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.member-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  font-size: 13px;
}
.member-tag .remove-tag {
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: 14px;
}

/* ==================== 导出弹窗 ==================== */
.export-group {
  margin-bottom: 16px;
}
.export-group-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 0.5px solid var(--border-light);
}
.export-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ==================== 动画 ==================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fade-in { animation: fadeIn 0.3s ease; }
