:root {
  color-scheme: dark;
  --bg: #07162b;
  --blue-950: #07172c;
  --blue-900: #0b2444;
  --blue-800: #143a68;
  --blue-700: #1c5590;
  --blue-500: #2294e8;
  --cyan: #27d6e7;
  --cyan-2: #18aacd;
  --card: rgba(38, 76, 126, 0.64);
  --card-strong: rgba(55, 96, 153, 0.76);
  --field: rgba(35, 67, 112, 0.88);
  --ink: #eef8ff;
  --muted: #aac1d8;
  --soft: #dceeff;
  --line: rgba(180, 215, 255, 0.18);
  --gold: #ffd56a;
  --danger: #ff8e9a;
  --paid: #6bf1b5;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 80% -10%, rgba(50, 142, 235, 0.28), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(39, 214, 231, 0.10), transparent 40%),
    linear-gradient(180deg, #092656 0%, #061426 58%, #04101e 100%);
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.error { min-height: 18px; color: var(--danger); font-size: 13px; }

/* ===== 顶部栏 + 侧边栏 ===== */
.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 64px 1fr;
  min-height: 100vh;
}

.app-topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(7, 22, 43, 0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-500), var(--cyan));
  color: #06182f;
  font-weight: 800;
}
.brand-lockup small {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.balance-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.balance-pill span { color: var(--muted); font-size: 12px; }
.balance-pill strong { font-size: 16px; color: var(--paid); }

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.user-pill .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
}
.user-pill small { color: var(--muted); font-size: 12px; }

.ghost-button {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  transition: all 0.18s var(--ease);
}
.ghost-button:hover { background: var(--card); border-color: rgba(180, 215, 255, 0.35); }

/* 侧边栏 */
.app-sidebar {
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: rgba(11, 36, 68, 0.42);
}
.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  padding: 10px 14px 6px;
}
.nav-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--soft);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
  border: 1px solid transparent;
}
.nav-link:hover { background: rgba(180, 215, 255, 0.06); }
.nav-link.active {
  background: linear-gradient(90deg, rgba(34, 148, 232, 0.32), rgba(39, 214, 231, 0.12));
  border-color: rgba(39, 214, 231, 0.35);
  color: #fff;
  font-weight: 600;
}
.nav-link svg { width: 18px; height: 18px; opacity: 0.85; }

/* ===== 主内容区 ===== */
.app-main {
  padding: 32px 40px 48px;
  overflow-y: auto;
}
.page-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
}
.page-subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.notice-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin-bottom: 24px;
  background: rgba(34, 148, 232, 0.12);
  border: 1px solid rgba(34, 148, 232, 0.30);
  border-radius: 12px;
  font-size: 13px;
  color: var(--soft);
  overflow: hidden;
}
.notice-bar .badge {
  flex-shrink: 0;
  padding: 2px 10px;
  background: var(--blue-500);
  border-radius: 6px;
  font-weight: 600;
  color: #fff;
  z-index: 2;
}

.marquee-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 20px;
}

.marquee-content {
  position: absolute;
  white-space: nowrap;
  margin: 0;
  padding-left: 100%;
  line-height: 20px;
  animation: marquee-pc 42s linear infinite;
}

.notice-bar:hover .marquee-content {
  animation-play-state: paused;
}

@keyframes marquee-pc {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-180%);
  }
}

.user-info-bar {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  margin-bottom: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.user-info-bar .info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.user-info-bar .info-label {
  color: var(--muted);
  font-size: 13px;
}
.user-info-bar .info-value {
  color: var(--gold);
  font-weight: 600;
  font-size: 15px;
}

/* 充值页双栏布局 */
.deposit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}

.panel-card {
  background: linear-gradient(160deg, rgba(38, 76, 126, 0.72), rgba(20, 58, 104, 0.55));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(2, 8, 23, 0.35);
}

.claim-desktop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.claim-desktop-card {
  display: grid;
  gap: 18px;
}

.claim-desktop-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.claim-stat {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(7, 22, 43, 0.3);
  border: 1px solid var(--line);
}

.claim-stat span {
  color: var(--muted);
  font-size: 12px;
}

