:root {
  --bg: #f2f4f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --accent: #16a34a;
  --accent-dark: #15803d;
  --warn: #d97706;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
}

button {
  font: inherit;
  cursor: pointer;
}

/* ---------- 顶部导航 ---------- */
.topbar {
  background: #0f172a;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.25);
}

.topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  flex: none;
}

.logo:hover {
  text-decoration: none;
  opacity: 0.92;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
}

.logo-text {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.2px;
}

.logo-text span {
  color: #93c5fd;
}

.search-form {
  flex: 1 1 420px;
  max-width: 720px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 4px 5px 4px 14px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.search-form:focus-within {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

.search-icon {
  color: #94a3b8;
  flex: none;
}

.search-form:focus-within .search-icon {
  color: var(--primary);
}

.search-form input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  padding: 9px 10px;
  font-size: 15px;
}

.search-form:focus-within input {
  color: var(--text);
}

.search-form input::placeholder {
  color: #b6c2d4;
}

.search-btn {
  flex: none;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  padding: 9px 20px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.search-btn:hover {
  background: var(--primary-dark);
}

.search-btn:active {
  transform: scale(0.97);
}

.quick-cats {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: none;
  max-width: 520px;
}

.quick-cats::-webkit-scrollbar {
  display: none;
}

.quick-cat {
  flex: none;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.quick-cat:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
}

.quick-cat.active {
  background: var(--primary);
  border-color: var(--primary);
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.balance-link {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  color: #fff;
  padding: 4px 10px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.balance-link:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.balance-label {
  font-size: 11px;
  color: #94a3b8;
}

.balance-value {
  font-size: 15px;
  color: #4ade80;
}

.user-menu {
  position: relative;
}

.user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 999px;
  padding: 5px 12px 5px 5px;
  min-height: 40px;
  transition: background 0.15s ease;
}

.user-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.user-name {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  min-width: 150px;
  padding: 6px;
  z-index: 60;
}

.user-dropdown a,
.user-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  color: var(--text);
  background: none;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  transition: background 0.12s ease;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
  background: var(--surface-2);
  text-decoration: none;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  min-height: 44px;
  padding: 0 18px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    transform 0.1s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-dark);
  text-decoration: none;
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--primary);
}

.mobile-only {
  display: none;
}

/* ---------- 提示条 ---------- */
.banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
}

.banner-warn {
  background: #fef3c7;
  color: #92400e;
  border-bottom: 1px solid #fde68a;
}

.banner-hint {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  margin-bottom: 16px;
}

.lang-toggle {
  flex: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s ease;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  text-decoration: none;
}

/* ---------- 主布局 ---------- */
.layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.sidebar {
  width: 240px;
  flex: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sidebar-head h2 {
  margin: 0;
  font-size: 16px;
}

.sidebar-close {
  display: none;
}

.filter-group {
  margin-bottom: 18px;
}

.filter-group h3 {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 230px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.filter-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  padding: 7px 10px;
  transition: background 0.12s ease, color 0.12s ease;
}

.filter-btn:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.filter-btn.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.filter-btn .count {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 1px 8px;
}

.filter-btn.active .count {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.18);
}

.filter-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  color: var(--muted);
  background: none;
}

.filter-btn.disabled:hover {
  background: none;
  color: var(--muted);
}

.filter-btn.disabled .count {
  color: var(--muted);
  background: var(--surface-2);
}

.content {
  flex: 1;
  min-width: 0;
}

.content-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.content-head h1 {
  font-size: 20px;
  margin: 0;
}

.filter-toggle {
  display: none;
}

.sidebar-overlay {
  display: none;
}

