﻿/* ============================================================
   平行纪元 (Paraverse Era) — 全局样式
   深色太空/星云主题 · 紫蓝渐变 · 玻璃质感
   ============================================================ */

:root {
  --bg-primary: #050510;
  --bg-secondary: #0a0a1e;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-input: rgba(255, 255, 255, 0.06);
  --gradient-primary: linear-gradient(135deg, #7c3aed, #3b82f6);
  --gradient-glow: linear-gradient(135deg, rgba(124, 58, 237, 0.5), rgba(59, 130, 246, 0.5));
  --gradient-btn: linear-gradient(135deg, #7c3aed, #6366f1);
  --gradient-amber: linear-gradient(135deg, #f59e0b, #eab308);
  --gradient-rose: linear-gradient(135deg, #ec4899, #7c3aed);
  --color-accent: #a78bfa;
  --color-accent2: #60a5fa;
  --color-accent3: #fbbf24;
  --color-text: #f1f5f9;
  --color-text-dim: #94a3b8;
  --color-text-muted: #475569;
  --color-success: #22c55e;
  --color-warning: #eab308;
  --color-danger: #ef4444;
  --border-color: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(167, 139, 250, 0.3);
  --border-glow-lg: rgba(167, 139, 250, 0.5);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(167, 139, 250, 0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "Georgia", "Noto Serif SC", serif;
  --transition-normal: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  --max-width: 480px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  background: #050510;
  min-height: 100vh;
}

/* ---- Cinematic Animated Background ---- */
.nebula-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.nebula-bg::before {
  content: '';
  position: absolute;
  top: -30%; left: -20%;
  width: 80%; height: 80%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, transparent 60%);
  animation: nebulaDrift1 25s ease-in-out infinite alternate;
}
.nebula-bg::after {
  content: '';
  position: absolute;
  bottom: -30%; right: -20%;
  width: 70%; height: 70%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
  animation: nebulaDrift2 30s ease-in-out infinite alternate-reverse;
}
.nebula-bg .nebula-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 120%; height: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at 30% 40%, rgba(167, 139, 250, 0.04) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 60%, rgba(96, 165, 250, 0.03) 0%, transparent 50%);
  animation: nebulaPulse 15s ease-in-out infinite alternate;
}

@keyframes nebulaDrift1 {
  0% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  100% { transform: translate(8%, 6%) scale(1.15); opacity: 1; }
}
@keyframes nebulaDrift2 {
  0% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  100% { transform: translate(-6%, 8%) scale(1.2); opacity: 0.9; }
}
@keyframes nebulaPulse {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* CSS-only floating particles */
.nebula-stars {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,.6) 50%, transparent 50%),
    radial-gradient(1px 1px at 25% 8%, rgba(255,255,255,.4) 50%, transparent 50%),
    radial-gradient(1px 1px at 40% 22%, rgba(255,255,255,.5) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 55% 12%, rgba(255,255,255,.7) 50%, transparent 50%),
    radial-gradient(1px 1px at 70% 18%, rgba(255,255,255,.3) 50%, transparent 50%),
    radial-gradient(1px 1px at 85% 25%, rgba(255,255,255,.5) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 15% 35%, rgba(255,255,255,.4) 50%, transparent 50%),
    radial-gradient(1px 1px at 35% 42%, rgba(255,255,255,.6) 50%, transparent 50%),
    radial-gradient(1px 1px at 60% 38%, rgba(255,255,255,.3) 50%, transparent 50%),
    radial-gradient(1px 1px at 78% 45%, rgba(255,255,255,.5) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 8% 55%, rgba(255,255,255,.6) 50%, transparent 50%),
    radial-gradient(1px 1px at 45% 52%, rgba(255,255,255,.4) 50%, transparent 50%),
    radial-gradient(1px 1px at 68% 58%, rgba(255,255,255,.7) 50%, transparent 50%),
    radial-gradient(1px 1px at 90% 62%, rgba(255,255,255,.3) 50%, transparent 50%),
    radial-gradient(1px 1px at 20% 68%, rgba(255,255,255,.5) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 52% 72%, rgba(255,255,255,.4) 50%, transparent 50%),
    radial-gradient(1px 1px at 75% 78%, rgba(255,255,255,.6) 50%, transparent 50%),
    radial-gradient(1px 1px at 30% 85%, rgba(255,255,255,.3) 50%, transparent 50%),
    radial-gradient(1px 1px at 62% 88%, rgba(255,255,255,.5) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 88% 92%, rgba(255,255,255,.4) 50%, transparent 50%);
  animation: starTwinkle 6s ease-in-out infinite alternate;
}
@keyframes starTwinkle {
  0% { opacity: .4; }
  50% { opacity: .8; }
  100% { opacity: .5; }
}

/* Animated floating orbs */
.nebula-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.nebula-orb.o1 {
  width: 200px; height: 200px;
  top: 5%; left: -10%;
  background: rgba(124, 58, 237, 0.08);
  animation: orbFloat1 20s ease-in-out infinite alternate;
}
.nebula-orb.o2 {
  width: 150px; height: 150px;
  bottom: 10%; right: -5%;
  background: rgba(96, 165, 250, 0.06);
  animation: orbFloat2 25s ease-in-out infinite alternate;
}
.nebula-orb.o3 {
  width: 120px; height: 120px;
  top: 40%; left: 50%;
  background: rgba(251, 191, 36, 0.04);
  animation: orbFloat3 18s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
  0% { transform: translate(0, 0); }
  100% { transform: translate(30%, 15%); }
}
@keyframes orbFloat2 {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-20%, -10%); }
}
@keyframes orbFloat3 {
  0% { transform: translate(-50%, -50%); }
  100% { transform: translate(-40%, -60%); }
}