.claim-stat strong {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.claim-desktop-note {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(180, 215, 255, 0.06);
  border: 1px solid var(--line);
}

.claim-desktop-note strong {
  color: #fff;
  font-size: 15px;
}

.claim-desktop-note p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.claim-desktop-history {
  display: grid;
  gap: 14px;
}

.claim-desktop-empty {
  padding: 36px 18px;
  border-radius: 16px;
  background: rgba(180, 215, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.claim-desktop-item {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(7, 22, 43, 0.28);
  border: 1px solid var(--line);
}

.claim-desktop-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.claim-desktop-item-head strong {
  color: #fff;
  font-size: 15px;
}

.claim-desktop-item-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.claim-desktop-item-grid div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(180, 215, 255, 0.06);
}

.claim-desktop-item-grid span {
  color: var(--muted);
  font-size: 12px;
}

.claim-desktop-item-grid strong {
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.claim-desktop-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.panel-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.panel-head .panel-sub {
  color: var(--muted);
  font-size: 12px;
  display: block;
  margin-top: 2px;
}
.status-chip {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(180, 215, 255, 0.10);
  color: var(--muted);
}
.status-chip.pending { color: var(--gold); background: rgba(255, 213, 106, 0.12); }
.status-chip.paid { color: var(--paid); background: rgba(107, 241, 181, 0.12); }
.status-chip.expired { color: var(--danger); background: rgba(255, 142, 154, 0.12); }
.status-chip.error { color: var(--danger); background: rgba(255, 142, 154, 0.12); }

.field-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.amount-input-wrap {
  position: relative;
  margin-bottom: 18px;
}
.amount-input-wrap input {
  width: 100%;
  padding: 18px 20px 18px 94px;
  font-size: 28px;
  font-weight: 600;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s var(--ease);
}
.amount-input-wrap input:focus { border-color: var(--cyan); }
.amount-input-wrap .currency-tag {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--blue-500), var(--cyan));
  color: #06182f;
  border-radius: 8px;
  font-weight: 800;
  font-size: 13px;
}

.points-preview {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  margin: -2px 0 18px;
  background: rgba(34, 148, 232, 0.10);
  border: 1px solid rgba(39, 214, 231, 0.20);
  border-radius: 14px;
}
.points-preview-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.4px;
}
.points-preview-value {
  color: var(--gold);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
}
.points-preview-value.lvl-1 { font-size: 26px; }
.points-preview-value.lvl-2 { font-size: 23px; }
.points-preview-value.lvl-3 { font-size: 20px; }
.points-preview-value.lvl-4 { font-size: 18px; }
.points-preview-hint {
  font-size: 12px;
  color: var(--soft);
  line-height: 1.5;
}

/* 支付方式 */
.pay-type-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.pay-type-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s var(--ease);
}
.pay-type-option input { position: absolute; opacity: 0; pointer-events: none; }
.pay-type-option:hover { border-color: rgba(180, 215, 255, 0.4); }
.pay-type-option:has(input:checked) {
  background: linear-gradient(135deg, rgba(34, 148, 232, 0.28), rgba(39, 214, 231, 0.12));
  border-color: var(--cyan);
  color: #fff;
}

.fullpay-note {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  background: rgba(255, 213, 106, 0.08);
  border: 1px solid rgba(255, 213, 106, 0.25);
  border-radius: 10px;
  font-size: 12px;
  color: var(--soft);
}
.fullpay-note strong { color: var(--gold); }

/* 快捷金额 */
.quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.quick-chip {
  padding: 12px 0;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 600;
  color: var(--soft);
  transition: all 0.15s var(--ease);
}
.quick-chip:hover { border-color: rgba(180, 215, 255, 0.4); }
.quick-chip.active {
  background: linear-gradient(135deg, rgba(34, 148, 232, 0.32), rgba(39, 214, 231, 0.18));
  border-color: var(--cyan);
  color: #fff;
}

.primary-action {
  width: 100%;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #06182f;
  background: linear-gradient(135deg, var(--cyan), var(--blue-500));
  border: 0;
  border-radius: 14px;
  transition: filter 0.15s var(--ease), transform 0.15s var(--ease);
}
.primary-action:hover:not(:disabled) { filter: brightness(1.05); transform: translateY(-1px); }
.primary-action:disabled { opacity: 0.65; cursor: not-allowed; }

.form-tip {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* 右侧二维码卡 */
.qr-panel { min-height: 460px; display: flex; flex-direction: column; }
.qr-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--muted);
}
.qr-empty .icon {
  width: 72px; height: 72px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: var(--field);
  margin-bottom: 12px;
}
.qr-empty .icon svg { width: 36px; height: 36px; opacity: 0.5; }
.qr-empty strong { font-size: 16px; color: var(--soft); }
.qr-empty p { margin: 0; font-size: 13px; line-height: 1.6; }

.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.qr-box {
  background: #fff;
  padding: 14px;
  border-radius: 14px;
  margin-bottom: 18px;
}
.qr-box img { display: block; width: 220px; height: 220px; }

.qr-amount {
  width: 100%;
  text-align: center;
  margin-bottom: 16px;
}
.qr-amount .label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.qr-amount strong { display: block; font-size: 28px; font-weight: 700; color: var(--gold); margin-bottom: 8px; }
.qr-amount button {
  padding: 6px 14px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  font-size: 12px;
}
.qr-amount button.copied { color: var(--paid); border-color: var(--paid); }

