/* ===== 全局重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
  min-height: 100vh;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
::selection { background: transparent; color: inherit; }
::-moz-selection { background: transparent; color: inherit; }
::-webkit-selection { background: transparent; color: inherit; }
/* 输入区域恢复文本选择和光标 */
input, textarea, [contenteditable="true"] {
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -webkit-touch-callout: default !important;
  cursor: text;
}
dialogue, dialogue-box, dialogue-box-full, dialogue-text, dialogue-text-full, dialog-box, dialog-text, dialog-content {
  cursor: pointer;
}
:root {
  --gold: #ffd700;
  --gold-dark: #daa520;
  --blue: #4dd0e1;
  --blue-dark: #00838f;
  --green: #66bb6a;
  --red: #ef5350;
  --pink: #ff8a80;
  --purple: #ba68c8;
  --bg-dark: #0a0a1a;
  --text-light: #fff;
  --text-dim: #ccc;
  --dialog-bg: rgba(10, 20, 40, 0.92);
  --map-sky: linear-gradient(180deg, #0d1b4e 0%, #1a3a7e 40%, #2d5aa0 75%, #4a90c8 100%);
}

/* ===== 登录/注册页面 ===== */
.auth-bg {
  position: fixed; inset: 0;
  background: url('/png/首页.png') center center / cover no-repeat,
              linear-gradient(135deg, #0d0d2e 0%, #1a1a4e 50%, #0d1b3e 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.auth-stars { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.auth-stars span {
  position: absolute; width: 3px; height: 3px;
  background: #fff; border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
  0%,100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}
.auth-card {
  position: relative; z-index: 2;
  background: rgba(13, 18, 46, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 24px;
  padding: 48px 40px;
  width: 420px; max-width: 90vw;
  box-shadow: 0 8px 40px rgba(0,0,0,0.45);
}
.auth-card h1 {
  text-align: center; color: var(--gold);
  font-size: 28px; margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(255,215,0,0.3);
}
.auth-card .subtitle { text-align: center; color: var(--text-dim); font-size: 14px; margin-bottom: 32px; }
.auth-input-group { margin-bottom: 20px; }
.auth-input-group label { display: block; color: var(--text-light); font-size: 14px; margin-bottom: 6px; }
.auth-input-group input {
  width: 100%; padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  color: var(--text-light); font-size: 15px;
  outline: none; transition: all 0.3s;
}
.auth-input-group input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,215,0,0.15); }
.auth-btn {
  width: 100%; padding: 16px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #1a1a2e; font-size: 16px; font-weight: bold;
  cursor: pointer; transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(255,215,0,0.3);
}
.auth-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(255,215,0,0.4); }
.auth-btn:active { transform: translateY(0); }
.auth-link { text-align: center; margin-top: 20px; color: var(--text-dim); font-size: 14px; }
.auth-link a { color: var(--gold); text-decoration: none; font-weight: bold; }
.auth-link a:hover { text-decoration: underline; }
.auth-error { color: var(--red); font-size: 14px; text-align: center; margin-bottom: 16px; min-height: 20px; }

/* ===== 主游戏页面（SPA容器）===== */
.game-page { width: 100vw; height: 100vh; overflow: hidden; position: relative; }

/* 顶栏 */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 56px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.topbar .logo { display: flex; align-items: center; gap: 8px; color: var(--gold); font-size: 18px; font-weight: bold; }
.topbar .user-info { display: flex; align-items: center; gap: 12px; }
.coin-display {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,215,0,0.15);
  padding: 4px 14px; border-radius: 20px;
  color: var(--gold); font-weight: bold; font-size: 15px;
  border: 1px solid rgba(255,215,0,0.3);
}
/* ===== 设置按钮 + 下拉菜单 ===== */
.settings-wrapper {
  position: relative;
}
.settings-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 16px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  background: transparent;
  color: var(--text-light);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
}
.settings-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,215,0,0.4);
}
.settings-icon { font-size: 15px; transition: transform 0.4s; }
.settings-wrapper.open .settings-icon { transform: rotate(90deg); }

.settings-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  background: rgba(20, 25, 50, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,215,0,0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 200;
}
.settings-wrapper.open .settings-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.dropdown-item:hover {
  background: rgba(255,255,255,0.08);
}
.dropdown-item .item-icon {
  font-size: 20px; flex-shrink: 0;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
}
.dropdown-item .item-content { flex: 1; min-width: 0; }
.dropdown-item .item-title {
  font-size: 13px; font-weight: bold;
  color: #fff; margin-bottom: 2px;
}
.dropdown-item .item-desc {
  font-size: 11px; color: rgba(255,255,255,0.5);
  line-height: 1.4;
}
.dropdown-item.logout-item:hover .item-title { color: #ff6b6b; }

.dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,0.12);
  margin: 6px 12px;
}

/* 重置确认弹窗 */
.confirm-modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: none; align-items: center; justify-content: center;
  z-index: 9999;
}
.confirm-modal-mask.show { display: flex; }
.confirm-modal {
  background: linear-gradient(145deg, #fff8e1, #ffe082);
  border-radius: 22px;
  padding: 28px 32px 22px;
  max-width: 340px; width: 88%;
  text-align: center;
  box-shadow: 0 12px 40px rgba(255,160,0,0.4), 0 0 0 5px #ff8f00, 0 0 0 9px #fff;
  animation: modalBounce 0.4s ease;
}
@keyframes modalBounce {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}
.confirm-modal .confirm-icon { font-size: 42px; margin-bottom: 8px; }
.confirm-modal h3 { font-size: 18px; color: #e65100; margin: 4px 0; }
.confirm-modal p { font-size: 13px; color: #5d4037; line-height: 1.5; margin: 10px 0 18px; }
.confirm-modal .confirm-btns { display: flex; gap: 12px; justify-content: center; }
.confirm-modal .confirm-btn {
  flex: 1; padding: 10px 16px; border: none; border-radius: 16px;
  font-size: 13px; font-weight: bold; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 3px 0 rgba(0,0,0,0.15);
}
.confirm-modal .confirm-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,0.15); }
.confirm-btn-cancel { background: rgba(0,0,0,0.15); color: #5d4037; }
.confirm-btn-danger { background: linear-gradient(135deg, #ff5252, #d32f2f); color: #fff; }

/* ===== SPA页面容器（显示/隐藏切换）===== */
.page {
  position: absolute; top: 56px; left: 0; right: 0; bottom: 0;
  display: none;
  overflow: hidden;
}
.page.active { display: block; animation: pageFadeIn 0.5s ease; }
@keyframes pageFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== 第一层：岛屿选择层（保卫萝卜式全屏滑动） ===== */
.page-islands { background: var(--map-sky); overflow: hidden; }

/* 滑动容器 */
.island-slider {
  position: relative; z-index: 2;
  width: 500%; height: 100%;
  display: flex;
  will-change: transform;
}

/* 单个岛屿幻灯片（占满一屏） */
.island-slide {
  width: 20%; height: 100%;
  position: relative;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.island-slide-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: 0;
}
.island-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.45) 60%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
}
.island-slide-overlay.locked-overlay {
  background: rgba(10,15,30,0.85);
}
.island-slide-content {
  position: relative; z-index: 3;
  text-align: center;
  padding: 20px;
  max-width: 480px;
}
.island-slide-content.blurred { filter: blur(8px); pointer-events: none; }
.island-slide-icon {
  font-size: 72px; margin-bottom: 8px;
  animation: bounce 2.5s ease-in-out infinite;
  filter: drop-shadow(0 4px 15px rgba(0,0,0,0.5));
}
.island-slide-island-num {
  color: var(--isl-color, var(--gold));
  font-size: 13px; font-weight: bold; letter-spacing: 2px;
  margin-bottom: 4px; opacity: 0.9;
}
.island-slide-title {
  font-size: 36px; color: #fff;
  text-shadow: 0 3px 15px rgba(0,0,0,0.6), 0 0 30px var(--isl-color, var(--gold));
  margin-bottom: 6px;
}
.island-slide-subtitle {
  font-size: 16px; color: var(--isl-color, var(--gold));
  font-weight: bold; margin-bottom: 12px; opacity: 0.95;
}
.island-slide-desc {
  font-size: 13px; color: rgba(255,255,255,0.8);
  line-height: 1.6; margin-bottom: 20px;
}
.island-slide-progress {
  margin-bottom: 24px;
}
.island-slide-progress-bar {
  height: 8px; background: rgba(255,255,255,0.15);
  border-radius: 4px; overflow: hidden;
  margin-bottom: 6px;
}
.island-slide-progress-fill {
  height: 100%; border-radius: 4px;
  transition: width 0.6s ease;
  box-shadow: 0 0 10px var(--isl-color, var(--gold));
}
.island-slide-progress-text {
  font-size: 12px; color: rgba(255,255,255,0.7);
}
.island-slide-enter-btn {
  padding: 14px 40px;
  border: none; border-radius: 30px;
  background: linear-gradient(135deg, var(--isl-color, var(--gold)) 0%, var(--isl-accent, var(--gold-dark)) 100%);
  color: #fff; font-size: 17px; font-weight: bold;
  cursor: pointer; transition: all 0.3s;
  box-shadow: 0 4px 25px var(--isl-color, rgba(255,215,0,0.4));
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  animation: btnPulse 2s ease-in-out infinite;
}
.island-slide-enter-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 35px var(--isl-color, rgba(255,215,0,0.5));
}
.island-slide-enter-btn:active { transform: translateY(0) scale(1); }
@keyframes btnPulse {
  0%,100% { box-shadow: 0 4px 25px var(--isl-color, rgba(255,215,0,0.4)); }
  50% { box-shadow: 0 4px 35px var(--isl-color, rgba(255,215,0,0.6)); }
}
.island-slide-badge {
  position: absolute; top: 20px; right: 20px;
  background: var(--green); color: #fff;
  padding: 6px 16px; border-radius: 20px;
  font-size: 13px; font-weight: bold;
  box-shadow: 0 2px 12px rgba(102,187,106,0.5);
  z-index: 4;
}
.island-lock-big {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 100px; z-index: 3;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.5));
}
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* 底部位置指示器 */
.island-dots {
  position: absolute; bottom: 60px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 10px;
  z-index: 10;
}
.island-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer; transition: all 0.3s;
}
.island-dot.active {
  width: 30px; border-radius: 5px;
  box-shadow: 0 0 10px currentColor;
}
.island-dot:hover { background: rgba(255,255,255,0.6); }

