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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f6fa;
  color: #333;
  min-height: 100vh;
}

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* 顶部导航 */
.topbar {
  background: linear-gradient(135deg, #4f7cff, #6a5cff);
  color: #fff;
  margin: 0 -16px 16px;
  padding: 14px 20px;
  box-shadow: 0 2px 10px rgba(79, 124, 255, .3);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto;
}
.shield {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: #34d399;
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: bold;
  flex-shrink: 0;
}
.topbar-title {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 卡片 */
.card {
  background: #fff;
  border-radius: 14px;
  padding: 22px 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
.tag {
  display: inline-block;
  background: #eaf1ff;
  color: #4f7cff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.desc {
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
}

/* 库存 */
.stock-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #666;
  background: #f7f8fc;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
}
.stock-num {
  color: #4f7cff;
  font-weight: 700;
  font-size: 16px;
}
.stock-num.empty { color: #e74c3c; }

/* 表单 */
.field { margin-bottom: 16px; }
.label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
}
input[type="email"], input[type="text"] {
  width: 100%;
  border: 1.5px solid #e3e6ef;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  outline: none;
  background: #fff;
  color: #333;
  transition: border-color .2s;
}
input:focus { border-color: #4f7cff; }

/* 按钮 */
.btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: #4f7cff;
  transition: opacity .2s;
}
.btn-primary {
  background: linear-gradient(135deg, #4f7cff, #6a5cff);
}
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* 提示 */
.msg {
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  min-height: 20px;
}
.msg.ok { color: #27ae60; }
.msg.err { color: #e74c3c; }

/* 领取结果 */
.result { text-align: center; }
.result-icon { font-size: 44px; margin-bottom: 8px; }
.result-title { font-size: 19px; margin-bottom: 6px; }
.result-desc { font-size: 13px; color: #999; margin-bottom: 14px; }
.code-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f7f8fc;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.code-text {
  flex: 1;
  font-family: monospace;
  font-size: 14px;
  word-break: break-all;
  color: #333;
}
.btn-copy {
  flex-shrink: 0;
  border: none;
  background: #4f7cff;
  color: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}
.result-tip { font-size: 12px; color: #bbb; }

.footer {
  text-align: center;
  font-size: 12px;
  color: #bbb;
  margin-top: 20px;
}
