/* QuizSprint 彩蛋浮层、印章横幅、答题卡流光、搜题暗号卡片与图鉴弹窗 */
.egg-fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 125;
  pointer-events: none;
}

/* 顶部居中悬浮彩蛋横幅（不阻挡下方刷题与点击） */
.egg-banner-host {
  position: fixed;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 126;
  pointer-events: none;
  width: min(560px, calc(100vw - 24px));
  display: flex;
  justify-content: center;
}

.egg-banner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  animation: eggBannerIn 300ms var(--ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1));
}
.egg-banner.is-out { animation: eggBannerOut 200ms ease forwards; }

.egg-banner.is-gold {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, #fef3c7), color-mix(in srgb, var(--surface) 96%, #fde68a));
}
.egg-banner.is-ok {
  border-color: rgba(16, 185, 129, 0.42);
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, #d1fae5), color-mix(in srgb, var(--surface) 97%, #a7f3d0));
}
.egg-banner.is-rain {
  border-color: rgba(59, 130, 246, 0.36);
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, #dbeafe), color-mix(in srgb, var(--surface) 97%, #e0f2fe));
}
.egg-banner.is-shield {
  border-color: rgba(249, 115, 22, 0.42);
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, #ffedd5), color-mix(in srgb, var(--surface) 97%, #fef3c7));
}
.egg-banner.is-violet {
  border-color: rgba(139, 92, 246, 0.42);
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, #ede9fe), color-mix(in srgb, var(--surface) 97%, #e0e7ff));
}
:root[data-color-scheme="dark"] .egg-banner {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.egg-banner-body { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.egg-banner-badge {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-fg);
  white-space: nowrap;
}
.egg-banner.is-gold .egg-banner-badge { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.egg-banner.is-shield .egg-banner-badge { background: rgba(249, 115, 22, 0.16); color: #c2410c; }
.egg-banner.is-ok .egg-banner-badge { background: rgba(16, 185, 129, 0.16); color: #047857; }
:root[data-color-scheme="dark"] .egg-banner.is-gold .egg-banner-badge { color: #fcd34d; }
:root[data-color-scheme="dark"] .egg-banner.is-shield .egg-banner-badge { color: #fdba74; }
:root[data-color-scheme="dark"] .egg-banner.is-ok .egg-banner-badge { color: #34d399; }

.egg-banner-text { min-width: 0; }
.egg-banner-title { font-size: 0.875rem; font-weight: 700; color: var(--ink); line-height: 1.35; }
.egg-banner-sub { font-size: 0.75rem; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.egg-banner-right { display: flex; align-items: center; gap: 6px; flex: none; }

.egg-stamp {
  padding: 3px 8px;
  border: 1.5px solid #d97706;
  border-radius: 6px;
  color: #b45309;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  transform: rotate(-7deg);
  animation: eggStampDrop 340ms var(--ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1));
}
:root[data-color-scheme="dark"] .egg-stamp { color: #fbbf24; border-color: #fbbf24; }

.egg-banner-act {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent-fg);
  border-radius: 8px;
  padding: 4px 9px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.egg-banner-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 6px;
  cursor: pointer;
}
.egg-banner-close:hover { background: var(--surface-hover); color: var(--ink); }

/* 答题卡边框短促情绪流光 */
.question-box.egg-pulse-gold { animation: eggPulseGold 1.35s ease; }
.question-box.egg-pulse-shield { animation: eggPulseShield 1.35s ease; }
.question-box.egg-pulse-ice { animation: eggPulseIce 1.15s ease; }
.question-box.egg-pulse-rain { animation: eggPulseRain 1.25s ease; }

/* Logo 7 连点翻转 */
.brand-icon.egg-spin { animation: eggLogoSpin 680ms var(--ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)); }

/* 搜题暗号卡片 & 电子木鱼 / 运势签 */
.egg-search-card, .egg-toy-card {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
}
.egg-search-card { margin-bottom: 10px; }
.egg-search-card.is-gold { border-color: rgba(245, 158, 11, 0.36); }
.egg-search-card.is-violet { border-color: rgba(139, 92, 246, 0.36); }
.egg-search-card.is-blue { border-color: rgba(59, 130, 246, 0.36); }
.egg-search-head, .egg-toy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.84rem;
}
.egg-fortune-grid { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; font-size: 0.8125rem; }
.egg-ft-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-right: 4px;
}
.egg-ft-tag.is-yi { background: var(--ok-soft); color: var(--ok); }
.egg-ft-tag.is-ji { background: var(--bad-soft); color: var(--bad); }

.egg-muyu-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}
.egg-muyu-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, border-color 0.15s ease;
}
.egg-muyu-btn:hover { border-color: var(--accent); }
.egg-muyu-btn.is-hit { animation: eggMuyuHit 180ms ease; }
.egg-muyu-emoji { font-size: 1rem; }
.egg-muyu-float-wrap { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.egg-muyu-float {
  position: absolute;
  left: 50%;
  top: -4px;
  transform: translateX(-50%);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-fg);
  white-space: nowrap;
  animation: eggFloatUp 800ms ease-out forwards;
}

/* 彩蛋图鉴弹窗 */
.egg-cat-summary {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.egg-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 8px;
}
.egg-cat-item {
  display: flex;
  gap: 9px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.egg-cat-item.is-locked {
  border-style: dashed;
  background: var(--surface-soft);
  opacity: 0.84;
}
.egg-cat-item.is-unlocked { border-color: color-mix(in srgb, var(--accent) 34%, var(--line)); }
.egg-cat-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--surface-soft);
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex: none;
}
.egg-cat-info { min-width: 0; }
.egg-cat-name { font-size: 0.8125rem; font-weight: 700; color: var(--ink); }
.egg-cat-desc { font-size: 0.74rem; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.egg-cat-time { font-size: 0.68rem; color: var(--accent-fg); margin-top: 4px; }
.egg-toys-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* 外观菜单里的隐藏皮肤角标 */
.theme-card-btn.is-secret { border-style: dashed; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

@keyframes eggBannerIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes eggBannerOut {
  to { opacity: 0; transform: translateY(-8px) scale(0.97); }
}
@keyframes eggStampDrop {
  0% { opacity: 0; transform: scale(1.7) rotate(-18deg); }
  70% { opacity: 1; transform: scale(0.94) rotate(-6deg); }
  100% { transform: scale(1) rotate(-7deg); }
}
@keyframes eggPulseGold {
  0%, 100% { box-shadow: none; }
  35% { box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.55), 0 0 26px rgba(245, 158, 11, 0.22); }
}
@keyframes eggPulseShield {
  0%, 100% { box-shadow: none; }
  35% { box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.48), 0 0 24px rgba(249, 115, 22, 0.2); }
}
@keyframes eggPulseIce {
  0%, 100% { box-shadow: none; }
  35% { box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.52), 0 0 24px rgba(56, 189, 248, 0.22); }
}
@keyframes eggPulseRain {
  0%, 100% { box-shadow: none; }
  35% { box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.36), 0 0 20px rgba(96, 165, 250, 0.16); }
}
@keyframes eggLogoSpin {
  0% { transform: scale(1) rotate(0deg); }
  45% { transform: scale(1.22) rotate(200deg); }
  100% { transform: scale(1) rotate(360deg); }
}
@keyframes eggMuyuHit {
  0% { transform: scale(1); }
  45% { transform: scale(0.93); }
  100% { transform: scale(1); }
}
@keyframes eggFloatUp {
  0% { opacity: 0; transform: translate(-50%, 4px) scale(0.9); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -26px) scale(1.04); }
}

@media (max-width: 640px) {
  .egg-banner-host { top: 58px; }
  .egg-banner { padding: 9px 11px; flex-wrap: wrap; }
  .egg-toys-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .egg-banner, .egg-stamp, .question-box.egg-pulse-gold, .question-box.egg-pulse-shield,
  .question-box.egg-pulse-ice, .question-box.egg-pulse-rain, .brand-icon.egg-spin {
    animation: none !important;
  }
}
