/* VTY 响应式壳 · 真实元素拆解 · 全屏无留白 */
:root {
  --bg: #121212;
  --bg2: #1a1a1a;
  --panel: #1e1e1e;
  --panel2: #252525;
  --line: #2e2e2e;
  --text: #fff;
  --muted: #9a9a9a;
  --orange: #f6941d;
  --orange2: #ff8a00;
  --purple: #694dff;
  --sidebar-w: 220px;
  --header-h: 56px;
  --bottom-h: 56px;
  --float-w: 56px;
  --safe: 0px;
  --font: "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.4;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ========== 断点指示条（评审用，不占布局逻辑） ========== */
.bp-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  height: 28px; display: flex; align-items: center; gap: 10px;
  padding: 0 12px; font-size: 11px;
  background: #000; border-bottom: 1px solid #333; color: #ccc;
}
.bp-bar b { color: var(--orange); }
.bp-bar .pill {
  padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: 10px;
  background: #222; border: 1px solid #444;
}
.bp-bar .pill.on-h5 { background: rgba(246,148,29,.2); border-color: var(--orange); color: var(--orange); }
.bp-bar .pill.on-tb { background: rgba(168,85,247,.2); border-color: #a855f7; color: #d8b4fe; }
.bp-bar .pill.on-pc { background: rgba(59,130,246,.2); border-color: #3b82f6; color: #93c5fd; }
.bp-bar a { color: var(--orange); margin-left: auto; font-weight: 600; }

/* 页面主体从指示条下开始，左右顶满 */
.app {
  padding-top: 28px;
  min-height: 100vh;
  width: 100%;
  background: var(--bg);
}

/* ========== PC 壳：左栏 + 顶栏 + 主区 ========== */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
  min-height: calc(100vh - 28px);
  width: 100%;
}
.shell .header { grid-column: 1 / -1; }
.shell .sidebar { grid-row: 2; }
.shell .main { grid-row: 2; min-width: 0; }

/* H5：取消侧栏占位，主区全宽 */
@media (max-width: 1023px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: var(--header-h) 1fr;
  }
  .shell .sidebar {
    position: fixed;
    top: calc(28px + var(--header-h));
    left: 0; bottom: 0;
    width: min(280px, 86vw);
    z-index: 80;
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: 8px 0 24px rgba(0,0,0,.5);
  }
  .shell.drawer-open .sidebar { transform: translateX(0); }
  .shell .main { grid-column: 1; padding-bottom: calc(var(--bottom-h) + 48px); }
}

