/* ===== 导航栏 - 像素风 ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--paper);
  border-bottom: 4px solid var(--pixel-border);
  padding: 0 var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  transition: transform var(--transition-normal);
  box-shadow: 0 4px 0 var(--clay);
}
.navbar.hidden { transform: translateY(-100%); }

.navbar .logo {
  display: flex; align-items: center; gap: var(--space-1);
  order: 1;
  margin-left: 0;
  margin-right: var(--space-4);
}
.navbar .logo span { 
  font-size: 2.4rem; 
  image-rendering: pixelated;
}

.navbar .links {
  display: flex; gap: var(--space-1); list-style: none;
  overflow-x: auto; flex-wrap: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
  order: 2;
}
.navbar .links a {
  display: block; 
  padding: var(--space-2) var(--space-3);
  color: var(--ink); 
  font-size: 1.25rem;
  font-weight: 700; 
  transition: all var(--transition-fast); 
  white-space: nowrap;
  border: 3px solid transparent;
  position: relative;
}
.navbar .links a:hover {
  background: var(--clay-lighter);
  border-color: var(--clay-dark);
  color: var(--clay-dark);
}
.navbar .links a.active {
  background: var(--clay);
  color: var(--white);
  border-color: var(--pixel-border);
  box-shadow: 2px 2px 0 var(--pixel-border);
  text-shadow: 1px 1px 0 var(--clay-dark);
}

.navbar .toggle {
  display: none; 
  order: 3;
  background: var(--clay);
  color: var(--white);
  width: 44px;
  height: 44px;
  font-size: 1.4rem; 
  cursor: pointer; 
  border: 3px solid var(--pixel-border);
  box-shadow: 3px 3px 0 var(--pixel-border);
  align-items: center;
  justify-content: center;
}
.navbar .toggle:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--pixel-border);
}

/* ===== Section 通用 - 像素风 ===== */
.section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 900;
  color: var(--clay);
  margin-bottom: 0.3em;
  text-shadow: 3px 3px 0 var(--pixel-border);
  letter-spacing: 2px;
}
.section-title::after {
  content: '';
  display: block;
  width: 96px;
  height: 6px;
  background: var(--clay);
  border: 2px solid var(--pixel-border);
  margin: 16px auto 0;
  box-shadow: 2px 2px 0 var(--pixel-border);
}

.section-subtitle {
  text-align: center;
  color: var(--ink-mid);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 50px;
  line-height: 1.7;
}

.section-alt {
  background: var(--paper-dark);
  border-top: 4px solid var(--pixel-border-light);
  border-bottom: 4px solid var(--pixel-border-light);
}

/* ===== Hero - 像素风 ===== */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 100px 20px 60px;
  position: relative; overflow: hidden;
  background-color: var(--paper);
}

/* Hero像素装饰背景（像素化的龟甲骨纹） */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(193, 120, 23, 0.15) 4px, transparent 5px),
    radial-gradient(circle at 80% 70%, rgba(192, 57, 43, 0.12) 4px, transparent 5px),
    radial-gradient(circle at 60% 20%, rgba(74, 124, 89, 0.12) 4px, transparent 5px),
    radial-gradient(circle at 30% 80%, rgba(212, 160, 23, 0.15) 4px, transparent 5px);
  background-size: 200px 200px;
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  font-weight: 400; /* ZCOOL KuaiLe 仅有 Regular 字重，伪加粗会导致笔画变形 */
  color: var(--clay);
  margin-bottom: 0.4em;
  text-shadow: 5px 5px 0 var(--clay-dark);
  letter-spacing: 4px;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.hero .subtitle {
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  color: var(--ink-mid);
  max-width: 800px;
  margin: 0 auto 48px;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: var(--space-4);
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.hero-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 48px; 
  flex: 1 1 0;
  justify-content: center;
  min-width: 160px;
  max-width: 100%;
  background: var(--clay); 
  color: #fff;
  font-size: 1.1rem; 
  font-weight: 800;
  text-decoration: none; 
  transition: all var(--transition-fast);
  border: 4px solid var(--pixel-border);
  box-shadow: 
    inset -4px -4px 0 var(--clay-dark),
    inset 4px 4px 0 var(--clay-light),
    6px 6px 0 var(--pixel-border);
  position: relative;
  z-index: 1;
  letter-spacing: 2px;
}
.hero-cta:hover {
  background: var(--clay-light);
  color: var(--ink-dark);
}
.hero-cta:active {
  transform: translate(6px, 6px);
  box-shadow: 
    inset 4px 4px 0 var(--clay-dark),
    inset -4px -4px 0 var(--clay-light),
    0 0 0 var(--pixel-border);
}

/* ===== 信息卡片网格 - 像素风 ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}

/* ===== 像素图标通用类（img 替换 emoji） ===== */
.pixel-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  image-rendering: pixelated;
}
.pixel-icon-lg {
  width: 1.6em;
  height: 1.6em;
}
.pixel-icon-sm {
  width: 0.85em;
  height: 0.85em;
}

/* 印章Logo样式（使用用户原图，平滑渲染） */
.seal-logo {
  width: 2.2em;
  height: 2.2em;
  vertical-align: middle;
  object-fit: contain;
  transition: transform var(--transition-fast);
}
.navbar .logo span .seal-logo {
  image-rendering: auto; /* 覆盖父级pixelated，避免原图被像素化渲染 */
}
.navbar .logo:hover .seal-logo {
  transform: rotate(-6deg) scale(1.05);
}

/* 导航栏艺术字标题图（源自用户banner，米色背景与导航无缝融合） */
.logo-title-img {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
  image-rendering: auto;
}

.seal-logo-small {
  width: 1.5em;
  height: 1.5em;
  vertical-align: -0.25em;
  object-fit: contain;
  image-rendering: auto;
}
.section-title .seal-logo-small {
  width: 1.7em;
  height: 1.7em;
  vertical-align: -0.3em;
}
footer .seal-logo {
  width: 2em;
  height: 2em;
}
/* 游戏页栏目标题图标 */
.game-col-title .seal-logo-small {
  width: 1.6em;
  height: 1.6em;
  vertical-align: -0.3em;
}
/* 标题内联图标：硬边投影（替代文字阴影） */
.section-title .pixel-icon,
.liushu-card h3 .pixel-icon {
  filter: drop-shadow(2px 2px 0 var(--pixel-border));
  vertical-align: -0.12em;
}
/* 徽章内图标放大 */
.badge .pixel-icon {
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.25em;
  margin-right: 2px;
}
/* 滚动指示箭头（右箭头旋转为向下） */
.scroll-indicator .pixel-icon {
  transform: rotate(90deg);
  width: 1.2em;
  height: 1.2em;
  filter: drop-shadow(2px 2px 0 var(--pixel-border));
}
/* Hero 标题中的玄鸟图标 */
.hero-bone {
  width: auto;
  height: 2.8em;
  vertical-align: -0.7em;
  margin-right: 0.15em;
  /* 水墨玄鸟 - 清雅庄重 */
  filter: drop-shadow(1px 1px 2px rgba(26, 26, 26, 0.2));
}
/* Hero CTA 按钮图标放大 */
.hero-cta .pixel-icon {
  width: 1.4em;
  height: 1.4em;
  vertical-align: -0.25em;
}
/* 页脚小图标 */
footer .pixel-icon {
  vertical-align: -0.12em;
}

/* ===== 首页模块入口 - 像素风 ===== */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-8);
}
.module-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  background: var(--white);
  padding: var(--space-6) var(--space-5);
  text-align: center;
  text-decoration: none;
  border: 4px solid var(--pixel-border);
  box-shadow:
    inset -3px -3px 0 var(--clay-lighter),
    inset 3px 3px 0 var(--white),
    5px 5px 0 var(--pixel-border);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.module-card:hover {
  transform: translate(-2px, -2px);
  box-shadow:
    inset -3px -3px 0 var(--clay-lighter),
    inset 3px 3px 0 var(--white),
    7px 7px 0 var(--pixel-border);
}
.module-card:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--pixel-border);
}
.module-card .module-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: var(--space-3);
  color: var(--clay);
}
.module-card h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-2);
  color: var(--ink);
  font-weight: 800;
  text-shadow: 1px 1px 0 var(--clay-lighter);
}
.module-card p {
  flex: 1 1 auto;
  font-size: 0.9rem;
  color: var(--ink-mid);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}
.module-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cinnabar);
  background: var(--clay-lighter);
  padding: 4px 12px;
  border: 2px solid var(--pixel-border);
  box-shadow: 2px 2px 0 var(--pixel-border);
  letter-spacing: 1px;
}

.card {
  background: var(--white);
  padding: var(--space-6) var(--space-5);
  text-align: center;
  border: 4px solid var(--pixel-border);
  box-shadow: 
    inset -3px -3px 0 var(--clay-lighter),
    inset 3px 3px 0 var(--white),
    5px 5px 0 var(--pixel-border);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
}
.card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 
    inset -3px -3px 0 var(--clay-lighter),
    inset 3px 3px 0 var(--white),
    7px 7px 0 var(--pixel-border);
}
.card .icon { 
  font-size: 3rem; 
  margin-bottom: var(--space-3); 
  display: block; 
  image-rendering: pixelated;
}
.card h3 { 
  font-size: 1.15rem; 
  margin-bottom: var(--space-2); 
  color: var(--ink); 
  font-weight: 800;
}
.card p { 
  font-size: 0.9rem; 
  color: var(--ink-mid); 
  line-height: 1.6; 
}

