/* ========== 设计变量 ========== */
:root {
  --accent: #A3E635;
  --accent-soft: #D4F58A;
  --input-bg: #F5F5F7;
  --text-main: #1A1A1A;
  --text-gray: #999;
  --text-light: #666;
  --bg-page: #F0F0F2;
  --bg-card: #FFFFFF;
  --danger: #FF4757;
  --success: #2ED573;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* ========== 手机容器 ========== */
.app-container {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-page);
  position: relative;
  overflow-x: hidden;
}

/* ========== 页面区 ========== */
.page-section { padding: 16px; }
.page-section-sm { padding: 12px 16px; }

/* ========== 卡片 ========== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin-bottom: 12px;
}

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 28px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: var(--font);
  text-decoration: none;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: #000; color: #fff; }
.btn-accent  { background: var(--accent); color: #000; }
.btn-outline { background: #fff; border: 2px solid #000; color: #000; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-ghost   { background: transparent; color: var(--text-light); }
.btn-sm  { padding: 7px 14px; font-size: 13px; border-radius: 20px; }
.btn-full { width: 100%; padding: 14px; font-size: 18px; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ========== 输入框 ========== */
.input-field {  width: 100%; background: var(--input-bg); border: 2px solid transparent; border-radius: var(--radius); padding: 14px 18px; font-size: 15px; color: var(--text-main); font-family: var(--font); outline: none; transition: border 0.2s; }
.input-field:focus { border-color: var(--accent); }
.input-field::placeholder { color: #B0B0B0; }

/* 带边框变体 - 更强的视觉边界 */
.input-bordered {
  background: #fff;
  border: 2px solid #E8E8E8;
}
.input-bordered:focus {
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

select.input-field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px;
  padding-right: 40px;
}

textarea.input-field {
  resize: none;
  min-height: 80px;
}

/* ========== 底部导航栏 ========== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: #fff;
  display: flex;
  border-top: 1px solid #EEE;
  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;
  padding: 8px 0 6px;
  cursor: pointer;
  transition: all 0.2s;
  color: #999;
  font-size: 11px;
  gap: 2px;
}
.tab-item.active { color: #000; font-weight: 600; }
.tab-item svg { width: 24px; height: 24px; }

/* ========== Tab 页面切换 ========== */
.tab-page { display: none; padding-bottom: 80px; animation: fadeUp 0.25s ease; }
.tab-page.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========== 车队列表卡片 ========== */
.team-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.team-card:active { transform: scale(0.98); }

.team-card .team-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.team-card .team-name {
  font-size: 17px;
  font-weight: 700;
}
.team-card .team-game {
  font-size: 13px;
  color: #fff;
  background: #000;
  padding: 4px 10px;
  border-radius: 100px;
}
.team-card .team-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-light);
}
.team-card .team-meta span { display: flex; align-items: center; gap: 4px; }
.team-card .team-captain {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #F0F0F0;
  font-size: 13px;
  color: var(--text-light);
}

/* ========== 标签徽章 ========== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.badge-recruiting { background: #E8F5E9; color: #2E7D32; }
.badge-full       { background: #FFF3E0; color: #E65100; }
.badge-closed     { background: #F5F5F5; color: #999; }
.badge-captain    { background: #000; color: var(--accent); }
.badge-member     { background: #F0F0F0; color: #666; }

/* ========== 游戏筛选 chips ========== */
.game-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  -webkit-overflow-scrolling: touch;
}
.game-chips::-webkit-scrollbar { height: 0; }
.game-chip {
  display: inline-flex;
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  border: 1.5px solid #E0E0E0;
  color: var(--text-light);
  white-space: nowrap;
  flex-shrink: 0;
}
.game-chip.active { background: #000; border-color: #000; color: #fff; }

/* ========== 头像 ========== */
.avatar {
  width: 44px; height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: #E8E8E8;
  flex-shrink: 0;
}
.avatar-lg { width: 64px; height: 64px; border-radius: 16px; }
.avatar-sm { width: 36px; height: 36px; border-radius: 10px; }

/* ========== 搜索栏 ========== */
.search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 28px;
  padding: 10px 16px;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
  font-family: var(--font);
}
.search-bar input::placeholder { color: #B0B0B0; }

/* ========== 弹窗 Modal ========== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 85%;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
}
.modal-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.modal-box p  { font-size: 14px; color: var(--text-light); margin-bottom: 20px; line-height: 1.5; }
.modal-actions { display: flex; gap: 12px; }
.modal-actions .btn { flex: 1; }

/* ========== Toast 提示 ========== */
.toast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  color: #fff;
  padding: 10px 24px;
  border-radius: 100px;
  font-size: 14px;
  z-index: 9999;
  animation: toastIn 0.3s ease;
  white-space: nowrap;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ========== 空状态 ========== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-gray);
}
.empty-state svg { width: 80px; height: 80px; margin-bottom: 16px; opacity: 0.3; }
.empty-state p  { font-size: 15px; }

/* ========== 加载 ========== */
.load-more { text-align: center; padding: 20px; color: var(--text-gray); font-size: 13px; }
.loading   { text-align: center; padding: 40px; }

/* ========== 成员列表 ========== */
.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #F5F5F5;
}
.member-row:last-child { border-bottom: none; }
.member-info { flex: 1; min-width: 0; }
.member-name { font-size: 15px; font-weight: 600; }
.member-meta { font-size: 12px; color: var(--text-gray); }
.member-comment { font-size: 12px; color: var(--text-light); background: #F8F8F8; padding: 4px 8px; border-radius: 6px; margin-top: 4px; display: inline-block; }

/* ========== 统计卡片 ========== */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-item {
  background: #F8F8F8;
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
}
.stat-num  { font-size: 24px; font-weight: 800; }
.stat-label { font-size: 12px; color: var(--text-gray); margin-top: 4px; }

/* ========== 表单标签 ========== */
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}
.form-group { margin-bottom: 18px; }

/* ========== 已选信息标签行 ========== */
.info-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 2px solid #000;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
}
.info-tags span { color: var(--text-main); }

/* ========== 其他 ========== */
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-gray { color: var(--text-gray); }
.text-light { color: var(--text-light); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.flex-1 { flex: 1; }
::-webkit-scrollbar { width: 0; height: 0; }
