/* ========================
   全局重置
======================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --theme-bg: #020617;
  --theme-text: #ffffff;
  --theme-header: #020617;
  --theme-border: #1e293b;
  --theme-surface: #0f172a;
  --theme-card: rgba(15,23,42,0.85);
  --theme-subtext: #94a3b8;
  --primary: #38bdf8;
}

.theme-light {
  --theme-bg: #f8fafc;
  --theme-text: #0f172a;
  --theme-header: #ffffff;
  --theme-border: #e2e8f0;
  --theme-surface: #ffffff;
  --theme-card: #ffffff;
  --theme-subtext: #64748b;
  --primary: #0ea5e9;

  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --text-main: #0f172a;
  --text-sub: #64748b;
}

/* 浅色主题：统一白底黑字，全站一致 */
.theme-light body {
  color: var(--theme-text);
}

/* ========================
   全局基础样式
======================== */
body {
  font-family: -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto,
               "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--theme-bg);
  color: var(--theme-text);
}

/* ========================
   App 容器
======================== */
.app {
  min-height: auto;
  padding-bottom: 96px;
}

/* ========================
   顶部 Header
======================== */
.header {
  height: 56px;
  background: var(--theme-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--theme-border);
}

.header .title {
  font-size: 16px;
  font-weight: 600;
}

.header .user {
  font-size: 13px;
  color: var(--primary, #38bdf8);
}

/* ========================
   页面内容区
======================== */
.content {
  padding: 16px;
}

/* ========================
   底部导航
======================== */
.bottom-nav {
  position: fixed;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 430px;
  height: 64px;
  background: rgba(15, 23, 42, 0.74);
  display: flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.35);
  z-index: 10001;
  padding: 0 6px;
  overflow: hidden;
}

.theme-light .bottom-nav {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.bottom-nav a {
  flex: 1;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 16px;
  text-decoration: none;
  font-size: 12px;
  color: var(--theme-subtext);
  position: relative;
  overflow: hidden;
  transition: color 0.2s ease, transform 0.2s ease;
}

.bottom-nav a::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72%;
  height: 88%;
  transform: translate(-50%, -50%) scale(0.84);
  border-radius: 999px;
  background: radial-gradient(
    ellipse at center,
    rgba(56, 189, 248, 0.30) 0%,
    rgba(56, 189, 248, 0.16) 52%,
    rgba(56, 189, 248, 0.05) 78%,
    rgba(56, 189, 248, 0) 100%
  );
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.bottom-nav a::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.26);
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}

.bottom-nav a:active::after {
  animation: nav-ripple 0.45s ease-out;
}

.bottom-nav a:active {
  color: var(--primary, #38bdf8);
  transform: scale(0.98);
}

.bottom-nav svg,
.bottom-nav img {
  width: 22px;
  height: 22px;
  display: block;
  position: relative;
  z-index: 1;
}

.bottom-nav svg path {
  fill: currentColor;
}

/* PNG 图标：保留原图颜色，未激活仅轻微降透明 */
.bottom-nav img {
  object-fit: contain;
  filter: none;
  opacity: 0.86;
}

.bottom-nav a span {
  position: relative;
  z-index: 1;
}

.bottom-nav a.active {
  color: var(--primary, #38bdf8);
}

.bottom-nav a.active img {
  filter: none;
  opacity: 1;
}

.bottom-nav a.active::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@keyframes nav-ripple {
  0% {
    opacity: 0.55;
    transform: scale(0);
    left: calc(50% - 5px);
    top: calc(50% - 5px);
  }
  100% {
    opacity: 0;
    transform: scale(12);
    left: calc(50% - 5px);
    top: calc(50% - 5px);
  }
}

/* ================= VIP 商店 ================= */
.vip-shop {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ================= 玻璃卡片（随主题） ================= */
.vip-glass-card {
  background: var(--theme-card);
  border-radius: 20px;
  padding: 16px;
  position: relative;
  backdrop-filter: blur(14px);
  border: 1px solid var(--theme-border);
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}

.theme-light .vip-glass-card {
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

.vip-current {
  transform: scale(1.04);
  border: 1px solid var(--theme-border);
}

.theme-light .vip-current {
  border-color: var(--primary);
}

/* ================= 卡片内容 ================= */
.vip-card-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vip-info {
  font-size: 14px;
}

.vip-title {
  font-size: 13px;
  opacity: .8;
  margin-bottom: 6px;
}

.vip-line {
  margin: 4px 0;
}

.vip-status {
  font-size: 13px;
  opacity: .7;
}

/* ================= 立体徽章 ================= */
.vip-badge-wrapper {
  width: 72px;
  height: 72px;
  position: relative;
}

.vip-badge-wrapper img {
  width: 100%;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.6));
}

/* ========================
   ⚠️ 已移除所有 hue-rotate 滤镜
   防止 VIP3、VIP4 变色
======================== */

/* ================= 进度条 ================= */
.vip-progress {
  margin-top: 14px;
}

.vip-progress-bar {
  height: 6px;
  background: var(--theme-border);
  border-radius: 6px;
  overflow: hidden;
}

.vip-progress-fill {
  height: 100%;
  background: linear-gradient(90deg,#38bdf8,#60a5fa);
}

.vip-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: .6;
  margin-top: 4px;
}

/* ================= 卡片间距 ================= */
.vip-glass-card + .vip-glass-card {
  margin-top: 6px;
}

/* ========================
   主题：个人中心 / 通用覆盖
   夜间=深色底+浅字，日间=白底+深字
======================== */
.profile-page {
  background: var(--theme-bg) !important;
  color: var(--theme-text) !important;
}

.theme-light .profile-page .profile-list,
.theme-light .profile-page .theme-keep:not(.balance-card) {
  background: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}

.theme-light .profile-page .profile-section-title,
.theme-light .profile-page .profile-list a,
.theme-light .profile-page .theme-keep:not(.balance-card) .username,
.theme-light .profile-page .theme-keep:not(.balance-card) .profile-text,
.theme-light .profile-page [style*="color: #e2e8f0"],
.theme-light .profile-page [style*="color: #64748b"] {
  color: var(--theme-text) !important;
}

.page-not-found {
  color: var(--theme-text);
  padding: 16px;
}