/* ===== 故事场景卡片 - 像素风 ===== */
.story-scene {
  background: var(--white);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
  border: 4px solid var(--pixel-border);
  border-left: 8px solid var(--clay);
  box-shadow: 5px 5px 0 var(--pixel-border);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
}
.story-scene:hover {
  transform: translateX(4px);
  box-shadow: 7px 5px 0 var(--pixel-border);
}
.story-scene h3 { 
  color: var(--clay); 
  font-size: 1.1rem; 
  margin-bottom: var(--space-2); 
  font-weight: 800;
}
.story-scene h3 .badge {
  display: inline-block; 
  background: var(--clay); 
  color: var(--white);
  padding: 2px var(--space-3); 
  font-size: 0.8rem; 
  margin-right: var(--space-2);
  border: 2px solid var(--pixel-border);
  box-shadow: 2px 2px 0 var(--pixel-border);
  font-weight: 700;
}
.story-scene p { 
  color: var(--ink-mid); 
  line-height: 1.8; 
  font-size: 0.95rem; 
}

/* ===== 人物卡片 - 像素风 ===== */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.person-card {
  background: var(--white);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  border: 3px solid var(--pixel-border);
  box-shadow: 4px 4px 0 var(--pixel-border);
  transition: transform var(--transition-fast);
}
.person-card:hover { 
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--pixel-border);
}
.person-card .emoji { 
  font-size: 2.5rem; 
  display: block; 
  margin-bottom: var(--space-2); 
}
.person-card .name { 
  font-weight: 800; 
  font-size: 1rem; 
  color: var(--ink); 
}
.person-card .role { 
  font-size: 0.8rem; 
  color: var(--clay); 
  margin-bottom: var(--space-1); 
  font-weight: 700;
}
.person-card .desc { 
  font-size: 0.85rem; 
  color: var(--ink-light); 
  line-height: 1.5; 
}

/* ===== 演变时间线 - 像素风 ===== */
.evo-container { 
  padding: var(--space-5) 0; 
  overflow-x: auto; 
}
.evo-track {
  display: flex; 
  gap: var(--space-2); 
  padding: var(--space-5) var(--space-2);
  min-width: 700px;
  align-items: center;
}
.evo-item {
  flex: 1; 
  min-width: 120px; 
  background: var(--white);
  padding: var(--space-4) var(--space-3);
  text-align: center;
  border: 3px solid var(--pixel-border);
  box-shadow: 4px 4px 0 var(--pixel-border);
  transition: transform var(--transition-fast);
}
.evo-item:hover {
  transform: translateY(-4px);
  box-shadow: 4px 8px 0 var(--pixel-border);
}
.evo-item .char-display { 
  font-size: 2.5rem; 
  margin-bottom: var(--space-2); 
  display: block; 
  color: var(--clay);
  font-weight: 700;
}
.evo-item .char-label { 
  font-size: 0.85rem; 
  font-weight: 700; 
  color: var(--ink); 
}
.evo-item .char-period { 
  font-size: 0.75rem; 
  color: var(--clay); 
  margin-top: var(--space-1); 
  font-weight: 600;
}
.evo-arrow {
  display: flex; 
  align-items: center;
  color: var(--clay); 
  font-size: 1.5rem;
  flex-shrink: 0; 
  padding: 0 var(--space-1);
  font-weight: 900;
  text-shadow: 2px 2px 0 var(--pixel-border);
}

/* ===== 六书卡片 - 像素风 ===== */
.liushu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}
.liushu-card {
  background: var(--white);
  padding: var(--space-5) var(--space-4);
  border: 4px solid var(--pixel-border);
  border-top: 8px solid var(--clay);
  box-shadow: 5px 5px 0 var(--pixel-border);
  transition: transform var(--transition-fast);
}
.liushu-card:hover { 
  transform: translateY(-3px);
  box-shadow: 5px 8px 0 var(--pixel-border);
}
.liushu-card h3 { 
  font-size: 1.1rem; 
  color: var(--clay); 
  margin-bottom: var(--space-2); 
  font-weight: 800;
}
.liushu-card .desc { 
  font-size: 0.9rem; 
  color: var(--ink-mid); 
  margin-bottom: var(--space-3); 
  line-height: 1.6;
}
.liushu-card .examples { 
  display: flex; 
  gap: var(--space-2); 
  flex-wrap: wrap; 
}
.liushu-card .example {
  background: var(--clay-lighter);
  padding: 2px var(--space-3);
  font-size: 0.85rem;
  color: var(--ink-dark);
  border: 2px solid var(--clay-dark);
  font-weight: 600;
}

/* ===== 趣味知识卡片 - 像素风 ===== */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}
.fact-card {
  background: var(--white);
  padding: var(--space-5);
  text-align: center;
  border: 4px solid var(--pixel-border);
  box-shadow: 5px 5px 0 var(--pixel-border);
  transition: transform var(--transition-fast);
  position: relative;
  overflow: hidden;
}
.fact-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--clay) 0, var(--clay) 8px,
    var(--gold) 8px, var(--gold) 16px
  );
  border-bottom: 3px solid var(--pixel-border);
}
.fact-card:hover { 
  transform: translateY(-3px);
  box-shadow: 5px 8px 0 var(--pixel-border);
}
.fact-card .fact-icon { 
  font-size: 2.5rem; 
  display: block; 
  margin: var(--space-3) 0 var(--space-2); 
}
.fact-card .fact-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--clay);
  display: block;
  text-shadow: 2px 2px 0 var(--pixel-border);
}
.fact-card p { 
  font-size: 0.9rem; 
  color: var(--ink-mid); 
  margin-top: var(--space-2); 
  line-height: 1.5; 
}

/* ===== 汉字画廊卡片 - 像素风 ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}
.char-card { 
  perspective: 800px; 
  height: 300px; 
  cursor: pointer; 
}
.char-card-inner {
  position: relative; 
  width: 100%; 
  height: 100%;
  transition: transform 0.5s steps(10);
  transform-style: preserve-3d;
}
.char-card.flipped .char-card-inner { 
  transform: rotateY(180deg); 
}

.char-card-front, .char-card-back {
  position: absolute; 
  inset: 0;
  backface-visibility: hidden;
  display: flex; 
  flex-direction: column;
  align-items: center; 
  justify-content: center;
  padding: var(--space-4);
  background: var(--white);
  border: 4px solid var(--pixel-border);
  box-shadow: 4px 4px 0 var(--pixel-border);
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: break-word;
}

.char-card-back {
  transform: rotateY(180deg);
  background: var(--paper);
  justify-content: flex-start;
  overflow-y: auto;
  border-color: var(--clay-dark);
  box-shadow: 4px 4px 0 var(--clay-dark);
}
.char-card-back::-webkit-scrollbar { width: 8px; }
.char-card-back::-webkit-scrollbar-track { 
  background: var(--clay-lighter); 
}
.char-card-back::-webkit-scrollbar-thumb {
  background: var(--clay);
  border: 2px solid var(--pixel-border-light);
}

.char-card-front .oracle-img {
  width: 110px; 
  height: 110px;
  object-fit: contain;
  margin-bottom: var(--space-2);
  /* 转像素褐色 */
  filter: invert(12%) sepia(30%) saturate(1500%) hue-rotate(-15deg) brightness(0.85);
}
.char-card-front .oracle { 
  font-size: 3.5rem; 
  margin-bottom: var(--space-2); 
  color: var(--clay); 
  display: none; 
}
.char-card-front .hint { 
  font-size: 0.75rem; 
  color: var(--ink-light); 
  margin-top: var(--space-3); 
  opacity: 0.8;
  font-weight: 600;
  letter-spacing: 1px;
}
.char-card-front .modern-label {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink-mid);
  margin-top: var(--space-1);
  letter-spacing: 2px;
}

.char-card-back .modern { 
  font-size: 2.8rem; 
  margin-bottom: var(--space-1); 
  color: var(--cinnabar); 
  font-weight: 900;
  text-shadow: 2px 2px 0 var(--cinnabar-dark);
}
.char-card-back .pinyin { 
  font-size: 0.9rem; 
  color: var(--ink-mid); 
  margin-bottom: var(--space-1); 
  font-weight: 600;
}
.char-card-back .meaning { 
  font-size: 0.9rem; 
  color: var(--ink); 
  font-weight: 700; 
}
.char-card-back .liushu-tag {
  display: inline-block;
  background: var(--jade);
  color: var(--white);
  padding: 1px var(--space-2);
  font-size: 0.7rem;
  font-weight: 700;
  border: 2px solid var(--jade-dark);
  margin: var(--space-2) 0;
}
.char-card-back .fun-fact {
  font-size: 0.8rem;
  color: var(--ink-mid);
  margin-top: var(--space-2);
  text-align: center;
  line-height: 1.6;
  padding-top: var(--space-2);
  border-top: 2px dashed var(--clay-light);
}

