:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  
  --bg-primary: #060911;
  --bg-secondary: #0d1322;
  --bg-card: #131b2e;
  --border-color: rgba(255, 255, 255, 0.1);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --color-gold: #f59e0b;
  --color-gold-glow: rgba(245, 158, 11, 0.4);
  --color-purple: #a855f7;
  --color-purple-glow: rgba(168, 85, 247, 0.4);
  --color-blue: #38bdf8;
  --color-cyan: #06b6d4;
  
  --radius-card: 16px;
  --radius-pill: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at 50% 20%, #111a33 0%, var(--bg-primary) 70%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* 顶部导航栏 */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 9, 17, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  font-size: 24px;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #38bdf8, #818cf8, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-badge-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-family: var(--font-mono);
}

.nav-badge-item .num {
  font-weight: 700;
  color: #38bdf8;
}

.ticket-cap-hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: -3px;
}

.btn-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

/* 导航切换 Tab */
.main-tabs {
  display: flex;
  justify-content: center;
  margin: 18px 0;
  gap: 12px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 24px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* 主内容容器 */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
  width: 100%;
  flex: 1;
}

/* 抽卡主屏幕 */
.gacha-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 0 40px;
}

.banner-card {
  width: 100%;
  max-width: 780px;
  background: linear-gradient(180deg, rgba(26, 38, 66, 0.7) 0%, rgba(13, 19, 34, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 36px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.banner-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.banner-header h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.banner-header p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.wish-highlight-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.wish-tag {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #bae6fd;
  font-size: 12px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.wish-tag:hover {
  background: rgba(56, 189, 248, 0.24);
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

.wish-tag.active {
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.55), rgba(37, 99, 235, 0.55));
  border-color: #7dd3fc;
  color: #fff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
}

.wish-tag-edit {
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(148, 163, 184, 0.4);
  color: var(--text-muted);
}

.wish-tag-edit:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.pity-info-bar {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 28px;
}

.pity-info-bar span b {
  color: var(--color-gold);
}

.gacha-action-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-gacha {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  padding: 14px 36px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 170px;
}

.btn-gacha .sub-text {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 2px;
}

.btn-gacha.btn-ten {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.btn-gacha:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.15);
}

.btn-gacha:active {
  transform: translateY(1px);
}

/* 抽卡展示与翻牌舞台 (Gacha Reveal Modal) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 10, 0.92);
  backdrop-filter: blur(16px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* 抽卡召唤光晕冲刷特效 (Summon Flash) */
.summon-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 101;
  transition: opacity 0.5s ease;
}

.summon-flash.flash-gold {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.8) 0%, rgba(217, 119, 6, 0.3) 50%, transparent 80%);
}

.summon-flash.flash-purple {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.8) 0%, rgba(126, 34, 206, 0.3) 50%, transparent 80%);
}

.summon-flash.flash-blue {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.6) 0%, rgba(2, 132, 199, 0.2) 50%, transparent 80%);
}

.reveal-controls {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  z-index: 105;
}

.reveal-flip-status {
  font-size: 13px;
  font-weight: 700;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 6px 14px;
  border-radius: 999px;
}

.reveal-grid {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
  max-width: 96vw;
  max-height: 78vh;
  overflow-x: auto;
  overflow-y: visible;
  padding: 20px 24px 26px;
  z-index: 102;
}

.reveal-grid.is-multi {
  justify-content: safe center;
}

.reveal-grid.is-multi .flip-card-wrapper {
  width: 236px;
  height: 372px;
}

.reveal-grid.is-multi .gacha-card {
  width: 236px;
  height: 372px;
}

.reveal-grid.is-multi .card-inner {
  padding: 13px;
}

.reveal-grid.is-multi .card-name {
  font-size: 16px;
}

.reveal-grid.is-multi .card-summary {
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 1260px) {
  .reveal-grid.is-multi {
    justify-content: flex-start;
  }
}

/* 未翻开强制收入图鉴确认弹窗 */
.reveal-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 17, 0.78);
  backdrop-filter: blur(8px);
  z-index: 140;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.reveal-confirm-overlay.active {
  display: flex;
}

