*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1677ff;
  --primary-hover: #0958d9;
  --danger: #ff4d4f;
  --success: #52c41a;
  --bg: #f5f7fa;
  --card-bg: #fff;
  --border: #e8e8e8;
  --text: #1a1a1a;
  --muted: #666;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

/* Nav */
.nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.nav-logo { font-size: 18px; font-weight: 700; color: var(--primary); text-decoration: none; margin-right: auto; }
.nav a { color: var(--text); text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--primary); }
.nav-btn {
  background: var(--primary); color: #fff; border: none; border-radius: var(--radius);
  padding: 6px 16px; cursor: pointer; font-size: 14px; text-decoration: none;
}
.nav .nav-btn { color: #fff; }
.nav-btn:hover { background: var(--primary-hover); }

/* Layout */
.container { max-width: 960px; margin: 0 auto; padding: 32px 16px; }
.page-title { font-size: 24px; font-weight: 700; margin-bottom: 24px; }

/* Card */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px; border-radius: var(--radius); border: none;
  cursor: pointer; font-size: 14px; font-weight: 500; transition: .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: #e6f0ff; }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger:hover { background: #fff1f0; }
.btn-sm { padding: 4px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; }
.form-group input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; outline: none; transition: .15s;
}
.form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(22,119,255,.2); }
.form-error { color: var(--danger); font-size: 13px; margin-top: 4px; min-height: 18px; }
.form-actions { display: flex; gap: 12px; margin-top: 20px; }

/* Tabs */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab {
  padding: 10px 20px; cursor: pointer; font-size: 15px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: .15s;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--muted); background: #fafafa; font-size: 13px; }