.char-card .flip-icon {
  position: absolute; 
  bottom: var(--space-2); 
  right: var(--space-2);
  font-size: 0.9rem; 
  opacity: 0.6; 
  transition: opacity var(--transition-fast);
}
.char-card:hover .flip-icon { opacity: 1; }
.char-card:hover .char-card-front,
.char-card:hover .char-card-back {
  box-shadow: 6px 6px 0 var(--clay-dark);
  border-color: var(--clay);
}
.char-card.flipped .char-card-front,
.char-card.flipped .char-card-back {
  border-color: var(--gold);
  box-shadow: 4px 4px 0 var(--gold);
}
.char-card .flip-icon .pixel-icon {
  width: 1.1em;
  height: 1.1em;
}

/* 画廊分类筛选标签 - 像素风 */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-bottom: var(--space-6);
}
.filter-tag {
  padding: var(--space-2) var(--space-4);
  background: var(--white);
  border: 3px solid var(--pixel-border);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 3px 3px 0 var(--pixel-border);
}
.filter-tag:hover {
  background: var(--clay-lighter);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--pixel-border);
}
.filter-tag.active {
  background: var(--clay);
  color: var(--white);
  box-shadow: inset 2px 2px 0 var(--clay-dark), inset -2px -2px 0 var(--clay-light);
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--pixel-border);
}

/* 画廊分页 - 像素风 */
.gallery-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
}
.page-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 3px solid var(--pixel-border);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--pixel-border);
  transition: all var(--transition-fast);
}
.page-btn:hover:not(:disabled) {
  background: var(--clay-lighter);
}
.page-btn.active {
  background: var(--clay);
  color: var(--white);
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--pixel-border);
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== 连连看游戏 - 像素风 ===== */
.game-container { 
  max-width: 720px; 
  margin: var(--space-6) auto 0; 
}

.game-score {
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  background: var(--white); 
  padding: var(--space-4) var(--space-5);
  border: 4px solid var(--pixel-border);
  box-shadow: 5px 5px 0 var(--pixel-border);
  margin-bottom: var(--space-5);
}
.game-score .score-item {
  text-align: center;
  flex: 1;
}
.game-score .label { 
  font-size: 0.8rem; 
  color: var(--ink-light); 
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.game-score .num { 
  font-size: 1.6rem; 
  font-weight: 900; 
  color: var(--clay); 
  text-shadow: 2px 2px 0 var(--pixel-border);
  font-family: var(--font-mono);
}
.game-score .num.pop {
  animation: scorePop 0.25s steps(4);
}
@keyframes scorePop {
  0% { transform: scale(1); color: var(--clay); }
  50% { transform: scale(1.5); color: var(--gold); }
  100% { transform: scale(1); color: var(--clay); }
}
.game-score .score-bar {
  width: 3px;
  height: 40px;
  background: var(--pixel-border);
}
.game-score .lives {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.game-score .lives .pixel-icon {
  width: 22px;
  height: 22px;
}
.game-score .lives.hurt {
  animation: pixelShake 0.3s steps(5);
}

.game-board {
  display: grid; 
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4); 
  margin-bottom: var(--space-5);
}
.game-col { 
  display: flex; 
  flex-direction: column; 
  gap: var(--space-2); 
}
.game-col-title {
  text-align: center; 
  font-weight: 800; 
  font-size: 0.9rem;
  color: var(--clay); 
  margin-bottom: var(--space-1);
  letter-spacing: 2px;
  padding: var(--space-2);
  background: var(--clay-lighter);
  border: 3px solid var(--pixel-border);
  box-shadow: 3px 3px 0 var(--pixel-border);
}

.game-card {
  background: var(--white);
  padding: var(--space-3);
  text-align: center;
  border: 3px solid var(--pixel-border);
  box-shadow: 3px 3px 0 var(--pixel-border);
  cursor: pointer; 
  transition: all var(--transition-fast);
  font-size: 1.2rem; 
  user-select: none;
  min-height: 88px;
  height: 88px;
  display: flex;
  align-items: center; 
  justify-content: center;
  box-sizing: border-box;
}
.game-card:hover { 
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--pixel-border);
  background: var(--paper);
}
.game-card:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--pixel-border);
}

.game-card.oracle {
  font-size: 2.5rem; 
  color: var(--clay);
  min-height: 80px;
  flex-direction: column;
  gap: 2px;
}
.game-card.oracle .oracle-card-img {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
  /* 转像素褐色 */
  filter: invert(15%) sepia(50%) saturate(500%) hue-rotate(-15deg) brightness(0.85);
}
.game-card.oracle .oracle-fallback { display: none; }

.game-card.modern {
  font-size: 2rem;
  color: var(--cinnabar);
  font-weight: 800;
  font-family: var(--font-display), "KaiTi", "STKaiti", "楷体", serif;
  letter-spacing: 2px;
}

.game-card.selected {
  background: var(--clay-lighter);
  border-color: var(--clay);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--clay-dark);
}
.game-card.selected.oracle { background: var(--clay-lighter); }
.game-card.selected.modern { background: var(--cinnabar-light); border-color: var(--cinnabar); }

.game-card.matched {
  opacity: 0.4; 
  pointer-events: none;
  border-color: var(--jade-dark);
  background: var(--jade-light);
  box-shadow: 2px 2px 0 var(--jade-dark);
}
.game-card.matched::after {
  content: '✓';
  position: absolute;
  font-size: 2rem;
  color: var(--jade-dark);
  font-weight: 900;
}

.game-card.wrong {
  border-color: var(--cinnabar-dark);
  background: var(--cinnabar-light);
  animation: pixelShake 0.3s steps(5);
}

@keyframes pixelShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.game-result {
  text-align: center; 
  padding: var(--space-8) var(--space-6); 
  background: var(--white);
  border: 4px solid var(--pixel-border);
  box-shadow: 6px 6px 0 var(--pixel-border);
  display: none;
}
.game-result.show { 
  display: block; 
  animation: pixelPop 0.4s steps(6); 
}
@keyframes pixelPop {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.game-result .result-icon { 
  font-size: 4rem; 
  display: block; 
  margin-bottom: var(--space-3); 
}
.game-result h3 { 
  font-size: 1.5rem; 
  color: var(--clay); 
  margin-bottom: var(--space-2);
  text-shadow: 2px 2px 0 var(--pixel-border);
  font-weight: 900;
}
.game-result p { 
  color: var(--ink-mid); 
  margin-bottom: var(--space-5);
  font-size: 1rem;
}
.game-result .score-big {
  font-size: 3rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--pixel-border);
  margin: var(--space-3) 0;
}

.game-reset {
  display: inline-flex; 
  align-items: center; 
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6); 
  background: var(--clay); 
  color: var(--white);
  border: 4px solid var(--pixel-border);
  font-size: 1rem; 
  font-weight: 800;
  cursor: pointer; 
  transition: all var(--transition-fast);
  box-shadow: 
    inset -3px -3px 0 var(--clay-dark),
    inset 3px 3px 0 var(--clay-light),
    4px 4px 0 var(--pixel-border);
}
.game-reset:hover { background: var(--clay-light); color: var(--ink-dark); }
.game-reset:active {
  transform: translate(4px, 4px);
  box-shadow: 
    inset 3px 3px 0 var(--clay-dark),
    inset -3px -3px 0 var(--clay-light),
    0 0 0 var(--pixel-border);
}

/* ===== 趣味问答 - 像素风 ===== */
.quiz-container {
  max-width: 680px; 
  margin: var(--space-6) auto 0;
  background: var(--white);
  padding: var(--space-6);
  border: 4px solid var(--pixel-border);
  box-shadow: 6px 6px 0 var(--pixel-border);
}

.quiz-start, .quiz-result {
  text-align: center;
  padding: var(--space-6) 0;
}

.quiz-icon { 
  font-size: 4rem; 
  margin-bottom: var(--space-3); 
  display: block;
}

.quiz-start h3, .quiz-result h3 {
  font-size: 1.5rem; 
  color: var(--clay); 
  margin-bottom: var(--space-3);
  font-weight: 900;
  text-shadow: 2px 2px 0 var(--pixel-border);
}

.quiz-start p, .quiz-message {
  color: var(--ink-mid); 
  margin-bottom: var(--space-5); 
  font-size: 0.95rem;
  line-height: 1.7;
}

.quiz-btn {
  display: inline-flex; 
  align-items: center; 
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6); 
  background: var(--clay); 
  color: var(--white);
  border: 4px solid var(--pixel-border);
  font-size: 1rem; 
  font-weight: 800;
  cursor: pointer; 
  transition: all var(--transition-fast);
  box-shadow: 
    inset -3px -3px 0 var(--clay-dark),
    inset 3px 3px 0 var(--clay-light),
    4px 4px 0 var(--pixel-border);
  letter-spacing: 1px;
}
.quiz-btn:hover { background: var(--clay-light); color: var(--ink-dark); }
.quiz-btn:active {
  transform: translate(4px, 4px);
  box-shadow: 
    inset 3px 3px 0 var(--clay-dark),
    inset -3px -3px 0 var(--clay-light),
    0 0 0 var(--pixel-border);
}

