/* 浅色内容区 + 渐变顶栏 + 底栏毛玻璃（变量可随品牌改） */
:root {
  --page-bg: #f0f2f5;
  --text: #1e293b;
  --text-muted: #64748b;
  /* 白底/浅底控件用深色字，与暗夜主题下的 --text 分离 */
  --text-on-light: #1e293b;
  --text-muted-on-light: #64748b;
  --accent-pink: #ff6b8a;
  --accent-pink-dark: #e85a78;
  --tab-active: #15803d;
  --header-gradient: linear-gradient(125deg, #4f7cff 0%, #6366f1 45%, #8b5cf6 100%);
  --radius: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  /* 与缩小后的 .tabbar 内容区大致相当；安全区由 .app-shell 的 padding-bottom 另加，避免重复 */
  --tabbar-h: 48px;
  --font: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  /* H5 主题（代理可换预设）：默认即当前视觉 */
  --btn-primary-bg: linear-gradient(165deg, #6fe88d 0%, #49d56f 100%);
  --btn-primary-shadow: 0 8px 14px rgba(22, 163, 74, 0.22), 0 2px 4px rgba(22, 163, 74, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  --btn-primary-border: rgba(34, 197, 94, 0.42);
  --card-surface: linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 255, 0.96) 100%);
  --card-elevated: linear-gradient(
    158deg,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(252, 253, 255, 0.9) 35%,
    rgba(241, 245, 249, 0.94) 100%
  );
  --tab-glow-a: rgba(22, 163, 74, 0.75);
  --tab-glow-b: rgba(34, 197, 94, 0.55);
  --tab-glow-c: rgba(21, 128, 61, 0.35);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 6px);
  position: relative;
}

/* ========== 顶栏 ========== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

/* 搜索区域仅首页显示：默认显示；切到其它 Tab 时隐藏整个顶栏 */
.app-shell.tab-not-home .app-header {
  display: none;
}

.header-gradient {
  /* 上下留白：在搜索条 32px 高度不变的前提下，略增高整块渐变区（约 +16%） */
  padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 12px;
  background: var(--header-gradient);
  border-radius: 0;
  box-shadow: 0 6px 20px rgba(79, 124, 255, 0.22);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}

.avatar-btn:active {
  transform: scale(0.96);
}

.avatar-circle {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.15));
}

/* 未配置头像图、或图片加载失败（img 被移除）时显示默认人形，避免左上角看起来全空 */
.avatar-circle:empty::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.92);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.avatar-img.avatar-img--ready {
  opacity: 1;
}

.search-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  height: 32px;
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.97) 0%, rgba(245, 248, 255, 0.94) 100%);
  box-shadow:
    0 8px 16px rgba(31, 41, 55, 0.13),
    0 2px 5px rgba(31, 41, 55, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.search-wrap::before {
  content: "";
  position: absolute;
  left: 10%;
  top: 2px;
  width: 80%;
  height: 46%;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
  pointer-events: none;
}

.search-wrap:focus-within {
  border-color: rgba(122, 159, 255, 0.9);
  box-shadow:
    0 10px 18px rgba(79, 124, 255, 0.24),
    0 2px 6px rgba(79, 124, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
  transform: translateY(-1px);
}

.search-action-btn {
  flex-shrink: 0;
  height: 32px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.34) 100%);
  color: #000;
  font-size: 0.8125rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow:
    0 10px 16px rgba(31, 41, 55, 0.2),
    0 2px 6px rgba(31, 41, 55, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
  transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.22s ease;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.search-action-btn::before {
  content: "";
  position: absolute;
  left: 12%;
  top: 3px;
  width: 76%;
  height: 46%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.search-action-btn::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: -6px;
  height: 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.28);
  filter: blur(6px);
  pointer-events: none;
  z-index: -1;
}

.search-action-btn:active {
  transform: translateY(1px);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.56) 0%, rgba(255, 255, 255, 0.3) 100%);
  box-shadow:
    0 5px 10px rgba(31, 41, 55, 0.2),
    0 1px 3px rgba(31, 41, 55, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 500;
  color: #1f2937;
  position: relative;
  z-index: 1;
  outline: none;
}

.search-input::placeholder {
  color: #8ea0b7;
}

.header-hint {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.4;
}

.header-hint:empty {
  display: none;
  margin: 0;
}

.header-hint--error {
  color: #fecaca;
}

/* ========== 主内容 ========== */
.app-main {
  padding-top: 10px;
}

.panel {
  display: none;
  animation: fadeIn 0.25s ease;
}

.panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-section-title {
  margin: 0 14px 12px;
  font-size: 1.05rem;
  font-weight: 600;
}

#panel-share .page-section-title--share-main {
  text-align: center;
  margin: 0 14px 4px;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, #1e3a8a 0%, #4f46e5 42%, #0d9488 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

.share-page-head {
  margin-bottom: 16px;
  padding: 6px 0 2px;
}

.share-page-tagline {
  margin: 0 14px 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.06em;
}

.share-guest-banner {
  margin: 0 14px 14px;
  padding: 16px 14px 14px;
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(255, 251, 235, 0.98) 0%, rgba(254, 243, 199, 0.55) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.12);
}

.share-guest-banner[hidden] {
  display: none !important;
}

.share-guest-banner__title {
  margin: 0 0 10px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #92400e;
  text-align: center;
}

.share-guest-banner__text {
  margin: 0 0 14px;
  font-size: 0.84rem;
  line-height: 1.65;
  color: #78350f;
  text-align: center;
}

.share-guest-banner__text strong {
  font-weight: 700;
  color: #451a03;
}

.share-guest-banner__btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 11px 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(160deg, #5b7cff 0%, #6366f1 100%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(79, 124, 255, 0.35);
}

.share-guest-banner__btn:active {
  transform: scale(0.98);
  opacity: 0.95;
}

/* ========== 「我的」页：立体光（左上光源）+ 浮台阴影 + 凹槽 / 凸起块 ========== */
.mine-shell {
  padding: 10px 12px 28px;
  position: relative;
  perspective: 1400px;
}

