/* ===== 智游电竞 H5 通用样式 ===== */
:root {
  --pri: #FF6A00;
  --pri-2: #FF8A3D;
  --pri-soft: #FFF1E8;
  --bg: #F6F6F8;
  --card: #FFFFFF;
  --txt: #17181C;
  --sub: #8C919B;
  --line: #EFF0F3;
  --ok: #22A06B;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(24, 24, 35, .06);
  --safe: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--txt);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* 页面容器：手机上满屏，电脑上居中显示成手机宽度 */
.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
  padding-bottom: calc(74px + var(--safe));
}

/* ===== 顶部橙色头图 ===== */
.hero {
  position: relative;
  padding: 14px 16px 18px;
  background:
    radial-gradient(120% 90% at 82% -10%, #FFD9BE 0%, rgba(255, 217, 190, 0) 55%),
    linear-gradient(180deg, #FFC79C 0%, #FF9138 62%, #FF7A22 100%);
  color: #fff;
  border-radius: 0 0 22px 22px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -40px; top: -60px;
  width: 180px; height: 180px;
  background: rgba(255, 255, 255, .18);
  border-radius: 50%;
}
.hero-brand { display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; }
.hero-logo {
  width: 40px; height: 40px; border-radius: 12px;
  background: #fff; object-fit: cover;
  box-shadow: 0 4px 12px rgba(190, 80, 0, .2);
}
.hero-name { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.hero-sub { font-size: 11px; opacity: .85; margin-top: 1px; }

/* 搜索胶囊 */
.search {
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  height: 40px;
  padding: 0 14px;
  border-radius: 20px;
  margin-top: 14px;
  position: relative; z-index: 2;
}
.search svg { width: 17px; height: 17px; stroke: #B9BEC7; flex: none; }
.search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 13.5px; color: var(--txt);
}
.search input::placeholder { color: #B9BEC7; }
.search-btn {
  border: 0; background: linear-gradient(135deg, #FF8A3D, #FF6A00);
  color: #fff; height: 30px; padding: 0 16px; border-radius: 15px;
  font-size: 13px; font-weight: 600;
}

/* ===== 通用卡片 ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 12px 14px;
  overflow: hidden;
}
.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 10px;
}
.card-hd h3 { margin: 0; font-size: 15.5px; font-weight: 700; }
.card-hd .more { font-size: 12px; color: var(--sub); display: flex; align-items: center; gap: 2px; }
.card-bd { padding: 0 14px 14px; }

/* 公告条 */
.notice-bar {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 14px 0;
  background: #FFF7F0;
  border: 1px solid #FFE7D3;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  color: #C85000;
  overflow: hidden;
}
.notice-bar .tag {
  flex: none; font-weight: 700; background: var(--pri); color: #fff;
  border-radius: 4px; padding: 1px 6px; font-size: 11px;
}
.notice-bar .txt { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 商品网格 ===== */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.goods {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 3px 12px rgba(24, 24, 35, .05);
  transition: transform .15s ease;
}
.goods:active { transform: scale(.985); }
.goods-cover-wrap { position: relative; }
.goods-cover { display: block; width: 100%; aspect-ratio: 1/1; background: #FFF6EF; object-fit: cover; }
.goods-info { padding: 8px 9px 10px; }
.goods-title { display: flex; align-items: center; gap: 0; font-size: 12.5px; font-weight: 600; line-height: 1.4;
  white-space: nowrap; overflow: hidden; }
.goods-title > .txt { overflow: hidden; text-overflow: ellipsis; }
.goods-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.price { color: var(--pri); font-weight: 800; font-size: 16px; }
.price small { font-size: 11px; font-weight: 600; }
.price-unit { color: var(--sub); font-size: 11px; }
.sales { font-size: 11px; color: var(--sub); }
.tag-mini {
  position: absolute; left: 6px; top: 6px; z-index: 2;
  display: inline-block; font-size: 10px; color: #fff;
  background: linear-gradient(135deg, #FF8A3D, #FF5A00);
  padding: 1px 5px; border-radius: 4px;
}

/* ===== 左侧分类页 ===== */
.cat-wrap { display: flex; height: calc(100vh - 96px); }
.cat-side {
  width: 96px; flex: none; background: #F0F1F4;
  overflow-y: auto; padding: 6px 0 20px;
}
.cat-item {
  padding: 14px 8px; text-align: center; font-size: 13px; color: #5C6270;
  border-radius: 0 10px 10px 0;
  position: relative;
}
.cat-item.active {
  background: linear-gradient(135deg, #FF8A3D, #FF6A00);
  color: #fff; font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 106, 0, .28);
}
.cat-main { flex: 1; overflow-y: auto; padding: 10px; }
.cat-main .grid2 { gap: 10px; }

/* ===== 陪玩列表（选人） ===== */
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding: 12px 14px 4px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 14px; border-radius: 16px; font-size: 13px;
  background: #fff; color: #5C6270; border: 1px solid var(--line);
}
.chip.active { background: var(--pri-soft); color: var(--pri); border-color: #FFD6BC; font-weight: 600; }

.player {
  display: flex; gap: 12px; padding: 14px;
  background: #fff; margin: 10px 14px; border-radius: 14px;
  box-shadow: var(--shadow);
}
.player-avatar {
  width: 64px; height: 64px; border-radius: 16px; object-fit: cover; flex: none;
  background: #FFF1E8;
}
.player-main { flex: 1; min-width: 0; }
.player-name { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; }
.dot-online { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.dot-offline { width: 7px; height: 7px; border-radius: 50%; background: #C9CDD4; }
.player-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.tag {
  font-size: 10.5px; color: #B4632A; background: #FFF2E7;
  padding: 2px 6px; border-radius: 5px;
}
.player-rank { color: var(--sub); font-size: 11.5px; margin-top: 5px; }
.player-foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 8px; }
.player-price { color: var(--pri); font-weight: 800; font-size: 17px; }
.player-price small { font-size: 11px; color: var(--sub); font-weight: 500; }

/* ===== 我的页 ===== */
.mine-hero {
  padding: 26px 18px 52px;
  background:
    radial-gradient(100% 80% at 90% 0%, #FFE2C8 0%, rgba(255,226,200,0) 60%),
    linear-gradient(160deg, #FFC08D 0%, #FF923F 55%, #FF7A22 100%);
  border-radius: 0 0 26px 26px;
  color: #fff;
  position: relative;
}
.mine-user { display: flex; align-items: center; gap: 12px; }
.mine-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255, 255, 255, .35);
  border: 2px solid rgba(255, 255, 255, .65);
  object-fit: cover;
}
.mine-name { font-size: 18px; font-weight: 700; }
.mine-desc { font-size: 12px; opacity: .85; margin-top: 2px; }

.mine-body { margin-top: -36px; position: relative; z-index: 2; }

.warn {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border-radius: 10px;
  margin: 0 14px; padding: 9px 12px;
  font-size: 12.5px; color: #6B7280;
  box-shadow: var(--shadow);
}
.warn b { color: #E5484D; font-weight: 700; }

.order-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 4px 8px 14px;
}
.order-cell { text-align: center; padding: 8px 0; }
.order-ico {
  width: 34px; height: 34px; margin: 0 auto 6px;
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #FFB166, #FF7A22);
  color: #fff;
  box-shadow: 0 4px 10px rgba(255, 122, 34, .22);
}
.order-ico svg { width: 18px; height: 18px; }
.order-cell span { font-size: 11.5px; color: #5C6270; }

.func-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px 4px; padding: 6px 8px 16px;
}
.func-cell { text-align: center; }
.func-cell svg { width: 24px; height: 24px; stroke: #3C4149; margin: 0 auto 6px; display: block; }
.func-cell span { font-size: 12px; color: #5C6270; }

/* ===== 消息页 ===== */
.msg-hero {
  padding: 22px 18px 46px;
  background: linear-gradient(160deg, #FFC38F 0%, #FF923F 60%, #FF7A22 100%);
  border-radius: 0 0 26px 26px;
  color: #fff; font-size: 24px; font-weight: 800;
}
.msg-list { margin-top: -30px; position: relative; z-index: 2; }
.msg-item {
  display: flex; align-items: center; gap: 12px;
  background: #fff; padding: 15px 14px;
  border-bottom: 1px solid #F6F7F9;
}
.msg-item:first-child { border-radius: 16px 16px 0 0; }
.msg-item:last-child { border-bottom: 0; border-radius: 0 0 16px 16px; }
.msg-ico {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #FFEFE4; color: var(--pri);
}
.msg-ico.green { background: #E8F7F0; color: #22A06B; }
.msg-ico svg { width: 22px; height: 22px; }
.msg-title { font-size: 15px; font-weight: 700; }
.msg-sub { font-size: 12px; color: var(--sub); margin-top: 2px; }
.msg-item .arrow { color: #C9CDD4; }

/* ===== 底部导航 ===== */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-width: 560px; margin: 0 auto;
  height: calc(58px + var(--safe));
  padding-bottom: var(--safe);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  border-top: 1px solid #EDEEF1;
  display: flex; align-items: center;
  z-index: 50;
}
.tab {
  flex: 1; text-align: center; color: #9AA0AB;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding-top: 4px;
  font-size: 11px;
}
.tab svg { width: 22px; height: 22px; stroke: currentColor; }
.tab.active { color: var(--pri); font-weight: 600; }
.tab-center { flex: 1; position: relative; }
.tab-center-btn {
  position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(160deg, #FF9A48, #FF6A00);
  box-shadow: 0 8px 20px rgba(255, 106, 0, .38), inset 0 0 0 3px rgba(255, 255, 255, .55);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; letter-spacing: 1px;
  border: 3px solid #fff;
}
.tab-center-btn:active { transform: translateX(-50%) scale(.96); }

/* ===== 通用控件 ===== */
.topbar {
  display: flex; align-items: center; gap: 8px;
  height: 50px; padding: 0 12px;
  max-width: 560px; margin: 0 auto;
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar .back { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; }
.topbar .back svg { width: 20px; height: 20px; stroke: #37393F; }
.topbar .title { flex: 1; text-align: center; font-size: 16px; font-weight: 700; }
.topbar .right { width: 30px; }

.btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 46px; border-radius: 23px; border: 0;
  font-size: 15.5px; font-weight: 700;
}
.btn-primary {
  background: linear-gradient(135deg, #FF8A3D, #FF6200);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 106, 0, .28);
}
.btn-ghost { background: #FFF1E8; color: var(--pri); }
.btn-line { background: #fff; border: 1px solid #E6E8EC; color: #4B515C; }
.btn:disabled { opacity: .55; box-shadow: none; }

.field {
  display: flex; align-items: center; gap: 10px;
  background: #fff; padding: 14px 15px; border-bottom: 1px solid #F4F5F7;
}
.field label { width: 74px; flex: none; color: #6B7280; font-size: 13.5px; }
.field input, .field select, .field textarea {
  flex: 1; border: 0; outline: 0; font-size: 14px; background: transparent;
  color: var(--txt); font-family: inherit;
}
.field textarea { resize: none; height: 62px; padding-top: 4px; }

.seg {
  display: flex; background: #F1F2F5; border-radius: 12px; padding: 3px; margin: 12px 14px;
}
.seg button {
  flex: 1; border: 0; background: transparent; height: 34px; border-radius: 10px;
  font-size: 13.5px; color: #5C6270;
}
.seg button.active { background: #fff; color: var(--pri); font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }

.tabs-line { display: flex; background: #fff; border-bottom: 1px solid var(--line); }
.tabs-line button {
  flex: 1; border: 0; background: transparent; height: 46px; font-size: 14px; color: #5C6270;
  position: relative;
}
.tabs-line button.active { color: var(--pri); font-weight: 700; }
.tabs-line button.active::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 4px; width: 24px; height: 3px; border-radius: 3px;
  background: var(--pri);
}

.list {
  background: #fff; margin: 12px 14px; border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow);
}
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-bottom: 1px solid #F5F6F8;
}
.list-row:last-child { border-bottom: 0; }
.list-row .l-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--pri-soft); display: flex; align-items: center; justify-content: center; flex: none; }
.list-row .l-ico svg { width: 18px; height: 18px; stroke: var(--pri); }
.list-row .l-main { flex: 1; font-size: 14px; }
.list-row .l-sub { font-size: 12px; color: var(--sub); margin-top: 2px; }
.list-row .l-right { color: #C0C4CC; font-size: 12px; display: flex; align-items: center; gap: 4px; }

.empty { text-align: center; padding: 70px 20px; color: #9AA0AB; }
.empty .pic { width: 120px; margin: 0 auto 14px; opacity: .9; }
.empty p { margin: 0; font-size: 13.5px; }

/* 订单卡片 */
.order-card {
  background: #fff; margin: 12px 14px; border-radius: 14px;
  padding: 14px; box-shadow: var(--shadow);
}
.order-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--sub); }
.order-status { font-weight: 700; }
.order-status.s0 { color: #E5484D; }
.order-status.s1, .order-status.s2 { color: #E8890C; }
.order-status.s3 { color: #22A06B; }
.order-status.s4 { color: #9AA0AB; }
.order-body { display: flex; gap: 12px; margin-top: 12px; }
.order-body img { width: 62px; height: 62px; border-radius: 10px; object-fit: cover; background: #FFF4EC; flex: none; }
.order-title { font-size: 14.5px; font-weight: 700; }
.order-meta { font-size: 12px; color: var(--sub); margin-top: 5px; }
.order-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #F0F1F4; }
.order-amount { color: var(--pri); font-weight: 800; font-size: 17px; }
.order-actions { display: flex; gap: 8px; }
.mini-btn { height: 30px; padding: 0 14px; border-radius: 15px; font-size: 12.5px; border: 1px solid #E6E8EC; background: #fff; color: #4B515C; }
.mini-btn.pri { background: linear-gradient(135deg, #FF8A3D, #FF6200); border: 0; color: #fff; font-weight: 600; }

/* 详情页 */
.detail-cover { width: 100%; height: 320px; object-fit: contain; background: #FFF6EF; }
.detail-box { background: #fff; margin: -18px 0 0; border-radius: 20px 20px 0 0; position: relative; padding: 16px 14px 20px; }
.detail-price { color: var(--pri); font-weight: 800; font-size: 24px; }
.detail-price small { font-size: 12px; color: var(--sub); font-weight: 500; margin-left: 4px; }
.detail-title { font-size: 17px; font-weight: 800; margin-top: 6px; }
.detail-desc { font-size: 13px; color: #6B7280; line-height: 1.7; margin-top: 10px; }
.detail-section { background: #fff; margin: 12px 0 0; padding: 14px; }
.detail-section h4 { margin: 0 0 8px; font-size: 14.5px; }

.qty-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px; background: #fff; border-top: 1px solid #F5F6F8;
}
.qty-ctrl { display: flex; align-items: center; gap: 12px; }
.qty-ctrl button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid #E6E8EC; background: #fff; font-size: 16px; color: #5C6270; }
.qty-ctrl span { min-width: 20px; text-align: center; font-weight: 700; }

.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  background: #fff; padding: 10px 14px calc(10px + var(--safe));
  border-top: 1px solid #F0F1F4; z-index: 40;
}
.bottom-bar .total { flex: 1; }
.bottom-bar .total b { color: var(--pri); font-size: 20px; }
.bottom-bar .total span { font-size: 12px; color: var(--sub); }
.bottom-bar .btn { width: 150px; height: 44px; flex: none; }

/* 弹层 */
.mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .45);
  z-index: 60; display: none; align-items: flex-end; justify-content: center;
}
.mask.show { display: flex; }
.sheet {
  width: 100%; max-width: 560px; background: #fff;
  border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + var(--safe));
  transform: translateY(100%); transition: transform .25s ease;
}
.mask.show .sheet { transform: translateY(0); }
.sheet h3 { margin: 0 0 4px; font-size: 16px; }
.sheet .sub { color: var(--sub); font-size: 12.5px; margin-bottom: 14px; }

/* toast */
.toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: rgba(30, 30, 35, .88); color: #fff;
  padding: 10px 18px; border-radius: 10px; font-size: 13.5px;
  z-index: 99; opacity: 0; pointer-events: none; transition: opacity .2s;
  max-width: 78%; text-align: center;
}
.toast.show { opacity: 1; }

/* 工具类 */
.mt-10 { margin-top: 10px; }
.mb-0 { margin-bottom: 0; }
.hide { display: none !important; }
.center { text-align: center; }
.muted { color: var(--sub); }
.hr { height: 1px; background: #F5F6F8; margin: 0 14px; }
.row-pad { padding: 12px 16px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
