/* 一野电竞 H5 · 深色电竞主题（移动优先，响应式） */
:root {
  --bg: #0b0d12;
  --bg-2: #11141c;
  --card: #151924;
  --card-2: #1b2030;
  --line: #232a3a;
  --text: #eef1f7;
  --muted: #8b93a7;
  --accent: #ff4d5e;
  --accent-2: #8a1bff;
  --gold: #f7c948;
  --ok: #37d67a;
  --warn: #ffb020;
  --danger: #ff5a5f;
  --radius: 16px;
  --tab-h: 62px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px; line-height: 1.5; min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(138,27,255,.16), transparent 60%),
    radial-gradient(900px 400px at 90% 10%, rgba(255,77,94,.10), transparent 55%),
    var(--bg);
}
.app-shell { max-width: 560px; margin: 0 auto; min-height: 100vh; position: relative; }
@media (min-width: 720px) {
  .app-shell { box-shadow: 0 0 80px rgba(0,0,0,.55); background: rgba(11,13,18,.6); }
}
.boot { padding: 80px 20px; text-align: center; color: var(--muted); }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center;
  gap: 10px; padding: 14px 16px calc(10px + env(safe-area-inset-top)) 16px;
  background: rgba(11,13,18,.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(35,42,58,.7);
}
.topbar .title { font-size: 17px; font-weight: 700; letter-spacing: .5px; flex: 1; }
.topbar .back {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 18px; display: flex;
  align-items: center; justify-content: center; cursor: pointer;
}
.topbar .ghost-btn {
  font-size: 13px; color: var(--muted); border: 1px solid var(--line);
  background: transparent; padding: 6px 10px; border-radius: 10px; cursor: pointer;
}
.main { padding: 16px 16px calc(var(--tab-h) + 24px + env(safe-area-inset-bottom)); }