#panel-mine.panel.active .mine-shell::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 0;
  height: 140px;
  border-radius: 22px;
  background: radial-gradient(ellipse 95% 85% at 50% -10%, rgba(99, 102, 241, 0.16), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

#panel-mine.panel.active .mine-shell > * {
  position: relative;
  z-index: 1;
}

.mine-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.mine-user-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.mine-user-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  flex-shrink: 0;
}

.mine-login-btn {
  flex-shrink: 0;
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.75) 0%, rgba(230, 238, 255, 0.55) 100%);
  color: #1e293b;
  font-size: 0.8125rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow:
    0 6px 16px rgba(79, 124, 255, 0.18),
    0 2px 6px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

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

.mine-logout-btn {
  background: linear-gradient(160deg, rgba(254, 242, 242, 0.95) 0%, rgba(252, 231, 231, 0.88) 100%);
  border-color: rgba(248, 113, 113, 0.45);
  color: #b91c1c;
  box-shadow:
    0 4px 12px rgba(239, 68, 68, 0.12),
    0 2px 6px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.mine-avatar-circle {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95) 0%, transparent 42%),
    linear-gradient(155deg, #eef2ff 0%, #dbeafe 45%, #cbd5e1 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 -6px 14px rgba(15, 23, 42, 0.08) inset,
    0 14px 28px rgba(79, 124, 255, 0.22),
    0 6px 14px rgba(15, 23, 42, 0.12);
}

.mine-avatar-circle:empty::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  background-color: #64748b;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mine-avatar-img {
  border-radius: 50%;
}

.mine-user-line {
  min-width: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  word-break: break-all;
}

.mine-user-tag {
  color: var(--text);
}

.mine-user-sep {
  color: var(--text-muted);
}

.mine-user-id {
  color: var(--text-muted);
  font-weight: 500;
}

/* 大卡：浮台 + 顶面受光 + 底缘厚度 + 落地影（::after） */
.mine-vip-card {
  position: relative;
  isolation: isolate;
  border-radius: 18px;
  background: var(--card-elevated);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.98) inset,
    0 -1px 0 rgba(148, 163, 184, 0.12) inset,
    inset 0 10px 28px rgba(255, 255, 255, 0.45),
    inset 0 -16px 36px rgba(148, 163, 184, 0.1),
    0 2px 4px rgba(15, 23, 42, 0.04),
    0 14px 28px -6px rgba(15, 23, 42, 0.1),
    0 36px 72px -20px rgba(15, 23, 42, 0.14),
    0 24px 48px -24px rgba(79, 124, 255, 0.18),
    0 52px 80px -32px rgba(15, 23, 42, 0.12);
  backdrop-filter: saturate(185%) blur(20px);
  -webkit-backdrop-filter: saturate(185%) blur(20px);
  overflow: hidden;
  transition: box-shadow 0.32s ease, transform 0.32s ease;
}

.mine-vip-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.08) 38%,
    transparent 52%
  );
  pointer-events: none;
  z-index: 0;
}

.mine-vip-card > * {
  position: relative;
  z-index: 1;
}

@media (hover: hover) {
  .mine-vip-card:hover {
    transform: translateY(-3px) rotateX(0.25deg);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 1) inset,
      0 -1px 0 rgba(148, 163, 184, 0.1) inset,
      inset 0 10px 28px rgba(255, 255, 255, 0.5),
      inset 0 -16px 36px rgba(148, 163, 184, 0.08),
      0 3px 6px rgba(15, 23, 42, 0.05),
      0 22px 40px -8px rgba(15, 23, 42, 0.12),
      0 48px 88px -28px rgba(15, 23, 42, 0.16),
      0 28px 56px -28px rgba(79, 124, 255, 0.22);
  }
}

.mine-vip-strip {
  padding: 12px 14px;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f1f5f9;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.35);
  background: linear-gradient(180deg, #64748b 0%, #4b5568 42%, #3d4a5c 100%);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -2px 6px rgba(15, 23, 42, 0.2);
}

.mine-vip-guest-notice {
  padding: 14px 14px 4px;
}

.mine-guest-notice-title {
  margin: 0 0 10px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.04em;
}

.mine-guest-notice-text {
  margin: 0 0 6px;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--text-muted);
  text-align: center;
}

.mine-vip-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 10px 0;
}

/* 仅「会员到期时间」一卡时：整行与下方「已邀请 + 金币」两格总宽对齐 */
.mine-vip-row2--expire-only {
  grid-template-columns: 1fr;
}

.mine-vip-row2[hidden] {
  display: none !important;
}

.mine-vip-guest-notice[hidden] {
  display: none !important;
}

