/* ============================================================
   顶尖发卡平台 - 基础样式与设计系统
   配色：青绿 teal + 橙 orange + 深色 ink + 浅灰蓝 bg
   ============================================================ */

:root {
  --font: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --bg: #F4F7FC;
  --ink: #0E1B2E;
  --ink-2: #14304F;
  --ink-3: #1B3A63;
  --teal: #0FC39A;
  --teal-dark: #0AA583;
  --teal-soft: #E3F8F2;
  --orange: #FF8A3D;
  --orange-dark: #E96A24;
  --orange-soft: #FFF2E8;
  --yellow: #FFD23F;
  --text: #22324A;
  --text-2: #687B93;
  --line: #E4EAF3;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 6px 24px rgba(14, 27, 46, .06);
  --shadow-lg: 0 18px 48px rgba(14, 27, 46, .12);
  --primary: #0FC39A;
  --primary-dark: #0AA583;
  --primary-light: #E3F8F2;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.container { width: min(1360px, 92%); margin: 0 auto; }
::selection { background: var(--teal); color: #fff; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

/* ===== 通用卡片 ===== */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===== 通用按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; font-family: var(--font);
  font-size: 15px; font-weight: 700; border-radius: 12px;
  padding: 12px 24px; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); box-shadow: 0 10px 24px rgba(15, 195, 154, .38); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-dark); box-shadow: 0 10px 24px rgba(255, 138, 61, .38); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid #CBD6E6; }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-dark); }
.btn-ghost-light { background: rgba(255, 255, 255, .08); color: #fff; border: 1.5px solid rgba(255, 255, 255, .5); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .16); border-color: #fff; }
.btn-lg { padding: 15px 34px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ===== 表单 ===== */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.field label span { color: var(--text-2); font-weight: 400; font-size: 12px; }
.field input, .field select, .field textarea {
  font-family: var(--font); font-size: 15px;
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 14px; background: #FBFCFE; color: var(--text);
  transition: border-color .2s, box-shadow .2s; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 195, 154, .12); background: #fff;
}
.field textarea { resize: vertical; min-height: 90px; }
.sms-row { display: flex; gap: 10px; align-items: stretch; }
.sms-row input { flex: 1; }
.code-btn {
  padding: 0 16px; border: 1.5px solid var(--teal); background: var(--teal-soft);
  color: var(--teal-dark); border-radius: 10px; cursor: pointer;
  font-family: var(--font); font-size: 13.5px; font-weight: 700;
  white-space: nowrap; transition: background .2s, opacity .2s; min-width: 112px;
}
.code-btn:hover { background: #D3F2E8; }
.code-btn:disabled { opacity: .55; cursor: not-allowed; background: #EEF2F7; border-color: var(--line); color: var(--text-2); }

/* ===== 徽章 / 标签 ===== */
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 100px; }
.pill-teal { background: var(--teal-soft); color: var(--teal-dark); }
.pill-orange { background: var(--orange-soft); color: var(--orange-dark); }
.pill-blue { background: #EAF1FF; color: #3B5BDB; }
.pill-gray { background: #EEF2F7; color: var(--text-2); }

/* ===== 模态框 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(6, 16, 34, .55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  z-index: 200; display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-mask.on { display: flex; }
.modal {
  background: #fff; border-radius: 20px; width: min(640px, 100%);
  box-shadow: var(--shadow-lg); animation: pop .3s ease both;
  max-height: calc(100vh - 40px); display: flex; flex-direction: column; overflow: hidden;
}
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px 0; }
.modal-head h3 { font-size: 20px; font-weight: 900; color: var(--ink); }
.modal-close {
  width: 38px; height: 38px; border: 0; background: #F0F4FA; border-radius: 9px;
  cursor: pointer; color: var(--text-2); display: flex; align-items: center; justify-content: center;
  font-size: 17px; transition: background .2s, color .2s;
}
.modal-close:hover { background: #E5ECF5; color: var(--ink); }
.modal-body { padding: 20px 26px 26px; overflow-y: auto; }
.modal-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.modal-tabs button {
  flex: 1; padding: 10px; border: 1.5px solid var(--line); background: #fff;
  border-radius: 10px; cursor: pointer; font-family: var(--font);
  font-size: 14px; font-weight: 700; color: var(--text-2); transition: all .2s;
}
.modal-tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.modal-tip { font-size: 12.5px; color: var(--text-2); background: #F7F9FC; border-radius: 10px; padding: 11px 14px; margin-bottom: 18px; line-height: 1.7; }
.nd-img { width: 100%; max-height: 300px; object-fit: contain; border-radius: 14px; margin: 0 auto 18px; display: block; background: #F4F7FC; padding: 14px; box-sizing: border-box; }
.notice-detail { line-height: 1.9; font-size: 14.5px; color: #33415C; }
.notice-detail p { margin: 0 0 12px; }

/* ===== Toast ===== */
.toast-wrap {
  position: fixed; top: 86px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: flex; flex-direction: column; gap: 10px;
  align-items: center; pointer-events: none;
}
.toast {
  background: var(--ink); color: #fff; padding: 13px 22px; border-radius: 12px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px; animation: toastIn .35s ease both;
}
.toast.ok { background: var(--teal-dark); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

/* ===== 回到顶部 ===== */
.back-top {
  position: fixed; right: 24px; bottom: 28px; width: 46px; height: 46px;
  border-radius: 50%; background: #fff; border: 1px solid var(--line);
  color: var(--text-2); cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 20px; box-shadow: var(--shadow); z-index: 90;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s, transform .3s, visibility .3s, color .2s, border-color .2s;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { color: var(--teal); border-color: var(--teal); }

/* ===== 进入动画（配合 JS IntersectionObserver） ===== */
html.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1); }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal-left { opacity: 0; transform: translateX(-44px); transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1); }
html.js .reveal-left.in { opacity: 1; transform: none; }
html.js .reveal-right { opacity: 0; transform: translateX(44px); transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1); }
html.js .reveal-right.in { opacity: 1; transform: none; }
html.js .reveal-scale { opacity: 0; transform: scale(.9); transition: opacity .6s ease, transform .6s cubic-bezier(.16, 1, .3, 1); }
html.js .reveal-scale.in { opacity: 1; transform: none; }

/* ===== 持续动画 ===== */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes float-slow { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(15, 195, 154, .45); } 70% { box-shadow: 0 0 0 14px rgba(15, 195, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(15, 195, 154, 0); } }
@keyframes gradient-shift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.float-anim { animation: float 4.5s ease-in-out infinite; }
.float-slow { animation: float-slow 6s ease-in-out infinite; }
.pulse-ring { animation: pulse-ring 2.8s ease-out infinite; }
.gradient-flow { background-size: 200% 200%; animation: gradient-shift 10s ease infinite; }

/* ===== 减少动效偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  html.js .reveal, html.js .reveal-left, html.js .reveal-right, html.js .reveal-scale { opacity: 1; transform: none; }
}

/* ===== iconfont 通用尺寸 ===== */
.iconfont { display: inline-flex; align-items: center; justify-content: center; }
.icon-sm { font-size: 14px; }
.icon-md { font-size: 18px; }
.icon-lg { font-size: 24px; }
.icon-xl { font-size: 32px; }
