/* C 端暗色直播风格（沿用 mobile.html 原型的沉浸式暗色 + 玻璃拟态，系统字体栈） */
:root {
  --bg-dark: #030408;
  --primary-red: #fe2c55;
  --primary-blue: #25f4ee;
  --glass-bg: rgba(14, 15, 26, 0.45);
  --glass-solid: rgba(18, 19, 32, 0.96);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text-white: #fff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --font-main: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; background: var(--bg-dark); color: var(--text-white); font-family: var(--font-main); }
#app { width: 100%; height: 100%; }
[v-cloak] { display: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; outline: none; }
img { max-width: 100%; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* ── 内联 SVG 图标（icons.js <s-icon>）：尺寸随 font-size，颜色继承 currentColor ── */
.s-icon { display: inline-block; width: 1em; height: 1em; line-height: 0; vertical-align: -0.125em; flex: none; }
.s-icon svg { display: block; width: 100%; height: 100%; }

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 0.5px solid var(--glass-border);
  border-radius: 16px;
}
.glass-solid {
  background: var(--glass-solid);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 0.5px solid var(--glass-border);
}

/* ── toast ── */
.toast-box { position: fixed; top: 12vh; left: 0; right: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  max-width: 80vw; padding: 10px 18px; border-radius: 999px; font-size: 14px;
  background: rgba(20, 21, 35, 0.92); border: 0.5px solid var(--glass-border);
  color: #fff; opacity: 0; transform: translateY(-8px); transition: all .25s ease;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-error { border-color: rgba(254, 44, 85, 0.5); }
.toast-success { border-color: rgba(37, 244, 238, 0.5); }

/* ── 通用页面 ── */
.page { min-height: 100%; padding: 16px 16px 84px; }
.page-head { display: flex; align-items: baseline; gap: 10px; padding: 8px 2px 16px; }
.page-head h1 { font-size: 24px; font-weight: 800; }
.head-sub { color: var(--text-muted); font-size: 12px; }
.icon-btn { font-size: 20px; line-height: 1; padding: 4px 10px; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.empty { text-align: center; color: var(--text-muted); padding: 48px 0; font-size: 14px; }

.btn-primary {
  display: inline-block; padding: 12px 28px; border-radius: 999px; font-size: 15px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--primary-red), #ff7b90);
  box-shadow: 0 6px 20px rgba(254, 44, 85, 0.35);
}
.btn-primary.block { display: block; width: 100%; margin-top: 16px; text-align: center; }
.btn-ghost { display: block; width: 100%; margin-top: 10px; padding: 10px; border-radius: 999px; color: var(--text-muted); border: 0.5px solid var(--glass-border); }

/* ── 错误页 / 启动页 ── */
.fatal-page { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; }
.fatal-card { padding: 36px 28px; text-align: center; max-width: 320px; }
.fatal-icon { font-size: 42px; line-height: 1; margin-bottom: 12px; color: #fbbf24; }
.fatal-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.fatal-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; }
.boot-spin {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.15); border-top-color: var(--primary-red);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.boot-text { color: var(--text-muted); font-size: 13px; }

/* ── 直播列表（单行卡片）── */
.room-list { display: flex; flex-direction: column; gap: 12px; }
.room-card { display: flex; align-items: center; gap: 12px; padding: 10px; }
.room-cover { position: relative; width: 96px; height: 64px; border-radius: 10px; overflow: hidden; flex: none; }
.room-cover img { width: 100%; height: 100%; object-fit: cover; }
.room-cover-ph { width: 100%; height: 100%; background: linear-gradient(135deg, #1c1e33, #34163a, #0d2438); }
.badge { position: absolute; top: 6px; left: 6px; font-size: 10px; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.badge-live { background: linear-gradient(135deg, var(--primary-red), #ff7b90); animation: pulse 1.6s ease infinite; }
.badge-idle { background: rgba(99, 102, 241, 0.8); }
.badge-ended { background: rgba(120, 120, 130, 0.8); }
@keyframes pulse { 50% { opacity: 0.75; } }
.room-info { flex: 1; min-width: 0; }
.room-title { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.room-sched { color: var(--primary-blue); }
.room-arrow { color: var(--text-muted); font-size: 16px; line-height: 0; padding-right: 4px; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary-blue); box-shadow: 0 0 8px var(--primary-blue); display: inline-block; }

/* ── 直播间 ── */
.live-room { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; }
.video-wrapper { position: absolute; inset: 0; z-index: 1; }
.video-wrapper video { width: 100%; height: 100%; object-fit: contain; background: radial-gradient(120% 120% at 20% 10%, #1c1e33 0%, #0a0b14 45%, #030408 100%); }
.video-mask { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(3, 4, 8, 0.45); }
.video-mask-text { color: var(--text-muted); font-size: 13px; }

.live-top { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: 14px 12px; padding-top: max(14px, env(safe-area-inset-top)); }
.live-title-chip { padding: 6px 14px; border-radius: 999px; }
.live-title { font-size: 13px; font-weight: 700; max-width: 46vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-online { font-size: 11px; color: var(--text-muted); }
.live-top .badge { position: static; }

.dm-area {
  position: absolute; z-index: 4; left: 12px; right: 84px; bottom: 76px;
  max-height: 34vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
  mask-image: linear-gradient(to top, rgba(0,0,0,1) 82%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 82%, rgba(0,0,0,0) 100%);
}
.dm-item {
  align-self: flex-start; max-width: 100%; padding: 6px 12px; border-radius: 14px; font-size: 13px; line-height: 1.4;
  background: rgba(12, 13, 22, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 0.5px solid rgba(255, 255, 255, 0.08); word-break: break-all;
}
.dm-nick { color: var(--primary-blue); margin-right: 6px; font-weight: 600; }

.lottery-float {
  position: absolute; z-index: 5; right: 12px; top: 32%; display: flex; flex-direction: column; align-items: center;
  padding: 10px 8px; border-radius: 14px; font-size: 20px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.85), rgba(251, 191, 36, 0.7));
  box-shadow: 0 4px 18px rgba(251, 191, 36, 0.4);
}
.lottery-float-text { font-size: 11px; font-weight: 700; margin-top: 2px; }
.lottery-float .s-icon { color: #fff; }

.live-bottom {
  position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px;
  padding: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.dm-input-wrap { flex: 1; display: flex; align-items: center; border-radius: 999px; padding: 4px 4px 4px 16px; }
.dm-input-wrap input { flex: 1; background: transparent; border: none; color: #fff; font-size: 14px; min-width: 0; }
.dm-input-wrap input::placeholder { color: var(--text-muted); }
.dm-send { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; border-radius: 999px; font-size: 16px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--primary-red), #ff7b90); }
.cart-btn {
  display: flex; flex-direction: column; align-items: center; font-size: 20px; padding: 6px 10px; border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6, var(--primary-blue)); color: #04121a;
}
.cart-btn-label { font-size: 10px; font-weight: 800; margin-top: 2px; }

/* ── 抽屉（商品橱窗）── */
.drawer-mask { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.5); }
.drawer { position: absolute; left: 0; right: 0; bottom: 0; max-height: 76vh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; font-weight: 700; font-size: 15px; border-bottom: 0.5px solid var(--glass-border); }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.drawer-foot { display: flex; gap: 10px; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 0.5px solid var(--glass-border); }

.prod-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 0.5px solid rgba(255,255,255,0.06); }
.prod-cover { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.prod-cover-ph { background: linear-gradient(135deg, #1c1e33, #34163a); }
.prod-mid { flex: 1; min-width: 0; }
.prod-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-price { color: var(--primary-red); font-weight: 800; margin-top: 6px; }
.prod-go { padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; background: linear-gradient(135deg, var(--primary-red), #ff7b90); color: #fff; }

.pd-gallery { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; }
.pd-gallery img { width: 220px; height: 220px; object-fit: cover; border-radius: 12px; flex: none; }
.pd-name { font-size: 17px; font-weight: 700; }
.pd-price-row { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 12px; }
.pd-price { color: var(--primary-red); font-size: 22px; font-weight: 800; }
.pd-stock { color: var(--text-muted); font-size: 12px; }
.pd-qty { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 0.5px solid rgba(255,255,255,0.08); font-size: 14px; }
.qty-ctrl { display: flex; align-items: center; gap: 14px; }
.qty-ctrl button { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,0.1); font-size: 17px; color: #fff; }
.pd-detail { margin-top: 12px; font-size: 14px; line-height: 1.7; color: rgba(255,255,255,0.85); }
.pd-detail img { border-radius: 10px; }
.btn-buy { flex: 1; padding: 13px; border-radius: 999px; font-size: 15px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--primary-red), #ff7b90); }
.btn-seckill { flex: 1; padding: 13px; border-radius: 999px; font-size: 15px; font-weight: 800; color: #2a1600; background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.btn-buy:disabled, .btn-seckill:disabled { opacity: 0.55; }

/* ── 弹窗 ── */
.modal-mask { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { position: relative; width: 100%; max-width: 340px; border-radius: 20px; padding: 26px 22px; text-align: center; }
.modal-title { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.modal-close { position: absolute; top: 10px; right: 14px; font-size: 16px; color: var(--text-muted); }
.lottery-info { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }
.lottery-joined { color: var(--primary-blue); font-size: 14px; padding: 10px 0; }
.lottery-result { font-size: 15px; font-weight: 700; padding: 14px 0; color: var(--text-muted); }
.lottery-result.win { color: #fbbf24; }
.winner-list { max-height: 32vh; overflow-y: auto; margin: 10px 0; }
.winner-item { padding: 8px; border-bottom: 0.5px solid rgba(255,255,255,0.07); font-size: 14px; }
.winner-me { color: #fbbf24; font-weight: 800; }

/* ── 订单 ── */
.tabs { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; }
.tab { padding: 8px 16px; border-radius: 999px; font-size: 13px; color: var(--text-muted); background: rgba(255,255,255,0.06); flex: none; }
.tab.active { color: #fff; background: linear-gradient(135deg, var(--primary-red), #ff7b90); font-weight: 700; }
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-card { display: flex; align-items: center; gap: 12px; padding: 12px; }
.order-cover { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.order-mid { flex: 1; min-width: 0; }
.order-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-no { font-size: 11px; color: var(--text-muted); margin: 4px 0; }
.order-amount { color: var(--primary-red); font-weight: 700; font-size: 13px; }
.order-status { font-size: 12px; font-weight: 700; flex: none; }
.os-pending { color: #fbbf24; }
.os-shipped { color: var(--primary-blue); }
.os-verified, .os-done { color: #4ade80; }
.os-refunding, .os-refunded, .os-cancelled { color: var(--text-muted); }

.detail-card { padding: 18px 16px; }
.detail-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: 14px; border-bottom: 0.5px solid rgba(255,255,255,0.06); }
.detail-row span { color: var(--text-muted); flex: none; }
.detail-row b { text-align: right; word-break: break-all; }

/* ── 核销码页 ── */
.code-card { padding: 28px 20px; text-align: center; }
.code-prod { font-size: 15px; font-weight: 700; margin-bottom: 18px; }
.qr-ph {
  width: 180px; height: 180px; margin: 0 auto 14px; border-radius: 14px; background: #fff; color: #666;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 12px;
}
.qr-grid {
  width: 120px; height: 120px; border-radius: 6px;
  background:
    repeating-linear-gradient(0deg, #222 0 8px, transparent 8px 16px),
    repeating-linear-gradient(90deg, #222 0 8px, #eee 8px 16px);
  opacity: 0.85;
}
.big-code { font-size: 26px; font-weight: 800; letter-spacing: 2px; font-family: ui-monospace, Menlo, monospace; margin: 6px 0; word-break: break-all; }
.big-code.used { color: var(--text-muted); text-decoration: line-through; }
.code-status { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }
.hb-hint { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; color: var(--text-muted); margin-top: 8px; }

/* ── 客服 ── */
.cs-page { display: flex; flex-direction: column; height: 100%; padding-bottom: 0; }
.cs-setup { padding: 24px 18px; text-align: center; }
.cs-note { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.6; }
.cs-manual { display: flex; gap: 10px; }
.cs-manual input { flex: 1; padding: 10px 14px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 0.5px solid var(--glass-border); color: #fff; }
.cs-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 2px 12px; }
.cs-msg { display: flex; }
.cs-msg.mine { justify-content: flex-end; }
.cs-bubble { max-width: 72%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; word-break: break-all; background: rgba(255,255,255,0.09); }
.cs-msg.mine .cs-bubble { background: linear-gradient(135deg, var(--primary-red), #ff7b90); }
.cs-input-bar { display: flex; align-items: center; gap: 8px; border-radius: 999px; padding: 4px 4px 4px 16px; margin-bottom: 76px; }
.cs-input-bar input { flex: 1; background: transparent; border: none; color: #fff; font-size: 14px; min-width: 0; }

/* ── 个人中心 ── */
.me-card { display: flex; align-items: center; gap: 16px; padding: 20px 18px; margin-bottom: 14px; }
.me-avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.me-avatar-ph { display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; background: linear-gradient(135deg, #6366f1, var(--primary-blue)); }
.me-nick { font-size: 17px; font-weight: 800; }
.me-store { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.me-menu { overflow: hidden; }
.me-menu-item { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; font-size: 14px; border-bottom: 0.5px solid rgba(255,255,255,0.06); }
.me-menu-item .mi-label { display: inline-flex; align-items: center; gap: 10px; }
.me-menu-item .mi-label .s-icon { font-size: 17px; color: var(--text-muted); }
.me-menu-item .mi-arrow { font-size: 14px; line-height: 0; color: var(--text-muted); }
.me-menu-item:last-child { border-bottom: none; }

/* ── 底部导航 ── */
.tabbar {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex;
  padding-bottom: env(safe-area-inset-bottom); border-radius: 18px 18px 0 0;
}
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 7px; font-size: 10px; color: var(--text-muted); }
.tabbar button span { font-size: 19px; line-height: 1; display: inline-flex; }
.tabbar button.active { color: #fff; font-weight: 700; }

/* ── 真二维码（qrcodejs 渲染，白底保证扫码识别率） ── */
.qr-box {
  width: 216px; margin: 0 auto 14px; padding: 8px; border-radius: 14px; background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.qr-box img, .qr-box canvas { display: block; width: 200px; height: 200px; }

/* ── 待付款「去支付」小按钮（订单列表卡片内） ── */
.order-pay-btn {
  display: block; margin-top: 8px; padding: 5px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--primary-red), #ff7b90);
}

/* ── 退款申请弹窗 ── */
.refund-reason {
  width: 100%; margin-bottom: 14px; padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,0.08); border: 0.5px solid var(--glass-border);
  color: #fff; font-size: 14px; line-height: 1.5; resize: none;
}
.refund-reason::placeholder { color: var(--text-muted); }

/* ── 客服页 FAQ 手风琴 ── */
.faq-box { margin-bottom: 12px; overflow: hidden; }
.faq-item { border-bottom: 0.5px solid rgba(255,255,255,0.06); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 14px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.faq-q i { font-style: normal; color: var(--text-muted); font-size: 16px; }
.faq-a { padding: 0 14px 12px; font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* ── 消息通知 ── */
.notice-card { padding: 13px 15px; }
.notice-title { font-size: 14px; font-weight: 700; }
.notice-sub { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.notice-time { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.notice-hint { text-align: center; font-size: 11px; color: var(--text-muted); margin-top: 14px; }