/* 进度条 - 像素风 */
.quiz-progress {
  display: flex; 
  align-items: center; 
  gap: var(--space-3); 
  margin-bottom: var(--space-5);
}
.quiz-progress-bar {
  flex: 1; 
  height: 20px; 
  background: var(--paper-dark);
  border: 3px solid var(--pixel-border);
  box-shadow: inset 2px 2px 0 var(--clay-lighter);
  position: relative;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--clay) 0, var(--clay) 8px,
    var(--clay-dark) 8px, var(--clay-dark) 16px
  );
  transition: width 0.3s steps(8);
  border-right: 3px solid var(--pixel-border);
}
.quiz-progress-text {
  font-size: 0.85rem; 
  color: var(--ink-mid); 
  font-weight: 800; 
  min-width: 50px; 
  text-align: right;
  font-family: var(--font-mono);
}

/* 题目 - 像素风 */
.quiz-question {
  font-size: 1.15rem; 
  color: var(--ink); 
  font-weight: 800;
  margin-bottom: var(--space-5); 
  line-height: 1.6;
  padding: var(--space-4);
  background: var(--paper);
  border-left: 6px solid var(--clay);
  border: 3px solid var(--pixel-border-light);
  border-left-width: 6px;
}

/* 选项 - 像素风 */
.quiz-options {
  display: flex; 
  flex-direction: column; 
  gap: var(--space-3);
}
.quiz-option {
  text-align: left; 
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  border: 3px solid var(--pixel-border);
  font-size: 1rem; 
  color: var(--ink);
  cursor: pointer; 
  transition: all var(--transition-fast);
  box-shadow: 3px 3px 0 var(--pixel-border);
  font-weight: 600;
  position: relative;
  padding-left: var(--space-6);
}
.quiz-option::before {
  content: '';
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: var(--clay-lighter);
  border: 2px solid var(--pixel-border);
}
.quiz-option:hover:not(:disabled) {
  background: var(--clay-lighter);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--pixel-border);
}
.quiz-option:hover:not(:disabled)::before {
  background: var(--clay);
}
.quiz-option.correct {
  border-color: var(--jade-dark);
  background: var(--jade-light);
  color: var(--jade-dark);
  box-shadow: 3px 3px 0 var(--jade-dark);
}
.quiz-option.correct::before {
  background: var(--jade);
  border-color: var(--jade-dark);
}
.quiz-option.wrong {
  border-color: var(--cinnabar-dark);
  background: var(--cinnabar-light);
  color: var(--cinnabar-dark);
  box-shadow: 3px 3px 0 var(--cinnabar-dark);
}
.quiz-option.wrong::before {
  background: var(--cinnabar);
  border-color: var(--cinnabar-dark);
}
.quiz-option:disabled { cursor: default; }

/* 反馈 - 像素风 */
.quiz-feedback {
  margin-top: var(--space-4); 
  padding: var(--space-3) var(--space-4);
  font-size: 0.9rem; 
  display: none;
  border: 3px solid var(--pixel-border);
  box-shadow: 3px 3px 0 var(--pixel-border);
  font-weight: 600;
}
.quiz-feedback.show { 
  display: block; 
  animation: pixelFadeIn 0.2s steps(3); 
}
@keyframes pixelFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.quiz-feedback.correct { 
  background: var(--jade-light); 
  color: var(--jade-dark); 
  border-color: var(--jade-dark);
  box-shadow: 3px 3px 0 var(--jade-dark);
}
.quiz-feedback.wrong { 
  background: var(--cinnabar-light); 
  color: var(--cinnabar-dark); 
  border-color: var(--cinnabar-dark);
  box-shadow: 3px 3px 0 var(--cinnabar-dark);
}

.quiz-result .quiz-score {
  font-size: 3rem; 
  font-weight: 900; 
  color: var(--gold); 
  margin: var(--space-4) 0;
  text-shadow: 3px 3px 0 var(--pixel-border);
  font-family: var(--font-mono);
}
.quiz-result .quiz-rank {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: var(--clay);
  color: var(--white);
  border: 3px solid var(--pixel-border);
  box-shadow: 3px 3px 0 var(--pixel-border);
  font-weight: 800;
  margin-bottom: var(--space-4);
}

/* ===== 占卜流程时间线 - 像素风 ===== */
.what-timeline {
  display: flex; 
  align-items: center; 
  justify-content: center;
  gap: var(--space-2); 
  flex-wrap: wrap;
  margin: var(--space-8) auto 0; 
  max-width: 800px; 
  padding: var(--space-5);
  background: var(--paper);
  border: 4px solid var(--pixel-border-light);
  box-shadow: inset 2px 2px 0 var(--white), inset -2px -2px 0 var(--clay-lighter);
}
.what-timeline .step { 
  text-align: center; 
  flex: 1; 
  min-width: 100px; 
}
.what-timeline .step-num {
  display: flex; 
  align-items: center; 
  justify-content: center;
  width: 48px; 
  height: 48px;
  background: var(--clay); 
  color: var(--white); 
  font-weight: 900; 
  margin: 0 auto var(--space-2);
  border: 3px solid var(--pixel-border);
  box-shadow: 
    inset -2px -2px 0 var(--clay-dark),
    inset 2px 2px 0 var(--clay-light),
    3px 3px 0 var(--pixel-border);
  font-size: 1.2rem;
}
.what-timeline .step-text { 
  font-size: 0.85rem; 
  color: var(--ink-mid); 
  font-weight: 600;
  line-height: 1.4;
}
.what-timeline .arrow { 
  font-size: 1.4rem; 
  color: var(--clay); 
  font-weight: 900;
  text-shadow: 2px 2px 0 var(--pixel-border);
}

/* ===== Footer - 像素风 ===== */
footer {
  background: var(--ink-dark);
  color: var(--clay-light);
  padding: var(--space-8) var(--space-5); 
  text-align: center;
  border-top: 6px solid var(--pixel-border);
  position: relative;
}
footer::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 0; right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--clay) 0, var(--clay) 16px,
    var(--gold) 16px, var(--gold) 32px,
    var(--cinnabar) 32px, var(--cinnabar) 48px,
    var(--jade) 48px, var(--jade) 64px
  );
}
footer p { 
  font-size: 0.9rem; 
  margin-bottom: var(--space-2); 
  line-height: 1.6;
}
footer .footer-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--clay);
  margin-bottom: var(--space-3);
  text-shadow: 2px 2px 0 #000;
  letter-spacing: 2px;
}
footer .footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin: var(--space-4) 0;
  flex-wrap: wrap;
}
footer .footer-links a {
  color: var(--clay-light);
  font-size: 0.85rem;
  font-weight: 600;
}
footer .footer-links a:hover {
  color: var(--gold-light);
}

/* ===== 响应式 - 像素风 ===== */
@media (max-width: 768px) {
  .navbar .links { display: none; }
  .logo-title-img { height: 32px; }
  .navbar .links.open {
    display: flex; 
    flex-direction: column;
    position: absolute; 
    top: 80px; 
    left: 0; 
    right: 0;
    background: var(--paper);
    padding: var(--space-3);
    border-bottom: 4px solid var(--pixel-border);
    gap: var(--space-2);
    box-shadow: 0 4px 0 var(--clay);
  }
  .navbar .links.open a {
    width: 100%;
    text-align: center;
    padding: var(--space-3);
  }
  .navbar .toggle { display: flex; }
  
  .gallery-grid { 
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); 
    gap: var(--space-3);
  }
  .char-card { height: 200px; }
  .char-card-front .oracle-img { width: 70px; height: 70px; }
  
  .game-board { grid-template-columns: 1fr; }
  .game-board .game-col:first-child { order: 2; }
  .game-board .game-col:last-child { order: 1; }
  .game-col { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: var(--space-2); 
  }
  .game-col-title { grid-column: 1 / -1; }
  .game-card { height: 70px; min-height: 70px; }
  .game-card.oracle .oracle-card-img { width: 44px; height: 44px; }
  .game-card.modern { font-size: 1.5rem; }
  
  .what-timeline { 
    flex-direction: column; 
    align-items: stretch; 
  }
  .what-timeline .arrow { 
    transform: rotate(90deg); 
    text-align: center;
    padding: var(--space-2) 0;
  }
  
  .hero h1 {
    text-shadow: 3px 3px 0 var(--clay-dark);
  }
  
  .section { padding: 60px 16px; }
  .card-grid { gap: var(--space-4); }
}


/* ===== 卡通像素标题样式 ===== */

/* 像素描边标题 — FC游戏卡带风格大字 */
.pixel-title-big {
  font-size: clamp(3rem, 7.5vw, 5rem);
  font-weight: 900;
  color: var(--gold);
  text-shadow:
    -3px -3px 0 var(--pixel-border),
    3px -3px 0 var(--pixel-border),
    -3px 3px 0 var(--pixel-border),
    3px 3px 0 var(--pixel-border),
    6px 6px 0 var(--pixel-border),
    -6px 0 0 var(--cinnabar),
    6px 0 0 var(--cinnabar);
  letter-spacing: 2px;
  display: inline-block;
  position: relative;
  animation: titleBounce 2s steps(4) infinite;
}