/* App Container — cinematic full-height */
#app {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 玻璃卡片 — cinematic glass */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  padding: 20px;
  transition: all var(--transition-normal);
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-card), 0 0 40px rgba(167, 139, 250, 0.1);
}

/* 渐变按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.25);
  letter-spacing: 0.02em;
}
.btn-primary:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
}
.btn-primary:active {
  transform: translateY(0) scale(0.98);
}
.btn-primary:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-dim);
  padding: 8px 16px;
}
.btn-ghost:hover {
  color: var(--color-text);
  background: var(--bg-card);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
  animation: glowPulse 3s ease-in-out infinite;
}

/* 输入框 */
.input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 15px;
  font-family: var(--font-family);
  transition: all var(--transition-normal);
  outline: none;
}
.input::placeholder {
  color: var(--color-text-muted);
}
.input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--border-glow);
}

textarea.input {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.char-counter {
  text-align: right;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* 标题 — cinematic */
.title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(167, 139, 250, 0.3));
  letter-spacing: 0.04em;
}

.title-glow {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  text-shadow: 0 0 30px rgba(167, 139, 250, 0.4), 0 0 60px rgba(96, 165, 250, 0.2);
  letter-spacing: 0.06em;
}

.subtitle {
  font-size: 13px;
  color: var(--color-text-dim);
  text-align: center;
  margin-top: 6px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* 进度圆点 */
.progress-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 16px 0;
}
.progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--color-text-muted);
  background: transparent;
  transition: all var(--transition-normal);
  position: relative;
}
.progress-dot.active {
  border-color: var(--color-accent);
  background: var(--color-accent);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.6);
  animation: dotPulse 1.5s ease-in-out infinite;
}
.progress-dot.completed {
  border-color: var(--color-accent);
  background: var(--color-accent);
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.4);
}
.progress-dot.completed::after {
  content: '✓';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 8px;
  color: #fff;
  font-weight: bold;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(124, 58, 237, 0.4); }
  50% { box-shadow: 0 0 20px rgba(124, 58, 237, 0.8); }
}

/* 量表 */
.scale-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}
.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-text-dim);
  padding: 0 4px;
}
.scale-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  flex-shrink: 0;
}
.scale-dot:hover {
  border-color: var(--color-accent);
  background: rgba(124, 58, 237, 0.15);
  transform: scale(1.1);
}
.scale-dot.selected {
  border-color: var(--color-accent);
  background: var(--gradient-glow);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.5);
}

/* 选项卡片 */
.option-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 15px;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: left;
  width: 100%;
}
.option-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}
.option-btn.selected {
  border-color: var(--color-accent);
  background: rgba(124, 58, 237, 0.12);
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.2);
  transform: scale(1.01);
}
.option-btn .check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-normal);
}
.option-btn.selected .check-icon {
  background: var(--gradient-primary);
  border-color: transparent;
}
.option-btn.selected .check-icon::after {
  content: '✓';
  font-size: 12px;
  color: #fff;
  font-weight: bold;
}

/* Tab 导航 */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 4px;
  backdrop-filter: blur(12px);
}
.tab {
  flex: 1;
  padding: 10px 12px;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--color-text-dim);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
  position: relative;
}
.tab:hover {
  color: var(--color-text);
}
.tab.active {
  background: rgba(124, 58, 237, 0.2);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}
.tab .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--color-danger);
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

