:root {
  color-scheme: dark;
  --bg: #090d16;
  --panel: #111827;
  --panel-2: #151f31;
  --line: rgba(255,255,255,.10);
  --text: #eef4ff;
  --muted: #98a8c7;
  --brand: #ff7a1a;
  --brand-2: #35d6ff;
  --ok: #28d17c;
  --danger: #ff4d5e;
  --warning: #ffc04d;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(255,122,26,.16), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(53,214,255,.14), transparent 26%),
    linear-gradient(180deg, #080b12, #101827 42%, #0b0f18);
}
a { color: inherit; text-decoration: none; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 6vw;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 18, .88);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 900; }
.brand span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #10131a;
  background: linear-gradient(135deg, #ffd35a, var(--brand));
  box-shadow: 0 0 28px rgba(255,122,26,.38);
}
nav { display: flex; gap: 22px; color: var(--muted); font-size: 14px; }
nav a:hover { color: var(--brand); }
.game-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: 36px;
  align-items: center;
  min-height: 590px;
  padding: 82px 6vw 56px;
}
.hero-copy h1 { max-width: 820px; margin: 10px 0 18px; font-size: clamp(38px, 5.2vw, 68px); line-height: 1.04; letter-spacing: 0; }
.lead { max-width: 720px; color: var(--muted); font-size: 18px; line-height: 1.8; }
.eyebrow { margin: 0; color: var(--brand); font-weight: 900; letter-spacing: 0; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.button, button {
  border: 0;
  border-radius: 8px;
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: .18s ease;
}
.button.primary, button.primary { background: linear-gradient(135deg, #ff9b2f, #ff5a1f); color: #16110c; box-shadow: 0 14px 30px rgba(255,122,26,.25); }
.button.ghost, button.ghost { background: rgba(255,255,255,.08); color: var(--text); border: 1px solid var(--line); }
button.danger { background: rgba(255,77,94,.18); color: #ff9aa4; }
button:disabled { opacity: .55; cursor: not-allowed; }
.trade-board {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(21,31,49,.92), rgba(12,18,30,.92));
  box-shadow: var(--shadow);
}
.board-head, .product-footer, .toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.board-head b { font-size: 22px; }
.board-head span, .status-line { color: var(--muted); }
.trade-tabs { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 18px 0; }
.trade-tabs span, .shop-badges span, .pay-safe span {
  border: 1px solid rgba(255,122,26,.26);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  color: #ffd8b8;
  background: rgba(255,122,26,.08);
}
.deal-list { display: grid; gap: 12px; }
.deal-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.045);
}
.deal-list em { font-style: normal; color: var(--brand-2); }
.deal-list strong { color: var(--brand); font-size: 20px; }
.category-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 0 6vw 38px;
}
.category-strip a {
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.055);
  text-align: center;
  font-weight: 800;
}
.band { padding: 48px 6vw; }
.band.muted { background: rgba(255,255,255,.035); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h2 { margin: 6px 0 0; font-size: 30px; }
.feature-grid, .card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
article, .card, .panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(21,31,49,.96), rgba(14,20,33,.96));
  box-shadow: 0 10px 35px rgba(0,0,0,.18);
}
article { padding: 22px; }
article h3 { margin: 0 0 10px; }
article p { margin: 0; color: var(--muted); line-height: 1.7; }
.notice-list { display: grid; gap: 12px; }
.notice { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.05); }
.notice b { display: block; margin-bottom: 6px; }
.notice p { margin: 0; color: var(--muted); }
.footer { padding: 28px 6vw; color: var(--muted); }

