/* ==================================================================
   花园世界 · 元宝账号提货平台   全局样式（浅色主题）
   ================================================================== */
:root {
  --green-900: #14361f;
  --green-700: #2f7a45;
  --green-600: #3f9d5c;
  --green-500: #55b473;
  --green-100: #e8f4ea;
  --green-50: #f2f9f3;
  --ink: #1d2e22;
  --ink-2: #46584c;
  --muted: #7b8d80;
  --line: #e2ebe4;
  --line-2: #eef4ef;
  --bg: #f4f8f5;
  --card: #ffffff;
  --amber: #c9812f;
  --amber-bg: #fdf4e6;
  --red: #d0543c;
  --red-bg: #fdeeea;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(20, 54, 31, 0.08);
  --shadow-lg: 0 24px 60px rgba(20, 54, 31, 0.16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: var(--green-700); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ---------------- 通用 ---------------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line);
  background: #fff; color: var(--ink);
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; transition: .16s;
}
.btn:hover { border-color: var(--green-500); color: var(--green-700); }
.btn-primary {
  background: linear-gradient(135deg, var(--green-600), var(--green-700));
  color: #fff; border-color: transparent; font-weight: 600;
  box-shadow: 0 6px 18px rgba(47, 122, 69, .26);
}
.btn-primary:hover { color: #fff; filter: brightness(1.05); }
.btn-primary:disabled { background: #cbd8ce; box-shadow: none; cursor: not-allowed; }
.btn-block { width: 100%; padding: 14px; font-size: 16px; border-radius: 12px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-danger { color: var(--red); border-color: #f0cfc8; background: #fff; }
.btn-danger:hover { background: var(--red-bg); border-color: var(--red); color: var(--red); }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: var(--green-100); color: var(--green-700); font-weight: 500;
}
.tag-warn { background: var(--amber-bg); color: var(--amber); }
.tag-red { background: var(--red-bg); color: var(--red); }
.tag-gray { background: #eef1ee; color: var(--muted); }

.muted { color: var(--muted); }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; }

/* ---------------- 顶部导航 ---------------- */
header.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--green-900); }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(140deg, var(--green-500), var(--green-700));
  display: flex; align-items: center; justify-content: center; color: #fff; flex: none;
}
.topnav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.topnav a, .topnav button {
  padding: 8px 14px; border-radius: 9px; font-size: 14px; color: var(--ink-2);
  border: 0; background: transparent;
}
.topnav a:hover, .topnav button:hover { background: var(--green-50); color: var(--green-700); }

/* ---------------- 公告条 ---------------- */
.announce {
  background: var(--green-50); border-bottom: 1px solid var(--line-2);
  font-size: 13px; color: var(--green-900);
}
.announce .wrap { display: flex; align-items: center; gap: 8px; padding-top: 9px; padding-bottom: 9px; }
.announce svg { flex: none; color: var(--green-600); }

/* ---------------- Hero ---------------- */
.hero { padding: 46px 0 30px; }
.hero h1 { margin: 0 0 12px; font-size: 34px; letter-spacing: -.5px; line-height: 1.25; }
.hero h1 span { color: var(--green-700); }
.hero p { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 620px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 26px; }
.hero-stats .item { }
.hero-stats .num { font-size: 22px; font-weight: 700; color: var(--green-700); }
.hero-stats .lbl { font-size: 13px; color: var(--muted); }

/* ---------------- 商品网格 ---------------- */
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 34px 0 16px; }
.section-title h2 { margin: 0; font-size: 19px; }
.section-title .hint { font-size: 13px; color: var(--muted); }

.tiers { display: flex; flex-direction: column; gap: 14px; padding-bottom: 30px; }

.tier-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; display: flex; flex-direction: column; gap: 12px;
  transition: .2s; position: relative; overflow: hidden;
}
/* 横向列表布局：左标题 / 中价格库存 / 右按钮 */
.tier-card.horiz {
  flex-direction: row; align-items: center; gap: 28px; padding: 18px 24px;
}
.tier-card.horiz:hover { transform: translateY(-2px); }
.tc-left { display: flex; align-items: center; gap: 14px; flex: 1.1; min-width: 0; }
.tc-title { min-width: 0; }
.tc-title h3 { margin: 0; font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-title .desc {
  margin: 3px 0 0; font-size: 12.5px; color: var(--muted); min-height: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tc-mid { flex: 1.4; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.tc-right { flex-shrink: 0; }
.tc-right .btn { padding: 11px 30px; font-size: 15px; }
.tier-card.horiz .tier-price .val { font-size: 26px; }
.tier-card.horiz .tier-meta { justify-content: flex-start; gap: 18px; border-top: none; padding-top: 0; }
.tier-card.horiz .stock-bar { height: 4px; }
@media (max-width: 680px) {
  .tier-card.horiz { flex-wrap: wrap; gap: 12px; }
  .tc-left { flex: 1 1 100%; }
  .tc-mid { flex: 1 1 auto; }
  .tc-right { flex: 1 1 100%; }
  .tc-right .btn { width: 100%; }
}
.tier-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #cfe4d5; }
.tier-card.sold-out { opacity: .72; }
.tier-card.sold-out:hover { transform: none; box-shadow: none; }
.tier-coin {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; flex-shrink: 0;
  background: linear-gradient(135deg, #eaf7ee, #dff1e4); color: var(--green-700);
  font-weight: 700; font-size: 13px; padding: 5px 12px; border-radius: 999px;
}
.tier-card h3 { margin: 0; font-size: 17px; }
.tier-card .desc { margin: 0; font-size: 13px; color: var(--muted); min-height: 38px; }
.tier-card.horiz .desc { min-height: 0; }
.tier-price { display: flex; align-items: baseline; gap: 6px; }
.tier-price .cur { font-size: 16px; font-weight: 600; color: var(--green-700); }
.tier-price .val { font-size: 30px; font-weight: 700; color: var(--green-700); letter-spacing: -1px; }
.tier-price .unit { font-size: 13px; color: var(--muted); }
.tier-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--ink-2);
  border-top: 1px dashed var(--line); padding-top: 12px;
}
.tier-meta b { color: var(--ink); }
.stock-bar { height: 5px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.stock-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green-500), var(--green-600)); }