/* 消息气泡 */
.msg-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.msg-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.msg-bubble.system {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 4px;
}
.msg-bubble.user {
  align-self: flex-end;
  background: var(--gradient-glow);
  border-bottom-right-radius: 4px;
}
.msg-bubble .msg-sender {
  font-size: 12px;
  color: var(--color-accent2);
  margin-bottom: 4px;
  font-weight: 600;
}
.msg-bubble .msg-time {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 4px;
  text-align: right;
}

/* 底部输入栏 */
.input-bar {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  align-items: flex-end;
}
.input-bar .input {
  flex: 1;
}
.input-bar .energy-display {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-dim);
  white-space: nowrap;
}
.input-bar .energy-display .energy-val {
  color: var(--color-warning);
  font-weight: 600;
}

/* 体力条 */
.energy-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}
.energy-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}
.energy-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: width var(--transition-normal);
}
.energy-bar-text {
  font-size: 12px;
  color: var(--color-text-dim);
  white-space: nowrap;
}

/* 动画 */
.fade-in { animation: fadeIn 0.3s ease forwards; }
.fade-out { animation: fadeOut 0.3s ease forwards; }
.slide-up { animation: slideUp 0.3s ease forwards; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* 模态框 */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  animation: slideUp 0.3s ease;
}
.modal h3 { font-size: 20px; margin-bottom: 8px; }
.modal p { color: var(--color-text-dim); margin-bottom: 20px; font-size: 14px; }
.modal .btn-group { display: flex; gap: 8px; justify-content: center; }

/* 全屏粒子动画 */
.particle-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 200;
  pointer-events: none;
}
.particle {
  position: absolute;
  border-radius: 50%;
  animation: particleExplode 2s ease-out forwards;
}
@keyframes particleExplode {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0); }
}

/* 在线状态 */
.online-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  display: inline-block;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}
.offline-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-text-muted);
  display: inline-block;
}