/* 滑动提示 */
.swipe-hint {
  position: absolute; bottom: 30px; left: 0; right: 0;
  text-align: center; z-index: 10;
  color: rgba(255,255,255,0.5); font-size: 12px;
  animation: hintFade 3s ease-in-out infinite;
}
@keyframes hintFade { 0%,100% { opacity: 0.4; } 50% { opacity: 0.8; } }

/* 小智向导 */
.map-guide {
  position: absolute; bottom: 20px; left: 20px;
  z-index: 15;
  display: flex; align-items: flex-end; gap: 8px;
}
.guide-sprite {
  width: 64px; height: auto;
  animation: charFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}
.guide-bubble {
  background: #fff; color: #333;
  padding: 8px 16px; border-radius: 14px;
  font-size: 13px; font-weight: bold;
  max-width: 200px; position: relative;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  margin-bottom: 16px;
}
.guide-bubble::after {
  content: ''; position: absolute; bottom: -8px; left: 20px;
  border: 8px solid transparent; border-top-color: #fff; border-bottom: 0;
}
.guide-bubble.pop { animation: bubblePop 0.4s ease; }
@keyframes bubblePop { 0% { transform: scale(0.5); } 60% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* ===== 第二层：节点选择层 ===== */
.page-nodes {
  background: var(--map-sky) center/cover no-repeat;
  overflow: hidden;
  position: relative;
  height: 100%;
}
/* 半透明深色遮罩：保证亮色场景图上的白色节点文字清晰可读 */
.page-nodes::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,20,60,0.55) 0%, rgba(10,20,60,0.35) 50%, rgba(10,20,60,0.55) 100%);
  z-index: 0;
  pointer-events: none;
}
.page-nodes > * { position: relative; z-index: 1; }
.back-btn {
  position: absolute; top: 12px; left: 16px; z-index: 20;
  padding: 8px 16px; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px; background: rgba(0,0,0,0.4);
  color: var(--text-light); font-size: 13px; cursor: pointer;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}
.back-btn:hover { background: rgba(255,255,255,0.15); border-color: var(--gold); }

/* 岛屿标题栏 */
.node-island-header {
  position: relative; z-index: 10;
  text-align: center;
  padding: 56px 16px 16px;
}
.node-island-icon {
  font-size: 52px; margin-bottom: 6px;
  animation: bounce 2.5s ease-in-out infinite;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.45));
}
.node-island-title {
  font-size: 32px; font-weight: 900; letter-spacing: 2px;
  color: var(--gold);
  text-shadow: 0 2px 10px rgba(0,0,0,0.55), 0 0 24px rgba(255,200,60,0.35);
  margin-bottom: 4px;
}
.node-island-sub { font-size: 14px; color: rgba(255,255,255,0.8); margin-bottom: 8px; }
.node-island-progress {
  display: inline-block;
  background: rgba(255,215,0,0.15);
  padding: 4px 14px; border-radius: 20px;
  color: var(--gold); font-weight: bold; font-size: 13px;
  border: 1px solid rgba(255,215,0,0.3);
}

/* 节点路径容器 */
.node-path-container {
  position: relative; z-index: 5;
  height: calc(100% - 190px);
  overflow-y: auto;
  padding: 12px 48px 60px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  /* 纤细半透明滚动条（矮屏需要滚动时也不突兀） */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.35) transparent;
}
.node-path-container::-webkit-scrollbar { width: 8px; }
.node-path-container::-webkit-scrollbar-track { background: transparent; }
.node-path-container::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.28);
  border-radius: 8px;
}
.node-path-container::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.5); }
.node-path-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}
.node-list {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
}

/* 单个节点（绝对定位，圆心锚定） */
.node-item {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; cursor: pointer;
  text-align: center;
  transition: transform 0.25s ease;
  z-index: 1;
}
.node-item.unlocked:hover { transform: translate(-50%, -50%) scale(1.08); }
.node-item.locked { cursor: not-allowed; }