@keyframes titleBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* 彩色像素标题 — 渐变像素字效果 */
.pixel-title-rainbow {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  background: linear-gradient(
    90deg,
    var(--cinnabar) 0%,
    var(--gold) 20%,
    var(--jade-light) 40%,
    var(--sky) 60%,
    var(--lavender) 80%,
    var(--cinnabar) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(3px 3px 0 var(--pixel-border));
  letter-spacing: 3px;
  animation: rainbowFlow 4s linear infinite;
}

@keyframes rainbowFlow {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* 像素章节标题 — 左右装饰线+星星 */
.section-title-pixel {
  position: relative;
  display: inline-block;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 900;
  color: var(--white);
  text-shadow:
    -2px -2px 0 var(--pixel-border),
    2px -2px 0 var(--pixel-border),
    -2px 2px 0 var(--pixel-border),
    2px 2px 0 var(--pixel-border),
    4px 4px 0 var(--cinnabar);
  padding: 0 var(--space-8);
  margin-bottom: var(--space-8);
}

.section-title-pixel::before,
.section-title-pixel::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: var(--gold);
  box-shadow:
    8px 0 0 var(--gold),
    0 8px 0 var(--gold), 8px 8px 0 var(--gold), 16px 8px 0 var(--gold),
    -8px 8px 0 var(--gold), 24px 8px 0 var(--gold),
    0 16px 0 var(--gold), 8px 16px 0 var(--gold), 16px 16px 0 var(--gold),
    8px 24px 0 var(--gold);
  filter: drop-shadow(2px 2px 0 var(--pixel-border));
}

.section-title-pixel::before {
  left: -16px;
}
.section-title-pixel::after {
  right: -16px;
}

/* 像素副标题/标签 — 小旗子风格 */
.pixel-subtitle {
  display: inline-block;
  background: var(--cinnabar);
  color: var(--white);
  padding: var(--space-1) var(--space-4);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  border: 3px solid var(--pixel-border);
  box-shadow: 3px 3px 0 var(--pixel-border);
  position: relative;
  margin-bottom: var(--space-4);
}
.pixel-subtitle::before {
  content: '★';
  margin-right: var(--space-2);
  color: var(--gold);
}
.pixel-subtitle::after {
  content: '★';
  margin-left: var(--space-2);
  color: var(--gold);
}

/* 像素数字大号 — 分数/进度用 */
.pixel-number {
  font-size: clamp(3rem, 8.5vw, 6rem);
  font-weight: 900;
  color: var(--gold);
  text-shadow:
    -3px -3px 0 var(--pixel-border),
    3px -3px 0 var(--pixel-border),
    -3px 3px 0 var(--pixel-border),
    3px 3px 0 var(--pixel-border),
    6px 6px 0 var(--cinnabar);
  line-height: 1;
  font-family: var(--font-pixel);
}

/* Hero标题强化 */
.hero-title {
  position: relative;
  z-index: 2;
}
.hero-title .main-title {
  font-size: clamp(3.8rem, 9vw, 7rem);
  font-weight: 900;
  color: var(--gold);
  text-shadow:
    -4px -4px 0 var(--pixel-border),
    4px -4px 0 var(--pixel-border),
    -4px 4px 0 var(--pixel-border),
    4px 4px 0 var(--pixel-border),
    -8px 0 0 var(--cinnabar),
    8px 0 0 var(--cinnabar),
    0 -8px 0 var(--cinnabar),
    8px 8px 0 var(--pixel-border),
    -8px 8px 0 var(--pixel-border);
  letter-spacing: 4px;
  margin-bottom: var(--space-4);
  display: inline-block;
  animation: heroTitleFloat 3s steps(6) infinite;
}

@keyframes heroTitleFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
}

.hero-title .sub-title {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--white);
  text-shadow:
    -2px -2px 0 var(--pixel-border),
    2px -2px 0 var(--pixel-border),
    -2px 2px 0 var(--pixel-border),
    2px 2px 0 var(--pixel-border);
  letter-spacing: 2px;
  margin-bottom: var(--space-6);
}


/* ===== 卡通像素按钮强化 ===== */

/* 重写基础按钮 — 更厚更卡通 */
.pixel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-pixel);
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 3px solid var(--pixel-border);
  border-bottom-width: 6px;
  border-right-width: 5px;
  background: var(--btn-bg, var(--primary));
  color: var(--btn-text, var(--white));
  cursor: pointer;
  position: relative;
  transition: none;
  image-rendering: pixelated;
  box-shadow: 
    inset -3px -3px 0 rgba(0,0,0,0.3),
    inset 3px 3px 0 rgba(255,255,255,0.3);
}

.pixel-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 
    inset -3px -3px 0 rgba(0,0,0,0.3),
    inset 3px 3px 0 rgba(255,255,255,0.4),
    0 4px 0 var(--pixel-border);
}

.pixel-btn:active {
  transform: translateY(3px);
  border-bottom-width: 3px;
  border-right-width: 3px;
  box-shadow: 
    inset 3px 3px 0 rgba(0,0,0,0.3),
    inset -3px -3px 0 rgba(255,255,255,0.2);
}

/* 按钮像素高光 */
.pixel-btn::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  right: 6px;
  height: 4px;
  background: rgba(255,255,255,0.4);
  pointer-events: none;
}

/* 大号卡通按钮 */
.pixel-btn-big {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-base);
  border-bottom-width: 8px;
  border-right-width: 6px;
}
.pixel-btn-big:active {
  border-bottom-width: 4px;
  transform: translateY(4px);
}

/* 按钮颜色变体 — 更鲜艳卡通版 */
.pixel-btn-primary { --btn-bg: var(--cinnabar); --btn-text: var(--white); }
.pixel-btn-secondary { --btn-bg: var(--jade); --btn-text: var(--white); }
.pixel-btn-accent { --btn-bg: var(--gold); --btn-text: var(--pixel-border); }
.pixel-btn-sky { --btn-bg: var(--sky); --btn-text: var(--pixel-border); }
.pixel-btn-lavender { --btn-bg: var(--lavender); --btn-text: var(--pixel-border); }
.pixel-btn-ghost {
  --btn-bg: var(--white);
  --btn-text: var(--pixel-border);
  border-color: var(--pixel-border);
}

/* 像素图标按钮 — 圆形像素风 */
.pixel-icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--pixel-border);
  border-bottom-width: 5px;
  border-right-width: 4px;
  background: var(--bg, var(--primary));
  color: var(--white);
  cursor: pointer;
  font-size: 1rem;
  box-shadow: inset -2px -2px 0 rgba(0,0,0,0.3), inset 2px 2px 0 rgba(255,255,255,0.3);
}
.pixel-icon-btn:hover { filter: brightness(1.1); }
.pixel-icon-btn:active {
  transform: translateY(2px);
  border-bottom-width: 3px;
}

/* 播放按钮 - 卡通大三角 */
.pixel-play-btn {
  width: 64px;
  height: 80px;
  background: var(--gold);
  border: 4px solid var(--pixel-border);
  border-bottom-width: 7px;
  border-right-width: 6px;
  position: relative;
  cursor: pointer;
  box-shadow: inset -3px -3px 0 rgba(0,0,0,0.3), inset 3px 3px 0 rgba(255,255,255,0.4);
}
.pixel-play-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid var(--pixel-border);
}
.pixel-play-btn:active {
  transform: translateY(3px);
  border-bottom-width: 4px;
}

/* 按钮组 - 像素风 */
.pixel-btn-group {
  display: flex;
  gap: 0;
}
.pixel-btn-group .pixel-btn {
  border-right-width: 2px;
}
.pixel-btn-group .pixel-btn + .pixel-btn {
  border-left-width: 2px;
}
.pixel-btn-group .pixel-btn:first-child {
  border-right-width: 3px;
}
.pixel-btn-group .pixel-btn:last-child {
  border-right-width: 5px;
}

/* 闪烁动画按钮（吸引点击） */
.pixel-btn-blink {
  animation: btnBlink 1s steps(2) infinite;
}
@keyframes btnBlink {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3) saturate(1.2); }
}

/* 按钮前图标（像素方块装饰） */
.pixel-btn-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: currentColor;
  box-shadow:
    4px 0 0 currentColor,
    0 4px 0 currentColor, 4px 4px 0 currentColor, 8px 4px 0 currentColor,
    0 8px 0 currentColor, 4px 8px 0 currentColor, 8px 8px 0 currentColor, 12px 8px 0 currentColor,
    4px 12px 0 currentColor, 8px 12px 0 currentColor, 12px 12px 0 currentColor, 16px 12px 0 currentColor,
    8px 16px 0 currentColor, 12px 16px 0 currentColor,
    12px 20px 0 currentColor;
}


/* ===== 卡通像素卡片强化 ===== */

/* 像素卡片基础 - 加厚边框+双层阴影 */
.pixel-card {
  position: relative;
  background: var(--white);
  border: 3px solid var(--pixel-border);
  box-shadow:
    6px 6px 0 var(--pixel-border),
    6px 6px 0 3px var(--cinnabar);
  padding: var(--space-5);
  overflow: visible;
}

