/* ===== 基础变量 ===== */
:root {
  --bg: #0c0e14;
  --bg2: #151820;
  --bg3: #1e2230;
  --ink: #e8e4dc;
  --muted: #7a8090;
  --rule: #2a3040;
  --accent: #c9a84c;
  --accent-dim: #a08430;
  --accent2: #5eb3a2;
  --danger: #c45c5c;
  --success: #6bb36b;
  --shadow: rgba(0,0,0,0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== 屏幕切换 ===== */
.screen {
  display: none;
  min-height: 100vh;
  animation: fadeIn 0.4s ease;
}
.screen.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 加载画面 ===== */
#loading-screen {
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1a1f2e 0%, var(--bg) 70%);
}
.loading-content { text-align: center; }
.game-title {
  font-size: 2.8rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-shadow: 0 0 30px rgba(201,168,76,0.3);
  margin-bottom: 0.5rem;
}
.loading-text {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.loading-bar {
  width: 200px;
  height: 3px;
  background: var(--bg3);
  border-radius: 3px;
  margin: 0 auto;
  overflow: hidden;
}
.loading-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  animation: loadProgress 2s ease forwards;
}
@keyframes loadProgress {
  to { width: 100%; }
}

/* ===== 登录/注册 ===== */
#auth-screen {
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: radial-gradient(ellipse at top, #1a2030 0%, var(--bg) 60%);
}
.auth-container {
  width: 100%;
  max-width: 420px;
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 2rem;
}
.auth-container .game-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.3rem;
}
.game-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.auth-tab {
  flex: 1;
  padding: 0.75rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.auth-form { display: none; }
.auth-form.active { display: block; }

.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.form-group input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--bg3);
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus {
  border-color: var(--accent);
}
.form-group input::placeholder {
  color: #4a5060;
}

/* 灵根选择器 */
.spirit-root-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}
.root-btn {
  background: var(--bg3);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0.6rem 0.3rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.root-btn:hover {
  border-color: var(--accent-dim);
  color: var(--ink);
}
.root-btn.selected {
  border-color: var(--accent);
  background: rgba(201,168,76,0.1);
  color: var(--accent);
}
.root-icon { font-size: 1.3rem; }
.root-name { font-size: 0.75rem; font-weight: 600; }
.root-desc { font-size: 0.6rem; display: none; }

/* ===== 按钮 ===== */
.btn {
  width: 100%;
  padding: 0.8rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  color: #1a1508;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(201,168,76,0.3);
}
.btn-cultivate {
  background: linear-gradient(135deg, #2a5a50, var(--accent2));
  color: #fff;
  padding: 1.2rem;
  flex-direction: column;
  gap: 0.3rem;
}
.btn-cultivate:hover {
  transform: scale(1.02);
  box-shadow: 0 0 30px rgba(94,179,162,0.3);
}
.btn-cultivate:active {
  transform: scale(0.98);
}
.btn-levelup {
  background: linear-gradient(135deg, #5a4a20, var(--accent));
  color: #1a1508;
}
.btn-breakthrough {
  background: linear-gradient(135deg, #5a2020, var(--danger));
  color: #fff;
  animation: pulseGlow 2s infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(196,92,92,0.3); }
  50% { box-shadow: 0 0 25px rgba(196,92,92,0.5); }
}
.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg3);
  border: 1px solid var(--rule);
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.3rem;
}
.btn-close:hover { color: var(--ink); }

/* ===== 游戏主界面 ===== */
#game-screen {
  flex-direction: column;
  max-width: 600px;
  margin: 0 auto;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  background: var(--bg2);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 10;
}
.player-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.player-name {
  font-weight: 700;
  color: var(--ink);
}
.player-realm {
  font-size: 0.75rem;
  color: var(--accent);
}
.header-actions {
  display: flex;
  gap: 0.5rem;
}

.game-main {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
}

/* ===== 面板 ===== */
.panel {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.2rem;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.panel-header h2 {
  font-size: 1.05rem;
  color: var(--accent);
}

/* 修炼面板 */
.cultivation-panel {
  text-align: center;
}
.cultivation-rate {
  font-size: 0.8rem;
  color: var(--accent2);
  font-family: monospace;
}

.realm-display {
  margin: 1rem 0;
}
.realm-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, rgba(201,168,76,0.15), rgba(201,168,76,0.05));
  border: 1px solid var(--accent-dim);
  border-radius: 12px;
}
.realm-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}
.realm-level {
  font-size: 0.85rem;
  color: var(--muted);
}