/* 通用 */
.card {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  margin-bottom: 14px;
}
.card.flat { background: var(--card); }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 6px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.bold { font-weight: 700; }
.gold { color: var(--gold); }
.accent { color: var(--accent); }
.ok { color: var(--ok); }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.hidden { display: none !important; }
.center { text-align: center; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.tag {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; border: 1px solid var(--line); color: var(--muted);
  background: rgba(255,255,255,.03); margin-right: 6px;
}
.tag.hot { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.tag.ok { color: var(--ok); border-color: rgba(55,214,122,.35); }
.tag.warn { color: var(--warn); border-color: rgba(255,176,32,.35); }

/* 按钮 */
.btn {
  appearance: none; border: 0; cursor: pointer; border-radius: 12px;
  padding: 12px 16px; font-size: 15px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--accent), #ff7a4d);
  width: 100%; transition: opacity .15s, transform .05s;
}
.btn:active { transform: scale(.99); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.secondary { background: var(--card-2); border: 1px solid var(--line); color: var(--text); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn.small { width: auto; padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn.danger { background: linear-gradient(135deg, #ff5a5f, #ff2d55); }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; color: var(--text);
  background: #0f131c; border: 1px solid var(--line); font-size: 15px; outline: none;
  appearance: none;
}
.input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 88px; resize: vertical; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.form-error { font-size: 13px; color: var(--danger); margin-top: 8px; min-height: 18px; }
.inline-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inline-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* 头部 hero */
.hero { padding: 6px 2px 2px; }
.hero .brand { font-size: 13px; letter-spacing: 3px; color: var(--accent); font-weight: 700; }
.hero .slogan { font-size: 26px; font-weight: 800; margin: 6px 0 4px; line-height: 1.25; }
.hero .sub { color: var(--muted); font-size: 13px; }
.notice {
  border: 1px solid rgba(255,77,94,.25); background: rgba(255,77,94,.08);
  border-radius: 12px; padding: 10px 12px; font-size: 13px; color: #ffd7da;
}
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 6px; text-align: center; font-size: 12px; color: var(--muted);
  cursor: pointer;
}
.quick .ico { font-size: 20px; display: block; margin-bottom: 4px; }
.quick:active { border-color: var(--accent); }

.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.game-card {
  position: relative; overflow: hidden; border-radius: 14px; padding: 18px 14px;
  background: linear-gradient(135deg, #1c2233, #131722); border: 1px solid var(--line);
  cursor: pointer;
}
.game-card .name { font-weight: 700; font-size: 15px; }
.game-card .en { font-size: 11px; color: var(--muted); letter-spacing: 1px; margin-top: 2px; }
.game-card::after {
  content: ""; position: absolute; right: -20px; bottom: -24px; width: 80px; height: 80px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,77,94,.35), transparent 70%);
}

/* 列表 */
.list { display: flex; flex-direction: column; gap: 10px; }
.list-item {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer;
}
.list-item:active { border-color: var(--accent); }
.avatar {
  width: 46px; height: 46px; border-radius: 12px; flex: none; display: flex;
  align-items: center; justify-content: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #2a3350, #161b28);
}
.avatar.lg { width: 64px; height: 64px; font-size: 20px; border-radius: 18px; }
.list-item .body { flex: 1; min-width: 0; }
.list-item .name { font-weight: 650; display: flex; align-items: center; gap: 6px; }
.list-item .desc { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price { color: var(--gold); font-weight: 800; font-variant-numeric: tabular-nums; }
.price::after { content: " 星钻/小时"; font-size: 11px; color: var(--muted); font-weight: 400; }

/* 详情 */
.detail-head { display: flex; gap: 14px; align-items: center; }
.detail-head .info { flex: 1; }
.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.stat { background: var(--card); border-radius: 12px; border: 1px solid var(--line); padding: 10px; text-align: center; }
.stat .v { font-weight: 800; font-size: 18px; }
.stat .k { font-size: 11px; color: var(--muted); }

/* 底部 tabbar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  max-width: 560px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(13,16,23,.94); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  height: var(--tab-h); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; color: var(--muted); font-size: 11px; cursor: pointer;
  position: relative;
}
.tab .ico { font-size: 19px; line-height: 1; }
.tab.active { color: var(--accent); }
.tab.plus .plus {
  width: 42px; height: 42px; border-radius: 50%; margin-top: -18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  box-shadow: 0 6px 18px rgba(255,77,94,.35); opacity: .55;
}

/* 聊天 */
.chat-page { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 78%; padding: 10px 12px; border-radius: 14px; font-size: 14.5px; word-break: break-word; white-space: pre-wrap; }
.msg.them { align-self: flex-start; background: var(--card-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.me { align-self: flex-end; background: linear-gradient(135deg, #ff4d5e, #ff7a4d); border-bottom-right-radius: 4px; }
.msg.sys { align-self: center; background: rgba(255,255,255,.04); color: var(--muted); font-size: 12px; padding: 6px 10px; border-radius: 999px; max-width: 90%; text-align: center; }
.msg.important { box-shadow: 0 0 0 2px rgba(247,201,72,.35); }
.msg .time { display: block; font-size: 10.5px; opacity: .65; margin-top: 4px; }
.chat-inputbar {
  position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 0;
  background: linear-gradient(180deg, transparent, var(--bg) 30%);
}
.chat-inputbar .input { flex: 1; }
.chat-inputbar .send { width: auto; padding: 12px 18px; }

/* 钱包 */
.wallet-hero {
  background: linear-gradient(135deg, #20162a, #161a26); border: 1px solid var(--line);
  border-radius: 18px; padding: 18px;
}
.wallet-hero .big { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wallet-hero .big small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.wallet-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 14px; }
.tabs-line { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs-line .t { padding: 10px 2px; color: var(--muted); font-size: 14px; cursor: pointer; border-bottom: 2px solid transparent; }
.tabs-line .t.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 650; }
.item-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); }
.badge.ok { color: var(--ok); } .badge.pending { color: var(--warn); } .badge.bad { color: var(--danger); }

/* 弹窗 / toast */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 60;
  display: flex; align-items: flex-end; justify-content: center; padding: 20px;
}
.modal {
  width: 100%; max-width: 520px; background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 18px; animation: rise .18s ease-out;
}
@keyframes rise { from { transform: translateY(16px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal h3 { margin: 0 0 8px; font-size: 17px; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 30px); transform: translateX(-50%);
  background: rgba(20,24,34,.96); border: 1px solid var(--line); color: var(--text);
  padding: 10px 16px; border-radius: 999px; font-size: 13.5px; z-index: 80; max-width: 80vw;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.empty { text-align: center; color: var(--muted); padding: 40px 10px; font-size: 13.5px; }
.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.25);
  border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite;
  display: inline-block; vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.qr-box { background: #fff; border-radius: 14px; padding: 10px; display: flex; justify-content: center; }
.qr-box img { width: 180px; height: 180px; object-fit: contain; }

/* 共创圈 */
.avatar.sm { width: 36px; height: 36px; border-radius: 10px; font-size: 14px; }
.post .post-content { white-space: pre-wrap; line-height: 1.55; font-size: 14px; margin-top: 8px; word-break: break-word; }
.post-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.post-imgs img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; }
.post-actions { display: flex; gap: 18px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.post-actions span { cursor: pointer; user-select: none; }
.post-actions span:active { color: var(--accent); }
.post-actions .liked { color: var(--accent); }
.comment { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment .body { flex: 1; min-width: 0; }
.comment .text { font-size: 13.5px; margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
#post-content { min-height: 120px; resize: vertical; }
.link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

.comment-actions { display: flex; gap: 14px; margin-top: 3px; color: var(--muted); font-size: 11px; }
.comment-actions span { cursor: pointer; }

.chat-img { max-width: 200px; max-height: 240px; border-radius: 10px; display: block; }


/* 验证码输入行：输入框可收缩，按钮不被挤出屏幕 */
.code-row { display: flex; align-items: center; width: 100%; }
.code-row .input { flex: 1 1 auto; width: auto; min-width: 0; }
.code-row .btn.small { flex: 0 0 auto; white-space: nowrap; }

/* 登录页主按钮：蓝紫渐变，避免大红色按钮的视觉压迫 */
.btn.login-blue { background: linear-gradient(135deg, #5b6cff, #8a1bff); }