/* 卡片顶部像素色带 */
.pixel-card-band {
  position: relative;
  padding-top: var(--space-4);
}
.pixel-card-band::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  height: 12px;
  background: repeating-linear-gradient(
    90deg,
    var(--band-color, var(--cinnabar)) 0,
    var(--band-color, var(--cinnabar)) 8px,
    var(--pixel-border) 8px,
    var(--pixel-border) 12px
  );
  border: 3px solid var(--pixel-border);
  border-bottom: none;
}
.pixel-card-band.cinnabar { --band-color: var(--cinnabar); }
.pixel-card-band.jade { --band-color: var(--jade); }
.pixel-card-band.gold { --band-color: var(--gold); }
.pixel-card-band.sky { --band-color: var(--sky); }
.pixel-card-band.lavender { --band-color: var(--lavender); }

/* 像素角标 - NEW/HOT/推荐 */
.pixel-badge-corner {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--badge-color, var(--cinnabar));
  color: var(--white);
  padding: var(--space-1) var(--space-3);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 1px;
  border: 3px solid var(--pixel-border);
  box-shadow: 3px 3px 0 var(--pixel-border);
  z-index: 10;
  animation: badgeBounce 1s steps(2) infinite;
}
.pixel-badge-corner.hot { --badge-color: var(--cinnabar); }
.pixel-badge-corner.new { --badge-color: var(--jade); }
.pixel-badge-corner.classic { --badge-color: var(--gold); color: var(--pixel-border); }

@keyframes badgeBounce {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-3deg) scale(1.05); }
}

/* 卡片像素表情/装饰 — 左上角像素小人 */
.pixel-card-emoji {
  position: absolute;
  top: -8px;
  left: var(--space-4);
  width: 4px;
  height: 4px;
  background: var(--gold);
  box-shadow:
    4px 0 0 var(--gold), 8px 0 0 var(--gold), 12px 0 0 var(--gold), 16px 0 0 var(--gold),
    0 4px 0 var(--gold), 4px 4px 0 var(--gold-light), 8px 4px 0 var(--gold), 12px 4px 0 var(--gold-light), 16px 4px 0 var(--gold), 20px 4px 0 var(--gold),
    0 8px 0 var(--gold), 4px 8px 0 var(--pixel-border), 8px 8px 0 var(--gold), 12px 8px 0 var(--gold), 16px 8px 0 var(--pixel-border), 20px 8px 0 var(--gold),
    0 12px 0 var(--gold), 4px 12px 0 var(--gold), 8px 12px 0 var(--pixel-border), 12px 12px 0 var(--pixel-border), 16px 12px 0 var(--gold), 20px 12px 0 var(--gold),
    4px 16px 0 var(--gold), 8px 16px 0 var(--gold), 12px 16px 0 var(--gold), 16px 16px 0 var(--gold),
    8px 20px 0 var(--pixel-border), 12px 20px 0 var(--pixel-border);
  z-index: 5;
}

/* 卡片底部像素脚（让卡片像立起来的） */
.pixel-card-feet {
  position: relative;
  margin-bottom: var(--space-6);
}
.pixel-card-feet::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 8px;
  background: var(--pixel-border);
  box-shadow:
    -12px 8px 0 var(--pixel-border),
    12px 8px 0 var(--pixel-border);
}

/* 卡片锯齿边缘 — 上下装饰 */
.pixel-card-zigzag {
  position: relative;
}
.pixel-card-zigzag::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -3px;
  right: -3px;
  height: 8px;
  background:
    linear-gradient(135deg, var(--card-zigzag, var(--cinnabar)) 25%, transparent 25%) -4px 0 / 8px 8px,
    linear-gradient(225deg, var(--card-zigzag, var(--cinnabar)) 25%, transparent 25%) -4px 0 / 8px 8px;
  border: 3px solid var(--pixel-border);
  border-bottom: none;
}
.pixel-card-zigzag::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: -3px;
  right: -3px;
  height: 8px;
  background:
    linear-gradient(45deg, var(--card-zigzag, var(--cinnabar)) 25%, transparent 25%) -4px 0 / 8px 8px,
    linear-gradient(-45deg, var(--card-zigzag, var(--cinnabar)) 25%, transparent 25%) -4px 0 / 8px 8px;
  border: 3px solid var(--pixel-border);
  border-top: none;
}

/* 卡片标题像素化 */
.pixel-card h3,
.pixel-card .card-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--pixel-border);
  text-shadow: 2px 2px 0 var(--gold-light);
  margin-bottom: var(--space-3);
  letter-spacing: 1px;
}

/* 卡片悬浮跳起 */
.pixel-card-hover:hover {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow:
    8px 10px 0 var(--pixel-border),
    8px 10px 0 3px var(--cinnabar);
}

/* 信息卡 - 卡通数据展示 */
.pixel-stat-card {
  background: var(--stat-bg, var(--sky-light));
  border: 3px solid var(--pixel-border);
  box-shadow: 5px 5px 0 var(--pixel-border);
  padding: var(--space-4);
  text-align: center;
  position: relative;
}
.pixel-stat-card .stat-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--stat-color, var(--cinnabar));
  text-shadow:
    -2px -2px 0 var(--pixel-border),
    2px -2px 0 var(--pixel-border),
    -2px 2px 0 var(--pixel-border),
    2px 2px 0 var(--pixel-border);
  line-height: 1;
  margin-bottom: var(--space-2);
}
.pixel-stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--pixel-border);
  font-weight: 700;
  letter-spacing: 1px;
}
.pixel-stat-card.cinnabar { --stat-bg: #fde4e0; --stat-color: var(--cinnabar); }
.pixel-stat-card.jade { --stat-bg: var(--jade-light); --stat-color: var(--jade); }
.pixel-stat-card.gold { --stat-bg: var(--gold-light); --stat-color: var(--cinnabar); }
.pixel-stat-card.lavender { --stat-bg: var(--lavender-light); --stat-color: #7b5fc4; }


/* ===== 游戏/问答页卡通像素特效 ===== */

/* 像素生命条（心形） */
.pixel-lives {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.pixel-life {
  width: 20px;
  height: 20px;
  background: var(--cinnabar);
  position: relative;
  box-shadow:
    inset -2px -2px 0 rgba(0,0,0,0.3),
    inset 2px 2px 0 rgba(255,255,255,0.4);
  clip-path: polygon(
    20% 0%, 0% 20%, 0% 40%, 20% 60%, 50% 100%,
    80% 60%, 100% 40%, 100% 20%, 80% 0%, 60% 0%, 50% 20%, 40% 0%
  );
}
.pixel-life.lost {
  background: var(--neutral-5);
  box-shadow: inset 2px 2px 0 rgba(0,0,0,0.2);
}

/* 像素进度条 - 方块堆叠 */
.pixel-progress {
  display: flex;
  gap: 4px;
  height: 16px;
  align-items: center;
}
.pixel-progress-bar {
  flex: 1;
  height: 12px;
  background: var(--neutral-3);
  border: 2px solid var(--pixel-border);
  position: relative;
  overflow: hidden;
}
.pixel-progress-fill {
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--jade) 0,
    var(--jade) 8px,
    var(--jade-dark) 8px,
    var(--jade-dark) 16px
  );
  transition: width 0.3s steps(10);
}

/* 像素分数弹出 */
.pixel-score-popup {
  position: absolute;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow:
    -2px -2px 0 var(--pixel-border),
    2px -2px 0 var(--pixel-border),
    -2px 2px 0 var(--pixel-border),
    2px 2px 0 var(--pixel-border);
  pointer-events: none;
  animation: scoreFloat 1s steps(5) forwards;
}
@keyframes scoreFloat {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-50px) scale(1.5); }
}

