/* 汽水音乐推广 H5 —— 样式 */
:root {
  --orange: #ff7a2f;
  --orange-2: #ffb03a;
  --yellow: #ffd84d;
  --bg: #14110f;
  --bg-2: #1c1815;
  --card: #221d19;
  --card-2: #2b2420;
  --line: #382f29;
  --text: #f6efe8;
  --text-2: #a89a8d;
  --text-3: #7b6d62;
  --green: #34d399;
  --red: #ff5f57;
  --blue: #4aa8ff;
  --radius: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: #0c0a09;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

body {
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

input, textarea, button, select { font-family: inherit; font-size: inherit; color: inherit; }
input, textarea { outline: none; }
button { border: none; background: none; cursor: pointer; padding: 0; }
ul, li, p, h1, h2, h3 { margin: 0; padding: 0; list-style: none; }
.hidden { display: none !important; }

.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow-x: hidden;
}

/* ---------------- 顶部 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: linear-gradient(135deg, #ff7a2f 0%, #ff4f2f 55%, #ff9a3c 100%);
  box-shadow: 0 6px 18px rgba(255, 90, 40, .18);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.logo {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(0, 0, 0, .28);
  color: #fff; font-weight: 700; font-size: 17px;
  border: 1px solid rgba(255, 255, 255, .35);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 16px; color: #fff; letter-spacing: .5px; }
.brand-text span { font-size: 11px; color: rgba(255, 255, 255, .8); }

.balance-chip {
  display: flex; flex-direction: column; align-items: flex-end;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(255, 255, 255, .3);
  line-height: 1.2;
}
.balance-chip em { font-style: normal; color: #fff; font-weight: 700; font-size: 15px; }
.balance-chip span { font-size: 10px; color: rgba(255, 255, 255, .85); }

/* ---------------- 内容区 ---------------- */
.content { flex: 1; padding: 12px 12px 90px; }

.notice-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; margin-bottom: 12px;
  border-radius: 10px;
  background: rgba(255, 176, 58, .1);
  border: 1px dashed rgba(255, 176, 58, .35);
}
.notice-bar .dot {
  width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--orange-2);
  box-shadow: 0 0 0 3px rgba(255, 176, 58, .18);
}
.notice-bar p { font-size: 12px; color: #e4c79a; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}

.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-head h2 { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; }
.card-sub { font-size: 11px; color: var(--text-3); }

.ico {
  width: 20px; height: 20px; flex: none;
  display: grid; place-items: center;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  color: #22140a; font-size: 12px; font-style: normal; font-weight: 700;
}

/* 表单 */
.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.req { color: var(--orange-2); }

.field input, .field textarea, .lb + input {
  width: 100%;
  padding: 11px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  transition: border-color .18s;
  resize: none;
}
.field input:focus, .field textarea:focus, .lb + input:focus { border-color: var(--orange); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }

/* 数量 */
.qty-box {
  display: flex; align-items: center; gap: 10px;
  padding: 5px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.qty-box input {
  flex: 1; min-width: 0;
  text-align: center;
  background: none; border: none; outline: none;
  font-size: 22px; font-weight: 700; color: var(--yellow);
  -moz-appearance: textfield;
}
.qty-box input::-webkit-outer-spin-button,
.qty-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step {
  width: 40px; height: 40px; flex: none;
  border-radius: 9px;
  background: var(--card-2);
  color: var(--text);
  font-size: 18px;
}
.step:active { background: var(--orange); color: #1b0e04; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 12px;
}
.chip.is-on {
  background: rgba(255, 122, 47, .14);
  border-color: var(--orange);
  color: var(--orange-2);
  font-weight: 600;
}

/* 速度 */
.speed-list { display: flex; flex-direction: column; gap: 9px; }
.speed {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg-2);
  transition: .18s;
}
.speed.is-on { border-color: var(--orange); background: rgba(255, 122, 47, .1); }
.speed .radio {
  width: 17px; height: 17px; flex: none;
  border-radius: 50%; border: 2px solid var(--text-3);
  display: grid; place-items: center;
}
.speed.is-on .radio { border-color: var(--orange); }
.speed.is-on .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.speed-main { flex: 1; min-width: 0; }
.speed-main .t { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.speed-main .t small { font-size: 10px; font-weight: 500; color: #1b0e04; background: var(--orange-2); border-radius: 4px; padding: 1px 5px; }
.speed-main .d { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.speed-right { text-align: right; flex: none; }
.speed-right .r { font-size: 12px; color: var(--orange-2); font-weight: 600; }
.speed-right .p { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* 账单 */
.bill li { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 13px; color: var(--text-2); }
.bill li b { color: var(--text); font-weight: 600; }
.bill li.dis b { color: var(--green); }
.bill li.total { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 10px; }
.bill li.total b { color: var(--orange-2); font-size: 20px; font-weight: 700; }
.bill-foot {
  display: flex; justify-content: space-between;
  margin-top: 8px; padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--text-3);
}
.bill-foot b { color: var(--text); }

/* 协议 + 提交 */
.agree { margin: 4px 0 12px; }
.check { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; color: var(--text-3); }
.check input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--orange); flex: none; }
.tip-bottom { text-align: center; font-size: 11px; color: var(--text-3); margin-top: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border-radius: 10px;
  font-weight: 600;
  transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: linear-gradient(135deg, var(--orange), #ff4f2f); color: #fff; }
.btn-outline { background: transparent; border: 1px solid rgba(255, 255, 255, .5); color: #fff; }
.btn-ghost { background: var(--card-2); color: var(--text-2); border: 1px solid var(--line); }
.btn-text { background: transparent; color: var(--text-3); font-weight: 500; }
.btn-sm { padding: 7px 15px; font-size: 13px; }
.btn-lg { padding: 14px; font-size: 16px; border-radius: 12px; box-shadow: 0 8px 20px rgba(255, 79, 47, .28); }
.btn-block { display: flex; width: 100%; }
.btn.disabled, .btn:disabled { opacity: .45; pointer-events: none; }

/* 提示卡 / 登录卡 */
.topup-card, .auth-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.topup-card { background: rgba(255, 95, 87, .1); border-color: rgba(255, 95, 87, .35); }
.auth-card { background: rgba(74, 168, 255, .08); border-color: rgba(74, 168, 255, .3); }
.auth-left strong { display: block; font-size: 14px; }
.auth-left span { font-size: 11px; color: var(--text-2); }
.auth-right { display: flex; flex-direction: column; gap: 6px; }

/* 登录/注册、改密表单 */
.auth-ico { background: linear-gradient(135deg, var(--orange), var(--orange-2)); color: #22140a; }
.auth-form { text-align: left; }
.auth-form .lb { margin-top: 10px; }
.auth-form input { width: 100%; margin-top: 6px; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); }
.auth-form input:focus { border-color: var(--orange); outline: none; }
.auth-form .btn { margin-top: 12px; }
#btnAuth { height: 44px; font-size: 15px; }
.auth-form .hint { margin: 8px 0; }

/* ---------------- 订单页 ---------------- */
.search-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.search-bar input {
  flex: 1; min-width: 0;
  padding: 10px 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.search-bar input:focus { border-color: var(--orange); }

.tabs { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; padding: 6px 15px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--text-2); font-size: 13px;
}
.tab.is-on { background: rgba(255, 122, 47, .14); border-color: var(--orange); color: var(--orange-2); font-weight: 600; }

.order-list { display: flex; flex-direction: column; gap: 11px; }
.order {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
}
.order-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-no { font-size: 11px; color: var(--text-3); font-family: ui-monospace, Menlo, Consolas, monospace; }
.status { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; flex: none; }
.status.pending { background: rgba(74, 168, 255, .15); color: var(--blue); }
.status.running { background: rgba(255, 176, 58, .15); color: var(--orange-2); }
.status.completed { background: rgba(52, 211, 153, .15); color: var(--green); }
.status.canceled { background: rgba(168, 154, 141, .15); color: var(--text-3); }

.order-title { margin: 9px 0 3px; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-meta { font-size: 12px; color: var(--text-3); }
.order-meta span + span::before { content: "·"; margin: 0 5px; }

.bar { height: 7px; border-radius: 999px; background: var(--bg-2); overflow: hidden; margin: 11px 0 7px; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--orange), var(--yellow)); transition: width .5s ease; }
.order.done .bar i { background: linear-gradient(90deg, #10b981, var(--green)); }

.order-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prog { font-size: 12px; color: var(--text-2); }
.prog b { color: var(--yellow); font-size: 14px; }
.order-acts { display: flex; gap: 8px; }

.empty { padding: 55px 20px; text-align: center; color: var(--text-3); }
.empty .e-ico { font-size: 40px; opacity: .35; }
.empty p { margin-top: 10px; font-size: 13px; }
.empty .btn { margin: 16px auto 0; }

/* ---------------- 我的 ---------------- */
.wallet {
  position: relative;
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  margin-bottom: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #ff7a2f, #ff4f2f 60%, #ff9a3c);
}
.wallet-bg { position: absolute; right: -30px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .13); }
.wallet-bg::after { content: ""; position: absolute; left: 30px; top: 80px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.wallet-top { position: relative; }
.wallet-top span { font-size: 12px; color: rgba(255, 255, 255, .85); }
.wallet-top em { display: block; font-style: normal; font-size: 34px; font-weight: 700; color: #fff; line-height: 1.2; }
.wallet-info { position: relative; display: flex; justify-content: space-between; font-size: 11px; color: rgba(255, 255, 255, .85); margin: 8px 0 13px; }
.wallet-btns { position: relative; display: flex; gap: 9px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { text-align: center; padding: 9px 2px; background: var(--bg-2); border-radius: 10px; }
.stat b { display: block; font-size: 17px; color: var(--orange-2); }
.stat span { font-size: 11px; color: var(--text-3); }

.rule li { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; color: var(--text-2); border-bottom: 1px dashed var(--line); }
.rule li:last-child { border-bottom: none; }
.rule li b { color: var(--text); }

.faq li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.faq li:last-child { border-bottom: none; }
.faq .q { font-size: 13px; font-weight: 600; }
.faq .a { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.danger-zone { text-align: center; padding: 6px 0 10px; }

/* ---------------- 底部导航 ---------------- */
.tabbar {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  z-index: 30;
  display: flex;
  padding-bottom: var(--safe-b);
  background: rgba(28, 24, 21, .96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.tabitem {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 7px;
  color: var(--text-3);
  font-size: 11px;
}
.tabitem .ti { font-size: 19px; line-height: 1; }
.tabitem.is-on { color: var(--orange-2); }
.badge {
  position: absolute; top: 4px; left: 50%; margin-left: 8px;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: grid; place-items: center;
  border-radius: 999px; background: var(--red); color: #fff;
  font-size: 10px; font-style: normal; font-weight: 600;
}

/* ---------------- 弹窗 ---------------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); animation: fade .2s ease; }
.sheet {
  position: relative;
  width: 100%; max-width: 480px;
  max-height: 92vh;
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border-radius: 18px 18px 0 0;
  animation: up .25s ease;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
#successModal { align-items: center; }
#authModal .sheet, #pwModal .sheet { min-height: 520px; }
#rechargeModal .sheet { min-height: 420px; }
#btnRecharge { height: 48px; font-size: 16px; }
#rechargeModal .btn-primary { height: 56px; font-size: 16px; }
#btnBuyCard { height: 44px; font-size: 14px; text-decoration: none; display: flex; align-items: center; justify-content: center; }
.sheet-center { align-items: center; border-radius: 18px; width: calc(100% - 56px); max-width: 340px; margin-bottom: 40px; }
@keyframes up { from { transform: translateY(100%); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sheet-head h3 { font-size: 16px; font-weight: 600; }
.close { width: 30px; height: 30px; border-radius: 50%; background: var(--card); color: var(--text-2); font-size: 19px; line-height: 1; }
.sheet-body { padding: 16px; overflow-y: auto; }
.sheet-body.center { text-align: center; }

.lb { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.lb + input { text-transform: uppercase; letter-spacing: 1px; }
.hint { font-size: 11px; color: var(--text-3); margin: 8px 0 14px; }
.hint.err { color: var(--red); }
.hint.ok { color: var(--green); }

.demo-cards { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.dc-title { font-size: 12px; color: var(--text-2); margin-bottom: 9px; }
.dc-list { display: flex; flex-direction: column; gap: 7px; }
.dc-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 11px; border-radius: 9px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 12px; text-align: left; width: 100%;
}
.dc-item code { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--yellow); letter-spacing: .5px; }
.dc-item .v { color: var(--orange-2); font-weight: 600; }
.dc-item.used { opacity: .45; }
.dc-item.used .v { color: var(--text-3); }

/* 成功弹窗 */
.ok-icon {
  width: 54px; height: 54px; margin: 4px auto 12px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #06281d; font-size: 28px; font-weight: 700;
}
.sheet-body.center h3 { font-size: 18px; }
.ok-sub { font-size: 12px; color: var(--text-3); margin: 6px 0 16px; }
.ok-info { width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 4px 12px; margin-bottom: 16px; }
.ok-info div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.ok-info div:last-child { border-bottom: none; }
.ok-info span { color: var(--text-3); flex: none; }
.ok-info b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ok-info div:last-child b { color: var(--orange-2); }

/* 详情 */
.detail-head { text-align: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.detail-head .d-status { display: inline-block; margin-bottom: 8px; }
.detail-head h4 { font-size: 16px; font-weight: 600; }
.detail-head .d-no { font-size: 11px; color: var(--text-3); font-family: ui-monospace, Menlo, Consolas, monospace; margin-top: 4px; }
.detail-prog { margin: 14px 0; }
.detail-prog .big { text-align: center; font-size: 26px; font-weight: 700; color: var(--yellow); }
.detail-prog .big small { font-size: 14px; }
.detail-prog .sub { text-align: center; font-size: 12px; color: var(--text-3); margin: 6px 0 10px; }
.detail-list { background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 4px 12px; margin-bottom: 14px; }
.detail-list div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.detail-list div:last-child { border-bottom: none; }
.detail-list span { color: var(--text-3); flex: none; }
.detail-list b { font-weight: 600; text-align: right; word-break: break-all; }

/* toast */
.toast {
  position: fixed;
  left: 50%; top: 42%;
  transform: translate(-50%, -50%) scale(.9);
  z-index: 99;
  max-width: 78%;
  padding: 11px 18px;
  border-radius: 10px;
  background: rgba(20, 17, 15, .95);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
