/* =============================================
   小九学习平台 - 全站样式
   配色：橙 #FF8C42 / 蓝 #6BB6FF / 米白 #FFF8F0 / 深蓝 #1E3A5F
   ============================================= */

:root {
  --primary: #FF8C42;
  --primary-dark: #E66B1F;
  --primary-light: #FFB988;
  --secondary: #6BB6FF;
  --secondary-dark: #4A8FD9;
  --success: #5DD39E;
  --danger: #FF6B6B;
  --warning: #FFC95C;
  --purple: #A882FF;

  --bg: #FFFAF2;
  --bg-soft: #FFF3E2;
  --bg-blue: #EDF6FF;
  --card: #FFFFFF;
  --border: rgba(255, 140, 66, 0.12);

  --text: #2D2A26;
  --text-soft: #8A8580;
  --text-mute: #B8B3AD;

  --shadow-sm: 0 2px 8px rgba(255, 140, 66, 0.08);
  --shadow: 0 4px 20px rgba(255, 140, 66, 0.1);
  --shadow-lg: 0 12px 40px rgba(255, 140, 66, 0.15);
  --shadow-blue: 0 8px 24px rgba(107, 182, 255, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }

.app { min-height: 100vh; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ============================================
   顶部导航
   ============================================ */
.topbar {
  background: linear-gradient(90deg, #FFB988, #FF8C42, #FF8C42, #6BB6FF, #A3D0FF);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap;
}
.topbar-daily {
  background: linear-gradient(90deg, #FFB988, #FF8C42, #6BB6FF, #A3D0FF);
  border-radius: 0 0 24px 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 800; font-size: 18px;
  text-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.brand-link {
  color: #fff; font-weight: 600; opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.brand-link:hover { opacity: 1; color: #fff; }

.nav { display: flex; gap: 6px; flex: 1; margin-left: 20px; }
.nav a {
  color: #fff; padding: 8px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,.1);
  transition: all .2s;
}
.nav a:hover { background: rgba(255,255,255,.2); }
.nav a.active { background: rgba(255,255,255,.95); color: var(--primary); text-shadow: none; }
.nav-pill { background: rgba(255,255,255,.15); border-radius: 999px; padding: 4px; }

.topbar-right { display: flex; gap: 10px; align-items: center; }
.tag-season, .tag-goal {
  background: rgba(255,255,255,.95); color: var(--text);
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.tag-goal { background: linear-gradient(90deg, #FFC95C, var(--primary)); color: #fff; }

.user-chip {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.2);
  color: #fff; padding: 6px 14px 6px 6px;
  border-radius: 999px; font-size: 13px; font-weight: 600;
}
.user-chip .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
}
.topbar-daily .user-chip { color: #fff; }

/* ============================================
   通用组件
   ============================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 700;
  border: none; cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 4px 14px rgba(255, 140, 66, 0.35); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255, 140, 66, 0.45); }
.btn-primary:disabled { background: var(--text-mute); cursor: not-allowed; box-shadow: none; transform: none; }
.btn-secondary { background: #fff; color: var(--primary); border: 2px solid var(--primary); }
.btn-secondary:hover { background: var(--bg-soft); }
.btn-lg { padding: 14px 32px; font-size: 16px; }

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}

.section { padding: 60px 24px; max-width: 1240px; margin: 0 auto; }
.section-title { font-size: 32px; text-align: center; color: var(--text); margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--text-soft); margin-bottom: 40px; font-size: 16px; }

.page-header { padding: 40px 24px 24px; text-align: center; }
.page-header h1 { font-size: 30px; color: var(--text); margin-bottom: 6px; }
.page-header p { color: var(--text-soft); }

/* ============================================
   欢迎页 Hero
   ============================================ */
.hero {
  position: relative;
  padding: 60px 24px 80px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 60%);
  overflow: hidden;
}
.hero-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 40px; align-items: center;
}
.hero-art { display: flex; justify-content: center; }
.hero-text h1 {
  font-size: 48px; line-height: 1.2; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-text .grad {
  background: linear-gradient(135deg, #FF8C42, #FFC95C);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}
.hero-badge {
  display: inline-block;
  background: linear-gradient(90deg, #FFC95C, #FF8C42);
  color: #fff; font-size: 13px; font-weight: 700;
  padding: 6px 16px; border-radius: 999px;
  margin-bottom: 16px; box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
}
.hero-text p { font-size: 18px; color: var(--text-soft); margin-bottom: 28px; }
.hero-stats {
  display: flex; gap: 32px; margin-top: 28px;
}
.hero-stats div { text-align: center; }
.hero-stats strong {
  display: block; font-size: 26px; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-stats span { font-size: 12px; color: var(--text-soft); }

.nav-vip {
  background: linear-gradient(90deg, #FFC95C, #FF8C42) !important;
  color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(255, 140, 66, 0.3);
  animation: vipPulse 2s ease-in-out infinite;
}
@keyframes vipPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.actions { display: flex; gap: 14px; flex-wrap: wrap; }

.floats { position: absolute; inset: 0; pointer-events: none; }
.float { position: absolute; font-size: 28px; animation: floatY 4s ease-in-out infinite; opacity: 0.5; }
.float.f1 { top: 15%; left: 8%; animation-delay: 0s; }
.float.f2 { top: 25%; right: 10%; animation-delay: 1s; }
.float.f3 { bottom: 30%; left: 12%; animation-delay: 2s; }
.float.f4 { top: 60%; right: 8%; animation-delay: 0.5s; }
.float.f5 { top: 40%; left: 50%; animation-delay: 1.5s; }
.float.f6 { bottom: 15%; right: 20%; animation-delay: 2.5s; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-text h1 { font-size: 36px; }
  .actions { justify-content: center; }
}

/* ============================================
   功能卡片
   ============================================ */
.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card { text-align: center; padding: 32px 24px; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-icon { font-size: 48px; margin-bottom: 16px; }
.feature-card h3 { font-size: 19px; color: var(--text); margin-bottom: 10px; }
.feature-card p { color: var(--text-soft); font-size: 14px; }

@media (max-width: 968px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

/* ============================================
   学习中心
   ============================================ */
.stat-row {
  max-width: 1240px; margin: 0 auto; padding: 0 24px 24px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-card {
  background: var(--card); padding: 18px 20px;
  border-radius: 16px; display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.stat-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.stat-icon.orange { background: rgba(255, 140, 66, 0.12); }
.stat-icon.blue { background: rgba(107, 182, 255, 0.12); }
.stat-icon.green { background: rgba(93, 211, 158, 0.12); }
.stat-icon.purple { background: rgba(168, 130, 255, 0.12); }
.stat-info .v { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-info .l { font-size: 12px; color: var(--text-soft); margin-top: 4px; }

.subject-grid {
  max-width: 1240px; margin: 0 auto 60px; padding: 0 24px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.subject-card {
  background: var(--card); padding: 24px;
  border-radius: 18px; cursor: pointer;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all .2s;
  color: var(--text);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.subject-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--accent, var(--primary));
  border-radius: 18px 18px 0 0;
}
.subject-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.subject-icon { font-size: 36px; margin-bottom: 12px; }
.subject-card h3 { font-size: 18px; color: var(--text); margin-bottom: 6px; }
.subject-card p { color: var(--text-soft); font-size: 13px; margin-bottom: 16px; }
.subject-meta {
  display: flex; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-soft);
}

@media (max-width: 968px) { .stat-row, .subject-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .stat-row, .subject-grid { grid-template-columns: 1fr; } }

/* ============================================
   每日一练 (daily)
   ============================================ */
.daily-wrap {
  max-width: 920px; margin: 0 auto; padding: 0 24px 60px;
}
.daily-hero {
  background: linear-gradient(135deg, #FFB988 0%, #FF8C42 50%, #6BB6FF 100%);
  border-radius: 20px; padding: 32px 36px;
  color: #fff; margin-bottom: 24px;
  box-shadow: 0 12px 36px rgba(255, 140, 66, 0.25);
  display: flex; align-items: center; gap: 20px;
}
.daily-hero-icon {
  font-size: 56px; background: rgba(255,255,255,.2);
  width: 80px; height: 80px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.daily-hero h1 { font-size: 28px; margin-bottom: 4px; }
.daily-hero p { font-size: 14px; opacity: 0.95; }

.daily-card {
  background: var(--card); border-radius: 20px;
  padding: 28px; box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.daily-h3 { font-size: 18px; color: var(--text); margin-bottom: 20px; }

.daily-row { margin-bottom: 24px; }
.daily-label { font-size: 13px; color: var(--text-soft); margin-bottom: 10px; }
.chip-group { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  padding: 10px 22px; border-radius: 999px;
  background: #fff; border: 2px solid var(--border);
  color: var(--text); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: var(--primary); color: #fff;
  box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
}

.daily-action {
  text-align: center; margin-top: 30px;
  padding-top: 24px; border-top: 1px solid var(--border);
}
.daily-streak { margin-top: 16px; color: var(--text-soft); font-size: 14px; }
.daily-streak strong { color: var(--primary); font-size: 18px; }

/* Quiz */
.quiz-progress {
  background: var(--bg-soft); height: 8px; border-radius: 4px;
  margin-bottom: 20px; overflow: hidden;
}
.quiz-bar {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  height: 100%; border-radius: 4px; transition: width .3s;
}
.quiz-body { margin: 20px 0; }
.q-text { font-size: 17px; line-height: 1.7; color: var(--text); }
.quiz-options { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.opt {
  text-align: left; padding: 14px 18px; border-radius: 12px;
  background: var(--bg-soft); border: 2px solid transparent;
  cursor: pointer; font-size: 15px; color: var(--text);
  display: flex; align-items: center; gap: 12px;
  transition: all .2s;
}
.opt:hover { background: rgba(255, 140, 66, 0.06); border-color: var(--primary); }
.opt.correct { background: rgba(93, 211, 158, 0.15); border-color: var(--success); color: var(--text); }
.opt.wrong { background: rgba(255, 107, 107, 0.15); border-color: var(--danger); }
.opt:disabled { cursor: default; }
.opt-letter {
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; color: var(--text); display: flex;
  align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.opt.correct .opt-letter { background: var(--success); color: #fff; }
.opt.wrong .opt-letter { background: var(--danger); color: #fff; }

.quiz-foot { display: flex; gap: 12px; margin-top: 24px; }
.quiz-foot .btn { flex: 1; }

.result-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px; margin-top: 8px;
}
.result-item {
  background: var(--bg-soft); border-radius: 12px;
  padding: 18px; text-align: center;
}
.r-num { font-size: 30px; font-weight: 800; color: var(--text); }
.r-l { font-size: 12px; color: var(--text-soft); margin-top: 4px; }

/* ============================================
   小九悬浮助手
   ============================================ */
.xj-floating {
  position: fixed; right: 24px; bottom: 24px;
  z-index: 1000; max-width: 320px;
  font-family: inherit;
}
.xj-float-bubble {
  background: linear-gradient(135deg, #FFB988 0%, #FF8C42 60%, #6BB6FF 100%);
  color: #fff; padding: 16px 18px;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 12px 36px rgba(255, 140, 66, 0.35);
  margin-bottom: 12px; position: relative;
  transition: all .3s;
  transform-origin: bottom right;
}
.xj-float-bubble.collapsed {
  transform: scale(0); opacity: 0; pointer-events: none;
}
.xj-float-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.2);
}
.xj-float-name { font-weight: 700; font-size: 14px; }
.xj-online { font-size: 11px; opacity: 0.85; font-weight: 500; }
.xj-float-sub { font-size: 11px; opacity: 0.9; }
.xj-float-close {
  margin-left: auto; background: rgba(255,255,255,.2);
  border: none; color: #fff; width: 22px; height: 22px;
  border-radius: 50%; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.xj-float-msg { font-size: 14px; line-height: 1.6; }
.xj-float-emoji { margin-left: 4px; }

.xj-float-input {
  display: flex; gap: 6px; background: #fff;
  border-radius: 999px; padding: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  align-items: center;
}
.xj-float-input input {
  flex: 1; border: none; outline: none; padding: 8px 14px;
  font-size: 14px; background: transparent; color: var(--text);
  font-family: inherit;
}
.xj-float-input button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none; color: #fff; width: 36px; height: 36px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.xj-float-avatar {
  position: absolute; right: 0; bottom: 0;
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #FFB988, #FF8C42);
  padding: 4px; border: 3px solid #fff;
  cursor: pointer; box-shadow: 0 8px 24px rgba(255, 140, 66, 0.4);
  transition: transform .2s;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.xj-float-avatar:hover { transform: scale(1.08); }
.xj-float-avatar .xj-svg { width: 100% !important; height: 100% !important; }
.xj-float-dot {
  position: absolute; top: 4px; right: 4px;
  width: 14px; height: 14px; background: var(--success);
  border: 2px solid #fff; border-radius: 50%;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }

@media (max-width: 480px) {
  .xj-floating { right: 12px; bottom: 12px; max-width: calc(100vw - 24px); }
}

/* ============================================
   定价页
   ============================================ */
.pricing-hero {
  text-align: center; padding: 50px 24px 30px;
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
}
.pricing-hero h1 {
  font-size: 36px; margin: 16px 0 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.pricing-hero > p { color: var(--text-soft); font-size: 17px; }
.pricing-trust {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  margin-top: 20px; font-size: 13px; color: var(--text-soft);
}
.pricing-trust span { display: flex; align-items: center; gap: 4px; }

.pricing-section { max-width: 1240px; margin: 0 auto; padding: 40px 24px; }
.pricing-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.price-card {
  background: var(--card); border-radius: 20px;
  padding: 28px 22px; position: relative;
  border: 2px solid var(--border);
  transition: all .2s;
  display: flex; flex-direction: column;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.price-card-hot {
  background: linear-gradient(180deg, #FF8C42 0%, #FFB988 100%);
  color: #fff; border: none;
  transform: scale(1.05);
  box-shadow: 0 16px 40px rgba(255, 140, 66, 0.3);
}
.price-hot-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--warning); color: var(--text);
  padding: 4px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 800; white-space: nowrap;
}
.price-head { margin-bottom: 20px; }
.price-name { font-size: 20px; font-weight: 700; }
.price-sub { font-size: 13px; opacity: 0.8; margin-top: 4px; }
.price-card-hot .price-sub { color: rgba(255,255,255,.95); }

.price-num {
  display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px;
}
.price-num .cur { font-size: 22px; font-weight: 600; }
.price-num .num { font-size: 48px; font-weight: 800; line-height: 1; }
.price-num .unit { font-size: 14px; opacity: 0.8; }
.price-tag {
  display: inline-block; background: var(--bg-soft); color: var(--primary);
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; margin-bottom: 20px;
}
.price-features { list-style: none; margin: 20px 0; flex: 1; }
.price-features li { padding: 6px 0; font-size: 14px; }
.price-features li.disabled { color: var(--text-mute); text-decoration: line-through; }
.price-card-hot .price-features li { color: #fff; }
.price-card-hot .price-features li.disabled { color: rgba(255,255,255,.5); }
.price-card .btn { width: 100%; margin-top: auto; }
.price-tip { text-align: center; margin-top: 12px; font-size: 12px; opacity: 0.85; }

@media (max-width: 968px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } .price-card-hot { transform: none; } }
@media (max-width: 600px) { .pricing-grid { grid-template-columns: 1fr; } }

/* 对比表 */
.compare-wrap { background: var(--card); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); overflow-x: auto; }
.compare-table {
  width: 100%; border-collapse: collapse; min-width: 600px;
}
.compare-table th, .compare-table td {
  padding: 12px 16px; text-align: center;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.compare-table th { background: var(--bg-soft); color: var(--text); font-weight: 700; }
.compare-table th.hot, .compare-table td.hot {
  background: rgba(255, 140, 66, 0.08); color: var(--primary); font-weight: 700;
}
.compare-table tr:hover td { background: var(--bg); }

.faq-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.faq-item {
  background: var(--card); border-radius: 14px;
  padding: 20px 24px; border: 1px solid var(--border);
}
.faq-item h4 { color: var(--text); margin-bottom: 8px; font-size: 16px; }
.faq-item p { color: var(--text-soft); font-size: 14px; }
@media (max-width: 768px) { .faq-grid { grid-template-columns: 1fr; } }

/* ============================================
   支付页
   ============================================ */
.pay-wrap { max-width: 720px; margin: 30px auto 60px; padding: 0 24px; }
.pay-card { background: var(--card); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); margin-bottom: 16px; border: 1px solid var(--border); }
.pay-info { display: flex; flex-direction: column; gap: 12px; }
.pay-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.pay-row span { color: var(--text-soft); }
.pay-row strong { color: var(--text); font-weight: 600; }
.pay-row-amount {
  margin-top: 8px; padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 18px;
}
.pay-row-amount strong { color: var(--primary); font-size: 26px; font-weight: 800; }
.pay-tip {
  margin-top: 16px; padding: 10px 14px;
  background: var(--bg-soft); border-radius: 10px;
  color: var(--text-soft); font-size: 13px;
}

.pay-method {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 12px;
  background: var(--bg-soft); cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s;
}
.pay-method:hover { background: rgba(255, 140, 66, 0.06); }
.pay-method.active { border-color: var(--primary); background: rgba(255, 140, 66, 0.08); }
.pay-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
}
.pay-m-name { font-weight: 600; color: var(--text); }
.pay-m-sub { font-size: 12px; color: var(--text-soft); }
.pay-check {
  margin-left: auto; color: var(--primary);
  font-weight: 800; opacity: 0;
}
.pay-method.active .pay-check { opacity: 1; }

.pay-qr-card { text-align: center; }
#qrArea { display: flex; justify-content: center; padding: 16px 0; }
.qr-img {
  width: 220px; height: 220px;
  border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.pay-loading { padding: 30px; color: var(--text-soft); }
.pay-spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 4px solid var(--bg-soft); border-top-color: var(--primary);
  animation: spin .8s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pay-instruction { margin-top: 12px; }
.pay-instruction p { color: var(--text-soft); font-size: 14px; margin: 6px 0; }
.pay-countdown { color: var(--primary); font-weight: 600; }

.pay-sandbox {
  margin-top: 20px; padding: 16px;
  background: var(--bg-blue); border-radius: 12px;
  border: 1px dashed var(--secondary);
}
.pay-sandbox-tip { font-size: 13px; color: var(--secondary-dark); margin-bottom: 10px; }
.pay-sandbox .btn { width: 100%; }

.pay-error { padding: 30px; text-align: center; }
.pay-error p { margin: 8px 0; color: var(--text-soft); }
.pay-error .btn { margin-top: 12px; }

/* 成功页 */
.success-wrap { max-width: 560px; margin: 60px auto; padding: 0 24px; text-align: center; }
.success-wrap h1 {
  font-size: 32px; margin: 12px 0 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.success-tip { color: var(--text-soft); font-size: 17px; margin-bottom: 30px; }
.success-card { background: var(--card); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.success-note { color: var(--text-soft); font-size: 13px; }

/* ============================================
   聊天页（chat）
   ============================================ */
.chat-wrap { max-width: 920px; margin: 0 auto; padding: 20px 24px 100px; min-height: calc(100vh - 70px); }
.chat-subject-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.subject-tab {
  padding: 8px 16px; border-radius: 999px;
  background: var(--bg-soft); color: var(--text-soft);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; transition: all .2s;
}
.subject-tab.active { background: var(--primary); color: #fff; }

.chat-card {
  background: var(--card); border-radius: 20px;
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 70vh;
}
.chat-head {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255, 140, 66, 0.05), rgba(107, 182, 255, 0.05));
}
.chat-head .xj-mount { background: #fff; border-radius: 50%; padding: 4px; }
.chat-head .name { font-weight: 700; font-size: 16px; }
.chat-head .status { font-size: 12px; color: var(--text-soft); }
.chat-head .status::before {
  content: ''; display: inline-block; width: 8px; height: 8px;
  background: var(--success); border-radius: 50%;
  margin-right: 4px; animation: pulse 2s infinite;
}

.chat-list { flex: 1; padding: 24px; overflow-y: auto; max-height: 60vh; }
.msg { display: flex; gap: 14px; margin-bottom: 20px; align-items: flex-start; }
.msg.user { flex-direction: row-reverse; }
.msg .ava {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px;
  flex-shrink: 0;
}
.msg .xj-msg { flex-shrink: 0; }
.msg .bubble {
  max-width: 70%;
  padding: 14px 18px; border-radius: 16px;
  background: var(--bg-soft); color: var(--text);
  font-size: 15px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
}
.msg.user .bubble {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}
.bubble.cursor::after {
  content: '▌'; animation: blink 1s infinite;
  color: var(--primary); margin-left: 2px;
}
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

.chat-suggest { padding: 0 24px 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.chip-suggest {
  padding: 6px 14px; border-radius: 999px;
  background: var(--bg-soft); color: var(--text-soft);
  font-size: 12px; cursor: pointer; border: 1px solid var(--border);
}
.chip-suggest:hover { color: var(--primary); border-color: var(--primary); }

.chat-composer {
  display: flex; gap: 10px; padding: 16px 24px;
  border-top: 1px solid var(--border); background: var(--bg);
}
.chat-composer textarea {
  flex: 1; padding: 12px 18px;
  border: 2px solid var(--border); border-radius: 14px;
  font-size: 14px; font-family: inherit; resize: none;
  min-height: 44px; max-height: 140px; outline: none;
  background: var(--card); color: var(--text);
}
.chat-composer textarea:focus { border-color: var(--primary); }
.chat-composer .send {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border: none; border-radius: 14px;
  padding: 0 22px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 4px;
}
.chat-composer .send:disabled { background: var(--text-mute); cursor: not-allowed; }

/* ============================================
   个人中心
   ============================================ */
.profile-hero {
  background: linear-gradient(135deg, #FFB988, #FF8C42, #6BB6FF);
  padding: 30px 24px; color: #fff;
  border-radius: 0 0 24px 24px;
}
.profile-hero-inner { max-width: 1240px; margin: 0 auto; display: flex; gap: 20px; align-items: center; }
.profile-hero h2 { font-size: 26px; margin-bottom: 4px; }
.profile-hero .sub { opacity: 0.9; font-size: 14px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.badge {
  background: rgba(255,255,255,.2); color: #fff;
  padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}

.profile-grid {
  max-width: 1240px; margin: 24px auto; padding: 0 24px;
  display: grid; grid-template-columns: 2fr 1fr;
  gap: 18px;
}
.profile-card { background: var(--card); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.profile-card h3 { font-size: 18px; margin-bottom: 16px; color: var(--text); }
.activity-list { display: flex; flex-direction: column; gap: 8px; }
.activity-item {
  display: flex; gap: 12px; align-items: center;
  padding: 12px; border-radius: 12px;
  background: var(--bg-soft);
}
.activity-item .ico {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; background: #fff;
}
.activity-item .text { flex: 1; }
.activity-item .t { font-size: 14px; color: var(--text); font-weight: 600; }
.activity-item .d { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.activity-item .pts { color: var(--primary); font-weight: 700; font-size: 14px; }

.rank-list { display: flex; flex-direction: column; gap: 6px; }
.rank-item {
  display: flex; gap: 12px; align-items: center;
  padding: 8px 10px; border-radius: 10px;
}
.rank-item .rk { width: 24px; font-weight: 700; color: var(--text-soft); }
.rank-item .r1 { color: #FFD700; }
.rank-item .r2 { color: #C0C0C0; }
.rank-item .r3 { color: #CD7F32; }
.rank-item .ava { width: 32px; height: 32px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.rank-item .nm { flex: 1; font-size: 14px; }
.rank-item .sc { font-weight: 700; color: var(--text); }

@media (max-width: 968px) { .profile-grid { grid-template-columns: 1fr; } }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 140, 66, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 140, 66, 0.4); }


/* ============================================
   v2.0 全新首页样式（玻璃拟态 + 动效）
   ============================================ */
.glass {
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 8px 32px rgba(31,38,135,0.08);
  border-radius: 18px;
}
.glass-top { background: rgba(255,250,242,0.75); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.home-page { background: linear-gradient(180deg,#FFF4E8 0%,#FFFAF2 30%,#EFF4FF 100%); }
/* v3：深色玻璃顶栏 - 白字白背景才看得清 */
.home-page .topbar {
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: rgba(28, 30, 44, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.home-page .topbar .brand-text { color: #fff !important; }
.home-page .topbar .brand-text b { color: #FFD8A8; }
.home-page .topbar .nav a { color: rgba(255,255,255,0.85) !important; }
.home-page .topbar .nav a.active { color: #FFD8A8 !important; }
.home-page .topbar .user-chip { color: #fff; }
.home-page .topbar .avatar { background: linear-gradient(135deg,#FF8C42,#FF4D8D); color: #fff; }
.home-page .topbar .points-chip { background: rgba(255,216,168,0.15) !important; color: #FFD8A8 !important; }
.home-page .topbar .points-chip b { color: #FFD8A8 !important; }
.hero-v2 { position: relative; overflow: hidden; padding: 60px 0 50px;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(255,140,66,0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(107,182,255,0.30) 0%, transparent 60%),
    linear-gradient(135deg, #FF8C42 0%, #FFA76A 35%, #B0D4F1 75%, #6BB6FF 100%);
}
.hero-v2::before {
  content: '985';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 360px; font-weight: 900; letter-spacing: -10px;
  color: rgba(255, 255, 255, 0.18);
  user-select: none; pointer-events: none;
  z-index: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  white-space: nowrap;
  text-shadow: 0 4px 30px rgba(0,0,0,0.1);
}
.hero-v2::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 80%, rgba(255,77,141,0.15) 0%, transparent 30%),
    radial-gradient(circle at 85% 25%, rgba(108,92,231,0.12) 0%, transparent 30%);
  pointer-events: none; z-index: 0;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.bg-float { position: absolute; font-size: 26px; font-weight: 700; color: rgba(255,140,66,0.12); animation: bgFloat 12s ease-in-out infinite; user-select: none; }
.bg-f1 { top:12%; left:6%; font-size:44px; animation-delay:0s; }
.bg-f2 { top:22%; right:14%; font-size:34px; animation-delay:1s; }
.bg-f3 { bottom:30%; left:10%; font-size:30px; animation-delay:2s; }
.bg-f4 { top:45%; right:6%; font-size:40px; animation-delay:3s; }
.bg-f5 { bottom:16%; left:28%; font-size:28px; animation-delay:4s; }
.bg-f6 { top:8%; left:42%; font-size:32px; animation-delay:1.5s; }
.bg-f7 { bottom:36%; right:26%; font-size:36px; animation-delay:2.5s; }
.bg-f8 { top:60%; left:16%; font-size:38px; animation-delay:3.5s; }
.bg-f9 { bottom:8%; right:40%; font-size:30px; animation-delay:0.5s; }
.bg-f10 { top:32%; left:30%; font-size:26px; animation-delay:4.5s; }
@keyframes bgFloat { 0%,100% { transform: translateY(0) rotate(0); opacity:.5; } 50% { transform: translateY(-30px) rotate(8deg); opacity:1; } }
.hero-v2-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; align-items: center; position: relative; z-index: 2; }
.goal-badge { display:inline-block; background: linear-gradient(90deg,#FFC95C,#FF8C42); color:#fff; font-size:14px; font-weight:700; padding:7px 18px; border-radius:999px; margin-bottom:18px; box-shadow:0 6px 18px rgba(255,140,66,.35); animation: goalPop 1.2s ease; }
@keyframes goalPop { 0% { transform: scale(.8); opacity:0; } 100% { transform: scale(1); opacity:1; } }
.hero-v2-title {
  font-size: 58px; line-height: 1.1; margin-bottom: 16px; font-weight: 900;
  letter-spacing: -.5px; color: #fff;
  text-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.3), 0 -2px 0 #FF6B35, 0 2px 0 #6C5CE7;
  -webkit-text-stroke: 2px rgba(0,0,0,0.15);
}
.grad-hot {
  background: linear-gradient(135deg,#FF0040,#FF8C00,#FFEB00);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  background-clip:text;
  display:inline-block;
  filter: drop-shadow(0 4px 8px rgba(255,67,0,0.4));
}
.grad-cool {
  background: linear-gradient(135deg,#00D4FF,#5B2BE0,#FF00B4);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  background-clip:text;
  display:inline-block;
  filter: drop-shadow(0 4px 8px rgba(91,43,224,0.4));
}
.hero-v2-sub { font-size: 19px; color: #fff; margin-bottom: 28px; line-height: 1.7; text-shadow: 0 2px 12px rgba(0,0,0,0.35); font-weight: 600; }
.hero-v2-actions { display:flex; gap:14px; flex-wrap:wrap; margin-bottom:30px; }
.btn-hero { padding:14px 28px; border-radius:999px; font-size:16px; font-weight:800; text-decoration:none; display:inline-block; transition:all .25s ease; }
.btn-hero-primary { background: linear-gradient(90deg,#FF8C42,#FF4D8D); color:#fff; box-shadow:0 8px 24px rgba(255,100,66,.4); }
.btn-hero-primary:hover { transform:translateY(-3px); box-shadow:0 12px 30px rgba(255,100,66,.5); }
.btn-hero-ghost { background: rgba(255,255,255,.7); color: var(--primary); border:2px solid rgba(255,140,66,.3); }
.btn-hero-ghost:hover { background:#fff; border-color: var(--primary); transform:translateY(-3px); }
.hero-v2-stats { display:flex; gap: 18px; }
.hstat { text-align:center;
  background: rgba(255,255,255,0.25); backdrop-filter: blur(8px);
  padding: 10px 16px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.hstat-num { display:block; font-size: 28px; font-weight: 900; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  background: none; -webkit-text-fill-color: #fff;
}
.hstat-label { font-size: 12px; color: #fff; margin-top: 2px; font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.hero-v2-art { position:relative; display:flex; justify-content:center; }
.hero-xj { animation: xjBreath 3s ease-in-out infinite; cursor:pointer; }
@keyframes xjBreath { 0%,100% { transform:translateY(0) scale(1); } 50% { transform:translateY(-12px) scale(1.02); } }
.xj-bubble { position:absolute; top:8%; right:0; max-width:180px; background:#fff; border-radius:14px; padding:10px 14px; font-size:13px; line-height:1.6; color:#333; box-shadow:0 6px 20px rgba(31,38,135,.15); border:1px solid rgba(255,140,66,.2); }
.xj-bubble::after { content:''; position:absolute; left:-8px; top:50%; border:8px solid transparent; border-right-color:#fff; transform:translateY(-50%); }
.xj-bubble.pop { animation: bubblePop .3s ease; }
@keyframes bubblePop { 0% { transform:scale(.8); opacity:0; } 100% { transform:scale(1); opacity:1; } }
.lv-section { padding:0 20px; }
.lv-card { padding:18px 22px; display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.lv-info { display:flex; align-items:center; gap:12px; min-width:260px; }
.lv-badge { background: linear-gradient(135deg,#FF8C42,#FF4D8D); color:#fff; font-weight:900; font-size:16px; padding:6px 14px; border-radius:999px; box-shadow:0 4px 12px rgba(255,100,66,.3); }
.lv-name { font-weight:800; color:#333; }
.lv-progress-text { font-size:13px; color: var(--text-soft); }
.lv-bar { flex:1; height:12px; background: rgba(255,140,66,.12); border-radius:999px; overflow:hidden; min-width:160px; }
.lv-bar-fill { height:100%; border-radius:999px; background: linear-gradient(90deg,#FFC95C,#FF8C42,#FF4D8D); transition:width 1s ease; }
.stat-grid { display:grid; grid-template-columns: repeat(4,1fr); gap:18px; }
.stat-card2 { text-align:center; padding:26px 16px; transition:transform .25s ease, box-shadow .25s ease; }
.stat-card2:hover { transform:translateY(-6px); box-shadow:0 16px 40px rgba(31,38,135,.12); }
.stat2-icon { width:54px; height:54px; border-radius:16px; margin:0 auto 12px; display:flex; align-items:center; justify-content:center; font-size:26px; box-shadow:0 6px 16px rgba(0,0,0,.1); }
.stat2-num { font-size:28px; font-weight:900; color:#333; }
.stat2-label { font-size:13px; color: var(--text-soft); margin-top:4px; }
.radar-wrap { padding:24px; max-width:520px; margin:0 auto; }
.rank-list { padding:10px 20px; }
.rank-item { display:flex; align-items:center; gap:12px; padding:12px 6px; border-bottom:1px solid rgba(0,0,0,.04); }
.rank-item:last-child { border-bottom:none; }
.rank-you { background: rgba(255,140,66,.06); border-radius:12px; padding-left:12px; padding-right:12px; }
.rank-medal { width:30px; font-size:20px; text-align:center; font-weight:800; }
.rank-ava { width:36px; height:36px; border-radius:50%; background: linear-gradient(135deg,#FFE8D6,#FFFAF2); display:flex; align-items:center; justify-content:center; font-size:18px; border:2px solid rgba(255,140,66,.2); }
.rank-name { min-width:90px; font-weight:700; color:#333; }
.rank-tag { background: linear-gradient(90deg,#FF8C42,#FF4D8D); color:#fff; font-size:10px; padding:1px 7px; border-radius:999px; margin-left:4px; }
.rank-bar { flex:1; height:8px; background: rgba(0,0,0,.05); border-radius:999px; overflow:hidden; }
.rank-bar-fill { height:100%; border-radius:999px; background: linear-gradient(90deg,#6BB6FF,#6C5CE7); transition:width .8s ease; }
.rank-pts { font-weight:800; color: var(--primary); min-width:48px; text-align:right; }
.task-list { display:grid; grid-template-columns: repeat(3,1fr); gap:16px; }
.task-item { display:flex; align-items:center; gap:12px; padding:16px; transition:transform .2s ease; }
.task-item:hover { transform:translateY(-4px); }
.task-done { opacity:.85; }
.task-done .task-ico { filter:grayscale(.2); }
.task-ico { width:44px; height:44px; border-radius:12px; font-size:22px; background: linear-gradient(135deg,#FFE8D6,#FFF4E8); display:flex; align-items:center; justify-content:center; }
.task-name { flex:1; font-size:13px; font-weight:700; color:#333; }
.task-pts { color: var(--primary); font-weight:800; font-size:13px; }
.task-check { width:24px; height:24px; border-radius:50%; border:2px solid rgba(0,0,0,.15); display:flex; align-items:center; justify-content:center; font-size:13px; color:#fff; }
.task-check.checked { background: linear-gradient(135deg,#6BB6FF,#6C5CE7); border-color:transparent; }
.badge-wall { display:grid; grid-template-columns: repeat(6,1fr); gap:14px; }
.badge-item { text-align:center; padding:18px 8px; border-radius:16px; background: rgba(255,255,255,.7); border:1px solid rgba(255,255,255,.6); box-shadow:0 4px 16px rgba(31,38,135,.06); transition:transform .2s ease; }
.badge-item:hover { transform:translateY(-4px); }
.badge-locked { filter:grayscale(1); opacity:.45; }
.badge-ico { font-size:32px; margin-bottom:8px; }
.badge-name { font-size:13px; font-weight:800; color:#333; }
.badge-desc { font-size:11px; color: var(--text-soft); margin-top:3px; }
.vip-cta { display:grid; grid-template-columns:.8fr 1.2fr; align-items:center; gap:30px; padding:40px 50px; border-radius:24px; background: linear-gradient(135deg,#FF8C42 0%,#FF4D8D 55%,#6C5CE7 100%); color:#fff; box-shadow:0 20px 50px rgba(255,100,66,.35); }
.vip-cta-art { display:flex; justify-content:center; }
.vip-cta-text h2 { font-size:30px; margin-bottom:10px; font-weight:900; }
.vip-cta-text p { opacity:.9; margin-bottom:22px; font-size:16px; }
.vip-cta-text .btn-hero-primary { background:#fff; color: var(--primary); box-shadow:0 8px 24px rgba(0,0,0,.2); }
@media (max-width:900px) {
  .hero-v2-inner { grid-template-columns:1fr; text-align:center; }
  .hero-v2-actions, .hero-v2-stats { justify-content:center; }
  .stat-grid { grid-template-columns:repeat(2,1fr); }
  .task-list { grid-template-columns:1fr; }
  .badge-wall { grid-template-columns:repeat(3,1fr); }
  .vip-cta { grid-template-columns:1fr; text-align:center; padding:30px 24px; }
  .hero-v2-title { font-size:40px; }
}
@media (max-width:560px) {
  .stat-grid { grid-template-columns:1fr; }
  .badge-wall { grid-template-columns:repeat(2,1fr); }
}

/* ============================================
   v3.0 B 站风格样式
   - 弹幕、霓虹、二次元、活沷
   ============================================ */

/* ---- B 站色板 ---- */
:root {
  --bili-blue: #00A1D6;
  --bili-pink: #FB7299;
  --bili-cyan: #23ADE5;
  --bili-purple: #6C5CE7;
  --bili-yellow: #FFD23F;
}

/* ---- 弹幕 ---- */
.danmaku-bar {
  height: 36px; overflow: hidden; position: relative;
  background: linear-gradient(90deg, rgba(0,161,214,0.1), rgba(251,114,153,0.1));
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.danmaku-track {
  position: absolute; white-space: nowrap; top: 50%; transform: translateY(-50%);
  animation: danmakuScroll 30s linear infinite;
  font-size: 13px; color: var(--text-soft);
}
.danmaku-track span { margin: 0 30px; }
.danmaku-track b { color: var(--bili-pink); margin: 0 4px; }
@keyframes danmakuScroll {
  0% { left: 100%; }
  100% { left: -100%; }
}

/* ---- B 站风格按钮 ---- */
.btn-bili {
  background: linear-gradient(90deg, #00A1D6, #FB7299);
  color: #fff !important; font-weight: 800;
  border-radius: 999px; padding: 8px 18px; font-size: 13px;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  transition: all .2s ease; box-shadow: 0 4px 12px rgba(0,161,214,0.3);
  border: none; cursor: pointer;
}
.btn-bili:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(251,114,153,0.4); }

/* ---- 视频讲解区 ---- */
.video-section { padding: 50px 20px; }
.video-tabs {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 28px;
}
.video-tab {
  padding: 10px 22px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,0.7); border: 2px solid transparent;
  font-weight: 700; font-size: 14px; color: #555;
  transition: all .2s ease;
}
.video-tab.active, .video-tab:hover {
  background: linear-gradient(90deg, #00A1D6, #FB7299); color: #fff !important;
  border-color: transparent; transform: translateY(-2px);
}
.video-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  max-width: 1280px; margin: 0 auto;
}
.video-card {
  background: rgba(255,255,255,0.85); border-radius: 14px; overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06); cursor: pointer;
  transition: all .25s ease; border: 1px solid rgba(255,255,255,0.6);
  display: block; text-decoration: none; color: inherit;
}
.video-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(0,0,0,0.12); }
.video-thumb {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,161,214,0.3), rgba(251,114,153,0.3));
}
.video-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,0.4); z-index: 2;
  transition: all .2s ease;
}
.video-card:hover .video-play { background: var(--bili-pink); border-color: #fff; transform: translate(-50%, -50%) scale(1.1); }
.video-duration {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,0.7); color: #fff; font-size: 11px;
  padding: 2px 6px; border-radius: 4px; z-index: 2;
}
.video-info { padding: 12px 14px; }
.video-title {
  font-size: 14px; font-weight: 700; color: #222;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.4; min-height: 39px;
}
.video-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; font-size: 12px; color: var(--text-soft);
}
.video-meta .up { display: flex; align-items: center; gap: 4px; color: var(--bili-pink); font-weight: 700; }
.video-meta .views { color: #999; }

/* ---- 拉新/分享 ---- */
.share-bar {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  padding: 24px 20px; margin: 30px auto; max-width: 800px;
  background: linear-gradient(135deg, rgba(0,161,214,0.08), rgba(251,114,153,0.08));
  border-radius: 20px; border: 1px dashed rgba(0,161,214,0.3);
}
.share-btn {
  display: flex; align-items: center; gap: 6px; padding: 10px 18px;
  background: #fff; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: #333; cursor: pointer; border: 1px solid rgba(0,0,0,0.06);
  transition: all .2s ease; text-decoration: none;
}
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); }
.share-btn.wechat { color: #07C160; }
.share-btn.qq { color: #1296DB; }
.share-btn.weibo { color: #E6162D; }
.share-btn.copy { color: #FB7299; }

.invite-card {
  background: linear-gradient(135deg, #00A1D6 0%, #FB7299 100%);
  border-radius: 20px; padding: 30px; color: #fff;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px;
  max-width: 900px; margin: 30px auto;
  box-shadow: 0 16px 40px rgba(0,161,214,0.3);
}
.invite-card h3 { font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.invite-card p { opacity: 0.9; font-size: 14px; margin: 0; }
.invite-card .invite-code {
  background: rgba(255,255,255,0.2); padding: 12px 20px; border-radius: 12px;
  font-size: 24px; font-weight: 900; letter-spacing: 4px;
  border: 2px dashed rgba(255,255,255,0.4);
}

/* 响应式 */
@media (max-width: 900px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .invite-card { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 560px) {
  .video-grid { grid-template-columns: 1fr; }
}

/* ============================================
   v4 学科详情页 subject.html 样式
   ============================================ */

.subject-hero {
  margin: 20px auto 32px;
  padding: 28px 40px;
  border-radius: 24px;
  display: grid;
  grid-template-columns: auto auto auto;
  justify-content: center;
  gap: 0 40px;
  align-items: center;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}
.subject-hero::before {
  content: ''; position: absolute;
  top: -60px; left: -40px; width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.subject-hero::after {
  content: ''; position: absolute;
  bottom: -50px; right: -30px; width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.subj-icon-big {
  font-size: 56px; line-height: 1;
  background: rgba(255,255,255,0.3);
  border-radius: 20px; padding: 14px 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.5);
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
  position: relative; z-index: 1;
}
.subj-info { text-align: left; position: relative; z-index: 1; min-width: 0; }
.subj-info h1 {
  font-size: 30px; font-weight: 900; margin: 0 0 3px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.12);
  letter-spacing: 1px;
}
.subj-info > p {
  font-size: 13px; margin: 0 0 14px; opacity: 0.92;
  letter-spacing: 0.5px;
}
.subj-stats { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.ss-item {
  background: rgba(255,255,255,0.22); border-radius: 10px;
  padding: 6px 14px; text-align: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.35); min-width: 64px;
}
.ss-num {
  display: block; font-size: 20px; font-weight: 900; line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0,0,0,0.12);
  font-variant-numeric: tabular-nums;
}
.ss-l { font-size: 11px; opacity: 0.85; margin-top: 2px; }
.subj-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.subj-actions .btn-hero { font-size: 13px; padding: 9px 20px; border-radius: 10px; font-weight: 700; transition: all .25s ease; }
.subj-actions .btn-hero-primary { background: linear-gradient(135deg,#fff 0%,#f8f8ff 100%); color:#333; border:none; box-shadow:0 4px 16px rgba(0,0,0,0.12); }
.subj-actions .btn-hero-primary:hover { transform:translateY(-2px); box-shadow:0 8px 24px rgba(0,0,0,0.18); }
.subj-actions .btn-hero-ghost { background:rgba(255,255,255,0.9); color:#444; border:2px solid rgba(255,255,255,0.6); border-radius:12px; }
.subj-actions .btn-hero-ghost:hover { background:#fff; transform:translateY(-2px); }

/* 右侧：正确率进度环 */
.subj-ring {
  width: 112px; height: 112px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.ring-inner {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: rgba(0,0,0,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ring-num {
  font-size: 24px; font-weight: 900; color: #fff; line-height: 1;
  text-shadow: 0 1px 6px rgba(0,0,0,0.2);
  font-variant-numeric: tabular-nums;
}
.ring-l { font-size: 11px; color: rgba(255,255,255,0.9); margin-top: 5px; }

/* 成就徽章行 */
.subj-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.badge {
  font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,0.28);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.badge-lock { opacity: 0.75; font-weight: 400; }

.subject-main .section-title {
  font-size: 24px; font-weight: 900; color: #222;
  margin: 0 0 6px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.subject-main .section-sub {
  font-size: 13px; color: var(--text-soft); margin: 0 0 20px;
  text-align: center;
}

/* ---- 知识图谱 ---- */
.knowledge-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.knowledge-card {
  background: #fff; border-radius: 14px; padding: 16px;
  text-decoration: none; color: inherit;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  border: 2px solid transparent;
  transition: all .2s ease; position: relative; display: block;
  border-left: 4px solid var(--kc, #FF8C42);
}
.knowledge-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.1); border-color: var(--kc); }
.knowledge-card.core { background: linear-gradient(135deg, rgba(255,140,66,0.04), rgba(255,255,255,1)); }
.kc-title { font-size: 15px; font-weight: 800; color: #222; display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.kc-tag {
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 999px;
  background: linear-gradient(90deg, #FF8C42, #FF4D8D); color: #fff;
}
.kc-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.kc-bar { flex: 1; height: 8px; background: rgba(0,0,0,0.05); border-radius: 999px; overflow: hidden; }
.kc-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #FFC95C, #FF8C42, #FF4D8D);
  transition: width 1s ease;
}
.kc-percent { font-size: 13px; font-weight: 800; color: var(--kc, #FF8C42); min-width: 36px; text-align: right; }
.kc-meta {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-soft);
}

/* ---- 真题卷 ---- */
.paper-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.paper-card {
  display: flex; align-items: center; gap: 16px;
  background: #fff; padding: 18px 20px; border-radius: 14px;
  text-decoration: none; color: inherit;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);
  transition: all .2s ease;
}
.paper-card:hover { transform: translateX(4px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.paper-year {
  background: linear-gradient(135deg, #FF8C42, #FF4D8D);
  color: #fff; font-size: 18px; font-weight: 900;
  padding: 12px 16px; border-radius: 12px; min-width: 60px; text-align: center;
}
.paper-info { flex: 1; }
.paper-region { font-size: 16px; font-weight: 800; color: #222; margin-bottom: 4px; }
.paper-meta { font-size: 12px; color: var(--text-soft); }
.paper-arrow { color: #FF8C42; font-weight: 700; font-size: 14px; }

/* ---- 视频区（subject.html 简化版）---- */
#subjectVideoGrid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}

/* ---- 错题本卡 ---- */
.wrongbook-card {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px;
  padding: 24px 32px;
  background: linear-gradient(135deg, #6BB6FF 0%, #6C5CE7 100%);
  color: #fff; border-radius: 18px;
  box-shadow: 0 16px 40px rgba(108,92,231,0.3);
}
.wrongbook-card h3 { font-size: 20px; font-weight: 900; margin-bottom: 4px; }
.wrongbook-card p { margin: 0; opacity: 0.9; font-size: 14px; }
.wrongbook-card .btn-hero-primary { background: #fff; color: #6C5CE7; }

@media (max-width: 900px) {
  .subject-hero {
    grid-template-columns: auto 1fr;
    padding: 28px 28px;
    gap: 0 24px;
  }
  .subj-ring { width: 92px; height: 92px; }
  .ring-inner { width: 74px; height: 74px; }
  .ring-num { font-size: 20px; }
  .subj-icon-big { font-size: 52px; padding: 12px 14px; border-radius: 18px; }
  .subj-info h1 { font-size: 28px; }
  .ss-item { min-width: 60px; padding: 6px 12px; }
  .ss-num { font-size: 18px; }
  .knowledge-grid, #subjectVideoGrid { grid-template-columns: repeat(2, 1fr); }
  .paper-list { grid-template-columns: 1fr; }
  .wrongbook-card { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 600px) {
  .subject-hero {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    gap: 16px;
  }
  .subj-stats { justify-content: center; }
  .subj-actions { justify-content: center; }
}

/* ==== 移动端适配 (mobile-first fixes, 追加于 style.css 末尾) ==== */

/* 桌面端隐藏汉堡按钮，仅在 ≤768px 显示 */
.nav-toggle { display: none !important; }

@media (max-width: 768px) {
  /* 容器收窄留白 */
  .container { padding-left: 16px; padding-right: 16px; }
  .lv-section, .video-section, .rank-list { padding-left: 16px; padding-right: 16px; }

  /* ---------- 顶部导航：汉堡菜单 ---------- */
  .topbar-inner { flex-wrap: wrap; padding: 10px 14px; gap: 10px 12px; }
  .brand, .brand-name { font-size: 16px; }
  .brand-tag { display: none; }
  .user-chip, .topbar-right { display: none; }

  .nav-toggle {
    display: flex !important;
    align-items: center; justify-content: center;
    width: 40px; height: 40px; margin-left: auto;
    border: none; border-radius: 10px;
    background: rgba(255, 255, 255, 0.28); color: #fff;
    font-size: 20px; line-height: 1; cursor: pointer;
    order: 2;
  }
  .nav-toggle:active { background: rgba(255, 255, 255, 0.45); }

  .nav {
    order: 3;
    flex: 1 1 100%;
    flex-direction: column;
    gap: 2px;
    margin-left: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 14px;
    transition: max-height .28s ease, padding .28s ease, margin .28s ease;
  }
  .nav.open {
    max-height: 360px;
    padding: 8px;
    margin-top: 6px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  }
  .nav a {
    color: #333 !important;
    width: 100%;
    text-align: left;
    padding: 13px 16px !important;
    font-size: 15px !important;
    border-radius: 10px;
  }
  .nav a:hover { background: rgba(0, 0, 0, 0.05); }
  .nav a.active { background: var(--primary) !important; color: #fff !important; }

  /* ---------- 首页 hero ---------- */
  .hero-v2 { padding: 30px 0 28px; }
  .hero-v2-title { font-size: 30px; }
  .hero-v2-sub { font-size: 15px; }
  .hero-v2-actions { gap: 10px; }
  .hero-v2-stats { gap: 18px; }
  .hero-xj { transform: scale(.82); }
  .xj-bubble { display: none; }

  /* 首页各网格单列 */
  .feature-grid, .stat-grid, .subject-grid, .task-list,
  .profile-grid, .pricing-grid, .faq-grid {
    grid-template-columns: 1fr !important;
  }

  /* ---------- 学习中心 / 学科详情 ---------- */
  .subject-hero {
    grid-template-columns: 1fr !important;
    text-align: center;
    justify-items: center;
    padding: 26px 18px 24px !important;
    gap: 14px !important;
  }
  .subj-icon-big { margin: 0 auto; }
  .subj-ring { margin: 0 auto; }
  .subj-info h1 { font-size: 26px !important; }
  .subj-info > p { font-size: 13px; }
  .subj-stats { justify-content: center; }
  .subj-actions { justify-content: center; }
  .knowledge-grid, #subjectVideoGrid { grid-template-columns: repeat(2, 1fr) !important; }
  .paper-list { grid-template-columns: 1fr !important; }
  .wrongbook-card { grid-template-columns: 1fr !important; text-align: center; }

  /* ---------- 聊天页 ---------- */
  .chat-wrap { padding: 14px 14px 92px; }
  .chat-hero { flex-direction: column; text-align: center; padding: 18px 12px; }
  .xj-mount.xj-big { transform: scale(.8); }
  .chat-list { padding: 16px; max-height: none; }
  .composer {
    position: sticky; bottom: 0; z-index: 50;
    background: #fff; padding: 8px 12px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  }
  .composer-inner textarea { font-size: 16px; }
  .composer-tips {
    display: flex; overflow-x: auto; white-space: nowrap;
    flex-wrap: nowrap; padding-bottom: 4px;
  }
  .composer-tips .chip { flex: 0 0 auto; }

  /* ---------- 支付页 ---------- */
  .pay-wrap { padding: 14px; margin: 16px auto 40px; }
  .pay-card { padding: 20px 16px; }
  .pay-qr-card img, #qrArea canvas, #qrArea img {
    width: 200px !important; max-width: 200px !important; height: auto !important;
  }

  /* ---------- 答题页 ---------- */
  .daily-wrap { padding: 16px 14px; }
  .daily-hero { padding: 24px 16px; }
  .daily-hero h1 { font-size: 26px; }
  .daily-card { padding: 20px 16px; }
  .daily-row { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
  .chip-group { flex-wrap: wrap; }
  .daily-action { flex-direction: column; align-items: stretch; }
  .daily-action .btn { width: 100%; }
  .daily-streak { text-align: center; margin-top: 10px; }

  /* 通用卡片内边距收窄 */
  .card, .glass, .lv-card, .stat-card2, .rank-list, .badge-wall {
    padding-left: 16px; padding-right: 16px;
  }
  .invite-card { padding: 22px 18px; }
  .vip-cta { padding: 28px 20px; }
}

@media (max-width: 480px) {
  .hero-v2-title { font-size: 26px; }
  .hero-v2-sub { font-size: 14px; }
  .knowledge-grid, #subjectVideoGrid { grid-template-columns: 1fr !important; }
  .subj-stats { gap: 10px; }
  .ss-item { min-width: 58px; padding: 6px 10px; }
  .subj-actions .btn-hero { width: 100%; justify-content: center; }
  .video-grid { grid-template-columns: 1fr !important; }
  .badge-wall { grid-template-columns: repeat(2, 1fr) !important; }
  .invite-card .invite-code { font-size: 20px; letter-spacing: 2px; }
  .brand-name, .brand { font-size: 15px; }
  .composer-tips .chip { font-size: 12px; padding: 8px 12px; }
  .daily-hero h1 { font-size: 23px; }
  .subj-info h1 { font-size: 23px !important; }
}

