/* ============================================
   柒喜竞界 · 全站主题（黑银红电竞风）
   参照 logo：黑金属底 + 银色金属字 + 红色光效
   ============================================ */
:root {
  --bg: #0c0c10;               /* 页面底色：碳黑 */
  --bg-2: #121218;             /* 次级底色 */
  --card: #17171e;             /* 卡片底 */
  --card-2: #1e1e26;           /* 卡内嵌块 */
  --line: #2c2c36;             /* 边框 */
  --main: #b3122e;             /* 主红 */
  --main-dark: #8a0d22;
  --accent: #f5c542;           /* 灿金 */
  --text: #e8e8ee;             /* 主文字：银白 */
  --muted: #9a9aa6;            /* 次文字：银灰 */
  --ok: #2ecc71; --warn: #f39c12; --danger: #ff4a4a;
  --silver-grad: linear-gradient(180deg, #f8f8fa 15%, #c9c9d4 40%, #8f8f9e 55%, #e8e8ee 80%);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 40% at 50% -10%, rgba(179,18,46,.10), transparent 60%),
    linear-gradient(115deg, transparent 0 55%, rgba(179,18,46,.05) 56%, transparent 62%, rgba(255,255,255,.03) 68%, transparent 75%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh; display: flex; flex-direction: column;
}
::selection { background: rgba(179,18,46,.5); color: #fff; }
.wrap { width: min(1100px, 94%); margin: 0 auto; }
main.wrap { flex: 1; padding: 24px 0 40px; }
a { color: #ff6b8a; }

/* 顶栏：黑金属 + 红色光线 */
.topbar {
  background: linear-gradient(90deg, #0c0c10 0%, #1b1b22 40%, #26262e 55%, #121216 100%);
  color: var(--text);
  border-bottom: 3px solid var(--main);
  box-shadow: 0 2px 16px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.06) inset;
  position: relative;
}
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  background: linear-gradient(90deg, transparent 0%, #ff4a4a 45%, #ffb3b3 50%, #ff4a4a 55%, transparent 100%);
  opacity: .8; pointer-events: none;
}
.topbar-in { display: flex; align-items: center; gap: 24px; padding: 14px 0; }
.logo {
  font-size: 20px; font-weight: 800; letter-spacing: 1px; text-decoration: none;
  background: var(--silver-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.8)) drop-shadow(0 0 6px rgba(179,18,46,.35));
}
.logo span { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 8px; -webkit-text-fill-color: var(--muted); }
.topbar nav { display: flex; gap: 18px; flex: 1; }
.topbar nav a { color: #c9c9d4; text-decoration: none; font-size: 14px; font-weight: 600; padding: 4px 10px; border-radius: 6px; transition: .15s; }
.topbar nav a:hover { color: #fff; background: rgba(179,18,46,.25); box-shadow: 0 0 10px rgba(179,18,46,.3); }
.topbar-user { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #c9c9d4; }
.topbar-user a { color: #ff6b8a; text-decoration: none; font-weight: 600; }
.balance { background: linear-gradient(90deg, var(--main), #d93652); color: #fff; padding: 2px 10px; border-radius: 12px; box-shadow: 0 0 10px rgba(179,18,46,.4); }
.role-badge { background: #2a2a34; color: #e8e8ee; padding: 2px 10px; border-radius: 12px; font-size: 12px; border: 1px solid #3c3c48; }

/* logo 横幅 */
.hero-banner { border-radius: 14px; overflow: hidden; border: 1px solid #3a3a44; box-shadow: 0 6px 18px rgba(0,0,0,.5), 0 0 24px rgba(179,18,46,.15); margin-bottom: 22px; }
.hero-banner img { display: block; width: 100%; max-height: 340px; object-fit: cover; }
.banner-mini { margin: 6px 0 18px; background: #141418; }

/* 「我的」页纯文字横幅：柒喜竞界（暗底 + 银色金属大字） */
.text-banner {
  position: relative; z-index: 0;
  margin: 6px 0 18px; padding: 18px 0; text-align: center;
  font-size: 30px; font-weight: 800; letter-spacing: 10px;
  color: transparent;
  background-image: var(--silver-grad);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 10px rgba(179,18,46,.35));
}
.text-banner::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, #0c0c10, #1e1e26, #0c0c10);
  border: 1px solid #3a3a44; border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
}

/* 首页游戏板块横幅（仅容器内横滑，不碰 body/html 滚动属性） */
.game-banner { position: relative; width: 100%; max-width: 100%; overflow: hidden; margin: 0 0 18px; }
.game-banner-track {
  display: flex; flex-wrap: nowrap; align-items: stretch; gap: 14px;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0 6px;
  cursor: grab; user-select: none;
}
.game-banner-track::-webkit-scrollbar { display: none; }
.game-banner-track.dragging { cursor: grabbing; }
.game-banner-track.dragging .game-tile { pointer-events: none; }

.game-banner-track .game-tile {
  flex: 0 0 calc((100% - 44px) / 6 * 5 / 3);
  width: calc((100% - 44px) / 6 * 5 / 3);
  min-width: 0; height: 230px; min-height: 230px;
  padding: 24px 22px; border-radius: 14px;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
@media (max-width: 760px) { .game-banner-track .game-tile { flex: 0 0 300px; width: 300px; } }

/* 文字小标签栏 */
.mini-tags {
  display: flex; gap: 8px; margin: 0 0 22px; padding-bottom: 6px;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.mini-tags::-webkit-scrollbar { display: none; }
.mini-tag {
  flex: 0 0 auto; padding: 7px 16px; font-size: 13px; color: #c9c9d4;
  text-decoration: none; border-radius: 14px; white-space: nowrap; transition: .15s;
  background: var(--card); border: 1px solid var(--line);
}
.mini-tag:hover { color: #fff; background: rgba(179,18,46,.25); border-color: var(--main); box-shadow: 0 0 10px rgba(179,18,46,.3); }
.section-title { font-size: 18px; }
.game-tile {
  display: block; position: relative; border-radius: 16px; padding: 46px 34px; min-height: 230px;
  text-decoration: none; color: #fff; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  transition: .18s; border: 1px solid #3c3f48;
}
.game-tile:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(179,18,46,.45); }
.tile-c0 { background: linear-gradient(135deg, #17181c 0%, #33363f 55%, #101014 100%); }
.tile-c1 { background: linear-gradient(135deg, #1a1214 0%, #4a2028 55%, #120c0e 100%); border-color: #5a2a33; }
.tile-c2 { background: linear-gradient(135deg, #101a1c 0%, #1e3a42 55%, #0c1416 100%); border-color: #2a4a55; }
.game-tile.has-cover {
  background-size: cover; background-position: center; background-repeat: no-repeat;
  background-color: #17181c;
}
.game-tile.has-cover::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.3) 0%, rgba(0,0,0,.6) 100%);
}
.game-tile.has-cover > * { position: relative; z-index: 1; }
.game-tile .tile-tag {
  display: inline-block; align-self: flex-start;
  font-size: 11px; color: var(--accent); border: 1px solid var(--accent);
  border-radius: 11px; padding: 1px 10px; margin-bottom: 12px; line-height: 1.5;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 0 6px rgba(245,197,66,.4);
}
.game-tile .tile-name {
  display: block; font-size: 24px; letter-spacing: 2px; line-height: 1.25;
  font-weight: 800; margin: 0 0 8px;
  background: var(--silver-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.7));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.game-tile .tile-intro {
  font-size: 13px; line-height: 1.5; color: rgba(232,232,238,.6); margin: 0 0 16px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.game-tile .tile-enter {
  align-self: flex-start; font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(90deg, var(--main), #d93652); border-radius: 7px; padding: 6px 13px;
  line-height: 1.5; white-space: nowrap; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 2px 10px rgba(179,18,46,.4);
}
.game-banner-track .game-tile:hover { transform: none; box-shadow: 0 10px 26px rgba(179,18,46,.5); }

/* 首页大标题 */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.btn-publish { background: linear-gradient(90deg, var(--main), #d93652); font-size: 15px; padding: 11px 26px; box-shadow: 0 4px 14px rgba(179,18,46,.4); }
.page-title-home {
  color: transparent;
  background: var(--silver-grad);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 10px rgba(179,18,46,.3)) drop-shadow(0 1px 1px rgba(0,0,0,.7));
  margin-top: 18px; margin-bottom: 24px;
}

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px; margin-bottom: 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
h1.page-title { font-size: 22px; margin-bottom: 16px; }
h2 { font-size: 17px; margin-bottom: 12px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.order-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; transition: .15s; }
.order-card:hover { box-shadow: 0 6px 18px rgba(179,18,46,.3); border-color: #4a2a33; }
.order-card .game { color: #ff6b8a; font-size: 13px; font-weight: 600; }
.order-card .title { font-size: 16px; font-weight: 700; margin: 6px 0; color: var(--text); }
.order-card .meta { color: var(--muted); font-size: 12px; }
.order-card .row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.price { color: var(--accent); font-weight: 700; font-size: 18px; text-shadow: 0 0 8px rgba(245,197,66,.3); }

.tag, .st-pending, .st-accepted, .st-doing, .st-settled, .st-cancelled {
  display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; color: #fff;
}
.st-pending { background: var(--warn); } .st-accepted { background: #2563a8; }
.st-doing { background: var(--main); } .st-settled { background: #1e8e52; }
.st-cancelled { background: #3c3c48; color: #b9b9c4; }
/* 订单卡为纵向 flex 布局，float 无效 → 状态徽章收缩为内容宽度并靠右 */
.order-card .st-doing, .order-card .st-pending, .order-card .st-settled,
.order-card .st-cancelled, .order-card .st-accepted {
  float: none; align-self: flex-end; margin-left: auto;
}

.btn {
  display: inline-block; background: linear-gradient(90deg, var(--main), #d93652); color: #fff;
  border: none; border-radius: 8px; padding: 9px 20px; font-size: 14px;
  cursor: pointer; text-decoration: none; text-align: center;
  box-shadow: 0 3px 12px rgba(179,18,46,.35); transition: .15s;
}
.btn:hover { background: linear-gradient(90deg, var(--main-dark), #b3122e); filter: brightness(1.1); }
.btn-outline { background: transparent; color: #ff6b8a; border: 1px solid var(--main); box-shadow: none; }
.btn-outline:hover { background: rgba(179,18,46,.15); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-danger { background: linear-gradient(90deg, #c0392b, #e74c3c); }
.btn-ok { background: linear-gradient(90deg, #1e8e52, #2ecc71); }

form .field { margin-bottom: 14px; }
label { display: block; font-size: 14px; margin-bottom: 5px; color: var(--muted); }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 14px; font-family: inherit;
  background: #101016; color: var(--text); transition: .15s;
}
input::placeholder, textarea::placeholder { color: #6a6a76; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--main); box-shadow: 0 0 0 2px rgba(179,18,46,.2); }
input[disabled] { color: var(--muted); background: #14141a; }
.form-narrow { max-width: 420px; margin: 30px auto; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.flash.ok { background: rgba(46,204,113,.12); color: #7de3a8; border: 1px solid rgba(46,204,113,.35); }
.flash.err { background: rgba(255,74,74,.12); color: #ff9a9a; border: 1px solid rgba(255,74,74,.4); }

/* 聊天区 */
.chat-box { height: 340px; overflow-y: auto; background: #101016; border: 1px solid var(--line);
  border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 72%; padding: 8px 12px; border-radius: 10px; font-size: 14px; line-height: 1.5; word-break: break-all; }
.msg .who { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.msg.me { align-self: flex-end; background: linear-gradient(90deg, var(--main), #d93652); color: #fff; }
.msg.me .who { color: rgba(255,255,255,.75); }
.msg.other { align-self: flex-start; background: #1e1e26; border: 1px solid var(--line); }
.chat-form { display: flex; gap: 10px; margin-top: 12px; }
.chat-form textarea { flex: 1; resize: none; height: 60px; }

/* 页脚：银色小字 + 红色顶边 */
.foot {
  text-align: center; font-size: 13px; padding: 18px 0; font-weight: 600; letter-spacing: 1px;
  color: var(--muted);
  background: linear-gradient(90deg, #0c0c10, #18181e, #0c0c10);
  border-top: 2px solid #3a3a44;
}
.foot { border-image: linear-gradient(90deg, transparent, var(--main), transparent) 1; }

/* 「我的」页面 */
.profile-card { padding: 24px; }
.profile-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--main); box-shadow: 0 4px 12px rgba(179,18,46,.4); }
.avatar-fallback { display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--main), #33333c); }
.profile-info { flex: 1; min-width: 180px; }
.profile-name { font-size: 20px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.profile-uid { font-size: 13px; color: var(--muted); margin-top: 2px; letter-spacing: 1px; }
.profile-balance { text-align: right; }
.profile-balance .label { font-size: 13px; color: var(--muted); }
.profile-balance .amount { font-size: 26px; font-weight: 700; color: var(--accent); text-shadow: 0 0 10px rgba(245,197,66,.4); }

/* 名字旁：累计消费徽章 */
.spent-badge {
  display: inline-block; font-size: 12px; font-weight: 600; vertical-align: 2px;
  color: #fff; background: linear-gradient(90deg, var(--main), #d93652);
  border-radius: 12px; padding: 2px 12px; margin-left: 6px;
  text-decoration: none; transition: .15s;
  box-shadow: 0 0 8px rgba(179,18,46,.3);
}
.spent-badge:hover { filter: brightness(1.15); box-shadow: 0 0 14px rgba(179,18,46,.55); }

/* 右侧会员等级卡（黑银红金属电竞风） */
.profile-tier {
  text-align: right; min-width: 200px; display: block; text-decoration: none;
  background: linear-gradient(135deg, #101014 0%, #26262e 55%, #14141a 100%);
  border: 1px solid #3a3a44; border-radius: 12px; padding: 14px 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,.45); transition: .18s;
}
.profile-tier:hover { border-color: var(--main); box-shadow: 0 8px 24px rgba(179,18,46,.45); }
.profile-tier .label { font-size: 12px; color: var(--muted); letter-spacing: 2px; }
.tier-name {
  font-size: 26px; font-weight: 800; letter-spacing: 3px; line-height: 1.3; margin-top: 4px;
  background: var(--silver-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.7));
}
.tier-bar {
  height: 6px; border-radius: 4px; margin-top: 10px; overflow: hidden;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
}
.tier-bar i {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--main), #ff5a5a);
  box-shadow: 0 0 8px rgba(179,18,46,.7);
}
.tier-progress-text { font-size: 11px; color: #b9b9c4; margin-top: 8px; }

/* 最高等级「暗耀星辰」流光 */
.profile-tier.tier-max {
  border-color: #7a2030;
  box-shadow: 0 0 22px rgba(179,18,46,.5), inset 0 0 24px rgba(179,18,46,.15);
  animation: tierGlow 2.6s ease-in-out infinite;
}
.profile-tier.tier-max .tier-name {
  background: linear-gradient(100deg, #e8e8ee 0%, #b3122e 22%, #f8f8fa 40%, #8f8f9e 58%, #ff4a4a 74%, #e8e8ee 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: tierShine 3.2s linear infinite;
  filter: drop-shadow(0 0 6px rgba(179,18,46,.6));
}
.profile-tier.tier-max .tier-progress-text { color: var(--accent); letter-spacing: 1px; }
@keyframes tierShine { 0% { background-position: 0% 0; } 100% { background-position: 220% 0; } }
@keyframes tierGlow {
  0%, 100% { box-shadow: 0 0 18px rgba(179,18,46,.45), inset 0 0 20px rgba(179,18,46,.12); }
  50% { box-shadow: 0 0 30px rgba(179,18,46,.65), inset 0 0 30px rgba(179,18,46,.2); }
}

.profile-links { display: flex; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.plink { flex: 1; min-width: 140px; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; text-align: center; text-decoration: none; color: var(--text); transition: .15s; }
.plink:hover { border-color: var(--main); box-shadow: 0 4px 14px rgba(179,18,46,.3); }
.plink b { display: block; font-size: 20px; color: #ff6b8a; text-shadow: 0 0 8px rgba(179,18,46,.4); }
.plink span { font-size: 13px; color: var(--muted); }

/* 账号安全入口 */
.security-entry {
  display: flex; align-items: center; gap: 14px; margin-top: 14px;
  padding: 14px 18px; border-radius: 10px; text-decoration: none;
  background: var(--card-2); border: 1px solid var(--line); transition: .15s;
}
.security-entry:hover { border-color: var(--main); background: #241418; box-shadow: 0 4px 14px rgba(179,18,46,.3); }
.security-entry .se-ico { font-size: 22px; line-height: 1; }
.security-entry .se-body { flex: 1; min-width: 0; display: block; }
.security-entry .se-title { display: block; font-size: 15px; font-weight: 700; color: var(--text); }
.security-entry .se-sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.security-entry .se-go { font-size: 13px; font-weight: 700; color: #ff6b8a; white-space: nowrap; }

/* 会员等级只读说明 */
.tier-readonly-tip {
  font-size: 12.5px; color: var(--muted); line-height: 1.75;
  margin-top: 14px; padding: 10px 14px; border-radius: 8px;
  background: rgba(179,18,46,.06); border: 1px dashed #4a2a33;
}

/* 我要做打手横幅 */
.become-booster-card {
  background: linear-gradient(120deg, #17181c 0%, #431622 60%, #121016 100%);
  border: 1px solid #5a2a33; color: #fff;
}
.become-booster-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.bb-title { font-size: 24px; font-weight: 800; letter-spacing: 6px; color: var(--accent); text-shadow: 0 1px 0 rgba(0,0,0,.5); }
.bb-sub { font-size: 13px; color: rgba(255,255,255,.55); margin-top: 6px; }
.bb-btn {
  font-size: 16px; font-weight: 700; padding: 12px 34px; border-radius: 10px;
  background: linear-gradient(90deg, var(--main), #d93652); color: #fff;
  box-shadow: 0 6px 18px rgba(179,18,46,.5);
}
.bb-btn:hover { filter: brightness(1.12); }

/* 联系客服横幅（银蓝光区别于打手横幅） */
.contact-service-card {
  background: linear-gradient(120deg, #10131c 0%, #16214a 60%, #0d1018 100%);
  border: 1px solid #2a3a66; color: #fff;
}
.contact-service-card .bb-title { color: #6ea8ff; }
.contact-service-card .bb-btn {
  background: linear-gradient(90deg, #2456c4, #3f7be0);
  box-shadow: 0 6px 18px rgba(36,86,196,.45);
}

/* 统计卡片与服务介绍 */
.stat-card { text-align: center; padding: 18px; }
.stat-card b { display: block; font-size: 26px; color: #ff6b8a; text-shadow: 0 0 10px rgba(179,18,46,.4); }
.stat-card span { font-size: 13px; color: var(--muted); }
.svc { background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.svc b { color: #ff6b8a; }
.svc p { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.7; }

/* 弹窗 */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 99;
  align-items: center; justify-content: center; }
.modal { background: var(--card); border: 1px solid #3a3a44; border-radius: 14px; padding: 24px; width: min(360px, 90%);
  box-shadow: 0 10px 40px rgba(0,0,0,.7), 0 0 30px rgba(179,18,46,.12); color: var(--text); }
.captcha {
  text-align: center; font-size: 34px; font-weight: 800; letter-spacing: 14px; padding: 14px 0;
  color: var(--accent); background: linear-gradient(135deg, #101014, #2a2a32); border-radius: 10px;
  text-shadow: 0 0 10px rgba(245,197,66,.55); user-select: none; margin-bottom: 14px;
}
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table.tbl th { color: var(--muted); font-weight: 500; }
table.tbl tr:hover td { background: rgba(179,18,46,.05); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* 站内消息未读角标 */
.msg-badge{display:inline-block;margin-left:4px;padding:0 6px;min-width:16px;height:16px;line-height:16px;border-radius:8px;background:var(--main);color:#fff;font-size:11px;text-align:center;vertical-align:middle;box-shadow:0 0 8px rgba(179,18,46,.5)}

/* 首页全部服务网格 */
.goods-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
@media(max-width:900px){.goods-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.goods-grid{grid-template-columns:1fr}}
.goods-grid .order-card{display:flex;flex-direction:column;min-height:150px}
.goods-grid .order-card .row{margin-top:auto}

/* 滚动条（暗色） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #101014; }
::-webkit-scrollbar-thumb { background: #33333c; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--main); }

/* ============================================
   H5 移动端适配（手机浏览器）
   ============================================ */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }          /* 兜底：任何元素超出都不产生横向滚动 */
img, svg, video { max-width: 100%; height: auto; }
/* 卡片内表格可横向滚动，不撑破页面 */
.card, .admin-wrap > .card {
  max-width: 100%;
}

@media (max-width: 760px) {
  /* ---------- 通用 ---------- */
  .wrap { width: 94%; }
  main.wrap { padding: 14px 0 28px; }
  .card { padding: 14px; border-radius: 10px; margin-bottom: 14px; }
  h1.page-title { font-size: 19px; margin-bottom: 12px; }
  h2 { font-size: 15.5px; }
  .section-title { font-size: 16px; }
  a, button, input, select, textarea { -webkit-tap-highlight-color: rgba(179,18,46,.25); }

  /* ---------- 顶栏：logo 独占一行，导航横滑，用户信息换行 ---------- */
  .topbar-in { flex-wrap: wrap; gap: 10px; padding: 10px 0; }
  .logo { font-size: 17px; flex: 0 0 auto; }
  .logo span { font-size: 11px; margin-left: 6px; }
  .topbar nav {
    order: 3; flex: 1 0 100%; gap: 6px;
    overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; -ms-overflow-style: none;
    padding-bottom: 4px; margin: 0 -2px;
  }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a {
    flex: 0 0 auto; font-size: 13px; padding: 7px 12px; white-space: nowrap;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  }
  .topbar-user {
    order: 2; flex: 1 0 100%; justify-content: flex-end;
    margin-left: 0; gap: 8px; font-size: 12.5px; flex-wrap: wrap;
  }
  .topbar-user a, .topbar-user .balance { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-user .balance { padding: 1px 8px; font-size: 12px; }
  .role-badge { font-size: 11px; padding: 1px 8px; }

  /* ---------- 按钮：触摸友好（最小 40px 高） ---------- */
  .btn { padding: 10px 18px; font-size: 14px; min-height: 40px; line-height: 1.35; }
  .btn-sm { padding: 8px 12px; font-size: 13px; min-height: 36px; }
  .btn-publish { font-size: 14px; padding: 10px 18px; }

  /* ---------- 输入框：16px 防止 iOS 自动放大 ---------- */
  input, select, textarea { font-size: 16px; padding: 11px 12px; }
  input[type=checkbox], input[type=radio] { width: auto; min-width: 18px; height: 18px; }
  input[type=file] { font-size: 13px; padding: 8px; }
  label { font-size: 13px; }
  .form-narrow { max-width: 100%; margin: 12px auto; }

  /* ---------- 表格：横向滚动容器 ---------- */
  .card table.tbl, .card > table {
    display: block; width: 100%; overflow-x: auto; white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  table.tbl th, table.tbl td { padding: 9px 10px; font-size: 13px; }
  /* 操作列按钮在手机上允许换行、不挤压 */
  table.tbl td form { display: inline-flex; }
  table.tbl td .btn { white-space: nowrap; }

  /* ---------- 首页 ---------- */
  .home-head { gap: 10px; }
  .page-title-home { font-size: 24px !important; margin-top: 10px; margin-bottom: 16px; }
  .hero-banner img { max-height: 200px; }
  .text-banner { font-size: 22px; letter-spacing: 6px; padding: 14px 0; }
  .game-banner-track { gap: 10px; }
  .game-banner-track .game-tile { flex: 0 0 240px; width: 240px; height: 180px; min-height: 180px; padding: 16px 14px; }
  .game-tile { padding: 20px 16px; min-height: 180px; }
  .game-tile .tile-name { font-size: 19px; letter-spacing: 1px; }
  .game-tile .tile-intro { font-size: 12px; margin-bottom: 10px; }
  .goods-grid { grid-template-columns: 1fr; gap: 12px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .order-card { padding: 13px; }
  .order-card .title { font-size: 15px; }
  .price { font-size: 17px; }
  .mini-tags { flex-wrap: nowrap; margin-bottom: 16px; }

  /* ---------- 订单详情 ---------- */
  .detail-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .detail-head .price { font-size: 22px !important; }
  .detail-head .page-title { font-size: 18px !important; }
  .chat-box { height: 260px; }
  .msg { max-width: 85%; font-size: 13.5px; }
  .chat-form { gap: 8px; }
  .chat-form textarea { height: 52px; font-size: 16px; }

  /* ---------- 「我的」页 ---------- */
  .profile-card { padding: 16px; }
  .profile-head { gap: 12px; }
  .avatar { width: 64px; height: 64px; border-width: 2px; }
  .avatar-fallback { font-size: 26px; }
  .profile-name { font-size: 17px; }
  .spent-badge { display: inline-block; margin: 6px 0 0; font-size: 11px; }
  .profile-tier { min-width: 0; width: 100%; text-align: center; margin-top: 4px; }
  .tier-name { font-size: 22px; letter-spacing: 2px; }
  .profile-links { gap: 10px; }
  .plink { min-width: calc(50% - 5px); flex: 1 1 calc(50% - 5px); padding: 12px 8px; }
  .plink b { font-size: 17px; }
  .security-entry { padding: 12px 14px; gap: 10px; }
  .security-entry .se-title { font-size: 14px; }

  /* ---------- 横幅类 ---------- */
  .become-booster-inner { flex-direction: column; align-items: stretch; text-align: center; gap: 12px; }
  .bb-title { font-size: 19px; letter-spacing: 3px; }
  .bb-btn { width: 100%; padding: 12px 20px; font-size: 15px; }
  .stat-card b { font-size: 22px; }

  /* ---------- 弹窗 ---------- */
  .modal { width: 92vw; max-height: 86vh; overflow-y: auto; padding: 18px; }
  .modal form > div:last-child { flex-direction: column; }
  .modal .btn { width: 100%; }
  .captcha { font-size: 28px; letter-spacing: 10px; }

  /* ---------- 会员等级页 ---------- */
  .tier-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .tier-hero .big { font-size: 28px; letter-spacing: 2px; }
  .tier-hero .hint { font-size: 12px; }

  /* ---------- 排行榜 ---------- */
  .podium { grid-template-columns: 1fr !important; align-items: stretch; }

  /* ---------- 页脚 ---------- */
  .foot { font-size: 12px; padding: 14px 10px; line-height: 1.6; }
}

@media (max-width: 400px) {
  .wrap { width: 96%; }
  .logo span { display: none; }
  .tier-grid { grid-template-columns: 1fr !important; }
  .plink { min-width: 100%; flex-basis: 100%; }
}
