/* ============ 秒助 · 全局样式（移动端优先） ============ */
:root {
  --red: #e02e24;            /* 拼多多红（主色） */
  --red-deep: #c7251c;
  --grad-btn: linear-gradient(135deg, #ff5a2e, #e02e24);
  --gold: #ffb300;           /* 福袋金（辅助） */
  --gold-deep: #ff9500;
  --green: #07c160;          /* 成功 */
  --bg: #fff5f0;             /* 暖白背景 */
  --card: #ffffff;
  --text: #333333;
  --text-sub: #999999;
  --line: #f0e6e0;
  --radius: 14px;
  --shadow: 0 4px 16px rgba(224, 46, 36, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--red);
  text-decoration: none;
}

.container {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

/* ============ 标题区 ============ */
.header {
  background: var(--grad-btn);
  color: #fff;
  padding: 20px 16px 28px;
  border-radius: 0 0 24px 24px;
  position: relative;
  overflow: hidden;
}

.header::after {
  content: '';
  position: absolute;
  right: -30px;
  top: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.header::before {
  content: '';
  position: absolute;
  right: 40px;
  top: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand .logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.brand .name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
}

.header-sub {
  position: relative;
  z-index: 1;
  margin-top: 14px;
}

.header-sub .title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
}

.header-sub .desc {
  margin-top: 6px;
  font-size: 13px;
  opacity: 0.9;
}

.header .tag {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.2);
}

/* ============ 公告栏 ============ */
.announce-bar {
  margin-top: 16px;
  background: linear-gradient(135deg, #fff7e6, #fff3d6);
  border: 1px solid #ffe1a8;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  color: #b45309;
  line-height: 1.6;
  word-break: break-all;
}

/* ============ 统计区 ============ */
.stats {
  display: flex;
  gap: 10px;
  margin: -20px 16px 0;
  position: relative;
  z-index: 2;
}

.stat-card {
  flex: 1;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 8px;
  text-align: center;
}

.stat-card .num {
  font-size: 22px;
  font-weight: 800;
  color: var(--red);
}

.stat-card .label {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-sub);
}

/* ============ 区块卡片 ============ */
.section {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-top: 16px;
}

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

.section-title h2 {
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title .tip {
  font-size: 12px;
  color: var(--text-sub);
}

/* ============ 按钮 ============ */
.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: transform 0.1s, opacity 0.2s;
}

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

.btn-primary {
  background: var(--grad-btn);
  color: #fff;
  box-shadow: 0 6px 18px rgba(224, 46, 36, 0.35);
}

.btn-gold {
  background: linear-gradient(135deg, #ffc53d, #ff9500);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 149, 0, 0.3);
}

.btn-ghost {
  background: #fff;
  color: var(--red);
  border: 1px solid var(--red);
}

.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn-sm {
  display: inline-block;
  width: auto;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 8px;
}

/* ============ 一键领码 ============ */
.claim-box {
  margin-top: 16px;
  text-align: center;
}

.claim-btn {
  font-size: 20px;
  padding: 18px;
  letter-spacing: 2px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.claim-btn .sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.9;
  letter-spacing: 0;
}

.claim-tip {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-sub);
}

/* ============ 福袋码列表 ============ */
.code-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.code-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: all 0.2s;
}

.code-item:active {
  background: #fff7f3;
}

.code-item .code {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--red);
  font-family: 'SF Mono', Consolas, Menlo, monospace;
}

.code-item .copy-btn {
  flex-shrink: 0;
}

.empty {
  text-align: center;
  padding: 32px 0;
  color: var(--text-sub);
  font-size: 14px;
}

.empty .icon {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
}

/* ============ 表单 ============ */
.form-item {
  margin-bottom: 14px;
}

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

.input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  outline: none;
  text-transform: uppercase;
  font-family: 'SF Mono', Consolas, Menlo, monospace;
}

.input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(224, 46, 36, 0.1);
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-sub);
  cursor: pointer;
}

.checkbox input {
  margin-top: 2px;
}

/* ============ 规则公告 ============ */
.rules {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.8;
}

.rules li {
  list-style: none;
  padding-left: 16px;
  position: relative;
}

.rules li::before {
  content: '·';
  position: absolute;
  left: 2px;
  color: var(--red);
  font-weight: 800;
}

/* ============ 底部 ============ */
.footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: #bbb;
  line-height: 1.8;
}

.footer a {
  color: #bbb;
}

/* ============ 弹窗 ============ */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.modal {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 360px;
  padding: 24px 20px;
  text-align: center;
  animation: pop 0.2s ease;
}

@keyframes pop {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal .big-code {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--red);
  margin: 12px 0;
  font-family: 'SF Mono', Consolas, Menlo, monospace;
}

.modal .modal-tip {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 16px;
}

.modal .btn {
  margin-top: 10px;
}

/* ============ 提示浮层 ============ */
.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 200;
  pointer-events: none;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============ 我的记录 ============ */
.record-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.record-item:last-child {
  border-bottom: none;
}

.record-item .code {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
  font-family: 'SF Mono', Consolas, Menlo, monospace;
}

.record-item .time {
  font-size: 12px;
  color: var(--text-sub);
}

.record-item .status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
}

.status-done {
  background: #e8f8ef;
  color: var(--green);
}

.status-pending {
  background: #fff4e5;
  color: var(--gold-deep);
}

/* ============ 导航 Tabs ============ */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 50;
}

.tabbar a {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 12px;
  color: var(--text-sub);
}

.tabbar a.active {
  color: var(--red);
  font-weight: 700;
}

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