/* ==========================================================================
   设计系统 Token
   配色取自参考截图：暖橙红主渐变 + 薄荷绿强调 + 暖白背景
   字体：展示字 Plus Jakarta Sans（数字/英文标签有几何感），中文用系统无衬线
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  /* 色彩 */
  --c-primary-1: #FF7A45;     /* 渐变起点：暖橙 */
  --c-primary-2: #FF3B2E;     /* 渐变终点：珊瑚红 */
  --c-primary: #FF5238;
  --c-accent: #18C37D;        /* 薄荷绿强调（选中态/确认态） */
  --c-accent-dark: #129A61;
  --c-gold: #FFB23E;          /* 奖品金色点缀 */
  --c-bg: #F6F4F2;            /* 页面底色，暖白灰 */
  --c-surface: #FFFFFF;
  --c-ink: #221B17;           /* 主文字，偏暖黑 */
  --c-ink-soft: #6B6058;      /* 次要文字 */
  --c-ink-faint: #A89E96;
  --c-border: #EFE9E4;
  --c-danger: #E0341F;

  --grad-primary: linear-gradient(135deg, var(--c-primary-1) 0%, var(--c-primary-2) 100%);
  --grad-gold: linear-gradient(135deg, #FFD27A 0%, #FF9A3E 100%);
  --grad-bg-hero: radial-gradient(circle at 15% 0%, rgba(255,122,69,.22), transparent 55%),
                   radial-gradient(circle at 100% 10%, rgba(255,59,46,.14), transparent 45%);

  /* 圆角 */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* 阴影 */
  --shadow-card: 0 4px 20px rgba(34, 27, 23, 0.06);
  --shadow-card-hover: 0 10px 30px rgba(34, 27, 23, 0.12);
  --shadow-float: 0 14px 34px rgba(255, 58, 46, 0.28);

  /* 字体 */
  --font-display: 'Plus Jakarta Sans', -apple-system, 'PingFang SC', sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;

  /* 布局 */
  --container-max: 1180px;
  --nav-h: 64px;
  --bottom-nav-h: 62px;
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-soft: cubic-bezier(.22, .61, .36, 1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--r-pill);
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 700;
  transition: transform .18s var(--ease-spring), box-shadow .2s, opacity .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-float);
}
.btn-primary:hover { box-shadow: 0 16px 38px rgba(255,58,46,.36); transform: translateY(-1px); }
.btn-ghost {
  background: var(--c-surface);
  color: var(--c-ink);
  border: 1.5px solid var(--c-border);
}
.btn-accent {
  background: var(--c-accent);
  color: #fff;
}
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  transition: box-shadow .25s var(--ease-soft), transform .25s var(--ease-soft);
}
.card-hover:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }

/* ---------- 标签 / 徽章 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-pill);
}
.badge-live { background: #E8FAF1; color: var(--c-accent-dark); }
.badge-soon { background: #FFF1E6; color: #C9622A; }
.badge-ended { background: #F1EFEC; color: var(--c-ink-faint); }

/* ---------- 顶部导航 ---------- */
.topbar {
  height: var(--nav-h);
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-border);
}
.topbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--grad-primary);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: var(--shadow-float);
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- 底部导航（移动端） ---------- */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--bottom-nav-h);
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  display: none;
  z-index: 60;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-inner {
  height: var(--bottom-nav-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--c-ink-faint);
  font-weight: 600;
}
.bottom-nav-item.active { color: var(--c-primary); }
.bottom-nav-fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: var(--shadow-float);
  margin: 0 auto;
  transform: translateY(-14px);
}

@media (max-width: 860px) {
  .bottom-nav { display: block; }
  body { padding-bottom: calc(var(--bottom-nav-h) + 8px); }
  .topbar-desktop-only { display: none; }
}
@media (min-width: 861px) {
  .mobile-only { display: none !important; }
}

/* ---------- 弹层 / 模态 ---------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(20,14,11,.46);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.overlay.open { display: flex; animation: fadeIn .2s var(--ease-soft); }
.modal {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 420px;
  padding: 28px 26px 26px;
  position: relative;
  animation: modalIn .32s var(--ease-spring);
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-bg);
  color: var(--c-ink-soft);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-ink-soft);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  background: var(--c-bg);
  transition: border-color .15s, background .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--c-primary);
  background: #fff;
  outline: none;
}
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }

.tabs-pill { display: flex; gap: 8px; flex-wrap: wrap; }
.tab-pill {
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-pill);
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-ink-soft);
  background: var(--c-surface);
  transition: all .18s var(--ease-soft);
}
.tab-pill.active {
  border-color: var(--c-accent);
  color: var(--c-accent-dark);
  background: #E8FAF1;
}

/* ---------- 工具类 ---------- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.mt-8{margin-top:8px;} .mt-12{margin-top:12px;} .mt-16{margin-top:16px;} .mt-24{margin-top:24px;} .mt-32{margin-top:32px;}
.mb-8{margin-bottom:8px;} .mb-12{margin-bottom:12px;} .mb-16{margin-bottom:16px;} .mb-24{margin-bottom:24px;}
.text-soft { color: var(--c-ink-soft); }
.text-faint { color: var(--c-ink-faint); }
.text-center { text-align: center; }
.font-display { font-family: var(--font-display); }
.section-title { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.section-title::before {
  content: '';
  width: 4px; height: 16px;
  border-radius: 3px;
  background: var(--grad-primary);
}
.skeleton {
  background: linear-gradient(90deg, #EFEAE6 25%, #F7F4F1 37%, #EFEAE6 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.toast-stack {
  position: fixed; top: 84px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast {
  background: var(--c-ink);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  animation: toastIn .25s var(--ease-spring);
}
.toast.toast-error { background: var(--c-danger); }
.toast.toast-success { background: var(--c-accent-dark); }
@keyframes toastIn { from { opacity:0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