tr:last-child td { border-bottom: none; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 500;
}
.badge-green { background: #f6ffed; color: var(--success); border: 1px solid #b7eb8f; }
.badge-red { background: #fff1f0; color: var(--danger); border: 1px solid #ffa39e; }
.badge-gray { background: #f5f5f5; color: #888; border: 1px solid #d9d9d9; }

/* Balance card */
.balance-hero {
  background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
  color: #fff; border-radius: var(--radius); padding: 32px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.balance-amount { font-size: 42px; font-weight: 700; }
.balance-label { font-size: 14px; opacity: .85; margin-bottom: 8px; }
.balance-note { font-size: 13px; opacity: .7; margin-top: 8px; }
.btn-white { background: #fff; color: var(--primary); border: none; }
.btn-white:hover { background: #f0f7ff; }

/* Code block */
.code-block {
  background: #1e1e2e; color: #cdd6f4; border-radius: var(--radius);
  padding: 16px 20px; font-family: "Courier New", monospace; font-size: 13px;
  overflow-x: auto; position: relative;
}
.code-block .copy-btn {
  position: absolute; right: 10px; top: 10px;
  background: rgba(255,255,255,.1); color: #cdd6f4; border: none;
  border-radius: 4px; padding: 3px 10px; cursor: pointer; font-size: 12px;
}
.code-block .copy-btn:hover { background: rgba(255,255,255,.2); }

/* Key row */
.key-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.key-row:last-child { border-bottom: none; }
.key-info { flex: 1; min-width: 0; }
.key-id { font-family: monospace; font-size: 13px; font-weight: 600; }
.key-secret { font-family: monospace; font-size: 12px; color: var(--muted); word-break: break-all; }
.key-date { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal { background: #fff; border-radius: var(--radius); padding: 28px; width: 380px; max-width: 95vw; box-shadow: 0 8px 32px rgba(0,0,0,.18); }
.modal-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.amount-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.amount-btn {
  border: 2px solid var(--border); background: #fff; border-radius: var(--radius);
  padding: 12px 10px; text-align: center; cursor: pointer; font-size: 16px; font-weight: 600; transition: .15s;
}
.amount-btn.selected { border-color: var(--primary); color: var(--primary); background: #e6f0ff; }
.amount-btn:hover { border-color: var(--primary); }
.amount-original { color: var(--muted); font-size: 14px; text-decoration: line-through; text-decoration-thickness: 2px; }
.amount-payable { color: var(--danger); font-size: 17px; line-height: 1.55; }
.amount-discount { color: #b45309; font-size: 12px; font-weight: 600; }
.amount-btn.selected .amount-payable { color: var(--primary); }
.amount-btn.promo-expired .amount-payable { color: var(--text); }
.payment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 16px; }
.payment-btn {
  border: 2px solid var(--border); background: transparent; border-radius: var(--radius);
  padding: 10px 12px; text-align: center; cursor: pointer; font-weight: 600; transition: .15s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.payment-btn:hover { border-color: #b8c2d6; box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.payment-btn[data-provider="alipay"].selected { border-color: #1677ff; box-shadow: 0 0 0 3px rgba(22,119,255,.14); }
.payment-btn[data-provider="wechat"].selected { border-color: #07c160; box-shadow: 0 0 0 3px rgba(7,193,96,.14); }
.payment-logo { width: 24px; height: 24px; display: block; border-radius: 6px; }
.payment-logo-wide { width: 112px; height: auto; border-radius: 4px; }
.wechat-qr-box { text-align: center; border: 1px dashed var(--border); border-radius: var(--radius); padding: 16px; margin-top: 14px; }
.wechat-qr-box img { width: 220px; height: 220px; max-width: 100%; display: block; margin: 0 auto 10px; }
.wechat-qr-box .order-no { font-family: monospace; color: var(--muted); font-size: 12px; word-break: break-all; }

/* Alert */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; }
.alert-info { background: #e6f4ff; color: #0958d9; border: 1px solid #91caff; }
.alert-success { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }

/* Login page */
.login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; width: 400px; max-width: 95vw; }
.login-logo { text-align: center; font-size: 22px; font-weight: 700; color: var(--primary); margin-bottom: 28px; }

/* Hero section */
.hero { text-align: center; padding: 64px 0 48px; }
.hero h1 { font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.hero p { font-size: 16px; color: var(--muted); max-width: 520px; margin: 0 auto 28px; }
.promo-banner {
  margin: -14px auto 0; padding: 10px 16px; border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #fb7185);
  color: #fff; text-align: center; font-weight: 700; font-size: 14px;
  box-shadow: 0 8px 22px rgba(239, 68, 68, .18);
}

/* Shenbi Bana Skill tab */
.shenbi-hero {
  position: relative;
  overflow: hidden;
  min-height: 500px;
  border-radius: 22px;
  padding: 50px 38px;
  background:
    linear-gradient(90deg, rgba(218, 236, 255, .35), rgba(238, 246, 255, .1)),
    url("../aibana_bg.png") center / cover no-repeat,
    linear-gradient(135deg, #f8fbff 0%, #edf4ff 48%, #dfeaff 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72);
}
.shenbi-hero::before {
  display: none;
}
.shenbi-hero::after {
  display: none;
}
.shenbi-bg-dot {
  display: none;
  position: absolute;
  width: 152px;
  height: 104px;
  opacity: .75;
  background-image: radial-gradient(circle, rgba(101, 139, 220, .38) 0 4px, transparent 5px);
  background-size: 22px 22px;
}
.shenbi-bg-dot-left { left: 26px; top: 24px; }
.shenbi-bg-dot-right { right: 24px; top: 24px; filter: brightness(1.8); }
.shenbi-hero-copy {
  position: relative;
  z-index: 2;
  width: 34%;
  min-width: 270px;
  padding-top: 58px;
}
.shenbi-kicker {
  color: #6680b6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  margin-bottom: 8px;
}
.shenbi-hero h2 {
  color: #17223a;
  font-size: clamp(34px, 4.3vw, 54px);
  line-height: 1;
  letter-spacing: -.06em;
  margin-bottom: 16px;
  text-shadow: 0 12px 22px rgba(31, 44, 74, .08);
}
.shenbi-rule {
  width: 76px;
  height: 4px;
  background: #202c40;
  margin-bottom: 20px;
}
.shenbi-rule span {
  display: block;
  width: 34%;
  height: 100%;
  background: #ef5a42;
  margin-left: 58%;
}
.shenbi-hero-copy p {
  color: #263349;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 2px;
}
.shenbi-cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 72px;
  padding: 11px 19px 11px 24px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #d94d3d 0%, #ff7a4d 100%);
  box-shadow: 0 18px 34px rgba(223, 83, 54, .26);
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}
.shenbi-cta:hover { color: #fff; transform: translateY(-1px); }
.shenbi-cta span { font-size: 23px; line-height: 1; }
.shenbi-stage {
  display: none;
  position: absolute;
  z-index: 2;
  right: -22px;
  top: 84px;
  width: 56%;
  min-width: 520px;
  height: 410px;
  transform: perspective(1000px) rotateY(-7deg) rotateZ(-4deg);
  transform-origin: center;
}
.shenbi-stage::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 28px;
  bottom: -68px;
  height: 72px;
  background: linear-gradient(180deg, rgba(104, 119, 151, .2), rgba(255,255,255,0));
  transform: skewX(-18deg);
  filter: blur(3px);
}
.shenbi-board {
  display: flex;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(35, 45, 62, .12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 46px rgba(24, 43, 77, .22);
}
.shenbi-sidebar {
  position: relative;
  width: 128px;
  padding: 22px 14px;
  color: rgba(255,255,255,.78);
  background: linear-gradient(180deg, #c34e39, #bd3f2f);
}
.shenbi-brand {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 24px;
}
.shenbi-menu-item {
  border-radius: 6px;
  padding: 9px 10px;
  margin-bottom: 8px;
  font-size: 12px;
}
.shenbi-menu-item.active { background: rgba(255,255,255,.16); color: #fff; }
.shenbi-user { position: absolute; bottom: 16px; font-size: 11px; color: #ffe6da; }
.shenbi-canvas {
  flex: 1;
  padding: 22px 26px;
  background: #f7f8fa;
}
.shenbi-tabs {
  display: flex;
  gap: 18px;
  align-items: center;
  color: #1f2736;
  font-size: 13px;
  margin-bottom: 22px;
}
.shenbi-tabs span { color: #9aa2af; }
.shenbi-upload {
  height: 58px;
  color: #a2a8b5;
  padding: 14px 22px;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 18px;
}
.shenbi-poster {
  width: 260px;
  min-height: 265px;
  margin: 0 auto;
  padding: 14px;
  color: #f4d377;
  background: radial-gradient(circle at 50% 36%, #0d5270, #071d3d 68%);
  box-shadow: 0 12px 28px rgba(14, 35, 72, .22);
}
.shenbi-poster-title {
  font-size: 19px;
  font-weight: 900;
  color: #ffe48a;
  text-align: center;
  margin-bottom: 14px;
}
.shenbi-map {
  position: relative;
  height: 144px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
}
.shenbi-map i {
  position: absolute;
  display: block;
  border-radius: 45% 55% 48% 52%;
  background: linear-gradient(135deg, #70b86e, #d5a94a);
  box-shadow: 0 0 0 2px rgba(255,255,255,.08);
}
.shenbi-map i:nth-child(1) { width: 62px; height: 34px; left: 86px; top: 16px; }
.shenbi-map i:nth-child(2) { width: 48px; height: 70px; left: 48px; top: 62px; transform: rotate(-24deg); }
.shenbi-map i:nth-child(3) { width: 68px; height: 42px; right: 38px; bottom: 26px; transform: rotate(18deg); }
.shenbi-map i:nth-child(4) { width: 24px; height: 20px; right: 64px; top: 62px; }
.shenbi-map i:nth-child(5) { width: 20px; height: 26px; left: 116px; bottom: 14px; }
.shenbi-poster-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.shenbi-poster-grid span {
  height: 48px;
  border-radius: 4px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
}
.shenbi-chat {
  position: absolute;
  right: -2px;
  top: -18px;
  width: 270px;
  height: 430px;
  padding: 14px;
  border-radius: 16px;
  color: #dcece7;
  background: #142723;
  box-shadow: 0 22px 44px rgba(15, 28, 32, .34);
}
.shenbi-chat-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}
.shenbi-chat-head span {
  margin-right: auto;
  font-weight: 800;
  color: #fff;
}
.shenbi-chat-head button {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 4px 7px;
  color: #e4d178;
  background: rgba(255,255,255,.04);
  font-size: 11px;
}
.shenbi-bubble {
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  font-size: 12px;
  line-height: 1.55;
}
.shenbi-bubble-user {
  color: #fff;
  background: linear-gradient(135deg, #ef553f, #f46c4d);
}
.shenbi-input {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  height: 76px;
  padding: 12px;
  border-radius: 10px;
  color: #9aa7aa;
  background: #f3f5f5;
  font-size: 12px;
}
.shenbi-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 18px 0;
}
.shenbi-info-card {
  padding: 18px;
  border: 1px solid #e7edf7;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}
.shenbi-info-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #e4573e;
  font-weight: 800;
  margin-bottom: 12px;
}
.shenbi-info-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}
.shenbi-info-card p { color: var(--muted); }

/* Section */
.section-title { font-size: 20px; font-weight: 700; margin-bottom: 16px; }

/* Inline copy */
.copy-inline {
  background: none; border: none; cursor: pointer; color: var(--primary); font-size: 13px; padding: 2px 6px;
}
.copy-inline:hover { text-decoration: underline; }

/* Empty state */
.empty { text-align: center; padding: 40px; color: var(--muted); }

/* Responsive */
@media (max-width: 600px) {
  .nav { padding: 0 16px; }
  .balance-hero { flex-direction: column; gap: 20px; text-align: center; }
  .hero h1 { font-size: 26px; }
  .shenbi-hero { min-height: auto; padding: 38px 22px 420px; }
  .shenbi-hero-copy { width: 100%; min-width: 0; padding-top: 0; }
  .shenbi-hero h2 { font-size: 40px; }
  .shenbi-hero-copy p { font-size: 15px; }
  .shenbi-cta { font-size: 17px; margin-top: 60px; padding: 12px 20px; }
  .shenbi-stage {
    right: -126px;
    top: auto;
    bottom: 72px;
    width: 680px;
    min-width: 680px;
    transform: scale(.56) perspective(1000px) rotateY(-7deg) rotateZ(-4deg);
    transform-origin: right bottom;
  }
  .shenbi-info-grid { grid-template-columns: 1fr; }
}

@media (min-width: 601px) and (max-width: 900px) {
  .shenbi-hero { padding: 42px 34px; }
  .shenbi-hero-copy { width: 32%; min-width: 245px; padding-top: 46px; }
  .shenbi-hero h2 { font-size: 40px; }
  .shenbi-hero-copy p { font-size: 14px; }
  .shenbi-cta { font-size: 16px; margin-top: 60px; padding: 10px 18px 10px 22px; }
  .shenbi-cta span { font-size: 21px; }
}

.site-footer {
  margin-top: 48px;
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}
.site-footer .footer-beian-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 10px;
}
.site-footer .footer-sep {
  color: var(--muted);
}

.site-footer .police-beian {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.site-footer .police-beian img {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 auto;
}

/* Fixed support entry with a click-to-open WeChat QR code. */
.contact-service {
  position: fixed;
  right: 0;
  bottom: 52px;
  z-index: 200;
}
.contact-service-button {
  writing-mode: vertical-rl;
  min-height: 112px;
  padding: 14px 10px;
  border: 0;
  border-radius: 8px 0 0 8px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(22,119,255,.28);
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 2px;
}
.contact-service-button:hover,
.contact-service-button:focus-visible { background: var(--primary-hover); }
.contact-service-button:focus-visible { outline: 3px solid rgba(22,119,255,.3); outline-offset: 3px; }
.contact-service-panel {
  position: absolute;
  right: 52px;
  bottom: 0;
  width: 190px;
  padding: 14px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
  text-align: center;
}
.contact-service-panel img { display: block; width: 100%; height: auto; }
.contact-service-panel p { margin-top: 8px; color: var(--muted); font-size: 14px; }

.invoice-contact-tip {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 6px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .contact-service { right: 0; bottom: 52px; }
  .contact-service-button { min-height: 94px; padding: 12px 8px; font-size: 13px; }
  .contact-service-panel { right: 44px; width: 160px; padding: 10px; }
  .invoice-contact-tip { margin-top: 14px; font-size: 13px; }
}