/* ---------- 商品卡片网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #c7d6f8;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.platform-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--primary);
  flex: none;
}

.platform-name {
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-chip {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.chip-低 {
  background: #f1f5f9;
  color: #475569;
}

.chip-中 {
  background: #dbeafe;
  color: #1d4ed8;
}

.chip-高 {
  background: #ede9fe;
  color: #6d28d9;
}

.chip-none {
  background: #f1f5f9;
  color: #64748b;
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.card-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}

.card-prices {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 12px;
}

.price-main {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.price-main small,
.price-1k small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.price-1k {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.meta-item strong {
  color: var(--text);
  font-weight: 600;
}

.btn-buy {
  margin-top: auto;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn-buy:hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn-buy:active {
  transform: scale(0.97);
}

.btn-buy:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

.grid-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.load-more-wrap {
  text-align: center;
  padding: 24px 0 10px;
}

.load-more-wrap[hidden],
[hidden] {
  display: none !important;
}

/* ---------- 弹窗 ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: 24px;
  position: relative;
  animation: modal-in 0.18s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal h2 {
  margin: 0 0 14px;
  font-size: 19px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 0;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 18px;
  transition: background 0.12s ease, color 0.12s ease;
}

.modal-close:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.modal-service {
  background: var(--primary-soft);
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.field input,
.field textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  background: var(--surface);
  color: var(--text);
  min-height: 44px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
}

.order-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.order-total-row strong {
  font-size: 20px;
  color: var(--primary);
}

.order-actions {
  display: flex;
  gap: 10px;
}

.order-actions .btn {
  flex: 1;
}

.btn-buy-lg {
  background: var(--accent);
  color: #fff;
}

.btn-buy-lg:hover {
  background: var(--accent-dark);
  text-decoration: none;
}

.order-error {
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 14px;
  background: var(--danger-soft);
  border-radius: 8px;
  padding: 8px 10px;
}

/* ---------- 表单（认证） ---------- */
.auth-page {
  min-height: calc(100vh - 190px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 400px;
  padding: 28px;
}

.auth-card h1 {
  margin: 0 0 4px;
  font-size: 22px;
}

.auth-card .muted {
  margin: 0 0 18px;
  font-size: 14px;
}

.form-error {
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  margin: 0 0 14px;
}

.auth-switch {
  text-align: center;
  font-size: 14px;
  margin: 16px 0 0;
}

/* ---------- 页面（面板/充值/法律） ---------- */
.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.page.narrow {
  max-width: 820px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-head h1 {
  margin: 0;
  font-size: 24px;
}

.balance-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 10px 16px;
}

.balance-card strong {
  font-size: 20px;
  color: var(--accent);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 20px;
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 17px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
  flex-wrap: wrap;
}

.order-left {
  min-width: 0;
  flex: 1;
}

.order-title {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.platform-mini {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.order-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
  word-break: break-all;
}

.order-err {
  font-size: 13px;
  color: var(--danger);
  margin-top: 4px;
}

.order-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: none;
}

.order-date {
  font-size: 12px;
  color: var(--muted);
}

.chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 10px;
}

.chip-pending,
.chip-paid {
  background: #fef3c7;
  color: #92400e;
}

.chip-ordered,
.chip-processing {
  background: #dbeafe;
  color: #1d4ed8;
}

.chip-completed {
  background: #dcfce7;
  color: #15803d;
}

.chip-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.chip-refunded {
  background: #f1f5f9;
  color: #475569;
}

.empty-note {
  padding: 12px 4px;
}

.recharge-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.recharge-form .field {
  flex: 1;
  min-width: 200px;
  margin-bottom: 0;
}

.recharge-result {
  margin-top: 18px;
  background: var(--primary-soft);
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 14px;
}

/* ---------- 钱包直付 ---------- */
.wallet-pay-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 18px;
}

.wallet-qr {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  width: fit-content;
}

.wallet-qr img {
  display: block;
  border-radius: 6px;
}

.wallet-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 6px 0 0;
}

.copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.copy-row code {
  flex: 1;
  min-width: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  word-break: break-all;
  user-select: all;
}