.qr-detail {
  width: 100%;
  padding: 14px;
  background: rgba(7, 22, 43, 0.35);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
}
.qr-detail .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
}
.qr-detail .row + .row { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.qr-detail .label { color: var(--muted); font-size: 12px; }
.qr-detail .value {
  font-size: 12px;
  word-break: break-all;
  text-align: right;
  max-width: 220px;
  color: var(--soft);
}
.qr-detail button.copy-line {
  background: transparent;
  border: 0;
  color: var(--cyan);
  padding: 0;
  font-size: 12px;
}

.qr-tip {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 213, 106, 0.08);
  border: 1px solid rgba(255, 213, 106, 0.25);
  border-radius: 10px;
  font-size: 12px;
  color: var(--soft);
  line-height: 1.55;
}
.qr-tip b { color: var(--gold); }

/* 弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 23, 0.72);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 50;
}
.modal-card {
  width: 360px;
  padding: 32px;
  text-align: center;
  background: linear-gradient(160deg, rgba(38, 76, 126, 0.95), rgba(20, 58, 104, 0.85));
  border: 1px solid var(--line);
  border-radius: 20px;
}
.success-check {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  font-size: 32px;
  color: #06182f;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--paid), #4cd2c2);
  animation: popCheck 0.55s var(--ease);
}
@keyframes popCheck {
  0% { transform: scale(0); }
  60% { transform: scale(1.14); }
  100% { transform: scale(1); }
}
.modal-card h3 { margin: 0 0 8px; font-size: 20px; }
.modal-card p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.modal-card strong { color: var(--paid); }

/* ===== 登录 / 注册 ===== */
.auth-page-bg {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
@media (max-width: 1100px) {
  .auth-page-bg { grid-template-columns: 1fr; }
  .auth-hero-side { display: none; }
}

.auth-hero-side {
  position: relative;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 30% 20%, rgba(34, 148, 232, 0.35), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(39, 214, 231, 0.25), transparent 45%),
    linear-gradient(135deg, #0b2444 0%, #04101e 100%);
  overflow: hidden;
}
.auth-hero-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 7%, rgba(79, 165, 255, 0.10) 8%, transparent 9% 91%, rgba(79, 165, 255, 0.10) 92%, transparent 93%);
  pointer-events: none;
}
.auth-hero-side .hero-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}
.auth-hero-side .hero-top img { width: 80px; height: auto; filter: drop-shadow(0 12px 30px rgba(123, 197, 255, 0.30)); }
.auth-hero-side .hero-top strong { font-size: 22px; letter-spacing: 1px; }

.auth-hero-side .hero-main {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.auth-hero-side h1 {
  margin: 0;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.3;
  background: linear-gradient(135deg, #fff, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-hero-side .hero-desc {
  font-size: 15px;
  color: var(--soft);
  line-height: 1.8;
  max-width: 400px;
}
.auth-hero-side .hero-banner {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  max-width: 460px;
}
.auth-hero-side .hero-banner img { display: block; width: 100%; height: auto; }

.auth-hero-side .hero-foot {
  position: relative;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-chip {
  padding: 8px 14px;
  background: rgba(180, 215, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--soft);
}

.auth-form-side {
  display: grid;
  place-items: center;
  padding: 40px;
}
.auth-form-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
  background: linear-gradient(160deg, rgba(38, 76, 126, 0.72), rgba(20, 58, 104, 0.55));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(2, 8, 23, 0.45);
}
.auth-form-card h2 { margin: 0 0 6px; font-size: 24px; }
.auth-form-card .form-sub { margin: 0 0 26px; color: var(--muted); font-size: 14px; }

.field-stack { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.glass-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.15s var(--ease);
}
.glass-field:focus-within { border-color: var(--cyan); }
.glass-field .field-icon { color: var(--muted); display: grid; place-items: center; }
.glass-field input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--ink);
  font-size: 15px;
}
.glass-field input::placeholder { color: var(--muted); }

.auth-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  font-size: 13px;
  color: var(--muted);
}
.auth-meta label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.auth-meta a:hover { color: var(--cyan); }

.terms-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--muted);
}
.terms-row a { color: var(--cyan); }

.auth-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}
.auth-shortcuts a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
  color: var(--soft);
  transition: all 0.15s var(--ease);
}
.auth-shortcuts a:hover { border-color: var(--cyan); color: #fff; }
.auth-shortcuts svg { width: 18px; height: 18px; }

/* 顶部"切回手机版"链接 */
.view-switch {
  position: fixed;
  top: 18px;
  right: 24px;
  z-index: 30;
  padding: 6px 14px;
  background: rgba(7, 22, 43, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}
.view-switch:hover { color: var(--cyan); border-color: var(--cyan); }