.reveal-confirm-card {
  max-width: 440px;
  width: 100%;
  background: linear-gradient(155deg, #162038 0%, #0b1120 100%);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}

.reveal-confirm-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: #fbbf24;
  margin-bottom: 10px;
}

.reveal-confirm-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.reveal-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-confirm-back {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 9px 16px;
  font-weight: 700;
}

.btn-confirm-forfeit {
  background: linear-gradient(135deg, #d97706, #b45309);
  border: none;
  color: #fff;
  padding: 9px 18px;
  font-weight: 700;
}

/* ============================================================
   统一高级纯文本卡牌规范 (Gacha Card Styles)
   ============================================================ */
.gacha-card {
  width: 290px;
  height: 440px;
  border-radius: var(--radius-card);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  transform-style: preserve-3d;
  flex-shrink: 0;
  user-select: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.card-inner {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0d1424;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

/* 镭射高光反射覆层 */
.card-foil-overlay {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2) 0%, transparent 70%),
              linear-gradient(135deg, rgba(255,0,128,0.15), rgba(0,255,255,0.15), rgba(255,215,0,0.15));
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: color-dodge;
  transition: opacity 0.3s ease;
}

.gacha-card.has-foil:hover .card-foil-overlay {
  opacity: 0.8;
}

/* 按领域的卡牌底色风格 */
.gacha-card.cat-cs .card-inner {
  background: linear-gradient(160deg, #06181b 0%, #030a0d 100%);
  border-color: rgba(6, 182, 212, 0.35);
}

.gacha-card.cat-history .card-inner {
  background: linear-gradient(160deg, #1f1406 0%, #0d0802 100%);
  border-color: rgba(217, 119, 6, 0.35);
}

.gacha-card.cat-science .card-inner {
  background: linear-gradient(160deg, #11142b 0%, #060714 100%);
  border-color: rgba(99, 102, 241, 0.35);
}

.gacha-card.cat-philosophy .card-inner {
  background: linear-gradient(160deg, #240a1b 0%, #0c0209 100%);
  border-color: rgba(219, 39, 119, 0.35);
}

/* 按星级的高级辉光边框 */
.gacha-card.star-5 {
  border: 2px solid #f59e0b;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.45);
}

.gacha-card.star-5 .card-inner::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  border-radius: var(--radius-card);
  box-shadow: inset 0 0 15px rgba(245, 158, 11, 0.25);
  pointer-events: none;
}

.gacha-card.star-4 {
  border: 1.5px solid #a855f7;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.35);
}

.gacha-card.star-3 {
  border: 1px solid #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.gacha-card.star-2, .gacha-card.star-1 {
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* 卡牌顶栏 */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cat-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--cat-color);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  color: var(--cat-color);
  font-weight: 600;
}

.star-symbols {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--color-gold);
}

/* 词条名称与称号 */
.card-title-group {
  margin: 8px 0 6px;
}

.card-name {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1.25;
}

.card-epithet {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  font-family: var(--font-mono);
}

/* 属性四维分值展示 */
.card-stats-section {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}

.stat-item .stat-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.stat-item .stat-num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #cbd5e1;
}

.stat-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  border-radius: 2px;
}

/* 100~200字核心概述 */
.card-summary-box {
  flex: 1;
  overflow: hidden;
  margin-bottom: 8px;
}

.summary-text {
  font-size: 11px;
  line-height: 1.55;
  color: #cbd5e1;
  text-align: justify;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 专属特性与技能 */
.card-skill-box {
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid #38bdf8;
  padding: 5px 8px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 6px;
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.skill-tag {
  font-size: 9px;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  padding: 1px 4px;
  border-radius: 3px;
}

.skill-name {
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
}

.skill-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
}

.card-quote {
  font-size: 10px;
  font-style: italic;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 6px;
}

/* 卡牌底栏 */
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

/* 未解锁图鉴卡牌样式 */
.gacha-card.is-locked {
  border: 1px dashed rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.locked-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #090e18;
}

.locked-icon {
  font-size: 36px;
  opacity: 0.3;
  margin-bottom: 12px;
}

.locked-badge {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.locked-id {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 12px;
}

.locked-hint {
  font-size: 11px;
  color: var(--text-dim);
}

/* 图鉴与画廊视图 (Handbook) */
.gallery-section {
  display: none;
}

.gallery-section.active {
  display: block;
}

.gallery-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-size: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip.active {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: #38bdf8;
}

.gallery-stats {
  font-size: 13px;
  color: var(--text-muted);
}

.gallery-stats b {
  color: #38bdf8;
}

.gallery-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
  justify-items: center;
}

/* 偏好设置弹窗 (Wish Modal · 3D 知识星仪版) */
.wish-modal-content {
  background: radial-gradient(circle at 50% 35%, #162241 0%, #0b1122 60%, #070b16 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 22px;
  max-width: 740px;
  width: 100%;
  max-height: 90vh;
  padding: 22px 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  position: relative;
}

.wish-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
}

.wish-header-text h2 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-main);
}

.wish-header-text p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.wish-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.wish-close-btn:hover {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.5);
  transform: rotate(90deg);
}

/* 3D 球形旋转舞台 */
.wish-globe-stage {
  position: relative;
  height: 320px;
  min-height: 240px;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 50%, rgba(14, 116, 144, 0.16) 0%, rgba(15, 23, 42, 0.65) 58%, rgba(6, 9, 17, 0.9) 100%);
  border: 1px solid rgba(56, 189, 248, 0.16);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
  flex: 1 1 auto;
}

.wish-globe-stage.dragging {
  cursor: grabbing;
}

.wish-globe-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  perspective: 900px;
}

.globe-core-glow {
  width: 196px;
  height: 196px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, rgba(56, 189, 248, 0.22), rgba(37, 99, 235, 0.08) 52%, transparent 72%);
  border: 1px dashed rgba(56, 189, 248, 0.22);
  box-shadow: 0 0 42px rgba(56, 189, 248, 0.15), inset 0 0 24px rgba(129, 140, 248, 0.12);
}

.globe-ring {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.globe-ring-equator {
  transform: rotateX(72deg) rotateZ(-12deg);
  border-color: rgba(56, 189, 248, 0.24);
  animation: wishRingSpinSlow 24s linear infinite;
}

.globe-ring-meridian-1 {
  transform: rotateY(58deg) rotateX(14deg);
  border-style: dashed;
  animation: wishRingSpinMeridian 32s linear infinite;
}

.globe-ring-meridian-2 {
  width: 205px;
  height: 205px;
  transform: rotateY(-46deg) rotateX(18deg);
  border-color: rgba(245, 158, 11, 0.18);
}

@keyframes wishRingSpinSlow {
  from { transform: rotateX(72deg) rotateZ(0deg); }
  to { transform: rotateX(72deg) rotateZ(360deg); }
}

@keyframes wishRingSpinMeridian {
  from { transform: rotateY(0deg) rotateX(14deg); }
  to { transform: rotateY(360deg) rotateX(14deg); }
}

.wish-globe-orbit {
  position: absolute;
  inset: 0;
  transition: opacity 0.22s ease, transform 0.28s ease;
}

.wish-globe-orbit.shuffling {
  opacity: 0.15;
  transform: scale(0.92);
}

.wish-globe-node {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 138px;
  max-width: 176px;
  padding: 9px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  will-change: transform, opacity;
}

.wish-globe-node:hover {
  border-color: rgba(56, 189, 248, 0.72);
  background: rgba(21, 33, 61, 0.96);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.35);
}

