/*
 * 小泡狐云端加速 · VIP会员中心
 * Futuristic Glassmorphism Dark UI Stylesheet
 */
:root {
  --bg-main: #070a12;
  --bg-card: rgba(18, 24, 38, 0.72);
  --bg-card-hover: rgba(26, 34, 52, 0.85);
  --bg-input: rgba(12, 17, 29, 0.85);
  
  --primary: #f43f5e;
  --primary-glow: rgba(244, 63, 94, 0.45);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.4);
  --accent-purple: #a855f7;
  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(244, 63, 94, 0.6);
  --border-card: 1px solid rgba(255, 255, 255, 0.08);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Lighting */
.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.glow-orb-1 {
  position: absolute;
  top: -10%;
  left: 15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.16) 0%, transparent 70%);
  filter: blur(80px);
}
.glow-orb-2 {
  position: absolute;
  top: 40%;
  right: -5%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.14) 0%, transparent 70%);
  filter: blur(100px);
}
.glow-orb-3 {
  position: absolute;
  bottom: -10%;
  left: 20%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
  filter: blur(90px);
}

.container {
  width: min(1160px, 92%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 10, 18, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 20px var(--primary-glow);
  border: 1px solid rgba(244, 63, 94, 0.4);
}
.brand-text h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}
.brand-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #f43f5e, #a855f7);
  color: #fff;
}
.brand-text p {
  font-size: 12px;
  color: var(--text-muted);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 14px;
}
.user-email-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-main);
}
.user-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #fff;
  box-shadow: 0 4px 18px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(244, 63, 94, 0.6);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.btn-cyan {
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  color: #fff;
  box-shadow: 0 4px 18px var(--accent-cyan-glow);
}
.btn-cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.6);
}
.btn-danger-outline {
  background: transparent;
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}
.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.6);
}
.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}
.btn-block {
  width: 100%;
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  border: var(--border-card);
  padding: 28px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

/* Hero Section (When not logged in) */
.hero-section {
  padding: 60px 0 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  color: #fb7185;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-content h2 {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: 18px;
}
.gradient-text {
  background: linear-gradient(135deg, #f43f5e 20%, #a855f7 60%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  font-size: 16.5px;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 30px;
  line-height: 1.65;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}
.hero-badge-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Hero Art Frame */
.hero-art-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(244, 63, 94, 0.25);
}
.hero-art-frame img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}
.hero-art-frame:hover img {
  transform: scale(1.03);
}

/* Auth Card (Embedded or Modal) */
.auth-box {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  max-width: 440px;
  width: 100%;
}
.auth-header {
  text-align: center;
  margin-bottom: 24px;
}
.auth-header h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}
.auth-header p {
  font-size: 13.5px;
  color: var(--text-muted);
}
.email-whitelist-hint {
  display: inline-block;
  font-size: 12px;
  background: rgba(6, 182, 212, 0.1);
  color: #38bdf8;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 8px;
}
.input-with-btn {
  display: flex;
  gap: 10px;
}
.input-field {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 14.5px;
  outline: none;
  transition: all 0.2s;
}
.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 14px var(--primary-glow);
}
.input-field::placeholder {
  color: var(--text-dim);
}

/* Dashboard View (When Logged in) */
.dashboard-view {
  padding: 36px 0 60px;
}

/* Overview Bar Card */
.sub-status-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.sub-status-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f43f5e, #a855f7, #06b6d4);
}
.sub-meta-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sub-title {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}
.badge-expired {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

/* Gauge & Progress */
.traffic-stats-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}
.traffic-bar-track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}
.traffic-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f43f5e, #a855f7);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px var(--primary-glow);
}
.traffic-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
  text-align: center;
}
.stat-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: var(--radius-md);
}
.stat-pill .num {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}
.stat-pill .lbl {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* QR Code & Link Controls */
.qr-link-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}
.qr-frame {
  background: #fff;
  padding: 12px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  margin-bottom: 14px;
}
.qr-frame canvas, .qr-frame img {
  display: block;
  width: 160px;
  height: 160px;
}
.qr-switch-btns {
  display: flex;
  gap: 8px;
}
.qr-switch-btn {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
}
.qr-switch-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Import Actions Grid */
.import-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 24px;
}
.import-tile {
  background: var(--bg-card);
  border: var(--border-card);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  color: inherit;
}
.import-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.import-tile .icon {
  font-size: 24px;
}
.import-tile h4 {
  font-size: 15px;
  font-weight: 700;
}
.import-tile p {
  font-size: 12px;
  color: var(--text-muted);
}

/* Section Title */
.section-header {
  margin: 44px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-header h3 {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tiers Grid */
.tiers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.tier-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.tier-card:hover {
  transform: translateY(-5px);
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}
.tier-card.featured {
  border-color: rgba(244, 63, 94, 0.5);
  background: linear-gradient(145deg, rgba(244, 63, 94, 0.12) 0%, var(--bg-card) 60%);
}
.tier-card.featured::before {
  content: "HOT 推荐";
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-full);
}
.tier-head h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.tier-price {
  margin: 16px 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.tier-price .currency {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}
.tier-price .amount {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
}
.tier-price .unit {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 4px;
}
.tier-specs {
  list-style: none;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  color: #cbd5e1;
}
.tier-specs li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tier-specs li span.check {
  color: #34d399;
  font-weight: 800;
}

/* Redeem Card */
.redeem-box {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(6, 182, 212, 0.08) 100%), var(--bg-card);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}
.redeem-content h4 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}
.redeem-content p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.6;
}
.redeem-input-row {
  display: flex;
  gap: 10px;
}
.redeem-input-row input {
  font-family: monospace;
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* History Table */
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 13.5px;
}
.history-table th {
  text-align: left;
  padding: 10px 14px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.history-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  transform: scale(0.94);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.modal-overlay.active .modal-content {
  transform: scale(1);
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
}
.modal-close:hover {
  color: #fff;
}

/* Toast */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid var(--border);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastIn 0.3s ease;
}
.toast.success {
  border-color: rgba(16, 185, 129, 0.4);
}
.toast.error {
  border-color: rgba(239, 68, 68, 0.4);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Client Download Grid */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.client-card {
  background: var(--bg-card);
  border: var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.client-card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}
.client-card .platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
  align-self: flex-start;
}
.client-card h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.client-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 18px;
  flex-grow: 1;
}
.client-card .meta-info {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: 60px;
  font-size: 13px;
  color: var(--text-dim);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .sub-status-card { grid-template-columns: 1fr; }
  .tiers-grid { grid-template-columns: repeat(2, 1fr); }
  .import-grid { grid-template-columns: repeat(2, 1fr); }
  .redeem-box { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tiers-grid { grid-template-columns: 1fr; }
  .import-grid { grid-template-columns: 1fr; }
  .traffic-detail-grid { grid-template-columns: 1fr; }
  .redeem-input-row { flex-direction: column; }
  .header-inner { height: auto; padding: 14px 0; flex-direction: column; gap: 12px; }
}