/* 顶部宇宙条 */
.universe-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}
.universe-bar .univ-info { display: flex; align-items: center; gap: 8px; }
.universe-bar .univ-name { font-weight: 700; font-size: 16px; }
.universe-bar .univ-level {
  font-size: 12px;
  color: var(--color-accent2);
  background: rgba(59, 130, 246, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
}
.universe-bar .online-count { font-size: 12px; color: var(--color-text-dim); }

/* 常用布局 */
.flex-1 { flex: 1; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-sm { gap: 8px; }
.gap-md { gap: 12px; }
.gap-lg { gap: 16px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-dim { color: var(--color-text-dim); }
.text-muted { color: var(--color-text-muted); }
.w-full { width: 100%; }

/* 滚动条美化 */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 2px; }

/* 响应式 */
@media (max-width: 480px) {
  #app { padding: 12px; }
  .title-glow { font-size: 22px; }
  .title { font-size: 20px; }
  .option-btn { padding: 12px 14px; font-size: 14px; }
  .scale-dot { width: 32px; height: 32px; }
  .modal { padding: 24px 16px; }
  .tab { font-size: 12px; padding: 8px 10px; }
  .msg-bubble { font-size: 13px; }
}

/* ============================================================
   VOICE DASHBOARD — 主画面 Voice 中心化样式
   ============================================================ */

/* 顶部宇宙信息条 */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-univ-name {
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.top-univ-lv {
  font-size: 11px;
  color: var(--color-accent2);
  background: rgba(59,130,246,.15);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-energy {
  font-size: 13px;
  color: var(--color-warning);
  font-weight: 600;
  white-space: nowrap;
}
.top-settings-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  transition: transform var(--transition-normal);
  line-height: 1;
}
.top-settings-btn:hover { transform: rotate(30deg); }

/* 主滚动区域 */
.main-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  -webkit-overflow-scrolling: touch;
}

/* ========== WORLDVIEW HERO ========== */
.worldview-hero {
  position: relative;
  width: 100%;
  height: 220px;
  flex-shrink: 0;
  overflow: hidden;
  margin: 0 0 12px 0;
}
.wv-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.wv-layer {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}
/* Myth theme */
.wv-myth-sun {
  background: radial-gradient(circle at 80% 30%, rgba(226,196,125,.4) 0%, transparent 60%);
  animation: wvPulse 3s ease-in-out infinite;
}
.wv-myth-temple {
  background: linear-gradient(to top, rgba(0,0,0,.3) 0%, transparent 50%);
}
.wv-myth-temple::after {
  content: '';
  position: absolute;
  bottom: 0; left: 10%; right: 10%; height: 40%;
  background: linear-gradient(to top, rgba(0,0,0,.4) 0%, transparent 100%);
  clip-path: polygon(0 100%, 20% 20%, 40% 50%, 50% 0, 60% 50%, 80% 20%, 100% 100%);
}
.wv-myth-runes {
  position: absolute;
  bottom: 30%; left: 50%;
  transform: translateX(-50%);
  font-size: 48px;
  letter-spacing: 20px;
  opacity: .25;
  animation: wvFloat 4s ease-in-out infinite;
}
/* Sci-fi theme */
.wv-scifi-grid {
  opacity: .5;
  animation: wvShift 8s linear infinite;
}
.wv-scifi-planet {
  position: absolute;
  top: 20%; right: 15%;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.15), transparent 70%);
  animation: wvPulse 2.5s ease-in-out infinite;
}
.wv-scifi-data {
  position: absolute;
  bottom: 20%; left: 10%;
  font-family: monospace;
  font-size: 10px;
  letter-spacing: 3px;
  opacity: .4;
  animation: wvShift 6s linear infinite;
}
/* Reality theme */
.wv-real-sky {
  background: linear-gradient(to bottom, var(--bg-primary), transparent 40%);
}
.wv-real-horizon {
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 30%;
}
.wv-real-stars {
  position: absolute;
  top: 10%; left: 0; right: 0; height: 50%;
  background-image: radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.6) 50%, transparent),
                    radial-gradient(1px 1px at 60% 20%, rgba(255,255,255,.4) 50%, transparent),
                    radial-gradient(1px 1px at 80% 50%, rgba(255,255,255,.5) 50%, transparent),
                    radial-gradient(1px 1px at 40% 60%, rgba(255,255,255,.3) 50%, transparent),
                    radial-gradient(1px 1px at 10% 70%, rgba(255,255,255,.4) 50%, transparent),
                    radial-gradient(1px 1px at 90% 15%, rgba(255,255,255,.35) 50%, transparent);
  animation: wvTwinkle 3s ease-in-out infinite alternate;
}
/* Cosmic theme */
.wv-cosmic-swirl {
  animation: wvRotate 20s linear infinite;
}
.wv-cosmic-particles {
  position: absolute;
  bottom: 25%; left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  letter-spacing: 30px;
  opacity: .3;
  animation: wvFloat 5s ease-in-out infinite;
}
/* Overlay & Content */
.wv-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.3) 100%);
  pointer-events: none;
}
.wv-content {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 2;
}
.wv-univ-name {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
  margin-bottom: 4px;
  animation: fadeIn .6s ease;
}
.wv-univ-desc {
  font-size: 13px;
  color: rgba(255,255,255,.8);
  line-height: 1.4;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
  margin-bottom: 8px;
  max-width: 280px;
  animation: fadeIn .8s ease;
}
.wv-taboo {
  display: inline-block;
  font-size: 11px;
  background: rgba(239,68,68,.2);
  color: #fca5a5;
  padding: 2px 10px;
  border-radius: 10px;
  border: 1px solid rgba(239,68,68,.3);
  animation: fadeIn 1s ease;
}
/* Worldview animations */
@keyframes wvPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}
@keyframes wvFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}
@keyframes wvShift {
  0% { transform: translateY(0); }
  100% { transform: translateY(-20px); }
}
@keyframes wvRotate {
  from { transform: rotate(0deg) scale(1.4); }
  to { transform: rotate(360deg) scale(1.4); }
}
@keyframes wvTwinkle {
  0% { opacity: .5; }
  100% { opacity: 1; }
}

/* ========== VOICE CARD ========== */
.voice-card {
  flex-shrink: 0;
}
.voice-card-inner {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.05);
}
.voice-card-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(124,58,237,.06) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(59,130,246,.04) 0%, transparent 50%);
  pointer-events: none;
}

/* Avatar with glow */
.voice-avatar-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 4px;
}
.voice-avatar-glow {
  position: absolute;
  top: -10px; left: -10px;
  right: -10px; bottom: -10px;
  border-radius: 50%;
  animation: voicePulse 3s ease-in-out infinite;
  opacity: .7;
}
.voice-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 20px rgba(124,58,237,.4), 0 0 60px rgba(124,58,237,.15);
  border: 2px solid rgba(255,255,255,.1);
}
@keyframes voicePulse {
  0%, 100% { transform: scale(1); opacity: .5; }
  50% { transform: scale(1.15); opacity: .8; }
}

/* Voice name (gradient text) */
.voice-name {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  filter: drop-shadow(0 0 20px rgba(124,58,237,.3));
  margin-top: 4px;
  text-shadow: 0 0 30px rgba(124,58,237,.5), 0 0 60px rgba(59,130,246,.3), 0 0 80px rgba(124,58,237,.2);
  animation: voiceGlow 3s ease-in-out infinite alternate;
}
@keyframes voiceGlow {
  0% { text-shadow: 0 0 20px rgba(124,58,237,.4), 0 0 40px rgba(59,130,246,.2); }
  100% { text-shadow: 0 0 40px rgba(124,58,237,.7), 0 0 80px rgba(59,130,246,.4), 0 0 100px rgba(124,58,237,.3); }
}