/* ---------------- 弹窗 ---------------- */
.mask {
  position: fixed; inset: 0; background: rgba(18, 36, 24, .45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  z-index: 200; opacity: 0; pointer-events: none; transition: .2s;
}
.mask.show { opacity: 1; pointer-events: auto; }
.modal {
  background: #fff; border-radius: 20px; width: 100%; max-width: 460px;
  max-height: 92vh; overflow: auto; box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(.98); transition: .22s;
}
.mask.show .modal { transform: none; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: #fff; z-index: 2;
}
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 20px 22px 24px; }
.icon-btn {
  border: 0; background: var(--line-2); width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.icon-btn:hover { background: #e3ece5; color: var(--ink); }

/* 步骤条 */
.steps { display: flex; align-items: center; gap: 8px; padding: 0 22px 4px; font-size: 12px; color: var(--muted); }
.steps .s { display: flex; align-items: center; gap: 6px; }
.steps .dot {
  width: 20px; height: 20px; border-radius: 50%; background: var(--line-2); color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600;
}
.steps .s.active .dot { background: var(--green-600); color: #fff; }
.steps .s.active { color: var(--green-700); font-weight: 600; }
.steps .sep { flex: 1; height: 1px; background: var(--line); }

/* 订单摘要 */
.summary { background: var(--green-50); border-radius: 14px; padding: 14px 16px; border: 1px solid var(--line-2); }
.summary .row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.summary .row .k { color: var(--muted); }
.summary .row .v { font-weight: 500; }
.summary .total { border-top: 1px dashed #d8e6dc; margin-top: 6px; padding-top: 10px; }
.summary .total .v { font-size: 22px; font-weight: 700; color: var(--green-700); }

/* 数量选择 */
.qty-row { display: flex; align-items: center; gap: 12px; margin: 18px 0 4px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper button { width: 38px; height: 40px; border: 0; background: #fff; font-size: 18px; color: var(--ink-2); }
.stepper button:hover { background: var(--green-50); color: var(--green-700); }
.stepper input { width: 60px; height: 40px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-size: 15px; font-weight: 600; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.quick button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 12px; font-size: 13px; color: var(--ink-2); }
.quick button.on, .quick button:hover { border-color: var(--green-500); color: var(--green-700); background: var(--green-50); }

.field { margin-top: 16px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  outline: none; background: #fff; color: var(--ink); transition: .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(63,157,92,.12); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* 支付区 */
.pay-box { text-align: center; }
.qr-frame {
  width: 232px; height: 232px; margin: 6px auto 14px; padding: 10px;
  border: 1px solid var(--line); border-radius: 16px; background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.qr-frame img { width: 100%; height: 100%; display: block; }
.qr-frame .empty { color: var(--muted); font-size: 13px; }
.pay-amount { font-size: 32px; font-weight: 700; color: var(--green-700); letter-spacing: -.5px; }
.pay-amount small { font-size: 15px; font-weight: 500; }
.countdown { font-size: 13px; color: var(--amber); margin-top: 6px; }
.pay-tip { font-size: 12.5px; color: var(--muted); margin-top: 12px; line-height: 1.7; }
.pay-actions { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.btn-ali { background: #1677ff; color: #fff; border-color: #1677ff; }
.btn-ali:hover { color: #fff; filter: brightness(1.06); }
.btn-ali:disabled { background: #b9cff5; border-color: #b9cff5; cursor: not-allowed; }
.pay-jump-toggle { margin-top: 10px; font-size: 13px; }
.pay-jump-toggle a { color: var(--green-700); text-decoration: underline; }
.pay-jump-hint { font-size: 12px; color: var(--muted); line-height: 1.7; margin: -2px 0 0; }
.divider-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.divider-or::before, .divider-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.waiting { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); justify-content: center; width: 100%; margin-top: 12px; }
.spin { width: 14px; height: 14px; border: 2px solid #d7e5da; border-top-color: var(--green-600); border-radius: 50%; animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* 发货结果 */
.success-head { text-align: center; padding: 6px 0 14px; }
.success-icon {
  width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 10px;
  background: var(--green-100); color: var(--green-700);
  display: flex; align-items: center; justify-content: center;
}
.success-head h4 { margin: 0 0 4px; font-size: 18px; }
.success-head p { margin: 0; font-size: 13px; color: var(--muted); }

.acct-list { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 14px; max-height: 300px; overflow: auto; }
.acct {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff;
  display: flex; flex-direction: column; gap: 8px;
}
.acct .line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.acct .line .k { color: var(--muted); width: 44px; flex: none; }
.acct .line .v { font-weight: 600; letter-spacing: .3px; word-break: break-all; }
.acct .copy { margin-left: auto; border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 3px 9px; font-size: 12px; color: var(--green-700); flex: none; }
.acct .copy:hover { background: var(--green-50); border-color: var(--green-500); }
.acct .recover { font-size: 12px; color: var(--amber); border-top: 1px dashed var(--line); padding-top: 7px; }

.notice { border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.7; }
.notice-warn { background: var(--amber-bg); color: #815219; }
.notice-info { background: var(--green-50); color: var(--green-900); }

/* 下单弹窗：支付方式选择 */
.gw-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.gw-opt {
  border: 1.5px solid var(--line); background: #fff; border-radius: 10px;
  padding: 9px 16px; font-size: 13.5px; color: var(--ink); cursor: pointer; transition: .15s;
}
.gw-opt:hover { border-color: var(--green-500); }
.gw-opt.on { border-color: var(--green-600); background: var(--green-50); color: var(--green-700); font-weight: 600; }

/* 后台：支付通道勾选 */
.gw-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.gw-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.gw-check input { width: 15px; height: 15px; accent-color: var(--green-600); }

.toast {
  position: fixed; left: 50%; bottom: 42px; transform: translate(-50%, 20px);
  background: rgba(20, 54, 31, .94); color: #fff; padding: 11px 20px; border-radius: 12px;
  font-size: 14px; z-index: 999; opacity: 0; transition: .25s; pointer-events: none; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 页脚 ---------------- */
footer.site-foot {
  border-top: 1px solid var(--line); margin-top: 40px; padding: 26px 0 40px;
  font-size: 12.5px; color: var(--muted); background: #fff;
}
footer.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; justify-content: space-between; }

.skeleton { background: linear-gradient(90deg, #eef4ef 25%, #f6faf7 37%, #eef4ef 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------- 用户账号 / 个人中心 ---------------- */
.topnav .nav-auth {
  background: var(--green-100); color: var(--green-700); font-weight: 600;
  max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topnav .nav-auth:hover { background: #dcf0e2; }

/* 分段切换（登录 / 注册） */
.seg { display: flex; background: var(--line-2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button {
  flex: 1; border: 0; background: transparent; padding: 9px 0; border-radius: 9px;
  font-size: 14px; color: var(--muted); font-weight: 500;
}
.seg button.on { background: #fff; color: var(--green-700); font-weight: 600; box-shadow: 0 2px 8px rgba(20,54,31,.08); }

/* 个人中心头部 */
.profile-head { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.profile-head .avatar {
  width: 48px; height: 48px; border-radius: 14px; flex: none;
  background: linear-gradient(140deg, var(--green-500), var(--green-700));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
}
.profile-head .uname { font-size: 16.5px; font-weight: 700; }
.profile-head .umeta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 我的订单 */
.stat-strip { display: flex; gap: 10px; }
.stat-strip .item {
  flex: 1; background: var(--green-50); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 10px 12px; text-align: center;
}
.stat-strip .num { font-size: 19px; font-weight: 700; color: var(--green-700); }
.stat-strip .lbl { font-size: 12px; color: var(--muted); }

.bind-row { display: flex; gap: 8px; margin-top: 12px; }
.bind-row input {
  flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 9px; outline: none; font-size: 13.5px;
}
.bind-row input:focus { border-color: var(--green-500); }
.bind-row .btn { flex: none; }

.order-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; max-height: 46vh; overflow: auto; }
.order-item { border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px; background: #fff; }
.order-item .oi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.order-item .oi-no { font-size: 12.5px; font-weight: 600; }
.order-item .oi-body { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.order-item .oi-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.order-item .oi-line.small { font-size: 12px; color: var(--muted); }
.order-item .oi-line b { color: var(--green-700); }
.order-item .oi-foot { margin-top: 10px; display: flex; justify-content: flex-end; }
.order-item .oi-foot:empty { display: none; }

.pager-line { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 13px; color: var(--muted); padding: 14px 0 4px; }

@media (max-width: 640px) {
  .hero { padding: 30px 0 20px; }
  .hero h1 { font-size: 25px; }
  .topnav a, .topnav button { padding: 7px 10px; font-size: 13px; }
  .brand { font-size: 15px; }
  .modal { border-radius: 16px; }
  .wrap { padding: 0 14px; }
}