/* 像素正确/错误特效 */
.pixel-correct-flash {
  animation: correctFlash 0.6s steps(6);
}
.pixel-wrong-flash {
  animation: wrongFlash 0.6s steps(6);
}
@keyframes correctFlash {
  0%, 100% { background: var(--white); }
  25% { background: var(--jade-light); }
  50% { background: var(--jade); }
  75% { background: var(--jade-light); }
}
@keyframes wrongFlash {
  0%, 100% { background: var(--white); }
  25% { background: #fde4e0; }
  50% { background: var(--cinnabar); }
  75% { background: #fde4e0; }
}

/* 像素连击（Combo）显示 */
.pixel-combo {
  position: absolute;
  top: 20%;
  right: 10%;
  font-size: clamp(2.4rem, 6.5vw, 4.5rem);
  font-weight: 900;
  color: var(--gold);
  text-shadow:
    -3px -3px 0 var(--pixel-border),
    3px -3px 0 var(--pixel-border),
    -3px 3px 0 var(--pixel-border),
    3px 3px 0 var(--pixel-border),
    6px 6px 0 var(--cinnabar);
  letter-spacing: 2px;
  pointer-events: none;
  animation: comboPop 0.8s steps(8);
}
.pixel-combo::after {
  content: ' COMBO!';
  font-size: 0.5em;
  color: var(--white);
  text-shadow:
    -2px -2px 0 var(--pixel-border),
    2px -2px 0 var(--pixel-border),
    -2px 2px 0 var(--pixel-border),
    2px 2px 0 var(--pixel-border);
}
@keyframes comboPop {
  0% { transform: scale(0.5) rotate(-10deg); opacity: 0; }
  30% { transform: scale(1.3) rotate(5deg); opacity: 1; }
  60% { transform: scale(1) rotate(0deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg) translateY(-20px); opacity: 0; }
}

/* 像素过场遮罩（关卡切换） */
.pixel-transition {
  position: fixed;
  inset: 0;
  background: var(--pixel-border);
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
}
.pixel-transition.active {
  animation: pixelWipe 0.5s steps(10);
}
@keyframes pixelWipe {
  0% { opacity: 0; clip-path: inset(50% 50%); }
  50% { opacity: 1; clip-path: inset(0); }
  100% { opacity: 0; clip-path: inset(50% 50%); }
}

/* 像素星星评分 */
.pixel-stars {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
}
.pixel-star-rating {
  width: 32px;
  height: 32px;
  background: var(--gold);
  position: relative;
  box-shadow:
    inset -2px -2px 0 rgba(0,0,0,0.3),
    inset 2px 2px 0 rgba(255,255,255,0.4),
    3px 3px 0 var(--pixel-border);
  clip-path: polygon(
    50% 0%, 61% 35%, 98% 35%, 68% 57%,
    79% 91%, 50% 70%, 21% 91%, 32% 57%,
    2% 35%, 39% 35%
  );
}
.pixel-star-rating.empty {
  background: var(--neutral-4);
  box-shadow: 3px 3px 0 var(--pixel-border);
}
.pixel-star-rating.active {
  animation: starPop 0.4s steps(4);
}
@keyframes starPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* 游戏HUD - 顶部信息栏 */
.pixel-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--clay);
  border: 3px solid var(--pixel-border);
  box-shadow: 4px 4px 0 var(--pixel-border);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-6);
}
.pixel-hud-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 900;
  color: var(--white);
  text-shadow: 2px 2px 0 var(--pixel-border);
  font-size: 0.9rem;
}
.pixel-hud-item .hud-value {
  background: var(--gold);
  color: var(--pixel-border);
  padding: var(--space-1) var(--space-3);
  border: 2px solid var(--pixel-border);
  text-shadow: none;
  min-width: 40px;
  text-align: center;
}

/* 像素对话框（NPC对话风格） */
.pixel-dialog {
  background: var(--white);
  border: 4px solid var(--pixel-border);
  box-shadow: 6px 6px 0 var(--pixel-border);
  padding: var(--space-5);
  position: relative;
  margin-bottom: var(--space-4);
}
.pixel-dialog::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--cinnabar) 0,
    var(--cinnabar) 6px,
    var(--gold) 6px,
    var(--gold) 12px,
    var(--jade) 12px,
    var(--jade) 18px
  );
}
.pixel-dialog::after {
  content: '▼';
  position: absolute;
  bottom: 8px;
  right: 12px;
  color: var(--pixel-border);
  font-size: 0.8rem;
  animation: dialogBlink 0.8s steps(2) infinite;
}
@keyframes dialogBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* 像素选项按钮（问答选项） */
.pixel-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--white);
  border: 3px solid var(--pixel-border);
  border-bottom-width: 5px;
  border-right-width: 4px;
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  font-weight: 700;
  color: var(--pixel-border);
  transition: none;
  position: relative;
}
.pixel-option:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}
.pixel-option:active {
  transform: translateY(2px);
  border-bottom-width: 3px;
}
.pixel-option .option-label {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cinnabar);
  color: var(--white);
  font-weight: 900;
  border: 2px solid var(--pixel-border);
  font-size: 0.8rem;
  flex-shrink: 0;
}
.pixel-option.correct {
  background: var(--jade-light);
  border-color: var(--jade);
}
.pixel-option.correct .option-label {
  background: var(--jade);
}
.pixel-option.wrong {
  background: #fde4e0;
  border-color: var(--cinnabar);
  animation: shakeX 0.4s steps(4);
}
.pixel-option.wrong .option-label {
  background: var(--cinnabar);
}
@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}


/* ===== 卡通像素导航与页脚 ===== */

/* 导航栏像素Logo强化 */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--cinnabar);
  text-shadow: 2px 2px 0 var(--pixel-border);
  letter-spacing: 1px;
}
.navbar-logo .logo-pixel {
  width: 36px;
  height: 36px;
  background: var(--cinnabar);
  border: 3px solid var(--pixel-border);
  position: relative;
  box-shadow: 3px 3px 0 var(--pixel-border);
}
.navbar-logo .logo-pixel::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 4px;
  height: 4px;
  background: var(--gold);
  box-shadow:
    8px 0 0 var(--gold),
    4px 8px 0 var(--gold),
    0 16px 0 var(--gold), 8px 16px 0 var(--gold), 16px 16px 0 var(--gold),
    4px 20px 0 var(--gold), 12px 20px 0 var(--gold);
}

/* 导航链接像素化 */
.navbar-link {
  position: relative;
  padding: var(--space-2) var(--space-4);
  font-weight: 700;
  color: var(--pixel-border);
  letter-spacing: 1px;
  border: 3px solid transparent;
}
.navbar-link:hover {
  color: var(--cinnabar);
  background: var(--gold-light);
  border-color: var(--pixel-border);
  border-bottom-width: 5px;
  transform: translateY(-2px);
}
.navbar-link.active {
  color: var(--cinnabar);
  background: var(--gold);
  border-color: var(--pixel-border);
  border-bottom-width: 5px;
  box-shadow: 3px 3px 0 var(--pixel-border);
}
.navbar-link.active::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--pixel-border);
}

/* 像素分页 */
.pixel-pagination {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  align-items: center;
}
.pixel-page-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 3px solid var(--pixel-border);
  border-bottom-width: 5px;
  font-weight: 900;
  color: var(--pixel-border);
  cursor: pointer;
}
.pixel-page-btn:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}
.pixel-page-btn.active {
  background: var(--cinnabar);
  color: var(--white);
  border-bottom-width: 3px;
  transform: translateY(2px);
}
.pixel-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* 页脚像素装饰 */
.pixel-footer {
  position: relative;
  background: var(--clay);
  border-top: 4px solid var(--pixel-border);
  padding: var(--space-10) var(--space-6) var(--space-6);
  margin-top: var(--space-12);
}
.pixel-footer::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--cinnabar) 0,
    var(--cinnabar) 16px,
    var(--gold) 16px,
    var(--gold) 32px,
    var(--jade) 32px,
    var(--jade) 48px
  );
  border-top: 4px solid var(--pixel-border);
  border-bottom: 4px solid var(--pixel-border);
}

/* 页脚像素图标组 */
.footer-icons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  margin-bottom: var(--space-6);
}
.footer-icon {
  width: 40px;
  height: 40px;
  background: var(--white);
  border: 3px solid var(--pixel-border);
  box-shadow: 3px 3px 0 var(--pixel-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
}
.footer-icon:hover {
  transform: translateY(-3px);
  background: var(--gold-light);
}

/* 页脚分隔线 - 像素风格 */
.pixel-footer-divider {
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--pixel-border) 0,
    var(--pixel-border) 8px,
    transparent 8px,
    transparent 16px
  );
  margin: var(--space-6) 0;
}

/* 返回顶部像素按钮 */
.pixel-back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: var(--cinnabar);
  border: 3px solid var(--pixel-border);
  border-bottom-width: 6px;
  border-right-width: 5px;
  cursor: pointer;
  z-index: 100;
  box-shadow: 4px 4px 0 var(--pixel-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 900;
  font-size: 1.2rem;
}
.pixel-back-top:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
}
.pixel-back-top:active {
  transform: translateY(3px);
  border-bottom-width: 3px;
}
.pixel-back-top::before {
  content: '▲';
  text-shadow: 2px 2px 0 var(--pixel-border);
}

/* 像素标签云 */
.pixel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.pixel-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  background: var(--tag-bg, var(--sky-light));
  border: 2px solid var(--pixel-border);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--tag-color, var(--pixel-border));
  letter-spacing: 0.5px;
}
.pixel-tag::before {
  content: '■';
  font-size: 0.5em;
  color: var(--cinnabar);
}
.pixel-tag.cinnabar { --tag-bg: #fde4e0; --tag-color: var(--cinnabar); }
.pixel-tag.jade { --tag-bg: var(--jade-light); --tag-color: var(--jade); }
.pixel-tag.gold { --tag-bg: var(--gold-light); --tag-color: var(--cinnabar); }
.pixel-tag.lavender { --tag-bg: var(--lavender-light); --tag-color: #7b5fc4; }

/* 像素工具提示 */
.pixel-tooltip {
  position: relative;
}
.pixel-tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pixel-border);
  color: var(--white);
  padding: var(--space-1) var(--space-3);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: none;
}
.pixel-tooltip:hover::after {
  opacity: 1;
  bottom: calc(100% + 8px);
}



/* ===== 侧边甲骨文装饰图元 ===== */
.oracle-side-decor {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 80px 0;
  opacity: 0.6;
}