.wish-globe-node.selected {
  border-color: #38bdf8;
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.55), rgba(30, 58, 138, 0.72));
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.42), inset 0 0 0 1px rgba(125, 211, 252, 0.35);
}

.wish-node-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.wish-node-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

.wish-node-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wish-node-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wish-node-check {
  margin-left: auto;
  font-size: 12px;
  font-weight: 800;
  color: #38bdf8;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.wish-globe-node.selected .wish-node-check {
  opacity: 1;
  transform: scale(1);
}

.wish-globe-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(6, 9, 17, 0.72);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  pointer-events: none;
}

/* 已选心愿标签槽 */
.wish-selected-dock {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  min-height: 46px;
}

.wish-dock-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.wish-selected-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 62px;
  overflow-y: auto;
  flex: 1;
}

.wish-dock-empty {
  font-size: 12px;
  color: var(--text-dim);
}

.wish-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #e0f2fe;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.wish-chip:hover {
  background: rgba(248, 113, 113, 0.22);
  border-color: rgba(248, 113, 113, 0.55);
}

.wish-chip-remove {
  font-size: 11px;
  opacity: 0.75;
}

/* 底部固定操作栏 */
.wish-modal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-shuffle-wish {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-shuffle-wish:hover {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.5);
}

.btn-shuffle-wish.spinning .shuffle-icon {
  display: inline-block;
  animation: spin360 0.45s ease;
}

@keyframes spin360 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.btn-submit-wish {
  flex: 1;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.btn-submit-wish:hover {
  filter: brightness(1.1);
}

@media (prefers-reduced-motion: reduce) {
  .globe-ring-equator,
  .globe-ring-meridian-1 {
    animation: none;
  }
}

/* 响应式适配 */
@media (max-width: 640px) {
  .top-navbar {
    padding: 10px 16px;
  }
  .banner-card {
    padding: 24px 16px;
  }
  .banner-header h1 {
    font-size: 22px;
  }
  .wish-modal-content {
    padding: 16px;
    max-height: 92vh;
  }
  .wish-globe-stage {
    height: 260px;
  }
  .wish-globe-node {
    min-width: 120px;
    padding: 7px 10px;
  }
  .wish-modal-footer {
    flex-direction: column;
  }
  .btn-shuffle-wish,
  .btn-submit-wish {
    width: 100%;
    justify-content: center;
  }
  .gacha-action-group {
    flex-direction: column;
    align-items: center;
  }
  .btn-gacha {
    width: 100%;
  }
}

/* ============================================================
   高品质爆卡特效与 3D 翻转卡背机制 (High-Rarity VFX & Flip Mechanics)
   ============================================================ */

/* 屏幕震动特效 (Screen Shake on 5★) */
@keyframes screenShake {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 4px); }
  40% { transform: translate(5px, -5px); }
  60% { transform: translate(-4px, 3px); }
  80% { transform: translate(3px, -2px); }
  100% { transform: translate(0, 0); }
}

.shake-screen {
  animation: screenShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* 粒子 Canvas 覆层 */
#particle-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 150;
}

/* 3D 翻转卡牌容器 */
.flip-card-wrapper {
  width: 290px;
  height: 440px;
  perspective: 1200px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.flip-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-card);
  backface-visibility: hidden;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

/* 卡背基础样式 */
.flip-back {
  background: radial-gradient(circle at 50% 50%, #152238 0%, #080d18 100%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotateY(0deg);
  z-index: 2;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.flip-card-wrapper.is-flipped .flip-back {
  transform: rotateY(-180deg);
}

.flip-front {
  transform: rotateY(180deg);
  z-index: 1;
}

.flip-card-wrapper.is-flipped .flip-front {
  transform: rotateY(0deg);
  z-index: 3;
}

/* 卡背神秘几何与符文 */
.card-back-pattern {
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  pointer-events: none;
}

.card-back-sigil {
  font-size: 42px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.7);
  transition: transform 0.3s ease;
}

.flip-card-wrapper:hover .card-back-sigil {
  transform: scale(1.15) rotate(15deg);
}

.card-back-logo {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #94a3b8;
  margin-bottom: 10px;
}

.card-back-hint {
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

/* ============================================================
   卡背光晕泄漏效果 (Rarity Leak Glows)
   ============================================================ */
@keyframes goldPulse {
  0% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.5), inset 0 0 15px rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 0 45px rgba(245, 158, 11, 0.9), inset 0 0 25px rgba(245, 158, 11, 0.6); }
  100% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.5), inset 0 0 15px rgba(245, 158, 11, 0.3); }
}

.flip-back.leak-gold {
  border-color: #f59e0b;
  animation: goldPulse 1.6s infinite ease-in-out;
}

.flip-back.leak-gold .card-back-sigil {
  color: #fbbf24;
  text-shadow: 0 0 20px #f59e0b;
}

@keyframes purplePulse {
  0% { box-shadow: 0 0 15px rgba(168, 85, 247, 0.4); }
  50% { box-shadow: 0 0 32px rgba(168, 85, 247, 0.8); }
  100% { box-shadow: 0 0 15px rgba(168, 85, 247, 0.4); }
}

.flip-back.leak-purple {
  border-color: #a855f7;
  animation: purplePulse 1.8s infinite ease-in-out;
}

.flip-back.leak-purple .card-back-sigil {
  color: #c084fc;
  text-shadow: 0 0 15px #a855f7;
}