.mine-vip-tap {
  margin: 0;
  padding: 10px 8px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 13px;
  background: linear-gradient(
    168deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(248, 250, 252, 0.98) 42%,
    rgba(226, 232, 240, 0.95) 100%
  );
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 -2px 6px rgba(148, 163, 184, 0.2) inset,
    0 5px 0 rgba(203, 213, 225, 0.45),
    0 8px 16px rgba(15, 23, 42, 0.08),
    0 2px 4px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.mine-vip-tap--static {
  cursor: default;
}

.mine-vip-tap:active:not(.mine-vip-tap--static) {
  transform: scale(0.98) translateY(1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 2px 8px rgba(15, 23, 42, 0.1) inset,
    0 2px 0 rgba(203, 213, 225, 0.35),
    0 3px 8px rgba(15, 23, 42, 0.06);
}

@media (hover: hover) {
  .mine-vip-tap:hover:not(.mine-vip-tap--static) {
    transform: translateY(-3px);
    border-color: rgba(147, 197, 253, 0.65);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 1) inset,
      0 -2px 6px rgba(148, 163, 184, 0.15) inset,
      0 7px 0 rgba(191, 219, 254, 0.55),
      0 16px 28px rgba(15, 23, 42, 0.1),
      0 6px 14px rgba(79, 124, 255, 0.14);
  }

  .mine-vip-tap:hover:active:not(.mine-vip-tap--static) {
    transform: scale(0.98) translateY(1px);
  }
}

.mine-vip-tap-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-on-light);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.mine-vip-tap-sub {
  display: block;
  margin-top: 4px;
  font-size: 0.6875rem;
  color: var(--text-muted-on-light);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.mine-vip-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
  padding: 14px 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.35) 0%, rgba(248, 250, 252, 0.55) 100%);
  box-shadow:
    inset 0 4px 12px rgba(148, 163, 184, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.mine-stat {
  text-align: center;
  padding: 10px 6px 9px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: linear-gradient(
    168deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(248, 250, 252, 0.98) 42%,
    rgba(226, 232, 240, 0.95) 100%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 -2px 6px rgba(148, 163, 184, 0.2) inset,
    0 5px 0 rgba(203, 213, 225, 0.45),
    0 8px 16px rgba(15, 23, 42, 0.08),
    0 2px 4px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.mine-stat:active {
  transform: scale(0.98) translateY(1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 2px 8px rgba(15, 23, 42, 0.1) inset,
    0 2px 0 rgba(203, 213, 225, 0.35),
    0 3px 8px rgba(15, 23, 42, 0.06);
}

@media (hover: hover) {
  .mine-stat:hover {
    transform: translateY(-3px);
    border-color: rgba(147, 197, 253, 0.65);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 1) inset,
      0 -2px 6px rgba(148, 163, 184, 0.15) inset,
      0 7px 0 rgba(191, 219, 254, 0.55),
      0 16px 28px rgba(15, 23, 42, 0.1),
      0 6px 14px rgba(79, 124, 255, 0.14);
  }

  .mine-stat:hover:active {
    transform: scale(0.98) translateY(1px);
  }
}

.mine-stat-label {
  font-size: 0.6875rem;
  color: var(--text-muted-on-light);
  margin-bottom: 2px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.mine-stat-val {
  font-size: 1.125rem;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.02em;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95),
    0 -1px 0 rgba(15, 23, 42, 0.06);
}

/* 我的服务：第二张浮台，略错开阴影层次 */
.mine-services-card {
  margin-top: 18px;
}

.mine-services-card .mine-services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 10px 12px;
}

.mine-service-cell {
  margin: 0;
  min-height: 52px;
  padding: 12px 10px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: linear-gradient(
    168deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(248, 250, 252, 0.98) 45%,
    rgba(226, 232, 240, 0.96) 100%
  );
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-on-light);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 -2px 6px rgba(148, 163, 184, 0.2) inset,
    0 5px 0 rgba(203, 213, 225, 0.42),
    0 8px 16px rgba(15, 23, 42, 0.07),
    0 2px 4px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.mine-service-cell:active {
  transform: scale(0.98) translateY(1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 2px 8px rgba(15, 23, 42, 0.08) inset,
    0 2px 0 rgba(203, 213, 225, 0.32),
    0 3px 8px rgba(15, 23, 42, 0.05);
}

@media (hover: hover) {
  .mine-service-cell:hover {
    transform: translateY(-3px);
    border-color: rgba(147, 197, 253, 0.65);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 1) inset,
      0 -2px 6px rgba(148, 163, 184, 0.14) inset,
      0 7px 0 rgba(191, 219, 254, 0.52),
      0 16px 28px rgba(15, 23, 42, 0.1),
      0 6px 14px rgba(79, 124, 255, 0.14);
  }

  .mine-service-cell:hover:active {
    transform: scale(0.98) translateY(1px);
  }
}

/* ========== 标签区域（全文搜「标签区域」）：首页分类条，6 列网格，>3 行折叠 ========== */
.category-bar {
  padding: 0 12px 12px;
}

.category-scroll-outer {
  min-width: 0;
}

.category-scroll.category-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.cat-tag {
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 12px;
  background: linear-gradient(165deg, #ffffff 0%, #edf2fb 100%);
  color: #425066;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  position: relative;
  isolation: isolate;
  box-shadow:
    0 8px 14px rgba(15, 23, 42, 0.08),
    0 2px 4px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.cat-tag.active {
  background: linear-gradient(135deg, var(--accent-pink), #ff8fa3);
  color: #000000;
  border-color: rgba(255, 146, 170, 0.65);
  /* 外圈淡粉晕 + 主体玫红投影 + 顶内高光（底部红色漫射主要靠 ::after） */
  box-shadow:
    0 0 0 1px rgba(255, 182, 198, 0.55),
    0 12px 24px rgba(236, 72, 127, 0.38),
    0 6px 14px rgba(219, 39, 119, 0.28),
    0 2px 6px rgba(190, 24, 93, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transform: translateY(-1px);
}

.cat-tag::before {
  content: "";
  position: absolute;
  left: 12%;
  top: 3px;
  width: 76%;
  height: 48%;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.65);
  pointer-events: none;
  z-index: -1;
}

.cat-tag::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -6px;
  height: 8px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.12);
  filter: blur(6px);
  pointer-events: none;
  z-index: -2;
}

/* 选中态：按钮正下方偏红/玫红的漫射影（与截图「红色阴影」一致，不用灰底） */
.cat-tag.active::after {
  left: 5%;
  right: 5%;
  bottom: -10px;
  height: 14px;
  border-radius: 14px;
  background: rgba(225, 29, 72, 0.5);
  filter: blur(10px);
}

.cat-tag:active {
  transform: translateY(1px);
  box-shadow:
    0 4px 8px rgba(15, 23, 42, 0.1),
    0 1px 3px rgba(15, 23, 42, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.cat-tag.active:active {
  box-shadow:
    0 0 0 1px rgba(255, 182, 198, 0.45),
    0 6px 14px rgba(236, 72, 127, 0.28),
    0 2px 6px rgba(219, 39, 119, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.cat-tag.active:active::after {
  bottom: -7px;
  height: 10px;
  opacity: 0.85;
}

.cat-tag--fold-hidden {
  display: none !important;
}

.cat-expand-btn {
  width: 100%;
  min-height: 34px;
  grid-row: span 2;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: linear-gradient(160deg, #ffffff 0%, #f6f9ff 100%);
  color: #64748b;
  cursor: pointer;
  box-shadow:
    0 14px 22px rgba(15, 23, 42, 0.09),
    0 3px 8px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.cat-expand-btn::before {
  content: "";
  position: absolute;
  left: 11%;
  top: 8px;
  width: 78%;
  height: 34%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  pointer-events: none;
}

.cat-expand-btn::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -7px;
  height: 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.13);
  filter: blur(7px);
  pointer-events: none;
}

.cat-expand-btn:active {
  transform: translateY(1px);
  box-shadow:
    0 7px 13px rgba(15, 23, 42, 0.1),
    0 1px 4px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.cat-expand-btn--open .cat-chevron {
  transform: rotate(180deg) scaleY(1.25);
}

.cat-chevron {
  width: 20px;
  height: 24px;
  stroke: #5f7ea6;
  stroke-width: 2.4;
  filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.18));
  transform: scaleY(1.25);
  transition: transform 0.25s ease, filter 0.25s ease;
  position: relative;
  z-index: 1;
}

/* ========== 两列视频网格 ========== */
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 4px;
  padding: 0 6px 10px;
}

.v-card {
  position: relative;
  display: block;
  padding: 3px 3px 5px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: var(--card-surface);
  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.08),
    0 2px 6px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.v-card::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 3px;
  height: 36%;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
  pointer-events: none;
}

.v-card::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.18);
  pointer-events: none;
}

.v-card:nth-child(4n + 1)::after {
  background: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

.v-card:nth-child(4n + 2)::after {
  background: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.2);
}

.v-card:nth-child(4n + 3)::after {
  background: #a78bfa;
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.22);
}

.v-card:nth-child(4n + 4)::after {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.v-card:active {
  transform: translateY(1px);
  border-color: rgba(148, 163, 184, 0.32);
  box-shadow:
    0 4px 10px rgba(15, 23, 42, 0.08),
    0 1px 4px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.v-card:active .v-card-thumb {
  transform: scale(0.985);
}

/* 16:9 用 padding 百分比实现，避免部分 WebView 不支持或错误处理 aspect-ratio 时按图片固有高度撑成竖条 */
.v-card-thumb {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  border-radius: 8px;
  overflow: hidden;
  background: #e2e8f0;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.11);
  transition: transform 0.15s ease;
}

.v-card-img,
.v-card-placeholder {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.v-card-img {
  object-fit: cover;
}

.v-card-placeholder {
  background: linear-gradient(145deg, #cbd5e1, #94a3b8);
}

.v-card-badge {
  position: absolute;
  z-index: 1;
  top: 6px;
  right: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.v-card-badge--owned {
  background: linear-gradient(135deg, #22c55e, #15803d);
}

.v-card-purchased-meta {
  margin: 4px 1px 0;
  font-size: 0.7rem;
  line-height: 1.35;
  color: #64748b;
}

.v-card-views,
.v-card-dur {
  position: absolute;
  z-index: 1;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 500;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
}

.v-card-views {
  left: 6px;
}

.v-card-dur {
  right: 6px;
}

.v-card-title {
  margin: 5px 1px 0;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  color: #1f2937;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== 底栏：毛玻璃 + 分层阴影（须半透明底，全白 #fff 会盖住 blur） ========== */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 480px;
  z-index: 100;
  overflow: visible;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 2px;
  padding: 5px 6px calc(5px + var(--safe-bottom));
  /* 半透明才能让背后列表透出来并被 blur，视觉上才像 App 底栏 */
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(200%) blur(26px);
  -webkit-backdrop-filter: saturate(200%) blur(26px);
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  /* 加重：部分 WebView 上 fixed+backdrop 时 box-shadow 很淡或几乎不画 */
  box-shadow:
    0 -28px 56px rgba(15, 23, 42, 0.2),
    0 -12px 28px rgba(15, 23, 42, 0.16),
    0 -4px 14px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/*
 * 单独一条「压在正文上」的向上渐变阴影（不依赖 box-shadow 是否生效）
 * bottom:100% 贴在底栏顶边之上，滚动时能看到和内容分离的层次
 */
.tabbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 18px;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.16) 0%,
    rgba(15, 23, 42, 0.06) 55%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* 顶沿细线：与毛玻璃并存，不抢整块透明度 */
.tabbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(15, 23, 42, 0.14) 20%,
    rgba(15, 23, 42, 0.14) 80%,
    transparent
  );
  pointer-events: none;
  z-index: 3;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .tabbar {
    background: rgba(252, 252, 253, 0.96);
  }
}

/* button 在部分 Android WebView 会忽略 background，用 !important + 拆成 background-color */
button.tabbar-item {
  position: relative;
  z-index: 4;
  flex: 1;
  max-width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: none;
  background-color: transparent;
  padding: 1px 4px;
  margin: 0;
  border-radius: 10px;
  color: var(--text-muted-on-light);
  cursor: pointer;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  font-family: inherit;
  transition:
    color 0.2s,
    transform 0.15s,
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.tabbar-item:active {
  transform: scale(0.96);
}

/* 选中：仅图标+文字变色，不要底、框、阴影 */
button.tabbar-item.active {
  color: var(--tab-active) !important;
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.tabbar-item .tabbar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

/* 图标：轮廓投影，四个 Tab 都有；选中时改绿色强光 */
.tabbar-item .tabbar-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  filter:
    drop-shadow(0 2px 4px rgba(15, 23, 42, 0.42))
    drop-shadow(0 4px 10px rgba(15, 23, 42, 0.28));
  transition: filter 0.2s ease, color 0.2s;
}

.tabbar-item.active .tabbar-icon svg {
  filter:
    drop-shadow(0 2px 6px var(--tab-glow-a))
    drop-shadow(0 0 14px var(--tab-glow-b))
    drop-shadow(0 4px 12px var(--tab-glow-c));
}

.tabbar-item.active .tabbar-icon {
  color: inherit;
}

/* 文字：四个 Tab 都有阴影；选中时绿色光晕 */
.tabbar-label {
  letter-spacing: 0.02em;
  text-shadow:
    0 1px 2px rgba(15, 23, 42, 0.35),
    0 2px 8px rgba(15, 23, 42, 0.22);
  transition: color 0.2s, text-shadow 0.2s;
}

.tabbar-item.active .tabbar-label {
  color: inherit;
  text-shadow:
    0 1px 3px var(--tab-glow-c),
    0 0 12px var(--tab-glow-b),
    0 3px 10px var(--tab-glow-a);
}

/* ========== 列表页简单卡片 ========== */
.simple-list {
  padding: 0 12px 16px;
}

.simple-card {
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  background: var(--card-surface);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.simple-card-title {
  margin: 0 0 6px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.simple-card-desc {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========== 弹窗 ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  /* 高于 .auth-modal-overlay(320)，注册/登录失败时的「提示」才能盖在登录框上 */
  z-index: 330;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 348px;
  padding: 22px 20px 18px;
  border-radius: 20px;
  background: linear-gradient(162deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 255, 0.95) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.94);
  box-shadow:
    0 22px 54px rgba(15, 23, 42, 0.2),
    0 6px 18px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: scale(0.94);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

.modal::before {
  content: "";
  position: absolute;
  left: 8%;
  top: 8px;
  width: 84%;
  height: 32%;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  pointer-events: none;
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  color: #0f172a;
  font-weight: 700;
  position: relative;
  z-index: 1;
  text-align: center;
}

.modal p {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.55;
  white-space: pre-wrap;
  position: relative;
  z-index: 1;
  max-height: 44vh;
  overflow-y: auto;
  text-align: center;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.btn {
  min-width: 76px;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn::before {
  content: "";
  position: absolute;
  left: 12%;
  top: 2px;
  width: 76%;
  height: 46%;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.btn-primary {
  color: #000;
  background: var(--btn-primary-bg);
  box-shadow: var(--btn-primary-shadow);
  border-color: var(--btn-primary-border);
}

.btn-ghost {
  color: #000;
  background: linear-gradient(165deg, #ff8f8f 0%, #ff6868 100%);
  box-shadow:
    0 8px 14px rgba(239, 68, 68, 0.22),
    0 2px 4px rgba(239, 68, 68, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  border-color: rgba(239, 68, 68, 0.38);
}

.btn:active {
  transform: translateY(1px);
  box-shadow:
    0 4px 8px rgba(15, 23, 42, 0.1),
    0 1px 3px rgba(15, 23, 42, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

/* ========== 登录 / 注册弹层（低于通用 #modal 提示与播放器） ========== */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.auth-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.auth-modal {
  position: relative;
  width: 100%;
  max-width: 360px;
  max-height: min(88vh, 560px);
  overflow: auto;
  padding: 20px 18px 18px;
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.97) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 24px 56px rgba(15, 23, 42, 0.18),
    0 8px 20px rgba(79, 124, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transform: scale(0.96) translateY(8px);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-modal-overlay.open .auth-modal {
  transform: scale(1) translateY(0);
}

.auth-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(241, 245, 249, 0.95);
  color: #64748b;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  -webkit-tap-highlight-color: transparent;
}

.auth-modal-close:active {
  transform: scale(0.94);
}

.auth-seg {
  display: flex;
  margin: 8px 28px 16px 0;
  padding: 4px;
  border-radius: 12px;
  background: rgba(226, 232, 240, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.auth-seg-btn {
  flex: 1;
  margin: 0;
  padding: 10px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.auth-seg-btn.active {
  color: #0f172a;
  background: linear-gradient(165deg, #fff 0%, #f1f5f9 100%);
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.auth-panels {
  position: relative;
  z-index: 1;
}

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: block;
}

.auth-field-label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
}

.auth-field-label:not(:first-child) {
  margin-top: 12px;
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  height: 44px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.95);
  font-size: 0.9375rem;
  color: #0f172a;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input::placeholder {
  color: #94a3b8;
}

.auth-input:focus {
  border-color: rgba(79, 124, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.15);
}

.auth-submit-btn {
  width: 100%;
  margin-top: 18px;
  height: 46px;
  border: none;
  border-radius: 12px;
  background: var(--btn-primary-bg);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--btn-primary-shadow);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.auth-submit-btn:active {
  transform: scale(0.99);
}

/* ========== 播放器弹层 ========== */
.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(2, 6, 23, 0.78);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.player-overlay.open {
  opacity: 1;
  visibility: visible;
}

.player-shell {
  width: 100%;
  max-width: 480px;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.55);
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  color: #e2e8f0;
}

.player-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.player-close {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.24);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

#player-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

/* ========== 播放页（独立页面） ========== */
.play-page {
  background: #f8fafc;
}

.play-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  background: #f8fafc;
}

.play-page--immersive {
  background: #000;
  overflow: hidden;
}

.play-page--immersive .play-shell {
  max-width: none;
  background: #000;
}

.player-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #0b1020;
}

.player-wrap--immersive {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #000;
}

.player-box {
  position: relative;
  width: 100%;
  height: clamp(200px, 56.25vw, 300px);
  background: #000;
  overflow: hidden;
}

.play-page--immersive .player-box {
  width: 100vw;
  height: 100dvh;
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

/* 播放页覆盖全局 #player-video 16:9 约束，避免伪全屏时只显示上半区域 */
.play-page #player-video {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.player-back {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.play-page .player-back {
  z-index: 40;
}

/* 未购买：全屏蒙层 + 居中提示（占位，后续接购买校验） */
.player-purchase-gate {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  background: rgba(0, 0, 0, 0.52);
  box-sizing: border-box;
}

.player-purchase-gate[hidden] {
  display: none !important;
}

.player-purchase-gate__inner {
  text-align: center;
  max-width: 280px;
}

.player-purchase-gate__text {
  margin: 0 0 20px;
  color: #f8fafc;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.player-purchase-gate__btn {
  display: inline-block;
  min-width: 140px;
  padding: 12px 36px;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #ff7eb3 0%, #f472b6 48%, #ec4899 100%);
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.45);
}

.player-purchase-gate__btn:active {
  opacity: 0.92;
  transform: scale(0.98);
}

.player-box--purchase-gate .player-controls,
.player-box--purchase-gate .player-center-play {
  visibility: hidden;
  pointer-events: none;
}

/* 播放页 · 通用提示（盖在购买弹窗之上） */
.play-hint-modal {
  z-index: 340;
}

/* 播放页 · 购买方式弹窗 */
.purchase-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.purchase-modal[hidden] {
  display: none !important;
}

/* 与首页「公告」.modal-overlay 一致：半透明罩 + 背后内容模糊 */
.purchase-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.purchase-modal__panel {
  position: relative;
  width: min(92vw, 380px);
  max-height: min(85vh, 520px);
  overflow: auto;
  padding: 20px 16px 16px;
  border-radius: 16px;
  background: linear-gradient(165deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}

.purchase-modal__title {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
  text-align: center;
}

.purchase-modal__hint {
  margin: 0 0 14px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #94a3b8;
  text-align: center;
}

.purchase-modal__hint[hidden] {
  display: none !important;
}

.purchase-modal__loading {
  margin: 12px 0;
  font-size: 0.88rem;
  color: #94a3b8;
  text-align: center;
}

.purchase-modal__loading[hidden] {
  display: none !important;
}

.purchase-modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.purchase-modal__cards-root {
  width: 100%;
}

/* 购买弹窗固定排版：单部购买|单片、包天|包周、包月整行 */
.purchase-modal__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}

.purchase-modal__slot {
  display: flex;
  min-height: 92px;
}

.purchase-modal__slot .purchase-modal__card {
  flex: 1;
  width: 100%;
  min-height: 92px;
  box-sizing: border-box;
}

.purchase-modal__slot--full {
  grid-column: 1 / -1;
}

.purchase-modal__slot-spacer {
  flex: 1;
  min-height: 92px;
  border-radius: 12px;
  border: 1px solid transparent;
  pointer-events: none;
}

.purchase-modal__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  padding: 12px 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.purchase-modal__card:active {
  background: rgba(255, 255, 255, 0.1);
}

.purchase-modal__card-label {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #e2e8f0;
}

.purchase-modal__card-price {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #f472b6;
  letter-spacing: 0.02em;
}

.purchase-modal__close {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 11px;
  border: none;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.2);
  cursor: pointer;
}

.purchase-modal__close:active {
  opacity: 0.9;
}

.player-error {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.82rem;
  background: rgba(220, 38, 38, 0.85);
  white-space: nowrap;
}

.player-center-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 74px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.2s ease;
}

.player-center-play.player-center-play--hidden {
  opacity: 0;
  pointer-events: none;
}

.player-center-play-triangle {
  display: block;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 18px solid rgba(255, 255, 255, 0.95);
  margin-left: 4px;
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px 10px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0) 0%, rgba(2, 6, 23, 0.78) 55%, rgba(2, 6, 23, 0.92) 100%);
  transition: opacity 0.2s;
}

.player-controls.player-controls--hidden {
  opacity: 0;
  pointer-events: none;
}

.player-progress-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: center;
}

.player-time {
  color: #fff;
  font-size: 0.75rem;
  white-space: nowrap;
}

.player-progress {
  width: 100%;
  height: 4px;
}

.player-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.player-icon-btn {
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.player-icon-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.player-time-combined {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 12px 0 10px;
  flex: 1;
}

.play-content {
  padding: 12px;
}

.play-page--immersive .play-content {
  display: none;
}

.play-title {
  margin: 0 0 12px;
  font-size: 1.15rem;
  line-height: 1.4;
  color: #0f172a;
}

.play-section {
  margin-top: 10px;
}

.play-section-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: #0f172a;
}

.play-reco-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 4px;
  padding: 0 6px 4px;
}

.play-reco-item {
  border: none;
  text-align: left;
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.play-reco-item-title {
  font-size: 0.84rem;
  color: #1e293b;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 首页顶栏：搜索与投诉并排时略收紧，避免窄屏换行 */
.header-row > .search-action-btn {
  padding: 0 9px;
  font-size: 0.78rem;
}

/* ========== 分享 Tab：邀请码 + 链接 + 二维码 ========== */
#panel-share.panel.active {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.55) 0%, var(--page-bg) 38%, var(--page-bg) 100%);
}

.share-invite-wrap {
  margin: 0 12px 18px;
}

.share-invite-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 20px 16px 22px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 250, 252, 0.97) 55%, rgba(239, 246, 255, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 20px 44px rgba(79, 124, 255, 0.12),
    0 8px 20px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.share-invite-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, #6366f1 0%, #22c55e 45%, #eab308 100%);
  opacity: 0.92;
}

.share-invite-tip-strip {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(254, 252, 232, 0.95) 0%, rgba(239, 246, 255, 0.9) 100%);
  border: 1px solid rgba(251, 191, 36, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.share-invite-hint {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.6;
  color: #475569;
}

.share-invite-block-label {
  margin: 0 0 8px 2px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: none;
  color: #94a3b8;
}

.share-invite-qr-box {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.share-invite-qr-frame {
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 1) 0%, rgba(241, 245, 249, 0.98) 100%);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow:
    0 12px 28px rgba(79, 124, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.share-invite-qr {
  display: block;
  width: 220px;
  height: 220px;
  max-width: 72vw;
  max-height: 72vw;
  border-radius: 12px;
  border: none;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.share-invite-url-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.share-invite-url-input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  box-sizing: border-box;
  font-size: 0.78rem;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.share-invite-url-input:focus {
  border-color: rgba(79, 124, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.12);
}

/* 与 .auth-submit-btn 同款主色立体按钮（分享页「复制链接」） */
.share-invite-copy-btn {
  flex-shrink: 0;
  min-width: 96px;
  height: 46px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: var(--btn-primary-bg);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--btn-primary-shadow);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.share-invite-copy-btn:active {
  transform: scale(0.98);
}

.share-section-subtitle {
  margin: 4px 0 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #334155;
}

.share-section-subtitle--center {
  text-align: center;
  margin-left: 14px;
  margin-right: 14px;
}

.share-section-subtitle--decor {
  position: relative;
  padding-bottom: 10px;
  margin-top: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #334155;
}

.share-section-subtitle--decor::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin: 8px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #22c55e);
  opacity: 0.85;
}

.share-invite-records .simple-card {
  margin-left: 2px;
  margin-right: 2px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-left: 3px solid #6366f1;
  background: linear-gradient(168deg, rgba(255, 255, 255, 1) 0%, rgba(248, 250, 252, 0.98) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 6px 16px rgba(15, 23, 42, 0.06);
}

.share-invite-records .simple-card-title {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.55;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
}

.share-empty-hint {
  margin: 0;
  padding: 10px 4px 4px;
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
}

/* ========== 投诉页（与首页渐变顶栏、卡片质感统一） ========== */
body.complaint-page {
  background: var(--page-bg);
}

.complaint-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.complaint-app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
}

.complaint-header-gradient {
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 12px;
  background: var(--header-gradient);
  border-radius: 0;
  box-shadow: 0 6px 20px rgba(79, 124, 255, 0.22);
}

.complaint-header-bar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 40px;
}

.complaint-header-spacer {
  grid-column: 3;
  width: 44px;
}

.complaint-back {
  grid-column: 1;
  justify-self: start;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.14) 100%);
  font-size: 1.45rem;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  font-family: inherit;
  box-shadow:
    0 6px 14px rgba(31, 41, 55, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.15s ease, background 0.2s ease;
}

.complaint-back:active {
  transform: scale(0.94);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.complaint-title {
  grid-column: 2;
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  letter-spacing: 0.02em;
}

.complaint-main {
  flex: 1;
  padding: 14px 14px 120px;
}

.complaint-card {
  position: relative;
  border-radius: var(--radius);
  background: var(--card-surface);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    0 14px 32px rgba(79, 124, 255, 0.12),
    0 4px 12px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  overflow: hidden;
}

.complaint-card::before {
  content: "";
  position: absolute;
  left: 8%;
  top: 6px;
  width: 84%;
  height: 28%;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.complaint-card-title {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 16px 16px 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.08), transparent 55%);
}

.complaint-reasons {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
}

.complaint-reason-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  background: transparent;
  font-size: 0.92rem;
  color: #1e293b;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.15s ease;
}

.complaint-reasons li:last-child .complaint-reason-row {
  border-bottom: none;
}

.complaint-reason-row:active:not(:disabled) {
  background: rgba(99, 102, 241, 0.06);
}

.complaint-reason-row:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.complaint-reason-row.is-selected:not(:disabled) {
  background: linear-gradient(90deg, rgba(244, 116, 145, 0.1), rgba(99, 102, 241, 0.04));
}

.complaint-reason-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid #cbd5e1;
  margin-left: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: transparent;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.complaint-reason-check::after {
  content: "";
}

.complaint-reason-row.is-selected .complaint-reason-check::after {
  content: "✓";
  color: #fff;
}

.complaint-reason-row.is-selected .complaint-reason-check {
  border-color: #f47491;
  background: linear-gradient(145deg, #f78ca0, #f47491);
  box-shadow: 0 4px 10px rgba(244, 116, 145, 0.35);
}

.complaint-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--page-bg) 55%, rgba(240, 242, 245, 0));
  pointer-events: none;
}

.complaint-footer-inner {
  pointer-events: auto;
}

.complaint-footer-hint {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 10px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #b45309;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.complaint-footer-hint[hidden] {
  display: none;
}

/* 与「我的」帮助中心 .mine-services-grid 一致：两列等宽 + .mine-service-cell 同款立体感 */
.complaint-footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}

.complaint-footer-btn {
  margin: 0;
  min-height: 52px;
  padding: 12px 10px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, border-color 0.22s ease, box-shadow 0.22s ease, filter 0.15s ease;
}

.complaint-footer-btn--return {
  color: var(--text-on-light);
  background: linear-gradient(
    168deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(248, 250, 252, 0.98) 45%,
    rgba(226, 232, 240, 0.96) 100%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 -2px 6px rgba(148, 163, 184, 0.2) inset,
    0 5px 0 rgba(203, 213, 225, 0.42),
    0 8px 16px rgba(15, 23, 42, 0.07),
    0 2px 4px rgba(15, 23, 42, 0.04);
}

.complaint-footer-btn--return:active {
  transform: scale(0.98) translateY(1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 2px 8px rgba(15, 23, 42, 0.08) inset,
    0 2px 0 rgba(203, 213, 225, 0.32),
    0 3px 8px rgba(15, 23, 42, 0.05);
}

.complaint-footer-btn--submit {
  color: #fff;
  border-color: rgba(255, 220, 230, 0.75);
  text-shadow: 0 1px 1px rgba(185, 28, 28, 0.18);
  background: linear-gradient(
    168deg,
    rgba(255, 200, 214, 1) 0%,
    rgba(252, 165, 185, 0.98) 38%,
    rgba(244, 116, 145, 0.96) 100%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 -2px 8px rgba(190, 24, 93, 0.12) inset,
    0 5px 0 rgba(232, 93, 124, 0.5),
    0 8px 16px rgba(190, 24, 93, 0.15),
    0 2px 4px rgba(15, 23, 42, 0.06);
}

.complaint-footer-btn--submit:active:not(:disabled) {
  transform: scale(0.98) translateY(1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 2px 8px rgba(157, 23, 77, 0.18) inset,
    0 2px 0 rgba(212, 68, 106, 0.38),
    0 3px 8px rgba(15, 23, 42, 0.06);
}

.complaint-footer-btn--submit:disabled {
  color: rgba(255, 255, 255, 0.88);
  border-color: rgba(226, 232, 240, 0.7);
  text-shadow: none;
  cursor: not-allowed;
  background: linear-gradient(
    168deg,
    rgba(180, 190, 202, 1) 0%,
    rgba(130, 144, 160, 0.98) 100%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 -2px 6px rgba(71, 85, 105, 0.15) inset,
    0 3px 0 rgba(100, 116, 139, 0.45),
    0 5px 12px rgba(15, 23, 42, 0.08);
  transform: none;
}

@media (hover: hover) {
  .complaint-footer-btn--return:hover {
    transform: translateY(-3px);
    border-color: rgba(147, 197, 253, 0.65);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 1) inset,
      0 -2px 6px rgba(148, 163, 184, 0.14) inset,
      0 7px 0 rgba(191, 219, 254, 0.52),
      0 16px 28px rgba(15, 23, 42, 0.1),
      0 6px 14px rgba(79, 124, 255, 0.14);
  }

  .complaint-footer-btn--return:hover:active {
    transform: scale(0.98) translateY(1px);
  }

  .complaint-footer-btn--submit:hover:not(:disabled) {
    transform: translateY(-3px);
    border-color: rgba(255, 192, 210, 0.95);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.65) inset,
      0 -2px 6px rgba(236, 72, 153, 0.12) inset,
      0 7px 0 rgba(244, 114, 182, 0.55),
      0 16px 28px rgba(190, 24, 93, 0.14),
      0 6px 14px rgba(244, 116, 145, 0.22);
  }

  .complaint-footer-btn--submit:hover:active:not(:disabled) {
    transform: scale(0.98) translateY(1px);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== 客服聊天页（展示用，无真实客服） ========== */
body.service-chat-page {
  margin: 0;
  background: #e8e8e8;
}

.service-chat-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  font-family: var(--font);
  color: var(--text);
}

.service-chat-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 12px 16px;
  -webkit-overflow-scrolling: touch;
}

.service-chat-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-chat-row {
  display: flex;
  width: 100%;
}

.service-chat-row--user {
  justify-content: flex-end;
}

.service-chat-row--staff {
  justify-content: flex-start;
}

.service-chat-staff-block {
  max-width: 82%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.service-chat-staff-label {
  font-size: 0.68rem;
  color: #888;
  margin: 0 0 4px 4px;
  font-weight: 600;
}

.service-chat-bubble {
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.94rem;
  line-height: 1.5;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.service-chat-bubble--user {
  background: #95ec69;
  color: #111;
  border-top-right-radius: 4px;
}

.service-chat-bubble--staff {
  background: #fff;
  color: #111;
  border-top-left-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.service-chat-footer {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #f5f5f5;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.service-chat-input {
  flex: 1;
  min-height: 42px;
  max-height: 120px;
  padding: 10px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: 0.94rem;
  line-height: 1.45;
  font-family: inherit;
  resize: none;
  background: #fff;
  color: #111;
}

.service-chat-input:focus {
  outline: none;
  border-color: rgba(79, 124, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(79, 124, 255, 0.12);
}

/* 与 .auth-submit-btn / 分享「复制链接」同系主按钮 */
.service-chat-send {
  flex-shrink: 0;
  min-height: 46px;
  padding: 0 20px;
  border: none;
  border-radius: 12px;
  background: var(--btn-primary-bg);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--btn-primary-shadow);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.service-chat-send:active {
  transform: scale(0.98);
}

/* 底栏「返回」：与投诉页 .complaint-footer-btn--return 同款，仅控制尺寸以与发送对齐 */
.service-chat-footer .service-chat-footer-back.complaint-footer-btn {
  min-height: 46px;
  padding: 10px 16px;
  align-self: flex-end;
}

/* ========== 我的-子页面占位（购买记录 / 金币记录 / 帮助中心） ========== */
.mine-subpage {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  background: var(--page-bg);
  font-family: var(--font);
  color: var(--text);
}

.mine-subpage-main {
  flex: 1;
  padding: 14px 14px 16px;
}

.mine-subpage-footer {
  flex-shrink: 0;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--page-bg) 55%, rgba(240, 242, 245, 0));
}

/* 全宽「返回」：复用投诉页 .complaint-footer-btn--return 的立体与 hover 效果 */
.mine-subpage-footer-btn.complaint-footer-btn {
  width: 100%;
}

.mine-subpage-card {
  border-radius: var(--radius);
  padding: 20px 16px;
  background: var(--card-surface);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    0 14px 32px rgba(79, 124, 255, 0.1),
    0 4px 12px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.mine-subpage-card h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.mine-subpage-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.mine-anti-loss-image-wrap {
  margin: 0 0 16px;
  text-align: center;
}

.mine-anti-loss-image {
  max-width: 100%;
  max-height: 280px;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.35);
  object-fit: contain;
}

.mine-anti-loss-body {
  margin: 0;
  min-height: 120px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #0f172a;
  white-space: pre-wrap;
  word-break: break-word;
}

.help-center-content .help-center-lead {
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 0.92rem;
  line-height: 1.65;
  color: #0f172a;
}

.help-center-content .help-center-lead strong {
  font-weight: 700;
}

.help-center-list {
  margin: 0;
  padding: 0 0 0 1.1em;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.help-center-list li {
  margin-bottom: 11px;
}

.help-center-list li:last-child {
  margin-bottom: 0;
}

.help-center-list .help-k {
  font-weight: 700;
  color: #334155;
}

/* 购买记录列表 */
.purchase-records-hint {
  margin: 0 0 12px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #b91c1c;
}

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

.purchase-record-row {
  padding: 14px 14px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 4px 14px rgba(15, 23, 42, 0.06);
}

.purchase-record-type {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.purchase-record-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 8px;
}

.purchase-record-time {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.purchase-record-price {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
}

.purchase-records-empty {
  margin: 0;
  padding: 28px 8px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.coin-record-change--muted {
  color: #94a3b8 !important;
  font-weight: 500 !important;
}