/* Voice title (subtitle) */
.voice-title {
  font-size: 13px;
  color: var(--color-text-dim);
  opacity: .7;
  text-align: center;
  letter-spacing: 1px;
}

/* Greeting */
.voice-greeting {
  font-size: 14px;
  font-style: italic;
  color: var(--color-text-dim);
  text-align: center;
  padding: 10px 4px;
  line-height: 1.6;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.voice-greeting::before { content: '"'; color: var(--color-accent); opacity: .5; }
.voice-greeting::after { content: '"'; color: var(--color-accent); opacity: .5; }

/* Faith bar */
.voice-faith {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 0;
}
.voice-faith-label {
  font-size: 12px;
  color: var(--color-text-dim);
  white-space: nowrap;
}
.voice-faith-bar {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.voice-faith-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .8s ease;
  position: relative;
}
.voice-faith-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: rgba(255,255,255,.2);
  border-radius: 4px 4px 0 0;
}
.voice-faith-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-warning);
  min-width: 32px;
  text-align: right;
}

/* Stats row */
.voice-stats-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  color: var(--color-text-dim);
  font-size: 13px;
}
.voice-stat { white-space: nowrap; }
.voice-stat-divider { color: var(--border-color); }

/* Actions */
.voice-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}
.voice-btn { flex: 1; font-size: 14px; padding: 10px 12px; }
.voice-btn-adventure { background: linear-gradient(135deg, rgba(234,179,8,.2), rgba(239,68,68,.15)); border-color: rgba(234,179,8,.3); }
.voice-btn-adventure:hover { background: linear-gradient(135deg, rgba(234,179,8,.3), rgba(239,68,68,.25)); }

/* Interactive Adventure UI */
.adv-overlay { padding: 0; display: flex; flex-direction: column; height: 100%; }
.adv-header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
.adv-theme-badge { font-size: 11px; background: rgba(124,58,237,.15); color: var(--color-accent); padding: 2px 8px; border-radius: 10px; }
.adv-title { font-size: 16px; font-weight: 700; flex: 1; }
.adv-step-count { font-size: 12px; color: var(--color-text-dim); }
.adv-story { padding: 16px; font-size: 14px; line-height: 1.9; color: var(--color-text); flex: 1; overflow-y: auto; animation: fadeIn .5s ease; }
.adv-question { padding: 0 16px 8px; font-size: 14px; color: var(--color-accent2); font-weight: 600; }
.adv-choices { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.adv-choice-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 14px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--color-text); font-family: var(--font-family); font-size: 14px; cursor: pointer; transition: all .2s ease; text-align: left; animation: slideUp .3s ease both; }
.adv-choice-btn:nth-child(1) { animation-delay: .1s; }
.adv-choice-btn:nth-child(2) { animation-delay: .2s; }
.adv-choice-btn:nth-child(3) { animation-delay: .3s; }
.adv-choice-btn:hover { border-color: var(--color-accent); background: rgba(124,58,237,.1); transform: translateX(4px); }
.adv-choice-text { flex: 1; font-weight: 500; }
.adv-choice-hint { font-size: 11px; color: var(--color-text-dim); font-style: italic; }
.adv-choice-cost { font-size: 11px; color: var(--color-warning); white-space: nowrap; }
.adv-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--border-color); flex-shrink: 0; }
.adv-energy-spent { font-size: 12px; color: var(--color-text-dim); }
/* Network error hint in choices area */
.adv-network-hint { text-align: center; padding: 16px 20px; color: var(--color-text-dim); font-size: 14px; animation: fadeIn 1.2s ease; }
/* Ending screen */
.adv-ending { text-align: center; padding: 24px 16px; gap: 16px; }
.adv-ending-icon { font-size: 56px; animation: popIn .5s ease; }
.adv-ending-title { font-size: 24px; font-weight: 800; background: linear-gradient(135deg,#eab308,#ef4444); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; animation: fadeIn .6s ease; }
.adv-ending-story { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 20px; text-align: left; line-height: 1.8; font-size: 14px; color: var(--color-text); animation: fadeIn .8s ease; }
.adv-ending-rewards { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; animation: fadeIn 1s ease; }
.adv-ending-reward { background: linear-gradient(135deg,rgba(234,179,8,.15),rgba(239,68,68,.1)); border: 1px solid rgba(234,179,8,.2); border-radius: var(--radius-md); padding: 10px 16px; font-size: 14px; display: flex; gap: 6px; align-items: center; }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ========== QUICK ACTIONS ========== */
.quick-actions {
  flex-shrink: 0;
}
.qa-title {
  font-size: 14px;
  color: var(--color-text-dim);
  margin-bottom: 10px;
  padding-left: 4px;
  font-weight: 600;
}
.qa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.qa-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: var(--font-family);
  font-size: 13px;
}
.qa-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124,58,237,.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(124,58,237,.15);
}
.qa-btn:hover .qa-icon { transform: scale(1.2); }
.qa-icon { transition: transform .3s ease; }
.qa-btn:active { transform: translateY(0); }
.qa-icon { font-size: 24px; }
.qa-label { font-weight: 500; }