/* 节点圆形画框（贴插画） */
.node-circle {
  width: 98px; height: 98px; border-radius: 50%;
  position: relative; flex-shrink: 0;
  border: 4px solid var(--node-color, var(--gold));
  background: rgba(255,255,255,0.08);
  box-shadow: 0 8px 22px rgba(0,0,0,0.45), 0 0 0 5px rgba(255,255,255,0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.node-img {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; display: block;
}
/* 无插画的序章节点用大 emoji */
.node-emoji {
  width: 100%; height: 100%; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 46px;
  background: linear-gradient(135deg, var(--node-color, #ffd54f), var(--node-accent, #ff8f00));
}

/* 序号徽章 */
.node-number {
  position: absolute; top: -8px; left: -8px;
  width: 30px; height: 30px; border-radius: 50%;
  background: #ffffff; color: var(--node-accent, #b26a00);
  font-size: 15px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
  border: 3px solid var(--node-color, var(--gold));
  z-index: 3;
}

/* 状态角标 */
.node-badge {
  position: absolute; bottom: -6px; right: -6px;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; z-index: 3;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.node-badge-done { background: linear-gradient(135deg, #ffd54f, #ff8f00); color: #fff; }
.node-badge-go { background: linear-gradient(135deg, #66bb6a, #2e7d32); color: #fff; animation: nodeBadgeBounce 1.4s ease-in-out infinite; }
.node-badge-lock { background: rgba(50,52,75,0.92); font-size: 15px; }
@keyframes nodeBadgeBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* 当前可玩节点：呼吸光环 + 上下漂浮 */
.node-item.unlocked:not(.completed) .node-circle { animation: nodeFloat 2.4s ease-in-out infinite; }
.node-item.unlocked:not(.completed) .node-pulse {
  position: absolute; inset: -7px; border-radius: 50%;
  border: 3px solid var(--node-color, var(--gold));
  animation: nodePulse 1.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes nodePulse {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(1.5); opacity: 0; }
}
@keyframes nodeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* 已完成节点：金色光环 */
.node-item.completed .node-circle {
  border-color: #ffd54f;
  box-shadow: 0 8px 22px rgba(0,0,0,0.4), 0 0 0 5px rgba(255,213,79,0.3), 0 0 26px rgba(255,190,60,0.45);
}

/* 未解锁节点：暗化灰度 */
.node-item.locked .node-img,
.node-item.locked .node-emoji { filter: grayscale(0.95) brightness(0.45); }
.node-item.locked .node-circle {
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
.node-item.locked .node-number { opacity: 0.45; }

/* 节点文字卡片（毛玻璃，圆下方居中） */
.node-label {
  max-width: 200px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 18px;
  padding: 10px 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
  transition: background 0.3s, border-color 0.3s;
}
.node-item.unlocked:hover .node-label {
  background: rgba(255,255,255,0.18);
  border-color: var(--node-color, var(--gold));
}
.node-name {
  font-size: 17px; font-weight: 900;
  color: #ffffff;
  margin-bottom: 3px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.node-sub {
  font-size: 13px; color: rgba(255,255,255,0.85);
  margin-bottom: 7px;
}
.node-status {
  font-size: 12px; font-weight: bold;
  display: inline-block; padding: 3px 12px;
  border-radius: 12px;
}
.node-status.done { background: rgba(255,193,7,0.22); color: #ffd54f; border: 1px solid rgba(255,213,79,0.4); }
.node-status.current { background: rgba(102,187,106,0.25); color: #b9f6ca; border: 1px solid rgba(102,187,106,0.5); animation: nodeBadgeBounce 1.6s ease-in-out infinite; }
.node-status.locked { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.45); }

/* 矮屏紧凑模式（笔记本/平板横屏）：缩小节点，两行波浪布局适配 */
@media (max-height: 820px) {
  .node-island-header { padding-top: 38px; }
  .node-island-icon { font-size: 38px; margin-bottom: 2px; }
  .node-island-title { font-size: 25px; }
  .node-island-sub { margin-bottom: 4px; }
  .node-path-container { height: calc(100% - 168px); padding-top: 4px; padding-bottom: 24px; }
  .node-circle { width: 78px; height: 78px; border-width: 3px; }
  .node-emoji { font-size: 36px; }
  .node-number { width: 26px; height: 26px; font-size: 13px; border-width: 2px; top: -6px; left: -6px; }
  .node-badge { width: 30px; height: 30px; font-size: 14px; border-width: 2px; bottom: -5px; right: -5px; }
  .node-label { padding: 8px 12px; max-width: 170px; }
  .node-name { font-size: 14px; }
  .node-sub { font-size: 11px; margin-bottom: 5px; }
  .node-status { font-size: 11px; padding: 2px 10px; }
}

/* 节点内容舞台 */
.node-stage {
  position: relative; z-index: 2;
  height: calc(100% - 140px);
  overflow-y: auto; overflow-x: hidden;
  padding: 0 0 80px;
}
.node-stage.flip { animation: flipOut 0.4s ease; }
.node-stage.slide-next { animation: slideOutLeft 0.4s ease; }
@keyframes flipOut {
  from { opacity: 1; transform: rotateY(0); }
  to { opacity: 0; transform: rotateY(90deg); }
}
@keyframes slideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-40px); }
}

/* 节点章节标签 */
.node-chapter-tag {
  text-align: center;
  color: var(--gold); font-size: 14px; font-weight: bold;
  padding: 8px 16px;
  background: rgba(255,215,0,0.08);
  border-radius: 14px;
  margin: 8px 20px 0;
  border: 1px solid rgba(255,215,0,0.2);
  display: inline-block;
  position: relative; z-index: 3;
}

/* ===== 实验节点 iframe 容器 ===== */
.experiment-hint {
  text-align: center; color: var(--gold);
  font-size: 13px; margin: 8px 20px;
  padding: 6px 16px; background: rgba(255,215,0,0.08);
  border-radius: 12px; border: 1px solid rgba(255,215,0,0.2);
}
.experiment-frame-wrap {
  margin: 8px 20px 16px;
  border: 2px solid rgba(255,215,0,0.3);
  border-radius: 16px;
  overflow: hidden;
  background: #1a1a2e;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  position: relative;
  z-index: 3;
}
.experiment-iframe {
  width: 100%; height: 70vh; min-height: 480px;
  border: none; display: block;
  background: #1a1a2e;
}

/* ===== Galgame对话系统 ===== */
.dialogue-stage {
  position: relative; width: 100%; min-height: 100%;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 0;
}

/* 角色立绘 */
.character-sprite {
  position: absolute; bottom: 220px; right: 5%;
  width: 280px; height: auto;
  z-index: 2;
  animation: charFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.4));
}
.character-sprite img { width: 100%; height: auto; }
.character-sprite.entering { animation: charEnter 0.5s ease, charFloat 4s ease-in-out 0.5s infinite; }
@keyframes charEnter {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes charFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* 对话框 */
.dialogue-box {
  position: relative; z-index: 3;
  margin: 0 20px 16px;
  background: var(--dialog-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255,215,0,0.25);
  border-radius: 20px;
  padding: 20px 28px 24px;
  min-height: 160px; max-height: 260px;
  cursor: pointer;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.3);
  transition: border-color 0.3s;
}
.dialogue-box:hover { border-color: rgba(255,215,0,0.5); }

/* 名牌 */
.dialogue-name-tag {
  position: absolute; top: -14px; left: 24px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #1a1a2e; font-size: 15px; font-weight: bold;
  padding: 4px 20px; border-radius: 14px;
  box-shadow: 0 2px 10px rgba(255,215,0,0.3);
}
.dialogue-name-tag.narrator {
  background: linear-gradient(135deg, #78909c 0%, #546e7a 100%);
  color: #fff;
}

/* 对话文本 */
.dialogue-text {
  color: var(--text-light); font-size: 16px;
  line-height: 1.8; margin-top: 8px;
  min-height: 60px;
}
.dialogue-text .typing-cursor {
  display: inline-block; width: 2px; height: 18px;
  background: var(--gold); margin-left: 2px;
  animation: blink 0.6s ease infinite;
  vertical-align: middle;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* 点击提示 */
.dialogue-hint {
  position: absolute; bottom: 8px; right: 20px;
  color: var(--gold); font-size: 12px;
  animation: hintBounce 1.5s ease-in-out infinite;
}
@keyframes hintBounce {
  0%,100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(-4px); opacity: 1; }
}

/* ===== 游戏交互区域 ===== */
.game-panel {
  margin: 12px 20px 16px;
  background: rgba(10, 20, 40, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255,215,0,0.2);
  border-radius: 20px;
  padding: 24px;
  z-index: 3; position: relative;
  max-height: 55vh; overflow-y: auto;
}
.game-panel::-webkit-scrollbar { width: 6px; }
.game-panel::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.game-panel::-webkit-scrollbar-thumb { background: rgba(255,215,0,0.2); border-radius: 3px; }

.game-title {
  font-size: 20px; font-weight: bold;
  color: var(--gold); margin-bottom: 8px; text-align: center;
}
.game-desc { color: var(--text-dim); font-size: 14px; text-align: center; margin-bottom: 20px; }

/* 节点导航区（进入下一节点按钮）*/
.node-nav {
  text-align: center;
  margin: 16px 20px 20px;
  padding: 12px;
  position: relative; z-index: 3;
}
.next-node-btn {
  font-size: 16px !important;
  padding: 14px 36px !important;
  animation: btnGlow 1.5s ease-in-out infinite;
}
@keyframes btnGlow {
  0%,100% { box-shadow: 0 4px 15px rgba(255,215,0,0.3); }
  50% { box-shadow: 0 4px 25px rgba(255,215,0,0.6); }
}

/* 分拣游戏 */
.sorting-game { display: flex; flex-direction: column; gap: 16px; }
.sorting-belt {
  display: flex; justify-content: center; gap: 12px;
  flex-wrap: wrap; min-height: 70px; padding: 14px;
  background: rgba(0,0,0,0.2); border-radius: 14px;
}
.sort-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 14px; border: 2px solid rgba(255,255,255,0.15);
  border-radius: 14px; background: rgba(255,255,255,0.08);
  cursor: pointer; transition: all 0.3s; user-select: none;
}
.sort-item:hover { transform: scale(1.05); border-color: var(--gold); }
.sort-item.sorted { opacity: 0.3; pointer-events: none; }
.sort-item .emoji { font-size: 28px; }
.sort-item .name { font-size: 11px; color: var(--text-light); }
.sorting-buckets { display: flex; gap: 16px; justify-content: center; }
.sort-bucket {
  flex: 1; max-width: 180px; min-height: 100px;
  border: 2px dashed rgba(255,255,255,0.2); border-radius: 14px;
  padding: 10px; display: flex; flex-direction: column;
  align-items: center; gap: 6px; transition: all 0.3s;
}
.sort-bucket.dragover { border-color: var(--gold); background: rgba(255,215,0,0.1); }
.sort-bucket .bucket-label { font-size: 13px; font-weight: bold; color: var(--text-light); }
.sort-bucket .bucket-items { display: flex; flex-wrap: wrap; gap: 4px; }
.sort-bucket .placed-item { font-size: 20px; }

/* 积木拼接 */
.block-sequence { display: flex; flex-direction: column; gap: 10px; }
.block-slot { display: flex; align-items: center; gap: 8px; }
.block-slot .slot-label { font-size: 13px; color: var(--text-dim); width: 50px; }
.block-pool { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.draggable-block {
  padding: 10px 18px; border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px; background: rgba(255,255,255,0.08);
  color: var(--text-light); cursor: grab; user-select: none;
  font-size: 14px; transition: all 0.3s;
}
.draggable-block:hover { border-color: var(--gold); }
.draggable-block.dragging { opacity: 0.5; }
.draggable-block.selected { border-color: var(--gold); background: rgba(255,215,0,0.15); }
.block-drop-zone {
  flex: 1; min-height: 44px;
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  padding: 6px 10px; transition: all 0.3s;
}
.block-drop-zone.dragover { border-color: var(--gold); background: rgba(255,215,0,0.1); }
.block-drop-zone .placed-block {
  padding: 6px 14px; border: 1px solid rgba(255,215,0,0.3);
  border-radius: 8px; background: rgba(255,215,0,0.1);
  color: var(--gold); font-size: 13px;
}

/* 反馈区域 */
.feedback-area {
  margin-top: 12px; padding: 12px 16px;
  border-radius: 12px; font-size: 14px; line-height: 1.6;
  display: none; animation: fadeIn 0.4s ease;
}
.feedback-area.show { display: block; }
.feedback-area.success { background: rgba(102,187,106,0.15); border: 1px solid rgba(102,187,106,0.3); color: var(--green); }
.feedback-area.error { background: rgba(239,83,80,0.15); border: 1px solid rgba(239,83,80,0.3); color: var(--red); }
.feedback-area.info { background: rgba(77,208,225,0.15); border: 1px solid rgba(77,208,225,0.3); color: var(--blue); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* 操作按钮 */
.action-btn {
  padding: 12px 32px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #1a1a2e; font-size: 15px; font-weight: bold;
  cursor: pointer; transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(255,215,0,0.3); margin-top: 12px;
}
.action-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,215,0,0.4); }
.action-btn:active { transform: translateY(0); }
.action-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.action-btn.secondary { background: rgba(255,255,255,0.1); color: var(--text-light); box-shadow: none; }
.action-btn.secondary:hover { background: rgba(255,255,255,0.15); }

/* 课后练习 */
.quiz-section {
  margin: 12px 20px 16px;
  background: rgba(10, 20, 40, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(77,208,225,0.2);
  border-radius: 20px;
  padding: 20px;
  z-index: 3; position: relative;
}
.quiz-title {
  font-size: 16px; font-weight: bold;
  color: var(--blue); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.quiz-reward {
  font-size: 12px; color: var(--gold);
  background: rgba(255,215,0,0.1);
  padding: 2px 10px; border-radius: 10px;
}
.quiz-item { margin-bottom: 16px; }
.quiz-item .quiz-question { margin-bottom: 8px; color: var(--text-light); font-size: 14px; }
.quiz-item .choice-list { display: flex; flex-direction: column; gap: 8px; }
.quiz-item .choice-item {
  padding: 12px 16px; border: 2px solid rgba(255,255,255,0.15);
  border-radius: 12px; background: rgba(255,255,255,0.06);
  color: var(--text-light); font-size: 14px;
  cursor: pointer; transition: all 0.3s;
  display: flex; align-items: center; gap: 10px;
}
.quiz-item .choice-item:hover { border-color: var(--gold); background: rgba(255,215,0,0.1); }
.quiz-item .choice-item.correct { border-color: var(--green); background: rgba(102,187,106,0.15); }
.quiz-item .choice-item.wrong { border-color: var(--red); background: rgba(239,83,80,0.15); }
.quiz-item .choice-letter {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.1); font-weight: bold; font-size: 12px;
}

/* 完成标记 */
.completion-badge { display: none; }

/* Toast 提示 */
.toast {
  position: fixed; top: 70px; right: 20px;
  padding: 12px 20px; border-radius: 12px;
  color: #fff; font-weight: bold; z-index: 1000;
  animation: slideIn 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3); font-size: 14px;
}
.toast.success { background: linear-gradient(135deg, #66bb6a, #43a047); }
.toast.error { background: linear-gradient(135deg, #ef5350, #e53935); }
.toast.info { background: linear-gradient(135deg, #4dd0e1, #00bcd4); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* 金币动画 */
.coin-fly {
  position: fixed; font-size: 24px; z-index: 999; pointer-events: none;
  animation: coinFly 1s ease-out forwards;
}
@keyframes coinFly {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.5) translateY(-60px); }
}

/* 章节标题覆盖层 */
.chapter-title-overlay { display: none; }

/* 天平游戏 */
.balance-game { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.balance-scale { display: flex; justify-content: center; align-items: flex-end; gap: 0; position: relative; height: 120px; }
.balance-beam {
  position: absolute; top: 20px; left: 50%;
  transform: translateX(-50%) rotate(0deg);
  width: 260px; height: 5px;
  background: linear-gradient(90deg, #b8860b, #daa520, #b8860b);
  border-radius: 3px; transform-origin: center;
  transition: transform 0.5s ease;
}
.balance-pillar {
  position: absolute; top: 25px; left: 50%;
  transform: translateX(-50%);
  width: 6px; height: 70px; background: #8b6914; border-radius: 3px;
}
.balance-pan {
  width: 100px; height: 50px;
  background: rgba(184,134,11,0.2);
  border: 2px solid #b8860b;
  border-radius: 0 0 50px 50px;
  display: flex; flex-wrap: wrap; gap: 4px;
  justify-content: center; align-items: center; padding: 6px;
  position: relative;
}
.balance-left, .balance-right { position: absolute; top: 25px; transition: transform 0.5s ease; }
.balance-left { left: calc(50% - 130px); }
.balance-right { right: calc(50% - 130px); }
.data-coin { font-size: 18px; cursor: pointer; transition: all 0.3s; }
.data-coin:hover { transform: scale(1.2); }
.coin-pool { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* 石头剪刀布 */
.rps-game { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rps-progress { display: flex; gap: 8px; }
.rps-progress-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.2); transition: all 0.3s; }
.rps-progress-dot.active { background: var(--gold); }
.rps-progress-dot.done { background: var(--green); }
.rps-choices { display: flex; gap: 16px; }
.rps-choice {
  font-size: 40px; cursor: pointer; padding: 12px 20px;
  border: 2px solid rgba(255,255,255,0.15); border-radius: 14px;
  background: rgba(255,255,255,0.06); transition: all 0.3s;
}
.rps-choice:hover { transform: scale(1.1); border-color: var(--gold); }
.rps-choice.selected { border-color: var(--gold); background: rgba(255,215,0,0.15); }

/* Token河 */
.token-game { display: flex; flex-direction: column; gap: 12px; }
.token-river {
  background: rgba(0,100,150,0.2);
  border: 1px solid rgba(77,208,225,0.3);
  border-radius: 12px; padding: 14px; min-height: 70px;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center;
}
.token-fragment {
  padding: 6px 12px; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px; background: rgba(255,255,255,0.08);
  color: var(--text-light); cursor: pointer; font-size: 13px;
  transition: all 0.3s; user-select: none;
}
.token-fragment:hover { transform: scale(1.05); border-color: var(--gold); }
.token-fragment.valid { border-color: rgba(102,187,106,0.4); }
.token-fragment.invalid { border-color: rgba(239,83,80,0.4); }
.token-fragment.selected { background: rgba(255,215,0,0.15); border-color: var(--gold); }
.token-bridge {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  min-height: 44px; padding: 10px;
  border: 2px dashed rgba(255,255,255,0.15); border-radius: 12px;
}

/* 魔法书 */
.book-shelf { display: flex; flex-direction: column; gap: 10px; }
.book-card {
  padding: 14px 18px; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px; background: rgba(255,255,255,0.06);
  transition: all 0.3s; cursor: pointer;
}
.book-card:hover { border-color: rgba(255,215,0,0.3); }
.book-card.read { border-color: rgba(102,187,106,0.3); background: rgba(102,187,106,0.05); }
.book-card .book-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.book-card .book-icon { font-size: 24px; }
.book-card .book-name { font-size: 15px; font-weight: bold; color: var(--gold); }
.book-card .book-content { display: none; color: var(--text-light); font-size: 13px; line-height: 1.6; }
.book-card.expanded .book-content { display: block; }
.book-card .book-good { margin-top: 6px; padding: 6px 10px; background: rgba(102,187,106,0.1); border-radius: 8px; font-size: 12px; color: var(--green); }
.book-card .book-quiz { margin-top: 10px; display: none; }
.book-card.expanded .book-quiz { display: block; }

/* 提示词打分 */
.scoring-game { display: flex; flex-direction: column; gap: 12px; }
.score-step { padding: 14px 18px; border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; background: rgba(255,255,255,0.06); }
.score-step .step-prompt { color: var(--text-light); font-size: 13px; margin-bottom: 6px; font-style: italic; }
.score-step .step-score { font-size: 24px; font-weight: bold; color: var(--gold); }
.score-step .step-feedback { color: var(--text-dim); font-size: 12px; margin-top: 4px; }
.score-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.1); overflow: hidden; margin-top: 6px; }
.score-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }

/* 幻觉修复 */
.hallucination-game { display: flex; flex-direction: column; gap: 12px; }
.error-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.error-tag {
  padding: 6px 14px; border: 2px solid rgba(239,83,80,0.4);
  border-radius: 10px; background: rgba(239,83,80,0.1);
  color: var(--red); font-size: 13px; cursor: pointer; transition: all 0.3s;
}
.error-tag.found { border-color: var(--green); background: rgba(102,187,106,0.1); color: var(--green); text-decoration: line-through; }

/* 道德法庭 */
.ethics-game { display: flex; flex-direction: column; gap: 12px; }
.ethics-cards { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 50px; }
.ethics-card {
  padding: 10px 14px; border: 2px solid rgba(255,255,255,0.15);
  border-radius: 10px; background: rgba(255,255,255,0.08);
  color: var(--text-light); font-size: 13px; cursor: grab; user-select: none; transition: all 0.3s;
}
.ethics-card:hover { border-color: var(--gold); transform: scale(1.05); }
.ethics-card.dragging { opacity: 0.5; }
.ethics-zones { display: flex; gap: 10px; }
.ethics-zone {
  flex: 1; min-height: 80px;
  border: 2px dashed rgba(255,255,255,0.15); border-radius: 12px;
  padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: all 0.3s;
}
.ethics-zone.dragover { border-color: var(--gold); background: rgba(255,215,0,0.1); }
.ethics-zone .zone-label { font-size: 13px; font-weight: bold; color: var(--text-light); }
.ethics-zone .zone-items { display: flex; flex-wrap: wrap; gap: 4px; }
.ethics-zone .placed-card { padding: 3px 8px; border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; font-size: 11px; }

/* 选择题通用 */
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice-item {
  padding: 14px 18px; border: 2px solid rgba(255,255,255,0.15);
  border-radius: 14px; background: rgba(255,255,255,0.06);
  color: var(--text-light); font-size: 15px;
  cursor: pointer; transition: all 0.3s;
  display: flex; align-items: center; gap: 12px;
}
.choice-item:hover { border-color: var(--gold); background: rgba(255,215,0,0.1); transform: translateX(4px); }
.choice-item.selected { border-color: var(--gold); background: rgba(255,215,0,0.15); }
.choice-item.correct { border-color: var(--green); background: rgba(102,187,106,0.15); }
.choice-item.wrong { border-color: var(--red); background: rgba(239,83,80,0.15); }
.choice-letter {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.1); font-weight: bold; font-size: 12px;
}

/* ===== 三级浮层：弹窗 ===== */
.popup-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 500;
}
.popup-overlay.show { display: flex; animation: fadeIn 0.3s ease; }
.popup-card {
  background: linear-gradient(135deg, rgba(30,30,60,0.95), rgba(20,20,50,0.95));
  border: 2px solid var(--gold);
  border-radius: 24px;
  padding: 40px 36px;
  text-align: center;
  max-width: 380px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 30px rgba(255,215,0,0.2);
  animation: popupBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popupBounce {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}
.popup-celebrate { font-size: 64px; margin-bottom: 12px; animation: spin 1s ease; }
.popup-title { font-size: 22px; color: var(--gold); font-weight: bold; margin-bottom: 8px; }
.popup-island { font-size: 18px; color: var(--text-light); margin-bottom: 8px; }
.popup-desc { font-size: 13px; color: var(--text-dim); margin-bottom: 16px; line-height: 1.6; }
.popup-reward {
  display: inline-block;
  background: rgba(255,215,0,0.15);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 20px;
  padding: 6px 18px;
  color: var(--gold); font-weight: bold;
  margin-bottom: 20px;
}

/* 加载动画 */
.loader {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--gold);
  border-radius: 50%; animation: spin 0.8s linear infinite;
  margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 响应式 */
@media (max-width: 768px) {
  .topbar .logo span { display: none; }
  .topbar { padding: 0 12px; }
  .character-sprite { width: 200px; right: 2%; bottom: 200px; }
  .dialogue-box { margin: 0 12px 12px; padding: 16px 20px 20px; min-height: 140px; }
  .dialogue-text { font-size: 14px; }
  .game-panel { margin: 8px 12px 12px; padding: 16px; }
  .quiz-section { margin: 8px 12px 12px; padding: 16px; }
  .node-chapter-tag { font-size: 12px; margin: 8px 12px 0; }
  .island-grid { grid-template-columns: 1fr 1fr; gap: 12px; padding: 8px 12px 90px; }
  .island-cover { height: 80px; }
  .island-card-title { font-size: 14px; }
  .island-card-sub { font-size: 11px; }
  .guide-sprite { width: 60px; }
  .guide-bubble { font-size: 12px; max-width: 140px; }
  .node-dot { width: 30px; height: 30px; font-size: 12px; }
  .node-line { width: 20px; }
  .map-title h1 { font-size: 22px; }
  .map-title-icon { font-size: 36px; }
  .map-cloud { font-size: 28px; }
}

/* ============================================================
   顶栏功能导航（首页红框区域）
   ============================================================ */
.hub-nav {
  display: flex; align-items: center; gap: 8px;
  flex: 1; justify-content: center;
  padding: 0 16px; min-width: 0;
}
.hub-nav-btn {
  display: flex; align-items: center; gap: 5px;
  height: 38px; padding: 0 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.18);
  color: #fff; font-size: 14px; font-weight: bold;
  text-decoration: none; cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.hub-nav-btn:hover {
  background: rgba(255,215,0,0.22);
  border-color: rgba(255,215,0,0.55);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255,215,0,0.25);
}
.hub-nav-btn:active { transform: translateY(0) scale(0.96); }
.hub-nav-btn .nav-emoji { font-size: 17px; }

/* ============================================================
   星光乐园（hub.html）通用框架
   ============================================================ */
/* --- 星光乐园设计令牌（明亮主题，统一视觉规范） --- */
.hub-page {
  /* 色彩系统：柔和明亮底 + 深色文字，确保 ≥ 4.5:1 对比度 */
  --hub-bg-0: #eef4ff;            /* 最浅·淡蓝 */
  --hub-bg-1: #f6f0ff;            /* 中层·淡紫 */
  --hub-bg-2: #fff6ec;            /* 底层·暖奶黄 */
  --hub-surface: #ffffff;                          /* 卡片：纯白 */
  --hub-surface-strong: #f3efff;                   /* 悬停/强调表面 */
  --hub-border: rgba(46,42,86,0.12);               /* 淡靛描边 */
  --hub-text: #2e2a56;            /* 主文字·深靛蓝（浅底对比 12.8:1） */
  --hub-text-sub: rgba(46,42,86,0.78);  /* 次级文字 ≈ 8:1 */
  --hub-text-dim: rgba(46,42,86,0.62);  /* 辅助文字 ≈ 5.6:1 */
  --hub-gold: #e6a800;            /* 深金，浅底可读 */
  --hub-radius: 20px;
  --hub-font-size: 15px;

  min-height: 100vh;
  font-size: var(--hub-font-size);
  line-height: 1.65;
  letter-spacing: 0.2px;
  color: var(--hub-text);
  background:
    radial-gradient(ellipse 900px 500px at 12% -8%, rgba(124,77,255,0.14), transparent 60%),
    radial-gradient(ellipse 800px 460px at 90% -4%, rgba(255,107,157,0.14), transparent 55%),
    linear-gradient(180deg, var(--hub-bg-0) 0%, var(--hub-bg-1) 48%, var(--hub-bg-2) 100%);
}
/* 淡彩光斑点缀（纯CSS绘制，零网络请求） */
.hub-page::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(14px 14px at 60px 80px, rgba(255,183,77,0.20), transparent 60%),
    radial-gradient(10px 10px at 220px 150px, rgba(124,77,255,0.14), transparent 60%),
    radial-gradient(12px 12px at 360px 60px, rgba(255,107,157,0.16), transparent 60%),
    radial-gradient(8px 8px at 150px 280px, rgba(0,229,255,0.16), transparent 60%);
  background-size: 440px 340px;
  opacity: 0.9;
}
.hub-content {
  position: relative; z-index: 1;
  max-width: 1080px; margin: 0 auto;
  padding: 76px 20px 48px;
}
/* 键盘操作可见焦点（无障碍，浅底用深紫） */
.hub-page :is(a, button, input, textarea):focus-visible {
  outline: 3px solid rgba(108,77,246,0.65);
  outline-offset: 2px;
  border-radius: 8px;
}
.hub-back-btn {
  display: flex; align-items: center; gap: 5px;
  height: 36px; padding: 0 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fdf6e3; font-size: 13px; font-weight: bold;
  text-decoration: none;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.18);
}
.hub-back-btn:hover { background: rgba(255, 215, 0, 0.16); border-color: rgba(255,215,0,0.4); }

.hub-page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.hph-icon {
  width: 60px; height: 60px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  background: #ffffff;
  border: 1.5px solid rgba(108,77,246,0.25);
  box-shadow: 0 4px 14px rgba(92,60,220,0.14);
}
.hub-page-head h2 {
  font-size: 27px; color: var(--hub-text); margin: 0 0 5px;
  letter-spacing: 0.5px;
}
.hub-page-head p { margin: 0; color: var(--hub-text-sub); font-size: 15px; }

/* ============================================================
   换装商店
   ============================================================ */
.shop-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.shop-item {
  background: #ffffff;
  border: 1.5px solid var(--hub-border);
  border-radius: 20px; padding: 18px 14px 16px;
  text-align: center; position: relative;
  box-shadow: 0 3px 12px rgba(70,55,140,0.07);
  transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
}
.shop-item:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(70,55,140,0.13); }
.shop-item.equipped {
  border-color: #ffb300;
  box-shadow: 0 0 0 3px rgba(255,179,0,0.18), 0 6px 18px rgba(230,168,0,0.18);
  background: #fffaf0;
}
.shop-avatar-wrap {
  width: 92px; height: 92px; margin: 0 auto 10px;
  border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, #f3efff, #faf8ff);
  border: 3px solid rgba(108,77,246,0.2);
  display: flex; align-items: center; justify-content: center;
}
.shop-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }
.shop-name { font-weight: bold; font-size: 15.5px; margin-bottom: 8px; color: var(--hub-text); letter-spacing: 0.4px; }
.shop-badge {
  display: inline-block; font-size: 12px; font-weight: bold;
  padding: 3px 12px; border-radius: 12px; margin-bottom: 10px;
}
.badge-price { background: #fff3d0; color: #8a5a00; border: 1px solid #f0d27a; }
.badge-owned { background: #e3f6e5; color: #1b5e20; border: 1px solid #a5d6a7; }
.badge-on { background: #fff3d0; color: #8a5a00; border: 1px solid #f0d27a; }
.shop-btn {
  width: 100%; height: 42px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, #FFD54F, #FFB300);
  color: #4E342E; font-weight: bold; font-size: 15px; cursor: pointer;
  transition: transform .12s ease, filter .2s ease;
}
.shop-btn:hover { filter: brightness(1.05); }
.shop-btn:active { transform: scale(0.96); }
.shop-item.equipped .shop-btn { background: #efeafc; color: #5b4bb8; }
.shop-btn:disabled { opacity: 0.7; cursor: default; }

/* ============================================================
   课后习题
   ============================================================ */
.quiz-island-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.quiz-tab {
  padding: 10px 18px; border-radius: 18px; cursor: pointer;
  background: #ffffff;
  border: 1.5px solid var(--hub-border);
  color: var(--hub-text); font-size: 14px; font-weight: bold;
  box-shadow: 0 2px 8px rgba(70,55,140,0.05);
  transition: all .15s ease;
}
.quiz-tab:hover { background: var(--hub-surface-strong); }
.quiz-tab.active {
  /* 统一深紫底白字保证对比，左侧彩条保留岛屿色 */
  background: linear-gradient(135deg, #6c4df6, #4b2fc8);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(92,60,220,0.30), inset 4px 0 0 var(--tc, #ffd700);
}
.quiz-body { display: flex; flex-direction: column; gap: 16px; }
.quiz-chapter-card {
  background: #ffffff;
  border: 1.5px solid var(--hub-border);
  border-radius: 18px; padding: 18px 20px;
  box-shadow: 0 3px 12px rgba(70,55,140,0.07);
}
.qc-head {
  font-size: 17px; font-weight: bold; color: var(--hub-text);
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.qc-head small { color: var(--hub-text-dim); font-size: 12.5px; font-weight: normal; }
.qc-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.quiz-q {
  background: #f6f4ff;
  border: 1px solid rgba(108,77,246,0.12);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 12px;
}
.quiz-q.done { background: #fff8e1; border: 1px solid rgba(240,210,122,0.8); }
.qq-title { font-size: 15.5px; color: var(--hub-text); margin-bottom: 10px; line-height: 1.65; letter-spacing: 0.2px; }
.qq-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qq-opt, .daily-opt {
  text-align: left; padding: 11px 14px;
  border-radius: 12px; cursor: pointer;
  background: #ffffff;
  border: 1.5px solid rgba(108,77,246,0.18);
  color: #3a3566; font-size: 14.5px; line-height: 1.5; letter-spacing: 0.2px;
  transition: all .12s ease;
}
.qq-opt:hover, .daily-opt:hover { background: var(--hub-surface-strong); border-color: rgba(108,77,246,0.4); transform: translateY(-1px); }
.qq-opt.wrong-pick, .daily-opt.wrong-pick {
  background: #fdecec; border-color: #e57373; color: #c62828;
  animation: shakeX .35s ease;
}
.qq-opt.right-pick, .daily-opt.right-pick {
  background: #e8f7eb; border-color: #66bb6a; color: #2e7d32;
  box-shadow: 0 0 0 2px rgba(102,187,106,0.25);
}
.qq-opt:disabled, .daily-opt:disabled { cursor: default; opacity: 0.9; }
.qq-feedback { margin-top: 8px; font-size: 13.5px; min-height: 18px; font-weight: bold; }
.qq-feedback.ok { color: #1a7a38; }
.qq-feedback.hint { color: #b45309; }
.quiz-empty { color: var(--hub-text-dim); font-size: 13.5px; padding: 6px 0; }
@keyframes shakeX {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ============================================================
   每日挑战
   ============================================================ */
.daily-card {
  background: linear-gradient(150deg, #f3eaff 0%, #fdeef5 60%, #fff6ec 100%);
  border: 1.5px solid rgba(108,77,246,0.25);
  border-radius: 24px; padding: 30px;
  display: flex; flex-wrap: wrap; gap: 26px; align-items: flex-start;
  box-shadow: 0 4px 18px rgba(70,55,140,0.10);
}
.daily-streak {
  flex-shrink: 0; text-align: center;
  background: #ffffff;
  border: 1.5px solid rgba(255,179,0,0.4);
  border-radius: 18px; padding: 16px 20px;
  min-width: 100px;
}
.ds-num { font-size: 40px; font-weight: bold; color: #b06a00; line-height: 1; }
.ds-num small { font-size: 16px; margin-left: 2px; }
.ds-label { font-size: 13px; color: var(--hub-text-sub); margin-top: 6px; font-weight: bold; }
.ds-badge {
  margin-top: 10px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: bold; line-height: 1;
  color: var(--hub-text-dim);
  background: rgba(46,42,86,0.07);
  white-space: nowrap;
}
.ds-badge.done { color: #1a7a38; background: rgba(46,160,90,0.14); }
.daily-q { flex: 1 1 320px; min-width: 0; }
.daily-q-title { color: #9a5a00; font-size: 13px; font-weight: bold; margin-bottom: 8px; }
.daily-q-text { font-size: 20px; font-weight: bold; color: var(--hub-text); line-height: 1.55; margin-bottom: 18px; }
.daily-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.daily-fb { margin-top: 14px; font-size: 15px; font-weight: bold; min-height: 20px; line-height: 1.5; }
.daily-fb.ok { color: #1a7a38; }
.daily-fb.hint { color: #b45309; }
.daily-fb.info { color: var(--hub-text-sub); font-weight: normal; }
.daily-tip {
  flex-basis: 100%; margin-top: 4px;
  font-size: 13px; color: var(--hub-text-dim);
}

/* ============================================================
   星光讨论区
   ============================================================ */
.forum-compose {
  display: flex; gap: 12px;
  background: #ffffff;
  border: 1.5px solid var(--hub-border);
  border-radius: 18px; padding: 14px; margin-bottom: 20px;
  box-shadow: 0 3px 12px rgba(70,55,140,0.07);
}
.forum-my-avatar, .fp-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  background: #f3efff;
  border: 2px solid rgba(255,179,0,0.55);
}
.forum-compose-main { flex: 1; }
#forumText {
  width: 100%; box-sizing: border-box; resize: none;
  background: #faf9ff;
  border: 1.5px solid rgba(108,77,246,0.2);
  border-radius: 12px; padding: 10px 14px;
  color: var(--hub-text); font-size: 14.5px; font-family: inherit; line-height: 1.6;
}
#forumText::placeholder { color: #756f99; }
#forumText:focus { outline: none; border-color: rgba(108,77,246,0.6); background: #fff; }
.forum-compose-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.forum-count { font-size: 12.5px; color: var(--hub-text-dim); }
.forum-send {
  height: 38px; padding: 0 24px; border: 1px solid rgba(255,215,0,0.4); border-radius: 999px;
  background: linear-gradient(135deg, #ffb640, #f5920b);
  color: #fff; font-weight: bold; font-size: 14px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(245,146,11,0.35);
  transition: filter .3s cubic-bezier(.4,0,.2,1), transform .3s cubic-bezier(.4,0,.2,1);
}
.forum-send:hover { filter: brightness(1.06); }
.forum-send:active { transform: scale(0.96); }
.forum-send:disabled { opacity: 0.6; }
.forum-list { display: flex; flex-direction: column; gap: 12px; }
.forum-loading, .forum-empty {
  text-align: center; color: var(--hub-text-dim);
  padding: 36px 0; font-size: 14px;
}
.forum-post {
  display: flex; gap: 12px;
  background: #ffffff;
  border: 1.5px solid var(--hub-border);
  border-radius: 18px; padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(70,55,140,0.06);
}
.fp-body { flex: 1; min-width: 0; }
.fp-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.fp-head b { color: #6a3fb5; font-size: 14.5px; }
.fp-time { font-size: 12px; color: var(--hub-text-dim); }
.fp-content { color: var(--hub-text); font-size: 15px; line-height: 1.7; letter-spacing: 0.2px; word-break: break-word; }
.fp-actions { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.fp-like, .fp-comment-btn {
  border: none; background: none; cursor: pointer;
  color: var(--hub-text-sub); font-size: 13.5px; padding: 5px 12px;
  border-radius: 16px; font-family: inherit;
  transition: background .15s ease, color .15s ease;
}
.fp-like:hover, .fp-comment-btn:hover { background: #f3efff; }
.fp-like.liked { color: #d81b60; font-weight: bold; }
.fp-comment-btn.open { color: #6a3fb5; background: #f3efff; font-weight: bold; }

/* ===== 评论展开区 ===== */
.fp-comments {
  margin-top: 12px;
  padding: 12px 12px 10px;
  background: #faf9ff;
  border: 1px solid rgba(108,77,246,0.12);
  border-radius: 14px;
}
.fp-comments[hidden] { display: none; }
.fpc-loading, .fpc-empty {
  text-align: center; color: var(--hub-text-dim);
  font-size: 13px; padding: 8px 0;
}
.fpc-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.fpc-item { display: flex; gap: 9px; align-items: flex-start; }
.fpc-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; background: #fff;
  border: 1.5px solid rgba(108,77,246,0.2);
}
.fpc-main { min-width: 0; }
.fpc-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.fpc-head b { color: #6a3fb5; font-size: 13.5px; }
.fpc-text {
  font-size: 14px; line-height: 1.65; color: var(--hub-text);
  word-break: break-word;
}
.fpc-compose { display: flex; gap: 8px; align-items: center; }
.fpc-myavatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; background: #f3efff;
  border: 1.5px solid rgba(255,179,0,0.45);
}
.fpc-input {
  flex: 1; min-width: 0; height: 40px; padding: 0 14px;
  border-radius: 20px; border: 1.5px solid rgba(108,77,246,0.22);
  background: #ffffff; color: var(--hub-text);
  font-size: 14px; font-family: inherit;
}
.fpc-input::placeholder { color: #9b97c0; }
.fpc-input:focus { outline: none; border-color: rgba(108,77,246,0.6); }
.fpc-send {
  flex-shrink: 0; height: 40px; padding: 0 18px; border: none; border-radius: 20px;
  background: linear-gradient(135deg, #6c4df6, #4b2fc8);
  color: #fff; font-weight: bold; font-size: 14px; cursor: pointer;
  font-family: inherit;
  transition: transform .12s ease, filter .2s ease;
}
.fpc-send:hover { filter: brightness(1.08); }
.fpc-send:active { transform: scale(0.95); }
.fpc-send:disabled { opacity: 0.6; cursor: default; }

/* ============================================================
   问问小智
   ============================================================ */
.ask-chat {
  height: 50vh; min-height: 320px; overflow-y: auto;
  background: #fff7df;
  border: 1.5px solid rgba(230,168,0,0.28);
  border-radius: 20px; padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
  scroll-behavior: smooth;
}
.ask-msg { display: flex; gap: 10px; align-items: flex-start; max-width: 85%; }
.ask-msg img {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(108,77,246,0.3);
  background: #fff;
}
.ask-bubble {
  padding: 12px 16px; border-radius: 18px;
  border-top-left-radius: 6px;
  font-size: 15px; line-height: 1.75; letter-spacing: 0.3px;
  color: var(--hub-text);
  background: #ffffff;
  border: 1px solid rgba(230,168,0,0.18);
  box-shadow: 0 2px 8px rgba(176,106,0,0.08);
  word-break: break-word;
}
.ask-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.ask-msg.me .ask-bubble {
  /* 暖金黄气泡 + 深棕字，与发送按钮同色系，深棕字 6.3:1 满足 AA */
  background: linear-gradient(135deg, #FFD54F, #FFB300);
  color: #4E342E;
  border: none;
  border-radius: 18px; border-top-right-radius: 6px;
  box-shadow: 0 3px 12px rgba(255,179,0,0.4);
}
.ask-dots { color: var(--hub-text-sub); letter-spacing: 2px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.ask-suggest { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 12px; align-items: center; }
.ask-suggest-label {
  flex-basis: 100%;
  font-size: 13px; font-weight: bold; letter-spacing: 1px;
  color: #f5920b;
  background: rgba(255, 214, 130, 0.14);
  border: 1px solid rgba(255, 190, 80, 0.28);
  border-radius: 999px;
  padding: 6px 16px;
  width: fit-content;
}
.ask-chip {
  padding: 10px 18px; border-radius: 20px; cursor: pointer;
  background: #fff1dc;
  border: 1.5px solid #f3c98b;
  color: #a35b00; font-size: 14px; font-weight: bold; letter-spacing: 0.3px;
  transition: transform .12s ease, background .2s ease;
}
.ask-chip:hover { background: #ffe6bf; transform: translateY(-2px); }
.ask-chip:active { transform: translateY(0) scale(0.96); }
.ask-input-bar { display: flex; gap: 10px; }
#askInput {
  flex: 1; height: 50px; padding: 0 18px;
  border-radius: 16px; border: 1.5px solid rgba(108,77,246,0.25);
  background: #ffffff; color: var(--hub-text);
  font-size: 15px; letter-spacing: 0.3px;
}
#askInput::placeholder { color: #756f99; }
#askInput:focus { outline: none; border-color: rgba(108,77,246,0.65); background: #fff; }
#askSend {
  height: 50px; padding: 0 26px; border: none; border-radius: 16px;
  background: linear-gradient(135deg, #FFD54F, #FFB300);
  color: #4E342E; font-weight: bold; font-size: 16px; letter-spacing: 1px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(255,179,0,0.3);
  transition: transform .12s ease, filter .2s ease;
}
#askSend:hover { filter: brightness(1.05); }
#askSend:active { transform: scale(0.96); }

/* ===== 全局轻提示 ===== */
.hub-toast {
  position: fixed; left: 50%; bottom: 44px; transform: translateX(-50%) translateY(20px);
  background: rgba(20,20,46,0.95); color: #fff;
  border: 1.5px solid rgba(255,215,0,0.5);
  padding: 12px 24px; border-radius: 16px; font-size: 14px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 9999; max-width: 86vw; text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.hub-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   功能中心响应式
   ============================================================ */
@media (max-width: 1100px) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-grid { grid-template-columns: repeat(3, 1fr); }
  .hub-nav-btn { padding: 0 10px; font-size: 13px; }
}
@media (max-width: 900px) {
  .hub-nav { gap: 5px; padding: 0 6px; order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; }
  .topbar { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; }
  .hub-nav::-webkit-scrollbar { display: none; }
  .daily-card { flex-wrap: wrap; }
}
@media (max-width: 768px) {
  .hub-grid { grid-template-columns: 1fr; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .qq-options, .daily-opts { grid-template-columns: 1fr; }
  .hub-content { padding: 84px 14px 36px; }
  .daily-card { padding: 20px; }
  .hub-page-head h2 { font-size: 21px; }
  .hub-nav-btn .nav-label { display: none; }
  .hub-nav-btn { width: 40px; padding: 0; justify-content: center; }
  .ask-msg { max-width: 95%; }
  .fpc-compose { flex-wrap: wrap; }
  .fpc-input { flex-basis: 100%; }
  .fpc-myavatar { display: none; }
}

/* --- 系统级高对比度模式（强光下/视力辅助，浅色版增强） --- */
@media (prefers-contrast: more) {
  .hub-page {
    --hub-bg-0: #ffffff;
    --hub-bg-1: #f4f2ff;
    --hub-bg-2: #fffaf2;
    --hub-border: rgba(46,42,86,0.35);
    --hub-text-sub: #2e2a56;
    --hub-text-dim: #3d3868;
  }
  .ask-chat { background: #ffffff; }
  .ask-bubble { border-width: 2px; }
  .ask-chip { color: #7a3f00; border-width: 2px; }
  .qq-opt, .daily-opt { border-width: 2px; }
}
/* --- 减弱动效偏好 --- */
@media (prefers-reduced-motion: reduce) {
  .hub-page *, .hub-page *::before {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