.cultivation-bar-container {
  margin: 1rem 0;
}
.cultivation-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.progress-bar {
  height: 10px;
  background: var(--bg3);
  border-radius: 5px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  border-radius: 5px;
  transition: width 0.5s ease;
}

.cultivation-actions {
  margin-top: 1rem;
}
.btn-icon-big { font-size: 1.8rem; }
.btn-text { font-size: 1.1rem; font-weight: 700; }
.btn-hint { font-size: 0.75rem; opacity: 0.7; }

.breakthrough-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}
.breakthrough-actions .btn {
  flex: 1;
}
.breakthrough-actions .hint {
  display: block;
  font-size: 0.7rem;
  opacity: 0.8;
  margin-top: 0.2rem;
}

/* 信息面板 */
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.info-item {
  background: var(--bg3);
  border-radius: 8px;
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.info-label {
  font-size: 0.75rem;
  color: var(--muted);
}
.info-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

/* 日志面板 */
.log-panel {
  flex: 1;
  min-height: 150px;
  display: flex;
  flex-direction: column;
}
.log-list {
  flex: 1;
  overflow-y: auto;
  max-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.log-entry {
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  background: var(--bg3);
  border-left: 3px solid var(--rule);
}
.log-entry.system {
  border-left-color: var(--accent2);
  color: var(--accent2);
}
.log-entry.gain {
  border-left-color: var(--accent);
  color: var(--ink);
}
.log-entry.breakthrough-success {
  border-left-color: var(--success);
  color: var(--success);
  background: rgba(107,179,107,0.1);
}
.log-entry.breakthrough-fail {
  border-left-color: var(--danger);
  color: var(--danger);
  background: rgba(196,92,92,0.1);
}

/* ===== 排行榜覆盖层 ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}
.overlay-content {
  width: 100%;
  max-width: 450px;
  max-height: 80vh;
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--rule);
}
.overlay-header h2 {
  font-size: 1.1rem;
  color: var(--accent);
}
.leaderboard-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}
.lb-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  margin-bottom: 0.3rem;
}
.lb-item:nth-child(1) { background: rgba(201,168,76,0.15); }
.lb-item:nth-child(2) { background: rgba(160,160,160,0.1); }
.lb-item:nth-child(3) { background: rgba(180,140,100,0.1); }
.lb-rank {
  width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
}
.lb-item:nth-child(1) .lb-rank { color: var(--accent); font-size: 1.1rem; }
.lb-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.lb-name {
  font-weight: 600;
  font-size: 0.9rem;
}
.lb-meta {
  font-size: 0.75rem;
  color: var(--muted);
}
.lb-score {
  text-align: right;
  font-family: monospace;
  color: var(--accent);
  font-weight: 700;
}

/* ===== Toast 提示 ===== */
#toast-container {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.8rem 1.2rem;
  color: var(--ink);
  font-size: 0.9rem;
  box-shadow: 0 4px 20px var(--shadow);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  pointer-events: auto;
}
.toast.success { border-color: var(--success); color: var(--success); }
.toast.error { border-color: var(--danger); color: var(--danger); }
.toast.info { border-color: var(--accent2); color: var(--accent2); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(-10px); }
}

/* ===== 底部导航 ===== */
.bottom-nav {
  display: flex;
  background: var(--bg2);
  border-top: 1px solid var(--rule);
  padding: 0.5rem 0;
  position: sticky;
  bottom: 0;
  z-index: 10;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.5rem 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.nav-item:hover { color: var(--ink); }
.nav-item.active { color: var(--accent); }
.nav-icon { font-size: 1.2rem; }

/* Tab 面板切换 */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== 神识显示 ===== */
.soul-power-display {
  font-size: 0.85rem;
  color: #7d8cc9;
  font-family: monospace;
}
.explore-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
  text-align: center;
}

/* ===== 探索面板 ===== */
.map-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.map-card {
  background: var(--bg3);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.map-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  border-radius: 3px 0 0 3px;
}
.map-card.danger-1::before { background: var(--success); }
.map-card.danger-2::before { background: var(--accent); }
.map-card.danger-3::before { background: var(--danger); }
.map-card:hover { border-color: var(--accent-dim); transform: translateX(4px); }
.map-card.locked {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.5);
}
.map-card.locked:hover { transform: none; border-color: var(--rule); }
.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}
.map-name { font-weight: 700; font-size: 1rem; color: var(--ink); }
.map-cost { font-size: 0.8rem; color: #7d8cc9; font-family: monospace; }
.map-desc { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }
.map-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.map-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--rule);
}
.map-tag.lock { color: var(--danger); border-color: var(--danger); }