.flip-back.leak-blue {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

/* ============================================================
   5★ 传世神品专属登场高光定格 (5★ Spotlight Cut-in Modal)
   ============================================================ */
.spotlight-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(2, 4, 8, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  overflow: hidden;
}

.spotlight-modal.active {
  opacity: 1;
  pointer-events: auto;
}

/* 旋转光芒放射背景 */
@keyframes spinRays {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spotlight-rays {
  position: absolute;
  width: 1400px;
  height: 1400px;
  background: conic-gradient(
    from 0deg,
    rgba(245, 158, 11, 0.18) 0deg 20deg,
    transparent 20deg 40deg,
    rgba(245, 158, 11, 0.18) 40deg 60deg,
    transparent 60deg 80deg,
    rgba(245, 158, 11, 0.18) 80deg 100deg,
    transparent 100deg 120deg,
    rgba(245, 158, 11, 0.18) 120deg 140deg,
    transparent 140deg 160deg,
    rgba(245, 158, 11, 0.18) 160deg 180deg,
    transparent 180deg 200deg,
    rgba(245, 158, 11, 0.18) 200deg 220deg,
    transparent 220deg 240deg,
    rgba(245, 158, 11, 0.18) 240deg 260deg,
    transparent 260deg 280deg,
    rgba(245, 158, 11, 0.18) 280deg 300deg,
    transparent 300deg 320deg,
    rgba(245, 158, 11, 0.18) 320deg 340deg,
    transparent 340deg 360deg
  );
  animation: spinRays 28s linear infinite;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0.85;
}

/* 5星专属震撼标题横幅 */
@keyframes slamTitle {
  0% { transform: scale(2.2); opacity: 0; letter-spacing: 12px; }
  60% { transform: scale(0.95); opacity: 1; letter-spacing: 2px; }
  100% { transform: scale(1); opacity: 1; letter-spacing: 3px; }
}

.spotlight-banner {
  z-index: 205;
  text-align: center;
  margin-bottom: 24px;
  animation: slamTitle 0.6s cubic-bezier(0.17, 0.89, 0.32, 1.28) forwards;
}

.spotlight-subtitle {
  font-size: 13px;
  font-family: var(--font-mono);
  color: #fbbf24;
  letter-spacing: 4px;
  margin-bottom: 4px;
}

.spotlight-main-title {
  font-size: 32px;
  font-weight: 900;
  background: linear-gradient(135deg, #fef08a, #f59e0b, #d97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 35px rgba(245, 158, 11, 0.7);
}

/* 5星卡牌震撼降落 */
@keyframes cardSlamIn {
  0% { transform: scale(1.6) translateY(-40px); opacity: 0; }
  70% { transform: scale(0.98) translateY(5px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.spotlight-card-stage {
  z-index: 205;
  animation: cardSlamIn 0.55s cubic-bezier(0.17, 0.89, 0.32, 1.25) forwards;
}

.spotlight-dismiss-hint {
  z-index: 205;
  margin-top: 24px;
  color: #cbd5e1;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 24px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
}

.spotlight-dismiss-hint:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
}

/* ============================================================
   藏家用户体系、个人名片与微信登录样式 (User Profile & WeChat Auth)
   ============================================================ */

/* 顶部导航栏藏家档案胶囊 */
.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 14px 4px 6px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.25s ease;
}

.user-profile-pill:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.user-avatar {
  font-size: 22px;
  background: rgba(255, 255, 255, 0.1);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-text-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.user-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-nickname {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-rank-stars {
  font-size: 10px;
  color: var(--color-gold);
  letter-spacing: 1px;
}

.user-title-badge {
  font-size: 10px;
  color: #38bdf8;
  font-weight: 600;
}

/* 个人档案弹窗卡片 */
.profile-modal-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  padding: 26px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.profile-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-large-avatar {
  font-size: 44px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, #1e293b, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-name-row h2 {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.profile-nickname-editable {
  cursor: pointer;
  padding: 2px 6px;
  margin-left: -6px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.profile-nickname-editable:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

.profile-nickname-input {
  width: 170px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #38bdf8;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.btn-inline-rename {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 6px;
  line-height: 1;
  transition: background 0.16s ease, transform 0.16s ease;
}

.btn-inline-rename:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.profile-auth-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.profile-auth-tag.is-wechat {
  background: rgba(7, 193, 96, 0.2);
  color: #07c160;
  border: 1px solid rgba(7, 193, 96, 0.4);
}

.profile-uid-text {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-top: 4px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.btn-close-modal:hover {
  color: #fff;
}

/* 藏家等级与称号卡 */
.rank-card-box {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.rank-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.rank-level-label {
  font-size: 14px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fbbf24;
  margin-right: 6px;
}

.rank-title-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.rank-star-display {
  font-size: 14px;
  color: var(--color-gold);
  letter-spacing: 2px;
}

.rank-exp-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.rank-exp-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #fde047);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.rank-exp-text-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
}

.rank-exp-text-row b {
  color: #fbbf24;
}

/* 统计数据 4 列网格 */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.p-stat-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}

.p-stat-label {
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.p-stat-num {
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #f1f5f9;
}

.p-stat-num.gold-text {
  color: #f59e0b;
}

.p-stat-num.purple-text {
  color: #c084fc;
}

/* 微信扫码登录区域 */
.login-section-box {
  background: rgba(7, 193, 96, 0.04);
  border: 1px dashed rgba(7, 193, 96, 0.3);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
}

.login-prompt-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.login-prompt-header p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.login-tabs-header {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
  margin-bottom: 16px;
  justify-content: center;
}

.login-tab-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.login-tab-btn:hover {
  border-color: #38bdf8;
  color: #f8fafc;
}

.login-tab-btn.active {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.wechat-qr-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.wechat-qr-code {
  position: relative;
  width: 140px;
  height: 140px;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.qr-laser-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #06b6d4, #38bdf8, transparent);
  box-shadow: 0 0 8px #38bdf8;
  animation: qrLaserScan 2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes qrLaserScan {
  0% { top: 4px; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: calc(100% - 6px); opacity: 0; }
}

.qr-loading-spinner {
  font-size: 11px;
  color: #64748b;
  text-align: center;
}

.qr-status-pill {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: bold;
  color: #38bdf8;
  animation: pulseStatus 2s infinite;
}

@keyframes pulseStatus {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.02); }
}

.qr-btn-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}

.btn-refresh-qr {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: #94a3b8;
  padding: 5px 12px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-refresh-qr:hover {
  color: #f8fafc;
  border-color: #94a3b8;
}

/* 账号密码表单样式 */
.pwd-login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
  margin: 0 auto;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.form-row label {
  font-size: 12px;
  color: #94a3b8;
}

.form-row input {
  background: #090e17;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  color: #f8fafc;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.form-row input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.phone-input-wrap {
  display: flex;
  align-items: center;
  background: #090e17;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.phone-input-wrap:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.phone-prefix {
  padding: 8px 10px 8px 12px;
  font-size: 13px;
  color: #64748b;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  user-select: none;
}

.phone-input-wrap input {
  border: none !important;
  box-shadow: none !important;
  flex: 1;
  background: transparent;
}

.sms-code-row {
  display: flex;
  gap: 8px;
}

.sms-code-row input {
  flex: 1;
  min-width: 0;
  letter-spacing: 2px;
  font-weight: 600;
}

.btn-send-sms {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-send-sms:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.24);
  border-color: #38bdf8;
}

.btn-send-sms:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.15);
}

.sms-dev-banner {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  text-align: center;
}

.sms-dev-banner b {
  font-size: 14px;
  letter-spacing: 1px;
  color: #6ee7b7;
}

.btn-sms-submit {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  margin-top: 4px;
}

.sms-policy-tip {
  font-size: 11px;
  color: #64748b;
  text-align: center;
  margin: 4px 0 0;
}

.sms-policy-tip b {
  color: #f59e0b;
}

.pwd-btn-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.btn-primary-login {
  flex: 1;
  background: #38bdf8;
  color: #0f172a;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary-login:hover {
  background: #0ea5e9;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.btn-secondary-register {
  flex: 1;
  background: transparent;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary-register:hover {
  border-color: #38bdf8;
  color: #38bdf8;
}

/* 游客极速试玩面板 */
.guest-login-box {
  text-align: center;
  max-width: 340px;
  margin: 0 auto;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.6;
}

.btn-guest-play {
  margin-top: 14px;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
  transition: all 0.2s;
}

.btn-guest-play:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.qr-mock-matrix {
  width: 100%;
  height: 100%;
  background: #111;
  position: relative;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 4px solid #07c160;
}

.qr-corner.top-left { top: 4px; left: 4px; }
.qr-corner.top-right { top: 4px; right: 4px; }
.qr-corner.bottom-left { bottom: 4px; left: 4px; }

.qr-center-icon {
  font-size: 20px;
  z-index: 2;
  background: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-scan-guide {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #cbd5e1;
}

.qr-scan-guide small {
  color: var(--text-dim);
  font-size: 10px;
}

.btn-wechat-login {
  margin-top: 6px;
  background: #07c160;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
}

.btn-wechat-login:hover {
  background: #06ad56;
  transform: translateY(-1px);
}

/* 已登录状态 */
.logged-in-section {
  text-align: center;
  padding-top: 10px;
}

.cloud-sync-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #07c160;
  background: rgba(7, 193, 96, 0.1);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(7, 193, 96, 0.25);
  margin-bottom: 16px;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #07c160;
  box-shadow: 0 0 8px #07c160;
}

.profile-action-row {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ============================================================
   研习悬赏与成就系统样式 (Quests & Achievements Styles)
   ============================================================ */

/* 任务红点 */
.badge-dot {
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  display: inline-block;
  margin-left: 4px;
  box-shadow: 0 0 8px #ef4444;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* 研习悬赏大厅容器 */
.quests-section {
  max-width: 880px;
  margin: 0 auto;
}

/* 活跃度宝箱横条 */
.activity-chest-bar {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 18px;
  padding: 22px 26px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.act-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.act-fire-icon {
  font-size: 28px;
  background: rgba(245, 158, 11, 0.15);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.act-main-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

.act-score-text {
  font-size: 13px;
  color: var(--text-muted);
}

.act-score-text b {
  color: #fbbf24;
  font-size: 16px;
}

.act-reset-hint {
  font-size: 11px;
  color: var(--text-dim);
}

/* 宝箱进度轨道 */
.chest-track-container {
  position: relative;
  padding: 10px 20px 20px;
}

.chest-track-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  position: relative;
  margin-bottom: 24px;
}

.chest-track-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.chest-milestones-row {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.chest-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.2s ease;
  user-select: none;
}

.chest-node:hover {
  transform: translateY(-2px);
}

.chest-icon {
  font-size: 28px;
  background: rgba(255, 255, 255, 0.05);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.chest-node.can-claim .chest-icon {
  border-color: #f59e0b;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
  animation: chestBounce 1s infinite alternate ease-in-out;
}

@keyframes chestBounce {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}

.chest-node.claimed .chest-icon {
  opacity: 0.4;
  border-color: rgba(255, 255, 255, 0.1);
  filter: grayscale(1);
}

.chest-req {
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
}

.chest-reward {
  font-size: 10px;
  color: #fbbf24;
  font-family: var(--font-mono);
}

/* 任务子 Tab */
.quest-subtabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.quest-subtab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.quest-subtab-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* 任务卡片列表 */
.quest-list-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quest-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: all 0.25s ease;
}

.quest-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.quest-card.is-ready {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.quest-card.is-claimed {
  opacity: 0.55;
}

.quest-info-left {
  flex: 1;
}

.quest-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.quest-title-text {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.quest-desc-text {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.quest-rewards-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.reward-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.reward-badge.badge-ticket {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.1);
}

.reward-badge.badge-exp {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
}

.reward-badge.badge-title {
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.3);
  background: rgba(244, 114, 182, 0.1);
}

.quest-action-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 100px;
}

.quest-progress-num {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.btn-quest-action {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-quest-action.btn-claim {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-quest-action.btn-claim:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-quest-action.btn-go {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-quest-action.btn-go:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn-quest-action.btn-done {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: default;
}

/* ============================================================
   3D 铝箔密封卡包与物理撕开动效 (Booster Pack & Tearing Mechanics)
   ============================================================ */

.pack-stage-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 120;
  gap: 24px;
  user-select: none;
}

.booster-pack-wrapper {
  perspective: 1200px;
}

/* 3D 铝箔密封卡包主体 */
.booster-pack {
  width: 310px;
  height: 480px;
  position: relative;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 30% 20%, #2a3a5e 0%, #0c1424 75%, #050810 100%);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-style: preserve-3d;
}

.booster-pack:hover {
  transform: translateY(-4px) scale(1.02);
}

/* 铝箔锯齿压纹边 (Crimped Foil Edges) */
.pack-crimp-edge {
  height: 18px;
  width: 100%;
  background: repeating-linear-gradient(
    90deg,
    #1e293b 0px,
    #475569 2px,
    #334155 4px,
    #0f172a 6px
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.pack-crimp-edge.bottom-crimp {
  border-bottom: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* 卡包顶部撕裂封条部件 */
.pack-top-part {
  display: flex;
  flex-direction: column;
  transition: all 0.55s cubic-bezier(0.18, 0.89, 0.32, 1.25);
  transform-origin: top right;
  z-index: 10;
  position: relative;
}

.pack-tear-strip {
  height: 38px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-top: 1px dashed rgba(245, 158, 11, 0.5);
  border-bottom: 1px dashed rgba(245, 158, 11, 0.5);
  display: flex;
  align-items: center;
  position: relative;
  cursor: grab;
  padding: 0 10px;
  overflow: hidden;
}

.pack-tear-strip:active {
  cursor: grabbing;
}

.tear-cutter {
  font-size: 16px;
  position: absolute;
  left: 8px;
  z-index: 5;
  transition: transform 0.1s ease;
  filter: drop-shadow(0 0 6px #f59e0b);
}

.tear-dashed-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
}

.tear-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.4), rgba(239, 68, 68, 0.6));
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.8);
  transition: width 0.05s linear;
}

.tear-hint-text {
  width: 100%;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 1px;
  pointer-events: none;
  z-index: 4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* 卡包主体封面 */
.pack-body-part {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  padding: 20px 16px;
}

.pack-cover-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  filter: saturate(1.25) contrast(1.12);
  z-index: 1;
}

.pack-metallic-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.28) 0%,
    transparent 35%,
    rgba(255, 215, 0, 0.18) 50%,
    transparent 65%,
    rgba(255, 255, 255, 0.12) 100%
  );
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 3;
}

.pack-content-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  justify-content: space-between;
  z-index: 4;
  position: relative;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

.pack-brand-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: #94a3b8;
}

.pack-emblem-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, rgba(15, 23, 42, 0.8) 80%);
  border: 2px solid #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
  margin: 10px 0;
}

.pack-emblem-icon {
  font-size: 38px;
}

.pack-main-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #fef08a, #f59e0b, #d97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.pack-series-name {
  font-size: 12px;
  color: #cbd5e1;
  margin-top: 4px;
}

.pack-spec-pill {
  font-size: 11px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde047;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-top: 14px;
}

.pack-barcode-line {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.25);
}

/* 内部喷涌出的耀眼圣光 (Light Eruption Beam) */
.pack-burst-beam {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%) scale(0.2);
  width: 280px;
  height: 380px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  z-index: 15;
  transition: all 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.25);
}

.pack-burst-beam.beam-gold {
  background: radial-gradient(ellipse at 50% 0%, #fef08a 0%, #f59e0b 45%, transparent 75%);
  box-shadow: 0 -20px 80px #f59e0b;
}

.pack-burst-beam.beam-purple {
  background: radial-gradient(ellipse at 50% 0%, #f5d0fe 0%, #a855f7 45%, transparent 75%);
  box-shadow: 0 -20px 80px #a855f7;
}

.pack-burst-beam.beam-blue {
  background: radial-gradient(ellipse at 50% 0%, #bae6fd 0%, #0284c7 45%, transparent 75%);
  box-shadow: 0 -20px 80px #0284c7;
}

/* 卡包撕开状态 (Is Torn State) */
.booster-pack.is-torn .pack-top-part {
  transform: translateY(-90px) rotate(-18deg) scale(0.92);
  opacity: 0;
  filter: blur(2px);
  pointer-events: none;
}

.booster-pack.is-torn .pack-burst-beam {
  opacity: 1;
  transform: translateX(-50%) scale(1.6);
}

.booster-pack.is-torn {
  transform: scale(1.04);
}

/* 快速开包与取消辅助按钮 */
.pack-quick-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn-quick-tear {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-quick-tear:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fbbf24;
}

.btn-cancel-pack {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel-pack:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(248, 113, 113, 0.6);
  color: #fecaca;
}

.pack-cancel-hint {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================================
   3D 多主题卡包 Coverflow 环绕展架 (3D Pack Carousel Styles)
   ============================================================ */

.carousel-stage-header {
  text-align: center;
  margin-bottom: 20px;
}

.carousel-main-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #38bdf8, #818cf8, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.carousel-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* 3D 轮播主舞台 */
.pack-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 960px;
  height: 420px;
  margin: 0 auto 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  perspective: 1200px;
  overflow: visible;
  user-select: none;
  cursor: grab;
  touch-action: pan-y;
}

.pack-carousel-wrapper.is-dragging {
  cursor: grabbing !important;
}

.carousel-nav-btn {
  display: none !important;
}

.pack-carousel-viewport {
  width: 100%;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transform-style: preserve-3d;
}

.pack-carousel-track {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* 底部交互控制与分页胶囊 Dock */
.carousel-control-dock {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  z-index: 30;
}

.carousel-indicator-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 92%;
  flex-wrap: wrap;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.carousel-dot:hover {
  background: #38bdf8;
  transform: scale(1.3);
}

.carousel-dot.active {
  width: 22px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.carousel-gesture-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #94a3b8;
  letter-spacing: 0.5px;
  background: rgba(15, 23, 42, 0.6);
  padding: 3px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hint-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: hintDotPulse 2s infinite ease-in-out;
}

@keyframes hintDotPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); box-shadow: 0 0 12px #38bdf8; }
}

/* 展架上的单个 3D 卡包外形 */
.carousel-pack-item {
  position: absolute;
  width: 220px;
  height: 340px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 0.45s ease,
              filter 0.45s ease,
              box-shadow 0.45s ease;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

/* 展品底部镜面投影与地光 */
.carousel-pack-item::after {
  content: "";
  position: absolute;
  bottom: -25px;
  left: 10%;
  width: 80%;
  height: 20px;
  background: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0.8) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(4px);
}

/* 卡包各主题专属涂装 (适用于展架展品与物理撕开卡包) */
.carousel-pack-item.pack-theme-all,
.booster-pack.pack-theme-all {
  background: radial-gradient(circle at 30% 20%, #2e1065 0%, #0f172a 75%, #020617 100%);
  border-color: rgba(236, 72, 153, 0.4);
}

.carousel-pack-item.pack-theme-cs,
.booster-pack.pack-theme-cs {
  background: radial-gradient(circle at 30% 20%, #083344 0%, #042f2e 60%, #020b0d 100%);
  border-color: rgba(6, 182, 212, 0.5);
}

.carousel-pack-item.pack-theme-history,
.booster-pack.pack-theme-history {
  background: radial-gradient(circle at 30% 20%, #451a03 0%, #291204 60%, #0c0501 100%);
  border-color: rgba(245, 158, 11, 0.5);
}

.carousel-pack-item.pack-theme-science,
.booster-pack.pack-theme-science {
  background: radial-gradient(circle at 30% 20%, #1e1b4b 0%, #0f172a 60%, #030712 100%);
  border-color: rgba(99, 102, 241, 0.5);
}

.carousel-pack-item.pack-theme-philosophy,
.booster-pack.pack-theme-philosophy {
  background: radial-gradient(circle at 30% 20%, #3b0764 0%, #1f052b 60%, #09010d 100%);
  border-color: rgba(219, 39, 119, 0.5);
}

/* 卡包内容细节排版 */
.cp-crimp {
  height: 14px;
  width: 100%;
  background: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.05) 0px,
    rgba(255,255,255,0.2) 2px,
    rgba(0,0,0,0.3) 4px,
    rgba(255,255,255,0.05) 6px
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cp-crimp.bottom {
  border-bottom: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cp-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cp-cover-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
  filter: saturate(1.2) contrast(1.1);
  transition: transform 0.4s ease, opacity 0.4s ease;
  z-index: 1;
}

.carousel-pack-item:hover .cp-cover-art,
.carousel-pack-item.pos-center .cp-cover-art {
  opacity: 0.85;
  transform: scale(1.05);
}

.cp-metallic {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.22) 0%, transparent 40%, rgba(255,255,255,0.1) 60%, transparent 100%);
  pointer-events: none;
  z-index: 3;
}

.cp-brand, .cp-emblem, .cp-title, .cp-subtitle, .cp-tag, .cp-wish-badge {
  position: relative;
  z-index: 4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 12px rgba(0, 0, 0, 0.8);
}

.cp-brand {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 2px;
  color: #94a3b8;
}

.cp-emblem {
  font-size: 36px;
  margin: 6px 0;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.cp-title {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #fff;
}

.cp-subtitle {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 2px;
}

.cp-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fbbf24;
  margin-top: 8px;
}

.cp-wish-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  font-weight: 700;
  background: #f59e0b;
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 0 0 8px #f59e0b;
}

/* 3D Coverflow 5 个位置的景深透视状态 */
@keyframes packFloatingMotion {
  0% { transform: translateY(0px) rotateZ(0deg); }
  50% { transform: translateY(-7px) rotateZ(0.6deg); }
  100% { transform: translateY(0px) rotateZ(0deg); }
}

.carousel-pack-item.pos-center {
  transform: translate3d(0, 0, 80px) rotateY(0deg) scale(1.08);
  z-index: 20;
  opacity: 1;
  filter: brightness(1.1);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(56, 189, 248, 0.4);
}

.carousel-pack-item.pos-center.is-tilting {
  transition: box-shadow 0.2s ease, filter 0.2s ease !important;
}

.carousel-pack-item.pos-center .cp-body {
  animation: packFloatingMotion 4.2s ease-in-out infinite;
}

.carousel-pack-item.pos-left {
  transform: translate3d(-200px, 0, -40px) rotateY(26deg) scale(0.88);
  z-index: 10;
  opacity: 0.72;
  filter: brightness(0.85);
}

.carousel-pack-item.pos-left:hover {
  transform: translate3d(-180px, -6px, -15px) rotateY(16deg) scale(0.92) !important;
  opacity: 0.95 !important;
  filter: brightness(1.15) saturate(1.1) !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(56, 189, 248, 0.4) !important;
}

.carousel-pack-item.pos-far-left {
  transform: translate3d(-360px, 0, -120px) rotateY(38deg) scale(0.72);
  z-index: 5;
  opacity: 0.35;
  filter: brightness(0.65);
}

.carousel-pack-item.pos-far-left:hover {
  transform: translate3d(-340px, -4px, -90px) rotateY(26deg) scale(0.78) !important;
  opacity: 0.65 !important;
  filter: brightness(0.95) !important;
}

.carousel-pack-item.pos-right {
  transform: translate3d(200px, 0, -40px) rotateY(-26deg) scale(0.88);
  z-index: 10;
  opacity: 0.72;
  filter: brightness(0.85);
}

.carousel-pack-item.pos-right:hover {
  transform: translate3d(180px, -6px, -15px) rotateY(-16deg) scale(0.92) !important;
  opacity: 0.95 !important;
  filter: brightness(1.15) saturate(1.1) !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(56, 189, 248, 0.4) !important;
}

.carousel-pack-item.pos-far-right {
  transform: translate3d(360px, 0, -120px) rotateY(-38deg) scale(0.72);
  z-index: 5;
  opacity: 0.35;
  filter: brightness(0.65);
}

.carousel-pack-item.pos-far-right:hover {
  transform: translate3d(340px, -4px, -90px) rotateY(-26deg) scale(0.78) !important;
  opacity: 0.65 !important;
  filter: brightness(0.95) !important;
}

.carousel-pack-item.pos-hidden {
  transform: translate3d(0, 0, -200px) scale(0.5);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

/* 当前选中卡包的元信息面板 */
.active-pack-panel {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.pack-meta-header {
  text-align: center;
  margin-bottom: 16px;
}

.pack-name-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.pack-name-row h2 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.pack-up-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid #f59e0b;
  color: #fbbf24;
}

.pack-desc-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* 系列收集进度条 */
.pack-series-progress {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.series-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.series-progress-label b {
  color: #38bdf8;
}

.series-pct {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fbbf24;
}

.series-track-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.series-track-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* 响应式调整 */
@media (max-width: 640px) {
  .pack-carousel-wrapper {
    height: 340px;
  }
  .carousel-pack-item {
    width: 170px;
    height: 270px;
  }
  .carousel-pack-item.pos-left {
    transform: translate3d(-120px, 0, -30px) rotateY(20deg) scale(0.85);
  }
  .carousel-pack-item.pos-right {
    transform: translate3d(120px, 0, -30px) rotateY(-20deg) scale(0.85);
  }
  .carousel-pack-item.pos-far-left,
  .carousel-pack-item.pos-far-right {
    display: none;
  }
}

/* ============================================================
   每日学者知识补给站与全服福利弹窗 (Supply Modal)
   ============================================================ */
.supply-modal-content {
  background: radial-gradient(circle at 50% 25%, #162241 0%, #0b1122 65%, #070b16 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 22px;
  max-width: 580px;
  width: 100%;
  max-height: 88vh;
  padding: 22px 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.78);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

.supply-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
}

.supply-modal-header h2 {
  font-size: 19px;
  font-weight: 800;
  color: #fde047;
  margin-bottom: 6px;
}

.supply-modal-header p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.supply-cap-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 14px;
  padding: 12px 14px;
  flex-shrink: 0;
}

.supply-cap-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-main);
  margin-bottom: 8px;
}

.supply-cap-num {
  font-family: var(--font-mono);
  color: #38bdf8;
}

.supply-cap-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.supply-cap-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #f59e0b);
  transition: width 0.3s ease;
}

.supply-cap-fill.is-full {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.supply-cap-tip {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-dim);
}

.supply-cap-tip.is-full {
  color: #fca5a5;
}

.supply-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.supply-grants-section {
  min-height: 0;
  flex: 1 1 auto;
}

.supply-section-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.supply-daily-card,
.supply-grant-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.supply-daily-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.supply-weekend-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fde047;
}

.supply-daily-amount {
  font-size: 12.5px;
  color: var(--text-muted);
}

.supply-daily-amount b {
  color: #38bdf8;
}

.btn-supply-claim {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.btn-supply-claim:hover:not(:disabled) {
  filter: brightness(1.1);
}

.btn-supply-claim:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  cursor: not-allowed;
}

.supply-grants-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 220px;
}

.supply-grants-empty {
  padding: 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-dim);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.supply-grant-reason {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.supply-grant-rewards {
  font-size: 12px;
  color: #7dd3fc;
  font-weight: 600;
}

/* 全量万级图鉴检索栏与分页器 */
.gallery-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.gallery-search-input {
  flex: 1 1 240px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gallery-search-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.gallery-select {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

.gallery-owned-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-pagination {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.gallery-page-info {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* 图形点选行为验证码弹窗 */
.captcha-modal-card {
  max-width: 360px !important;
  padding: 20px !important;
}

.captcha-prompt-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #fde68a;
  font-weight: 600;
}

.captcha-refresh-btn {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.captcha-canvas-wrap {
  position: relative;
  width: 300px;
  height: 160px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid rgba(251, 191, 36, 0.45);
  cursor: crosshair;
  user-select: none;
  background: #070d1f;
}

.captcha-canvas-wrap img {
  width: 300px;
  height: 160px;
  display: block;
}

#captcha-pins-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.captcha-dot-pin {
  position: absolute;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  margin-top: -11px;
  border-radius: 50%;
  background: #fbbf24;
  color: #0b1120;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  border: 2px solid #fff;
}

.captcha-footer-hint {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}