.wallet-hints {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.red-hint-title {
  margin: 0 0 6px;
  font-weight: 700;
  color: #b91c1c;
}

.red-hints {
  margin: 0 0 8px;
  padding-left: 18px;
  color: #991b1b;
  font-size: 14px;
}

.red-hints li {
  margin: 3px 0;
}

.red-hint {
  margin: 4px 0 0;
  color: #b91c1c;
  font-size: 13.5px;
}

.verify-note {
  margin: 0 0 12px;
  font-weight: 600;
}

.status-window {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.status-window .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warn);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.status-window.credited {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}

.status-window.credited .status-dot {
  background: var(--accent);
  animation: none;
}

.status-window.incomplete {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}

.status-window.incomplete .status-dot {
  background: var(--warn);
  animation: none;
}

.overdue-hint {
  background: #fef3c7;
  color: #92400e;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px;
}

.txid-confirm {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.txid-confirm .field {
  flex: 1;
  min-width: 260px;
  margin-bottom: 0;
}

.admin-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: none;
}

.admin-form .txid-input {
  width: 180px;
}

@media (max-width: 640px) {
  .wallet-pay-grid {
    grid-template-columns: 1fr;
  }
}

.address-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.address-box code {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  word-break: break-all;
  user-select: all;
}

.txid-form {
  display: flex;
  gap: 6px;
}

.txid-input {
  width: 220px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  min-height: 36px;
}

.txid-input:focus {
  border-color: var(--primary);
}

/* ---------- 法律 / FAQ ---------- */
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.breadcrumb a {
  color: var(--muted);
}

.legal-title {
  margin: 0 0 22px;
  font-size: 26px;
}

.legal-section {
  margin-bottom: 26px;
}

.legal-section h2 {
  font-size: 17px;
  margin: 0 0 8px;
}

.legal-section p {
  margin: 8px 0;
  color: #334155;
  font-size: 15px;
}

.legal-date {
  font-size: 13px;
  margin-top: 30px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  min-height: 24px;
}

.faq-item p {
  color: #334155;
  font-size: 14.5px;
  margin: 10px 0 0;
}

/* ---------- 浮动客服 ---------- */
.support-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
}

.support-bubble {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  transition: transform 0.15s ease, background 0.15s ease;
  position: relative;
}

.support-bubble:hover {
  background: var(--primary-dark);
  transform: scale(1.06);
}

.support-bubble::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(37, 99, 235, 0.5);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

.support-panel {
  position: absolute;
  right: 0;
  bottom: 66px;
  width: 340px;
  max-width: calc(100vw - 40px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modal-in 0.18s ease;
}

.support-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f172a;
  color: #fff;
  padding: 12px 16px;
}

.support-head .icon-btn {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  width: 34px;
  height: 34px;
}

.support-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.support-tab {
  flex: 1;
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  min-height: 42px;
  border-bottom: 2px solid transparent;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.support-tab:hover {
  color: var(--primary);
}

.support-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.support-body {
  padding: 14px;
  max-height: 380px;
  overflow-y: auto;
}

.support-pane {
  display: none;
}

.support-pane.active {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.support-link:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  text-decoration: none;
}

.support-link.tg {
  color: #0284c7;
}

.mini-faq details {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.mini-faq summary {
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.mini-faq p {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 0;
}

.support-form {
  display: flex;
  flex-direction: column;
}

.support-form .field {
  margin-bottom: 10px;
}

.form-feedback {
  font-size: 14px;
  color: var(--accent);
  background: #dcfce7;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 0;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: #fff;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
  max-width: calc(100vw - 40px);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  background: var(--danger);
}

.toast.success {
  background: var(--accent);
}

/* ---------- 页脚 ---------- */
.footer {
  background: #0f172a;
  color: #cbd5e1;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand strong {
  font-size: 17px;
  color: #fff;
}

.footer-brand p {
  margin: 4px 0 0;
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-links a {
  color: #e2e8f0;
  font-size: 14px;
  padding: 4px 0;
}

.footer-links a:hover {
  color: #93c5fd;
}

.footer-note {
  font-size: 12.5px;
  color: #64748b;
  margin: 0;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .quick-cats {
    display: none;
  }
}

@media (max-width: 900px) {
  .topbar-inner {
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
  }

  .search-form {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }

  .mobile-only {
    display: inline-flex;
  }

  .filter-toggle {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    z-index: 110;
    border-radius: 0;
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-height: none;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: inline-flex;
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 105;
  }

  .layout {
    padding: 14px 12px;
  }

  .content-head h1 {
    font-size: 18px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
  }

  .user-name {
    display: none;
  }
}

@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .balance-link {
    display: none;
  }

  .page {
    padding: 16px 12px 50px;
  }

  .order-right {
    align-items: flex-start;
  }

  .txid-form {
    flex-direction: column;
    align-items: stretch;
  }

  .txid-input {
    width: 100%;
  }

  .address-box {
    flex-direction: column;
    align-items: stretch;
  }

  .support-panel {
    width: calc(100vw - 32px);
    right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
