/* ===========================
   VIP 等级页面
=========================== */

#pageVip {
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  z-index: var(--z-detail-page);
  background: #0B1426;
  padding-bottom:0 !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: none;
  box-sizing: border-box;
}
#pageVip.active {
  display: block !important;
  animation: none !important;
}

/* --- 顶部导航栏 --- */
.vip-header {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: rgba(11,20,38,0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: var(--z-sticky);
  box-sizing: border-box;
}
/* 头部占位 — 仅覆盖 fixed header 自身高度 */
.vip-header-spacer {
  height: 54px;
}
.vip-header-back {
  display: flex; align-items: center; gap: 4px;
  background: none; border: none; color: var(--text-main);
  font-size: var(--fs-md); font-weight: 600; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.vip-header-back i { font-size: var(--icon-lg); }
.vip-header-title {
  font-size: var(--fs-lg); font-weight: 800; color: var(--text-main);
  letter-spacing: 0.3px;
}
.vip-header-right { width: 60px; }

/* --- 当前 VIP 卡片 --- */
.vip-card-section {
  padding: 20px 16px 12px;
  margin-top: 62px; /* 跳过 fixed tab 栏（52px + ~60px 高度） */
}
.vip-current-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,209,102,0.12) 0%, rgba(0,230,138,0.08) 100%);
  border: 1px solid rgba(255,209,102,0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.06);
}
.vip-current-card::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(255,209,102,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.vip-card-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.vip-card-level {
  display: flex; align-items: center; gap: 10px;
}
.vip-card-icon {
  width: clamp(40px, 13vw, 48px); height: clamp(40px, 13vw, 48px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--icon-xl);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #0B1426;
  box-shadow: 0 4px 12px rgba(255,209,102,0.3);
}
.vip-card-level-text {
  font-size: var(--fs-2xl); font-weight: 900; color: var(--gold);
  font-family: var(--font-display);
  letter-spacing: -0.5px;
}
.vip-card-level-sub {
  font-size: var(--fs-sm); color: var(--text-muted); font-weight: 500;
  margin-top: 2px;
}
.vip-card-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: var(--fs-xs); font-weight: 700;
  background: rgba(255,209,102,0.15);
  color: var(--gold);
  border: 1px solid rgba(255,209,102,0.25);
}

/* VIP 卡片内进度条 */
.vip-card-progress {
  margin-top: 4px;
}
.vip-progress-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.vip-progress-label {
  font-size: var(--fs-xs); color: var(--text-muted); font-weight: 600;
  min-width: 48px;
}
.vip-progress-track {
  flex: 1; height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.vip-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(.4,0,.2,1);
}
.vip-progress-fill.recharge {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
}
.vip-progress-fill.bet {
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
}
.vip-progress-value {
  font-size: var(--fs-xs); color: var(--text-sub); font-weight: 600;
  min-width: 60px; text-align: right;
  font-family: var(--font-display);
}

/* --- Tab 切换 --- */
.vip-tabs-section {
  padding: 8px 16px;
  position: fixed; top: 52px; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  z-index: calc(var(--z-sticky) - 1);
  background: var(--bg-page);
  box-sizing: border-box;
}
/* Tabs 占位 */
.vip-tabs-spacer {
  height: 0;
}
.vip-tabs {
  display: flex; gap: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: 12px;
}
.vip-tab {
  flex: 1;
  padding: 9px 0;
  text-align: center;
  font-size: var(--fs-sm); font-weight: 700;
  color: var(--text-muted);
  background: none; border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.vip-tab.active {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #0B1426;
  box-shadow: 0 2px 8px rgba(255,209,102,0.25);
}

/* --- VIP 等级表格 --- */
.vip-table-section {
  padding: 0 16px 24px;
}
.vip-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bubble-bg-solid);
  border: 1px solid rgba(255,255,255,0.06);
}
.vip-table thead th {
  padding: 12px 10px;
  font-size: var(--fs-xs); font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.vip-table thead th:first-child {
  text-align: left; padding-left: 16px;
}
.vip-table tbody td {
  padding: 14px 10px;
  font-size: var(--fs-sm); font-weight: 500;
  color: var(--text-sub);
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.2s;
}
.vip-table tbody td:first-child {
  text-align: left; padding-left: 16px;
}
.vip-table tbody tr:last-child td {
  border-bottom: none;
}
.vip-table tbody tr.current-level {
  background: rgba(255,209,102,0.06);
}
.vip-table tbody tr.current-level td {
  color: var(--text-main);
  font-weight: 700;
}
.vip-table tbody tr.current-level td:first-child {
  color: var(--gold);
}

/* VIP 等级徽章 */
.vip-level-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 800;
  font-family: var(--font-display);
}
.vip-level-badge .level-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}
.vip-table tbody tr.current-level .vip-level-badge .level-dot {
  background: var(--gold);
  box-shadow: 0 0 6px rgba(255,209,102,0.5);
}

/* 数字等宽 */
.vip-table .num {
  font-family: var(--font-display);
  font-weight: 700;
}

/* 提现权益高亮 */
.vip-table .highlight-green {
  color: var(--primary) !important;
}
.vip-table .highlight-gold {
  color: var(--gold) !important;
}

/* --- 响应式 --- */
@media (max-width: 380px) {
  .vip-current-card { padding: 18px 14px; }
  .vip-card-icon { width: 40px; height: 40px; font-size: var(--icon-lg); }
  .vip-table thead th { padding: 10px 6px; }
  .vip-table tbody td { padding: 12px 6px; }
}