/* ========== UNIVERSE FEED ========== */
.universe-feed {
  flex-shrink: 0;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 8px;
}
.uf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}
.uf-online {
  font-size: 13px;
  color: var(--color-text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}
.uf-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.uf-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text-dim);
  line-height: 1.5;
  padding: 4px 0;
  animation: fadeInUp .5s ease forwards;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.uf-item-avatar { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.uf-item-text { flex: 1; }

/* ========== OVERLAY ========== */
.overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
}
.overlay-enter { animation: overlaySlideUp .35s ease forwards; }
.overlay-exit { animation: overlaySlideDown .3s ease forwards; }

@keyframes overlaySlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes overlaySlideDown {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(30px); }
}

.overlay-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  min-height: 52px;
}
.overlay-back {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--color-text);
  cursor: pointer;
  padding: 4px 8px;
  transition: transform var(--transition-normal);
  line-height: 1;
}
.overlay-back:hover { transform: scale(1.2); }
.overlay-title {
  flex: 1;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
}
.overlay-spacer { width: 40px; }
.overlay-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
}

/* Chat messages inside overlay */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0;
}
.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  padding: 40px 20px;
  text-align: center;
}
.chat-empty-icon { font-size: 48px; margin-bottom: 12px; }
.chat-empty-text { font-size: 14px; }

.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  align-items: center;
  flex-shrink: 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  margin: 0 -16px;
  padding: 10px 16px;
}
.chat-input { flex: 1; }

/* DM list */
.dm-list { display: flex; flex-direction: column; gap: 4px; }
.dm-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
}
.dm-item:hover { background: var(--bg-card-hover); }
.dm-item-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.dm-item-info { flex: 1; min-width: 0; }
.dm-item-name { font-size: 15px; font-weight: 600; }
.dm-item-status { font-size: 12px; color: var(--color-text-dim); }

/* Universe selector */
.univ-select-list { display: flex; flex-direction: column; gap: 8px; }
.univ-select-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
}
.univ-select-item:hover { background: var(--bg-card-hover); border-color: rgba(124,58,237,.3); }
.univ-select-item.current { border-color: var(--color-accent); background: rgba(124,58,237,.1); }
.univ-select-icon { font-size: 20px; }
.univ-select-name { flex: 1; font-weight: 600; }
.univ-select-badge {
  font-size: 11px;
  color: var(--color-accent);
  background: rgba(124,58,237,.15);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ========== ENERGY MODAL ========== */
.energy-modal-wrap {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.energy-modal-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
}
.energy-modal {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px 24px 24px;
  max-width: 340px;
  width: 90%;
  text-align: center;
  animation: slideUp .35s ease;
  transform: translateY(20px);
  opacity: 0;
  transition: all .3s ease;
}
.energy-modal.show {
  transform: translateY(0);
  opacity: 1;
}
.energy-modal-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.energy-modal h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.energy-modal p {
  color: var(--color-text-dim);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}
.energy-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.energy-modal-buttons .btn { width: 100%; }

/* ========== NETWORK ERROR MODAL ========== */
.net-err-modal-wrap {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
}
.net-err-modal-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(5,5,20,.85);
  backdrop-filter: blur(6px);
}
.net-err-modal {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: var(--radius-xl);
  padding: 32px 24px 24px;
  max-width: 340px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 40px rgba(239,68,68,.15);
  transform: translateY(20px);
  opacity: 0;
  transition: all .3s ease;
}
.net-err-modal.show {
  transform: translateY(0);
  opacity: 1;
}
.net-err-modal-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.net-err-modal h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: #ef4444;
}
.net-err-modal p {
  color: var(--color-text-dim);
  font-size: 14px;
  margin-bottom: 12px;
  line-height: 1.6;
}
.net-err-modal-hint {
  color: var(--color-text-muted) !important;
  font-size: 12px !important;
  font-style: italic;
}
.net-err-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.net-err-modal-buttons .btn { width: 100%; }

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-muted);
  font-size: 14px;
}