.app-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 68px); }
.sidebar { padding: 22px; border-right: 1px solid var(--line); background: #080d16; color: #b9c7e3; }
.sidebar h2 { margin: 0 0 18px; color: #fff; }
.menu { display: grid; gap: 8px; }
.menu button { width: 100%; text-align: left; background: transparent; color: #b9c7e3; padding: 10px 12px; }
.menu button.active, .menu button:hover { background: rgba(255,122,26,.12); color: #fff; }
.workspace { padding: 26px; overflow: auto; }
.toolbar { margin-bottom: 18px; flex-wrap: wrap; }
.toolbar h1 { margin: 0; font-size: 26px; }
.panel { padding: 18px; margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.settlement-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.045); }
.stat span { display: block; color: var(--muted); font-size: 13px; }
.stat b { display: block; margin-top: 8px; font-size: 26px; color: var(--brand); }
.stat b.small-stat { font-size: 14px; line-height: 1.5; color: #dbe7ff; word-break: break-word; }
table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; vertical-align: top; }
th { background: rgba(255,255,255,.06); color: #dbe7ff; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 12px; background: rgba(53,214,255,.12); color: var(--brand-2); }
.badge.ok { background: rgba(40,209,124,.13); color: var(--ok); }
.badge.warn { background: rgba(255,192,77,.14); color: var(--warning); }
.badge.bad { background: rgba(255,77,94,.15); color: var(--danger); }
form.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.seg-form { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.seg-form label { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.05); }
.seg-form input { width: auto; }
label { display: grid; gap: 7px; color: #d7e3fa; font-weight: 700; font-size: 13px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  color: var(--text);
  background: rgba(255,255,255,.06);
}
select option { color: #111827; }
textarea { min-height: 96px; resize: vertical; }
.full { grid-column: 1 / -1; }
.auth-box {
  max-width: 500px;
  margin: 46px auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(21,31,49,.96), rgba(11,17,29,.96));
  box-shadow: var(--shadow);
}
.auth-box h1 { margin: 0 0 18px; }
.shop-head { padding: 46px 6vw 26px; border-bottom: 1px solid var(--line); }
.game-shop-head { background: linear-gradient(135deg, rgba(255,122,26,.12), rgba(53,214,255,.08)); }
.shop-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: center; }
.shop-head h1 { margin: 6px 0 10px; font-size: 38px; }
.shop-head p { margin: 0; color: var(--muted); }
.shop-badges { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.qq-card {
  justify-self: end;
  display: grid;
  gap: 8px;
  min-width: 260px;
  padding: 20px;
  border: 1px solid rgba(255,122,26,.32);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,122,26,.14), rgba(53,214,255,.08));
  box-shadow: 0 18px 48px rgba(0,0,0,.18);
}
.qq-card span { color: var(--muted); font-size: 13px; font-weight: 800; }
.qq-card b { color: var(--brand); font-size: 24px; }
.shop-layout { display: grid; grid-template-columns: 1fr 380px; gap: 20px; padding: 24px 6vw 52px; }
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.product { padding: 18px; position: relative; overflow: hidden; }
.product::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.product.featured-product { border-color: rgba(255,122,26,.55); box-shadow: 0 0 0 1px rgba(255,122,26,.28), 0 18px 48px rgba(255,122,26,.12); }
.product .price { color: var(--brand); font-weight: 900; font-size: 26px; }
.product-footer { margin-top: 16px; }
.checkout-panel { position: sticky; top: 88px; align-self: start; }
.pay-safe { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; font-size: 13px; }
.status-line { min-height: 22px; }
.code-box { white-space: pre-wrap; padding: 14px; border-radius: 8px; background: #050813; color: #dbeafe; border: 1px solid var(--line); }
.link-input { min-width: 280px; font-size: 12px; color: #cbd7ee; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.row-actions button { padding: 8px 10px; font-size: 12px; }
.pay-wait-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; padding: 24px 6vw 50px; }
.pay-frame-panel { min-height: calc(100vh - 130px); }
#payFrame { width: 100%; min-height: 680px; border: 0; border-radius: 8px; background: #fff; }
.pay-side { align-self: start; position: sticky; top: 88px; }
.pay-side p { color: var(--muted); line-height: 1.7; }
.cashier-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(6, 10, 18, .25), rgba(6, 10, 18, .82)),
    radial-gradient(circle at 50% 0%, rgba(53,214,255,.20), transparent 34%),
    #070b13;
}
.cashier-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 22px;
}
.cashier-card {
  width: min(440px, 100%);
  padding: 24px;
  border: 1px solid rgba(53,214,255,.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18,28,46,.96), rgba(9,14,25,.98));
  box-shadow: 0 28px 80px rgba(0,0,0,.38);
}
.cashier-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.cashier-brand span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  color: #07101b;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.cashier-brand h1 { margin: 0; font-size: 28px; }
.cashier-brand p { margin: 4px 0 0; color: var(--muted); }
.cashier-form { display: grid; gap: 14px; }
.cashier-pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-choice {
  min-height: 48px;
  color: #dbeafe;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
}
.pay-choice.active {
  color: #07101b;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 26px rgba(53,214,255,.18);
}
.cashier-form input {
  min-height: 48px;
  font-size: 17px;
}
.cashier-submit {
  min-height: 52px;
  font-size: 17px;
}

@media (max-width: 980px) {
  .site-header { align-items: flex-start; flex-direction: column; padding: 14px 5vw; gap: 12px; }
  nav { flex-wrap: wrap; gap: 12px; }
  .game-hero, .shop-layout, .app-shell { grid-template-columns: 1fr; }
  .shop-hero-grid { grid-template-columns: 1fr; }
  .pay-wait-layout { grid-template-columns: 1fr; }
  .qq-card { justify-self: stretch; min-width: 0; }
  .category-strip, .feature-grid, .card-grid, .stats, .settlement-grid, .products, form.grid { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; }
  .checkout-panel { position: static; }
}