/* ===== 背包面板 ===== */
.inventory-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.inv-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  background: var(--bg3);
  border-radius: 8px;
}
.inv-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: var(--bg);
  border: 1px solid var(--rule);
}
.inv-info { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; }
.inv-name { font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.inv-meta { font-size: 0.75rem; color: var(--muted); }
.inv-qty {
  font-family: monospace;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
}

.quality-1 { border-color: #888; }
.quality-2 { border-color: var(--accent2); }
.quality-3 { border-color: #7d8cc9; }
.quality-4 { border-color: var(--accent); }
.quality-5 { border-color: var(--danger); }

/* ===== 功法面板 ===== */
.skill-slots {
  font-size: 0.8rem;
  color: var(--muted);
}
.skills-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.skill-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem;
  background: var(--bg3);
  border-radius: 10px;
  border: 1px solid var(--rule);
  transition: all 0.2s;
  cursor: pointer;
}
.skill-item:hover { border-color: var(--accent-dim); }
.skill-item.equipped {
  border-color: var(--accent);
  background: rgba(201,168,76,0.08);
}
.skill-grade {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  white-space: nowrap;
}
.grade-黄 { background: #554400; color: #f5d76e; }
.grade-玄 { background: #1a3a5a; color: #5eb8ff; }
.grade-地 { background: #3a1a4a; color: #c77dff; }
.grade-天 { background: #5a1a1a; color: #ff6b6b; }
.skill-info { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; }
.skill-name { font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.skill-type { font-size: 0.7rem; color: var(--muted); }
.skill-desc { font-size: 0.8rem; color: var(--muted); }
.skill-status {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.skill-status.equipped { background: rgba(201,168,76,0.2); color: var(--accent); }
.skill-status.unequipped { background: var(--bg); color: var(--muted); border: 1px solid var(--rule); }

/* ===== 子Tab切换 ===== */
.sub-tabs, .duel-sub-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}
.sub-tab {
  flex: 1;
  padding: 0.75rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.sub-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.sub-panel { display: none; }
.sub-panel.active { display: block; }

/* ===== 装备栏 ===== */
.equipment-bar {
  display: flex;
  gap: 0.75rem;
  margin: 1rem 0;
}
.eq-slot {
  flex: 1;
  padding: 0.8rem;
  background: var(--bg3);
  border: 1px solid var(--rule);
  border-radius: 10px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  transition: all 0.2s;
}
.eq-slot span {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink);
  font-weight: 600;
}

/* ===== 探索内背包 ===== */
.inventory-sub {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
.inventory-sub h4 {
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.inv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
.inv-grid-item {
  aspect-ratio: 1;
  background: var(--bg3);
  border: 1px solid var(--rule);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}
.inv-grid-item:hover {
  border-color: var(--accent-dim);
  background: rgba(201,168,76,0.08);
}

/* ===== 炼丹面板 ===== */
.recipe-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.recipe-card {
  background: var(--bg3);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.recipe-name {
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
}
.recipe-materials {
  font-size: 0.8rem;
  color: var(--muted);
}
.recipe-effect {
  font-size: 0.85rem;
  color: var(--accent2);
}
.alchemy-result, .forge-result, .duel-result {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg3);
  border: 1px solid var(--rule);
  border-radius: 10px;
  text-align: center;
  animation: fadeIn 0.4s ease;
}
.forge-options {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.forge-type-btn {
  flex: 1;
  padding: 1rem;
  background: var(--bg3);
  border: 1px solid var(--rule);
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}
.forge-type-btn:hover {
  border-color: var(--accent-dim);
  background: rgba(201,168,76,0.08);
}

/* ===== 宗门面板 ===== */
.sect-create {
  background: var(--bg3);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.sect-create h4 {
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.sect-create input,
.sect-create select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.95rem;
  outline: none;
}
.sect-create input:focus,
.sect-create select:focus {
  border-color: var(--accent);
}
.sect-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.sect-card {
  background: var(--bg3);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.sect-card-name {
  font-weight: 700;
  color: var(--ink);
  font-size: 1rem;
}
.sect-card-faction {
  font-size: 0.8rem;
  color: var(--muted);
}
.sect-my {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.sect-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1rem;
}
.sect-header h3 {
  color: var(--accent);
  font-size: 1.2rem;
}
.sect-members {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sect-member-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  background: var(--bg3);
  border-radius: 8px;
  border: 1px solid var(--rule);
}

/* ===== 论道面板 ===== */
.duel-targets {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.duel-target-card {
  background: var(--bg3);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.duel-target-card:hover {
  border-color: var(--accent-dim);
  transform: translateX(4px);
}
.duel-target-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.duel-target-name {
  font-weight: 700;
  color: var(--ink);
}
.duel-target-meta {
  font-size: 0.8rem;
  color: var(--muted);
}
.duel-rank-list, .duel-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ===== 赛季横幅 ===== */
.season-banner {
  background: linear-gradient(90deg, rgba(201,168,76,0.2), rgba(201,168,76,0.05));
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.season-name { color: var(--accent); font-weight: 600; font-size: 0.85rem; }
.season-timer { color: var(--muted); font-size: 0.75rem; }

/* ===== 轮回/飞升按钮区域 ===== */
.endgame-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}
.endgame-actions .btn { flex: 1; }

.btn-reincarnate {
  background: linear-gradient(135deg, #3a2060, #6b4c9a);
  color: #fff;
}
.btn-reincarnate:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(107,76,154,0.4);
}
.btn-ascend {
  background: linear-gradient(135deg, #205a5a, var(--accent2));
  color: #fff;
}
.btn-ascend:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(94,179,162,0.4);
}

/* ===== 轮回覆盖层 ===== */
.overlay-content.wide { max-width: 600px; }

.reincarnation-body {
  padding: 1rem 1.2rem;
  overflow-y: auto;
}
.reincarnation-info p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.reincarnation-stats {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  padding: 0.75rem;
  background: var(--bg3);
  border-radius: 8px;
  font-size: 0.85rem;
}
.reincarnation-stats div {
  flex: 1;
  text-align: center;
  color: var(--ink);
}
.reincarnation-stats span {
  color: var(--accent);
  font-weight: 700;
}

/* ===== 天赋树 ===== */
.talent-tree {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}
.talent-branch {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.talent-branch-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.talent-node {
  padding: 0.6rem;
  background: var(--bg3);
  border: 1px solid var(--rule);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.talent-node:hover { border-color: var(--accent); }
.talent-node.unlocked { border-color: var(--success); background: rgba(107,179,107,0.1); }
.talent-node.locked { opacity: 0.5; cursor: not-allowed; }
.talent-node-name { font-size: 0.8rem; font-weight: 600; }
.talent-node-desc { font-size: 0.7rem; color: var(--muted); }
.talent-node-cost { font-size: 0.7rem; color: var(--accent); }

/* ===== 仙界覆盖层 ===== */
.celestial-body {
  padding: 1rem 1.2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.celestial-realm {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent2);
}
.celestial-cultivation-bar {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.celestial-cultivation-bar span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ===== 赛季覆盖层 ===== */
.season-body {
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.season-info h3 {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}
.season-info p {
  color: var(--muted);
  font-size: 0.85rem;
}
.season-scores {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.season-score-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  background: var(--bg3);
  border-radius: 8px;
  font-size: 0.9rem;
}
.season-score-item span:first-child { color: var(--muted); }
.season-score-item span:last-child {
  color: var(--accent);
  font-weight: 700;
  font-family: monospace;
}
.season-score-item.total {
  background: rgba(201,168,76,0.1);
  border: 1px solid var(--accent-dim);
}
.season-score-item.total span:last-child { color: var(--accent); font-size: 1rem; }
.season-rank {
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink);
  padding: 0.5rem;
}
.season-rank span { color: var(--accent); font-weight: 700; }

/* ===== 响应式 ===== */
@media (max-width: 480px) {
  .game-title { font-size: 2rem; }
  .auth-container { padding: 1.5rem; }
  .root-desc { display: none; }
  .spirit-root-selector { gap: 0.3rem; }
  .root-btn { padding: 0.4rem 0.2rem; }
  .info-grid { grid-template-columns: 1fr; }
  .inv-grid { grid-template-columns: repeat(3, 1fr); }
  .equipment-bar { gap: 0.5rem; }
  .eq-slot { padding: 0.6rem; font-size: 0.8rem; }
  .sub-tab { font-size: 0.85rem; padding: 0.6rem; }
}