.oracle-side-decor.left {
  left: 0;
  align-items: flex-end;
  padding-right: 8px;
}

.oracle-side-decor.right {
  right: 0;
  align-items: flex-start;
  padding-left: 8px;
}

.oracle-side-decor .oracle-glyph {
  width: 48px;
  height: 48px;
  position: relative;
  flex-shrink: 0;
}

.oracle-side-decor .oracle-glyph svg,
.oracle-side-decor .oracle-glyph img {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.7;
  filter: sepia(0.3);
}

.oracle-side-decor .oracle-glyph svg path,
.oracle-side-decor .oracle-glyph img {
  stroke: var(--clay);
}

/* 每个字不同的浮动动画 */
.oracle-side-decor .oracle-glyph:nth-child(1) { animation: sideFloat1 6s steps(6) infinite; }
.oracle-side-decor .oracle-glyph:nth-child(2) { animation: sideFloat2 7s steps(5) infinite; }
.oracle-side-decor .oracle-glyph:nth-child(3) { animation: sideFloat3 8s steps(6) infinite; }
.oracle-side-decor .oracle-glyph:nth-child(4) { animation: sideFloat1 9s steps(5) infinite; }
.oracle-side-decor .oracle-glyph:nth-child(5) { animation: sideFloat2 6.5s steps(6) infinite; }
.oracle-side-decor .oracle-glyph:nth-child(6) { animation: sideFloat3 7.5s steps(5) infinite; }

/* 像素风边框小印章效果（部分字加） */
.oracle-side-decor .oracle-glyph.seal::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid var(--cinnabar);
  opacity: 0.4;
  transform: rotate(3deg);
}

/* 摸鱼彩蛋提示：右侧手和鱼之间加个小手势符号 */
.oracle-side-decor.right .moyu-hint {
  font-size: 0.6rem;
  color: var(--cinnabar);
  opacity: 0.35;
  font-family: var(--font-pixel);
  writing-mode: vertical-rl;
  margin: 2px 0;
  letter-spacing: 1px;
  transition: opacity 0.3s;
}
.oracle-side-decor.right:hover .moyu-hint {
  opacity: 0.7;
}

/* 响应式：小屏隐藏侧边装饰 */
@media (max-width: 900px) {
  .oracle-side-decor {
    display: none;
  }
}


/* ===== 子页面标题横幅（像素游戏开场风格） ===== */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 96px var(--space-5) 56px;
  text-align: center;
  background:
    /* 顶部像素彩条 */
    linear-gradient(
      180deg,
      var(--clay) 0, var(--clay) 6px,
      var(--gold) 6px, var(--gold) 12px,
      var(--cinnabar) 12px, var(--cinnabar) 18px,
      var(--jade) 18px, var(--jade) 24px,
      var(--sky) 24px, var(--sky) 30px
    );
  border-bottom: 6px solid var(--pixel-border);
  box-shadow: 0 6px 0 var(--clay-dark);
  margin-bottom: var(--space-6);
}

/* 像素点阵装饰背景 */
.page-hero::before {
  content: '';
  position: absolute;
  inset: 30px 0 0 0;
  background-image:
    radial-gradient(circle at 8px 8px, rgba(193,120,23,0.14) 2px, transparent 2.5px);
  background-size: 16px 16px;
  pointer-events: none;
}

.page-title {
  position: relative;
  z-index: 1;
  display: inline-block;
  font-size: clamp(2.8rem, 7.5vw, 5rem);
  font-weight: 900;
  font-family: var(--font-display);
  color: var(--gold);
  letter-spacing: 4px;
  text-shadow:
    -4px -4px 0 var(--pixel-border),
    4px -4px 0 var(--pixel-border),
    -4px 4px 0 var(--pixel-border),
    4px 4px 0 var(--pixel-border),
    6px 6px 0 var(--cinnabar);
  margin-bottom: var(--space-3);
  animation: titleBounce 2s steps(4) infinite;
}

.page-title .title-icon {
  display: inline-block;
  width: 72px;
  height: 80px;
  vertical-align: -18px;
  margin-right: var(--space-2);
  filter: drop-shadow(3px 3px 0 var(--pixel-border));
}

.page-subtitle {
  position: relative;
  z-index: 1;
  display: inline-block;
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 2px;
  background: var(--clay-dark);
  border: 3px solid var(--pixel-border);
  box-shadow: 3px 3px 0 var(--pixel-border);
  padding: var(--space-2) var(--space-5);
  margin: var(--space-2) auto 0;
  max-width: 640px;
  line-height: 1.7;
}

/* 小屏适配 */
@media (max-width: 768px) {
  .page-hero { padding: 84px var(--space-4) 40px; }
  .page-title .title-icon { width: 52px; height: 52px; vertical-align: -12px; }
  .page-subtitle { font-size: 0.9rem; }
}


/* ===== 全局像素强化 ===== */

/* 像素地面条（Hero 底部） */
.pixel-ground {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 36px;
  background: repeating-linear-gradient(
    90deg,
    var(--clay-dark) 0, var(--clay-dark) 24px,
    var(--clay-darker) 24px, var(--clay-darker) 48px
  );
  border-top: 6px solid var(--pixel-border);
  box-shadow: 0 -4px 0 var(--clay);
  pointer-events: none;
}
.pixel-ground::before {
  content: '';
  position: absolute;
  top: -14px; left: 0; right: 0;
  height: 8px;
  background:
    linear-gradient(135deg, var(--jade) 25%, transparent 25%) -4px 0 / 8px 8px,
    linear-gradient(225deg, var(--jade) 25%, transparent 25%) -4px 0 / 8px 8px;
}

/* Hero 装饰：像素云与像素星（纯 CSS 绘制） */
.hero-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.pixel-cloud {
  position: absolute;
  width: 64px;
  height: 40px;
  background: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10' shape-rendering='crispEdges'%3E%3Crect x='5' y='1' width='6' height='2' fill='%23ffffff'/%3E%3Crect x='3' y='3' width='10' height='4' fill='%23ffffff'/%3E%3Crect x='5' y='7' width='6' height='2' fill='%23ffffff'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  opacity: 0.75;
}
.pixel-cloud.c1 { top: 14%; left: 10%; transform: scale(0.85); opacity: 0.65; }
.pixel-cloud.c2 { top: 10%; right: 18%; transform: scale(1); opacity: 0.7; }
.pixel-cloud.c3 { top: 40%; left: 6%; transform: scale(0.55); opacity: 0.55; }
.pixel-cloud.c4 { top: 32%; right: 12%; transform: scale(0.65); opacity: 0.6; }
/* 子页面蓝色背景上的云朵用更亮的颜色 */
.page-hero .pixel-cloud {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10' shape-rendering='crispEdges'%3E%3Crect x='5' y='1' width='6' height='2' fill='%23f8e4b8'/%3E%3Crect x='3' y='3' width='10' height='4' fill='%23f8e4b8'/%3E%3Crect x='5' y='7' width='6' height='2' fill='%23f8e4b8'/%3E%3C/svg%3E");
  opacity: 0.6;
}

.pixel-star {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold);
  image-rendering: pixelated;
  box-shadow:
    0 -4px 0 var(--gold), 0 4px 0 var(--gold),
    -4px 0 0 var(--gold), 4px 0 0 var(--gold);
  animation: twinkle 1.6s steps(4) infinite;
}
.pixel-star.s1 { top: 20%; left: 22%; animation-delay: 0s; }
.pixel-star.s2 { top: 14%; right: 28%; animation-delay: 0.4s; }
.pixel-star.s3 { top: 36%; right: 18%; animation-delay: 0.8s; }
.pixel-star.s4 { top: 42%; left: 16%; animation-delay: 1.2s; }
.pixel-star.s5 { top: 26%; left: 46%; animation-delay: 0.6s; }

@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.7); }
}

/* 扫描线覆盖层（全局 CRT 感） */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.045) 0px, rgba(0,0,0,0.045) 1px,
    transparent 1px, transparent 3px
  );
  mix-blend-mode: multiply;
}

/* 像素徽章按钮（页面小标签） */
.pixel-tagline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--cinnabar);
  color: var(--white);
  padding: var(--space-1) var(--space-4);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 2px;
  border: 3px solid var(--pixel-border);
  box-shadow: 3px 3px 0 var(--pixel-border);
  margin-bottom: var(--space-4);
}
.pixel-tagline::before {
  content: '★';
  color: var(--gold);
}
.pixel-tagline::after {
  content: '★';
  color: var(--gold);
}

/* 像素区块分隔（章节之间） */
.pixel-divider-band {
  height: 16px;
  background:
    linear-gradient(135deg, var(--clay) 25%, transparent 25%) -8px 0 / 16px 16px,
    linear-gradient(225deg, var(--clay) 25%, transparent 25%) -8px 0 / 16px 16px;
  border-top: 4px solid var(--pixel-border);
  border-bottom: 4px solid var(--pixel-border);
}

/* 像素小箭头（步骤流程用） */
.pixel-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid var(--clay);
  filter: drop-shadow(2px 2px 0 var(--pixel-border));
}