/* ========== Header ========== */
.header {
  display: flex; align-items: center; gap: 12px;
  height: var(--header-h);
  padding: 0 12px;
  background: #161616;
  border-bottom: 1px solid var(--line);
  width: 100%;
}
.header .menu-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
}
.header .logo {
  font-weight: 800; font-size: 18px; letter-spacing: .5px;
  color: #fff; white-space: nowrap;
}
.header .logo span { color: var(--orange); }
.header .sponsor {
  display: none; align-items: center; gap: 8px;
  padding: 4px 8px; border-radius: 8px; background: #222;
  font-size: 11px; color: #bbb; max-width: 180px;
}
.header .marquee {
  flex: 1; min-width: 0; overflow: hidden; white-space: nowrap;
  color: var(--muted); font-size: 12px;
}
.header .marquee span {
  display: inline-block; padding-left: 100%;
  animation: mq 18s linear infinite;
}
@keyframes mq { to { transform: translateX(-100%); } }
.header .auth { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.header .bal { color: var(--orange); font-weight: 700; font-size: 14px; }
.btn-login {
  height: 32px; padding: 0 14px; border-radius: 16px;
  border: 1px solid var(--orange); color: var(--orange); font-size: 13px;
}
.btn-reg {
  height: 32px; padding: 0 14px; border-radius: 16px;
  background: var(--orange); color: #111; font-weight: 700; font-size: 13px;
  box-shadow: 0 0 12px rgba(246,148,29,.35);
}
@media (min-width: 1280px) {
  .header .sponsor { display: inline-flex; }
}

/* ========== Sidebar ========== */
.sidebar {
  background: #151515;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  overflow: auto;
  width: 100%;
}
.side-promo {
  display: grid; gap: 8px; padding: 12px;
}
.side-promo a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 10px;
  background: linear-gradient(90deg, #2a2110, #1a1a1a);
  border: 1px solid #3a3020; font-size: 13px;
}
.side-nav { padding: 4px 8px 12px; flex: 1; }
.side-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 10px; color: #ddd; font-size: 13px;
}
.side-nav a:hover { background: #222; }
.side-nav a.active {
  background: linear-gradient(90deg, rgba(246,148,29,.35), rgba(246,148,29,.05));
  color: #fff; font-weight: 700;
}
.side-nav .ico { width: 18px; text-align: center; opacity: .9; }
.side-foot {
  padding: 12px; border-top: 1px solid var(--line);
  display: flex; gap: 6px;
}
.side-foot button {
  flex: 1; height: 34px; border-radius: 8px; background: #222; font-size: 12px; color: #aaa;
}
.side-foot button.on { background: #333; color: var(--orange); border: 1px solid #553; }

/* ========== Main ========== */
.main {
  background: var(--bg);
  overflow: auto;
  width: 100%;
  position: relative;
}
.main-inner { width: 100%; padding: 12px; }

/* H5 顶部分类四宫格 — 仅窄屏 */
.h5-cats {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.h5-cats a {
  text-align: center; padding: 10px 4px; border-radius: 12px;
  background: var(--panel); font-size: 12px;
}
.h5-cats a.active { outline: 2px solid var(--orange); color: var(--orange); }
.h5-cats .ico { font-size: 22px; margin-bottom: 4px; }
@media (max-width: 1023px) {
  .h5-cats { display: grid; }
}

/* Hero：宽屏 2 列，窄屏堆叠，永远拉满 */
.hero {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
  width: 100%;
}
.hero-banner {
  border-radius: 12px; overflow: hidden; min-height: 180px;
  background: #0d2038 center/cover no-repeat;
  position: relative;
  border: 1px solid #243;
}
.hero-banner .cap {
  position: absolute; left: 16px; bottom: 16px;
  font-size: clamp(18px, 2.2vw, 28px); font-weight: 800;
  text-shadow: 0 2px 8px #000;
}
.hero-banner .sub { font-size: 12px; opacity: .85; font-weight: 500; margin-top: 4px; }
.hero-promo {
  border-radius: 12px; min-height: 180px;
  background: radial-gradient(circle at 70% 40%, #3a2a60, #121018 70%);
  border: 1px solid #332a48;
  padding: 18px 16px; display: flex; flex-direction: column; justify-content: center;
}
.hero-promo .amt { font-size: clamp(28px, 3vw, 40px); font-weight: 800; color: #fff; }
.hero-promo .btn {
  margin-top: 12px; align-self: flex-start;
  height: 36px; padding: 0 18px; border-radius: 18px;
  background: var(--purple); color: #fff; font-weight: 700;
}
@media (max-width: 1023px) {
  .hero { grid-template-columns: 1fr; }
  .hero-banner, .hero-promo { min-height: 140px; }
}

/* 赛程区标题 */
.sec-head {
  display: flex; align-items: center; gap: 8px; margin: 8px 0 12px; flex-wrap: wrap;
}
.sec-head .tabs { display: flex; gap: 6px; }
.sec-head .tabs button {
  height: 32px; padding: 0 14px; border-radius: 8px; background: #222; color: #bbb; font-size: 13px;
}
.sec-head .tabs button.on { background: var(--orange); color: #111; font-weight: 700; }
.sec-head .more { margin-left: auto; color: var(--muted); font-size: 12px; }

/* ★ 赛程卡片栅格：5→4→3→2→1 */
.match-grid {
  display: grid;
  width: 100%;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1399px) {
  .match-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1099px) {
  .match-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .match-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .match-grid { grid-template-columns: minmax(0, 1fr); }
}

.match-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  min-width: 0;
}
.match-card .league { font-size: 11px; color: var(--muted); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-card .teams {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center;
  margin-bottom: 8px;
}
.match-card .team { font-size: 13px; font-weight: 600; text-align: center; min-width: 0; }
.match-card .team span { display: block; font-size: 11px; color: #888; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-card .score { font-size: 18px; font-weight: 800; color: var(--orange); }
.match-card .meta { display: flex; justify-content: space-between; font-size: 11px; color: #888; }
.match-card .odds {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px;
}
.match-card .odds button {
  background: #2a2a2a; border-radius: 8px; padding: 8px 6px; font-size: 11px; color: #ddd;
}
.match-card .odds button em { display: block; color: var(--orange); font-style: normal; font-weight: 700; margin-top: 2px; }

/* H5 滚球列表（窄屏额外展示，示意） */
.h5-live {
  display: none;
  margin-top: 8px;
}
@media (max-width: 1023px) {
  .h5-live { display: block; }
  .pc-only-sec { display: none; }
}
@media (min-width: 1024px) {
  .h5-live { display: none; }
}

.market-tabs {
  display: flex; gap: 4px; overflow-x: auto; margin-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}
.market-tabs button {
  flex: 0 0 auto; padding: 8px 12px; font-size: 13px; color: #aaa;
  border-bottom: 2px solid transparent;
}
.market-tabs button.on { color: #fff; border-bottom-color: var(--orange); font-weight: 700; }
.sport-chips {
  display: flex; gap: 8px; overflow-x: auto; margin-bottom: 10px; padding-bottom: 4px;
}
.sport-chips button {
  flex: 0 0 auto; height: 32px; padding: 0 14px; border-radius: 16px;
  background: #2a2a2a; font-size: 12px; color: #ccc;
}
.sport-chips button.on { background: var(--orange); color: #111; font-weight: 700; }

.league-block { margin-bottom: 10px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.league-block .lh {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; background: #1b1b1b; font-size: 13px;
}
.match-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #222;
  background: #161616;
}
.match-row .info .t { font-size: 11px; color: #888; margin-bottom: 4px; }
.match-row .info .n { font-size: 13px; display: flex; justify-content: space-between; margin: 2px 0; }
.match-row .info .n b { color: var(--orange); }
.match-row .mk {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.match-row .mk button {
  background: #2a2a2a; border-radius: 6px; padding: 6px; font-size: 11px; text-align: center;
}
@media (max-width: 420px) {
  .match-row { grid-template-columns: 1fr; }
}

/* 右侧浮条 — 宽屏 */
.float-bar {
  position: fixed; right: 0; top: 40%;
  width: var(--float-w);
  background: #1a1a1a; border: 1px solid #333; border-right: 0;
  border-radius: 10px 0 0 10px; z-index: 40;
  display: flex; flex-direction: column;
}
.float-bar a {
  padding: 12px 4px; text-align: center; font-size: 10px; color: #bbb; border-bottom: 1px solid #2a2a2a;
}
@media (max-width: 1023px) {
  .float-bar { display: none; }
}

/* 底栏直播条 — 宽屏 */
.live-dock {
  position: sticky; bottom: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; background: #0e0e0e; border-top: 1px solid #2a2a2a;
  width: 100%;
}
.live-dock .acts { margin-left: auto; display: flex; gap: 8px; }
.live-dock .acts button {
  height: 30px; padding: 0 12px; border-radius: 6px; background: #2a2a2a; font-size: 12px;
}
@media (max-width: 1023px) {
  .live-dock { display: none; }
}

/* H5 底栏 + App 提示 */
.app-tip {
  display: none;
  position: fixed; left: 0; right: 0; bottom: var(--bottom-h);
  background: var(--orange); color: #111; padding: 8px 12px;
  font-size: 12px; font-weight: 600; z-index: 50;
  align-items: center; gap: 8px;
}
.app-tip button {
  margin-left: auto; background: #111; color: #fff; border-radius: 14px; height: 28px; padding: 0 12px; font-size: 12px;
}
.bottom-nav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--bottom-h);
  background: #0a0a0a; border-top: 1px solid #2a2a2a; z-index: 60;
  grid-template-columns: 1.2fr repeat(4, 1fr);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 10px; color: #999; gap: 2px;
}
.bottom-nav .brand { color: var(--orange); font-weight: 800; font-size: 12px; }
@media (max-width: 1023px) {
  .app-tip { display: flex; }
  .bottom-nav { display: grid; }
}

.drawer-mask {
  display: none; position: fixed; inset: 28px 0 0 0; background: rgba(0,0,0,.5); z-index: 70;
}
.shell.drawer-open .drawer-mask { display: block; }

/* ========== Auth 页 / Modal ========== */
.auth-page {
  min-height: calc(100vh - 28px);
  width: 100%;
  display: flex; align-items: stretch; justify-content: center;
  background: #0a0a0a;
}
.auth-card {
  width: 100%;
  max-width: 860px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #333;
  min-height: 480px;
}
.auth-visual {
  background: #0c1a2e center/cover no-repeat;
  position: relative; min-height: 220px;
}
.auth-visual .slogan {
  position: absolute; left: 16px; right: 16px; bottom: 20px;
  font-size: 22px; font-weight: 800; text-shadow: 0 2px 10px #000;
}
.auth-form { padding: 28px 24px; display: flex; flex-direction: column; }
.auth-form h1 { font-size: 22px; margin-bottom: 4px; }
.auth-tabs { display: flex; gap: 8px; margin: 16px 0; }
.auth-tabs button {
  height: 34px; padding: 0 14px; border-radius: 17px; background: transparent; color: #aaa;
}
.auth-tabs button.on { background: var(--orange); color: #111; font-weight: 700; }
.field { margin-bottom: 14px; }
.field label {
  display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px;
}
.field label small { color: var(--orange); font-size: 11px; }
.field input {
  width: 100%; height: 44px; border-radius: 8px; border: 1px solid #3a3a3a;
  background: #121212; color: #fff; padding: 0 12px; font-size: 14px;
}
.field input:focus { outline: none; border-color: var(--orange); }
.row-between { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #aaa; margin: 8px 0 16px; }
.btn-primary {
  width: 100%; height: 44px; border-radius: 8px;
  background: linear-gradient(180deg, #c9892a, #8a5a10); color: #fff; font-size: 16px; font-weight: 700;
}
.btn-secondary {
  width: 100%; height: 44px; border-radius: 8px; margin-top: 10px;
  background: #2a2a2a; color: #fff; font-size: 14px;
}
.auth-foot { margin-top: auto; padding-top: 16px; text-align: center; font-size: 12px; color: #888; }
.auth-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid #2a2a2a;
}
.auth-top .title { font-size: 18px; font-weight: 700; }

/* 窄屏：鉴权整页，隐藏左品牌，表单拉满 */
@media (max-width: 767px) {
  .auth-page { align-items: stretch; background: #121212; }
  .auth-card {
    max-width: none; margin: 0; border: 0; border-radius: 0;
    grid-template-columns: 1fr; min-height: calc(100vh - 28px);
  }
  .auth-visual {
    display: none; /* 窄屏隐藏双栏品牌，避免挤表单；底部可另放横幅 */
  }
  .auth-visual.h5-show {
    display: block; min-height: 120px; order: 2;
  }
  .auth-form { padding: 20px 16px 32px; }
}

/* 平板：仍单栏表单优先 */
@media (min-width: 768px) and (max-width: 1023px) {
  .auth-card { grid-template-columns: 1fr; max-width: 480px; }
  .auth-visual { display: none; }
}

.check { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: #bbb; margin: 12px 0; }
.check input { margin-top: 2px; }
.check a { color: #4ea1ff; }

.stepper {
  display: flex; gap: 8px; margin: 12px 0 18px; font-size: 11px; color: #888;
}
.stepper span { flex: 1; text-align: center; padding-bottom: 6px; border-bottom: 2px solid #333; }
.stepper span.on { color: var(--orange); border-bottom-color: var(--orange); font-weight: 700; }

.hub-links {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; background: #0d0d0d; border-bottom: 1px solid #222;
}
.hub-links a {
  padding: 6px 10px; border-radius: 8px; background: #1e1e1e; border: 1px solid #333; font-size: 12px;
}
.hub-links a.on { border-color: var(--orange); color: var(--orange); }