/* ========== SETTINGS LIST ========== */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all .3s ease;
}
.settings-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124,58,237,.2);
  transform: translateX(4px);
}
.settings-item-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.settings-item-label {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
}
.settings-item-arrow {
  color: var(--color-text-muted);
  font-size: 20px;
  font-weight: 300;
}

/* ========== UNIVERSE MANAGEMENT ========== */
.um-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.um-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.um-card-title {
  font-size: 16px;
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(124,58,237,.08);
}
.um-rules-title {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background .3s ease;
}
.um-rules-title:hover {
  background: rgba(124,58,237,.15);
}
.um-rules-toggle {
  font-size: 12px;
  color: var(--color-text-dim);
}
.um-card-body {
  padding: 12px 16px;
}
.um-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.um-row:last-child { border-bottom: none; }
.um-label {
  font-size: 14px;
  color: var(--color-text-dim);
}
.um-val {
  font-size: 14px;
  color: var(--color-text);
  font-weight: 500;
  text-align: right;
  max-width: 55%;
}
.um-taboo {
  color: var(--color-danger) !important;
}
.um-inv {
  margin-top: 12px;
  padding: 14px;
  background: rgba(124,58,237,.08);
  border: 1px solid rgba(124,58,237,.2);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.um-inv-code {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--color-accent2);
  cursor: pointer;
  padding: 8px 20px;
  background: rgba(59,130,246,.1);
  border-radius: var(--radius-sm);
  transition: all .3s ease;
}
.um-inv-code:hover {
  background: rgba(59,130,246,.2);
  transform: scale(1.03);
}
.um-copy-hint {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--color-text-dim);
}
.um-inv-meta {
  font-size: 12px;
  color: var(--color-text-dim);
}
.um-inv-actions {
  display: flex;
  gap: 8px;
}
.um-divider {
  height: 1px;
  background: var(--border-color);
  margin: 14px 0;
}
.um-section-label {
  font-size: 13px;
  color: var(--color-text-dim);
  margin-bottom: 8px;
}
.um-use {
  display: flex;
  gap: 8px;
  align-items: center;
}
.um-use-input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}
/* ========== GOLD DISPLAY ========== */
.top-gold {
  font-size: 12px;
  color: var(--color-warning);
  margin-right: 10px;
  font-weight: 600;
}

/* ========== AI PING BUBBLE ========== */
.ai-ping-bubble {
  margin: 0 12px 8px;
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(124,58,237,.3);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  animation: slideUp .4s ease;
}
.ai-ping-msg {
  font-size: 14px;
  color: var(--color-text);
  flex: 1;
  line-height: 1.5;
}
.ai-ping-reply {
  padding: 8px 16px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .3s ease;
  font-family: var(--font-family);
}
.ai-ping-reply:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(124,58,237,.4);
}

/* ========== SETTLEMENT ACTIONS ========== */
.um-settled { color: var(--color-success) !important; }
.um-cooldown { color: var(--color-warning) !important; }
.um-settlement-actions {
  display: flex;
  gap: 8px;
  padding: 10px 0 6px;
  flex-wrap: wrap;
}
.um-settlement-actions .btn { flex: 1; min-width: 0; font-size: 13px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 480px) {
  .top-bar { padding: 10px 12px; }
  .main-scroll { padding: 12px; gap: 12px; }
  .voice-card-inner { padding: 24px 16px 16px; }
  .voice-avatar-wrap { width: 68px; height: 68px; }
  .voice-avatar { width: 68px; height: 68px; font-size: 34px; }
  .voice-avatar-glow { top: -8px; left: -8px; right: -8px; bottom: -8px; }
  .voice-name { font-size: 20px; }
  .voice-title { font-size: 12px; }
  .voice-greeting { font-size: 13px; min-height: 40px; }
  .voice-stat { font-size: 12px; }
  .voice-btn { font-size: 13px; padding: 8px 10px; }
  .qa-btn { padding: 14px 10px; }
  .qa-icon { font-size: 22px; }
  .overlay-header { padding: 10px 12px; }
  .overlay-content { padding: 10px 12px; }
  .energy-modal { padding: 24px 16px 20px; }

/* ========== DM TABS ========== */
.dm-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-card);
  padding: 4px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
}
.dm-tab {
  flex: 1;
  padding: 10px 8px;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--color-text-dim);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
}
.dm-tab.active {
  background: rgba(124,58,237,.2);
  color: #fff;
}
.dm-tab-content {
  flex: 1;
  overflow-y: auto;
  min-height: 200px;
}
.dm-tab-footer {
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  margin-top: 12px;
}
.dm-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.dm-item-arrow {
  font-size: 24px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

/* ========== DM CONVERSATION OVERLAY ========== */
.ov-dm {
  display: flex;
  flex-direction: column;
}
.dm-conv {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}
.dm-conv-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}
.dm-conv-peer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.dm-conv-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.dm-conv-name {
  font-size: 16px;
  font-weight: 700;
}
.dm-conv-more {
  background: none;
  border: none;
  color: var(--color-text-dim);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  font-family: var(--font-family);
  transition: all var(--transition-normal);
}
.dm-conv-more:hover { color: #fff; }
.dm-conv-menu {
  position: absolute;
  top: 56px;
  right: 12px;
  background: #1a1a2e;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  z-index: 100;
  overflow: hidden;
  animation: slideDown .2s ease;
}
.dm-menu-item {
  padding: 12px 20px;
  font-size: 14px;
  cursor: pointer;
  color: var(--color-text);
  transition: background var(--transition-normal);
  white-space: nowrap;
}
.dm-menu-item:hover { background: var(--bg-card-hover); }
.dm-conv-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dm-conv-input {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}
.dm-conv-input .chat-input { flex: 1; }

/* DM Message bubbles */
.dm-msg-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.dm-msg-bubble.dm-right {
  align-self: flex-end;
  background: var(--gradient-primary);
  margin-left: 40px;
  border-bottom-right-radius: 4px;
}
.dm-msg-bubble.dm-left {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  margin-right: 40px;
  border-bottom-left-radius: 4px;
}
.dm-msg-sender {
  font-size: 12px;
  margin-bottom: 4px;
  font-weight: 600;
}
.dm-msg-bubble.dm-right .dm-msg-sender { color: rgba(255,255,255,.7); }
.dm-msg-bubble.dm-left .dm-msg-sender { color: var(--color-accent2); }
.dm-msg-time {
  font-size: 11px;
  margin-top: 4px;
}
.dm-msg-bubble.dm-right .dm-msg-time { color: rgba(255,255,255,.5); text-align: right; }
.dm-msg-bubble.dm-left .dm-msg-time { color: var(--color-text-muted); text-align: right; }

/* ========== DISCOVERY GRID (E1) ========== */
.discovery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.discovery-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-normal);
}
.discovery-card:hover {
  border-color: rgba(124,58,237,.3);
  background: var(--bg-card-hover);
}
.discovery-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.discovery-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.discovery-bio {
  font-size: 11px;
  color: var(--color-text-dim);
  line-height: 1.4;
}

/* ========== ONLINE/OFFLINE DOTS ========== */
.online-dot-sm {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 6px var(--color-success);
  vertical-align: middle;
}
.offline-dot-sm {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-text-muted);
  vertical-align: middle;
}

/* ========== BUTTON SIZE VARIANTS ========== */
.btn-xs {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: var(--radius-sm);
}
.btn-success {
  background: rgba(34,197,94,.2);
  color: var(--color-success);
  border: 1px solid rgba(34,197,94,.3);
}
.btn-success:hover {
  background: rgba(34,197,94,.3);
}

/* ========== RESPONSIVE DM ========== */
@media (max-width: 480px) {
  .discovery-grid { gap: 8px; }
  .discovery-card { padding: 10px 8px; }
  .dm-conv-header { padding: 8px 10px; }
  .dm-conv-msgs { padding: 8px 10px; }
  .dm-conv-input { padding: 8px 10px; }
}

}

/* ========== ECONOMY SYSTEM ========== */
.top-coin {
  font-size: 12px;
  color: var(--color-accent2);
  background: rgba(59,130,246,.12);
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 6px;
  white-space: nowrap;
}

.voice-mint {
  background: rgba(124,58,237,.08);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.voice-mint-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--color-text-dim);
}
.voice-mint-info span:last-child {
  color: var(--color-warning);
  font-weight: 600;
}
.voice-mint-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 12px;
}
.voice-mint-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.voice-mint-note {
  font-size: 11px;
  color: var(--color-accent2);
  opacity: .7;
  padding: 2px 0;
}

/* Universe Management Economy Card */
.um-econ-card {
  border-color: rgba(234,179,8,.25);
}
.um-econ-card .um-card-title {
  color: var(--color-warning);
}
.um-econ-type {
  color: var(--color-warning) !important;
  font-weight: 600;
}
.um-pp {
  color: var(--color-success) !important;
  font-weight: 700;
  font-size: 15px;
}

/* Economy responsive */
@media (max-width: 480px) {
  .top-coin { font-size: 11px; padding: 1px 6px; }
  .voice-mint { padding: 8px 10px; flex-direction: column; align-items: flex-start; }
  .voice-mint-btn { width: 100%; }
}
