/* Page transitions */
.screen.question-screen { display: none; }
.screen.question-screen.is-active { display: block; }

/* 粉色爱心拉帘：双面板从两侧合拢/拉开，形成窗帘效果 */
.aurora-veil {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  will-change: transform, opacity;
}

.curtain-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  background:
    radial-gradient(ellipse 90% 70% at 30% 40%, rgba(255, 100, 200, 0.5), transparent 60%),
    radial-gradient(ellipse 80% 70% at 70% 60%, rgba(255, 100, 200, 0.42), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23ff64c8' fill-opacity='.26'%3E%3Cpath d='M30 30c0-6 4-10 10-10s10 4 10 10c0 8-10 16-10 16S30 38 30 30z'/%3E%3Cpath d='M78 78c0-5 3-8 8-8s8 3 8 8c0 6-8 13-8 13s-8-7-8-13z'/%3E%3Cpath d='M64 22c0-4 3-7 7-7s7 3 7 7c0 6-7 11-7 11s-7-5-7-11z'/%3E%3Cpath d='M22 84c0-4 3-7 7-7s7 3 7 7c0 6-7 11-7 11s-7-5-7-11z'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, #ffe3f0 0%, #ffd0e6 45%, #ffb3d9 100%);
  background-size: auto, auto, 120px 120px, auto;
  will-change: transform;
}

.curtain-panel-left {
  left: 0;
  transform-origin: 100% 50%;
}

.curtain-panel-right {
  right: 0;
  transform-origin: 0% 50%;
}

/* 关闭动画（curtain 合拢）时面板从两侧进入画面 */
.aurora-veil.is-sweeping {
  visibility: visible;
  opacity: 1;
}

.aurora-veil.is-sweeping .curtain-panel-left {
  animation: curtain-in-left 0.5s cubic-bezier(0.45, 0.05, 0.2, 1) forwards;
}

.aurora-veil.is-sweeping .curtain-panel-right {
  animation: curtain-in-right 0.5s cubic-bezier(0.45, 0.05, 0.2, 1) forwards;
}

.aurora-veil.is-sweeping[data-direction='back'] .curtain-panel-left {
  animation-name: curtain-in-right;
}

.aurora-veil.is-sweeping[data-direction='back'] .curtain-panel-right {
  animation-name: curtain-in-left;
}

@keyframes curtain-in-left {
  from { transform: translateX(-101%); }
  to { transform: translateX(0); }
}

@keyframes curtain-in-right {
  from { transform: translateX(101%); }
  to { transform: translateX(0); }
}

/* Emoji rain — fixed full-screen, rAF driven */
.emoji-rain {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 16%, rgba(253, 224, 236, 0.45), transparent 24%),
    radial-gradient(circle at 86% 84%, rgba(220, 236, 250, 0.5), transparent 26%);
}

.rain-emoji {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  border: 0;
  padding: 2px;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1;
  background: transparent;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  filter: drop-shadow(0 4px 6px rgba(55, 53, 47, 0.14));
  will-change: transform, opacity;
  transition: filter 0.18s ease;
}

.rain-emoji.is-grabbed {
  cursor: grabbing;
  filter: drop-shadow(0 8px 14px rgba(86, 69, 212, 0.28));
}

.screen.question-screen.is-active {
  position: relative;
  z-index: 2;
  background: transparent !important;
  pointer-events: none;
}

.screen.question-screen.is-active::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  /* 透明背景，让 emoji 雨透过显示（原为不透明 var(--surface) 挡住了 z-index:1 的 emoji 层） */
  background: transparent;
  pointer-events: none;
}

.question-screen.is-active .question-header,
.question-screen.is-active .progress-track,
.question-screen.is-active .question-view,
.question-screen.is-active .question-view * {
  pointer-events: auto;
}

.question-view {
  /* 注意：不能设置 perspective/transform/filter，否则会成为 position:fixed 的"不要"按钮的包含块，
     导致按钮相对 question-view 定位而逃逸出视口 */
  animation: none !important;
}

/* 过渡动画锁：拉帘/题目浮现完成前禁用内部交互，防止快速连点跳题丢数据 */
.question-view.is-locked {
  pointer-events: none;
  user-select: none;
}
.question-view.is-locked * {
  pointer-events: none;
}

/* Hero + map polish */
.hero-cta,
.no-btn {
  animation: none !important;
}

.hero-cta {
  background: #fff !important;
  color: var(--primary) !important;
  animation: water-float 6.5s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.04), 0 10px 22px rgba(0, 0, 0, 0.26), 0 20px 38px rgba(86, 69, 212, 0.18);
  will-change: transform;
}

.no-btn {
  background: #fff;
  animation: water-float-no 6.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  box-shadow: 0 8px 16px rgba(15, 21, 48, 0.16), 0 18px 34px rgba(15, 21, 48, 0.1);
  transition: left 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), top 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), filter 0.2s ease, opacity 0.2s ease;
  will-change: transform, left, top, filter;
}

.hero-screen::before,
.hero-screen::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 7%;
  width: clamp(260px, 34vw, 520px);
  height: 76px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  transform: translateX(-50%) scale(0.72);
  opacity: 0;
  animation: water-ring 6.5s ease-out infinite;
  pointer-events: none;
}

.hero-screen::after {
  animation-delay: 3.25s;
}

@keyframes water-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -5px, 0) scale(1.01); }
}

@keyframes water-float-no {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  35% { transform: translate3d(0, -4px, 0) rotate(-0.35deg); }
  70% { transform: translate3d(0, -2px, 0) rotate(0.25deg); }
}

@keyframes water-ring {
  0% { opacity: 0; transform: translateX(-50%) scale(0.72); }
  18% { opacity: 0.35; }
  75% { opacity: 0.08; }
  100% { opacity: 0; transform: translateX(-50%) scale(1.08); }
}

.map-container {
  height: clamp(240px, 34vh, 360px);
  overflow: hidden !important;
  contain: paint;
  isolation: isolate;
}

.map-container .amap-maps,
.map-container .amap-layers {
  overflow: hidden !important;
  clip-path: inset(0 round 8px);
}

.map-container .amap-copyright {
  bottom: 4px !important;
  max-width: 100%;
  white-space: nowrap;
}

.map-tools {
  align-items: flex-start;
}

.search-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-field .map-search {
  width: 100%;
}

.search-results {
  display: none;
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  margin: 0;
  max-height: 220px;
  overflow: auto;
}

.search-results.is-open {
  display: block;
}

.option-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  will-change: transform;
}

.option-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 42%, rgba(86, 69, 212, 0.1));
  opacity: 0;
  transform: translateX(-20%);
  transition: opacity 0.32s ease, transform 0.48s ease;
  z-index: -1;
}

.option-card:hover::before,
.option-card:focus-visible::before {
  opacity: 1;
  transform: translateX(0);
}

.option-card:hover {
  border-color: rgba(86, 69, 212, 0.32);
}

.button-primary,
.hero-cta {
  background: linear-gradient(135deg, #6d5bea 0%, #5645d4 55%, #4534b3 100%);
  box-shadow: 0 10px 20px rgba(86, 69, 212, 0.2);
  position: relative;
  overflow: hidden;
}

.hero-cta {
  background: #fff !important;
  color: var(--primary) !important;
}

.button-primary::after,
.hero-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(255, 255, 255, 0.32) 50%, transparent 75%);
  transform: translateX(-120%);
  transition: transform 0.62s ease;
  pointer-events: none;
}

.button-primary:hover::after,
.hero-cta:hover::after {
  transform: translateX(120%);
}

.button-secondary {
  background: linear-gradient(135deg, #fff, #f5f2ff);
  box-shadow: 0 6px 15px rgba(15, 21, 48, 0.08);
}

.map-confirm {
  background: linear-gradient(110deg, #5645d4, #795ff0, #5645d4);
  background-size: 200% 100%;
  transition: background-position 0.45s ease, box-shadow 0.35s ease;
}

.map-confirm:hover {
  background-position: 100% 0;
  box-shadow: 0 12px 24px rgba(86, 69, 212, 0.28);
}

.heart-map-marker {
  position: relative;
  width: 32px;
  height: 42px;
  filter: drop-shadow(0 4px 5px rgba(160, 46, 109, 0.32));
  animation: heart-bob 1.8s ease-in-out infinite;
  transform-origin: 50% 30%;
}

.heart-map-marker span {
  position: absolute;
  left: 3px;
  top: 0;
  color: #ff64c8;
  font-size: 30px;
  line-height: 30px;
  text-shadow: 0 1px 0 #fff;
  animation: heart-glow 1.8s ease-in-out infinite;
}

.heart-map-marker i {
  position: absolute;
  left: 15px;
  top: 27px;
  width: 2px;
  height: 14px;
  background: #a02e6d;
  transform: rotate(-14deg);
  transform-origin: top;
}

.heart-map-marker i::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: -3px;
  width: 8px;
  height: 2px;
  background: #a02e6d;
  transform: rotate(14deg);
}

/* 心跳：有节奏的慢频率缩放（两次跳动后停顿），而非高频抖动 */
@keyframes heart-bob {
  0%, 100% { transform: scale(1) translateY(0); }
  12% { transform: scale(1.14) translateY(-1px); }
  22% { transform: scale(1) translateY(0); }
  38% { transform: scale(1.09) translateY(-1px); }
  50% { transform: scale(1) translateY(0); }
}

/* 光晕：爱心周围粉色光晕有节奏地扩散消退 */
@keyframes heart-glow {
  0%, 100% { text-shadow: 0 1px 0 #fff, 0 0 0 rgba(255, 100, 200, 0); }
  38% { text-shadow: 0 1px 0 #fff, 0 0 18px rgba(255, 100, 200, 0.9), 0 0 30px rgba(255, 100, 200, 0.5); }
  50% { text-shadow: 0 1px 0 #fff, 0 0 0 rgba(255, 100, 200, 0); }
}

/* 名字输入弹窗 */
.name-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.name-modal.is-open {
  display: flex;
}

/* 确认弹窗始终在最上层（可能从其他模态内部触发，如配置管理删除） */
#confirm-modal { z-index: 1100; }

.name-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(7, 15, 36, 0.6);
  backdrop-filter: blur(4px);
}

.name-modal-card {
  position: relative;
  width: min(380px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: clamp(28px, 6vw, 40px);
  text-align: center;
  box-shadow: 0 24px 48px -8px rgba(0, 0, 0, 0.25);
  animation: modal-pop 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.name-modal-heart {
  display: block;
  font-size: 40px;
  color: var(--pink);
  margin-bottom: 8px;
}

.name-modal-card h2 {
  font-size: 26px;
  margin: 8px 0 8px;
  color: var(--ink);
}

.name-modal-hint {
  color: var(--slate);
  font-size: 14px;
  margin: 0 0 20px;
}

.name-input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--strong);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 16px;
  text-align: center;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}

.name-input:focus {
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 3px rgba(86, 69, 212, 0.12);
}

.name-error {
  color: var(--semantic-error, #e03131);
  font-size: 13px;
  margin: 10px 0 0;
  min-height: 18px;
}

.name-confirm {
  width: 100%;
  margin-top: 16px;
  min-height: 46px;
  font-size: 16px;
}

/* 通用确认弹窗：取消/确定按钮同样式（紫色），确定文字红色表示危险操作 */
.confirm-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.confirm-actions .name-confirm {
  width: auto;
  flex: 1;
  margin-top: 0;
  min-height: 46px;
  font-size: 16px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  padding-left: 18px;
  padding-right: 18px;
}
.confirm-actions .button-ghost {
  border: 1px solid rgba(255, 255, 255, 0.3);
}
#confirm-ok {
  color: #e03131;
  font-weight: 600;
}

/* toast 提示 */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: rgba(15, 21, 48, 0.92);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.25s, transform 0.25s;
  max-width: 280px;
}
.toast.is-show {
  opacity: 1;
  transform: translateX(0);
}
.toast-success { border-left: 3px solid #1aae39; }
.toast-error { border-left: 3px solid #e03131; }
.toast-info { border-left: 3px solid #5645d4; }

/* JSON 编辑器 */
.json-editor-card { width: min(680px, 92vw); }
.json-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.json-tab {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
}
.json-tab.is-active {
  background: var(--primary);
  color: #ff4d6d;
  border-color: var(--primary);
  font-weight: 700;
}
.json-editor-text, .json-editor-sample {
  width: 100%;
  min-height: 260px;
  max-height: 50vh;
  background: rgba(0, 0, 0, 0.35);
  color: #d6e4ff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px;
  font-family: monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  resize: vertical;
  box-sizing: border-box;
}

/* 首页配置选择器 */
.config-picker {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 15;
}
.config-picker-trigger {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.config-picker-panel {
  position: absolute;
  top: 48px;
  right: 0;
  width: 240px;
  background: rgba(15, 21, 48, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 10px;
  display: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}
.config-picker-panel.is-open { display: block; }
.config-picker-search {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  margin-bottom: 8px;
  box-sizing: border-box;
}
.config-picker-list { max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.config-picker-item {
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  background: transparent;
  border: 0;
  color: #fff;
  border-radius: 6px;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 13px;
}
.config-picker-item:hover { background: rgba(255, 255, 255, 0.1); }
.config-picker-item.is-active { background: rgba(86, 69, 212, 0.4); }
.config-picker-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.config-picker-copy {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 6px;
  padding: 4px 7px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.config-picker-copy:hover { background: rgba(86, 69, 212, 0.4); }
.config-picker-name { font-weight: 600; }
.config-picker-key { color: #a4a097; font-size: 11px; }
.config-picker-count { color: #ffb4c8; font-size: 11px; }
.config-picker-empty { color: #a4a097; text-align: center; padding: 10px; font-size: 13px; }
.config-picker-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.config-picker-page-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12px;
}
.config-picker-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.config-picker-page-info { color: #a4a097; font-size: 12px; }

/* 配置管理模态 */
.config-manage-card { width: min(560px, 92vw); }
.config-manage-list {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.config-manage-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 10px;
}
.config-manage-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.config-manage-del { flex-shrink: 0; }

/* 专属配置结果查看模态 */
.result-viewer-card { width: min(560px, 92vw); }
.result-viewer-list {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
/* 专属结果卡片：填实紫色底（与 JSON 编辑器按钮紫色底一致，双 class 提高优先级覆盖 .admin-card 默认底） */
.admin-card.result-viewer-card-item {
  background: var(--primary);
  border: 1px solid var(--primary);
}
.admin-card.result-viewer-card-item:hover {
  border-color: #ff64c8;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

@keyframes modal-pop {
  from { transform: scale(0.92) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* ===== 管理员页面 ===== */
.admin-entry {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
  backdrop-filter: blur(4px);
}
.admin-entry:hover {
  transform: rotate(45deg) scale(1.1);
  background: rgba(255, 100, 200, 0.35);
}
/* 专属链接进入时：齿轮变爱心 + 心跳效果 */
/* 心跳由 result-viewer.js 用 requestAnimationFrame 驱动（避免 prefers-reduced-motion 禁用 CSS 无限动画） */
.admin-entry.admin-entry-heart {
  color: #ff6b9d;
  background: rgba(255, 100, 200, 0.18);
  will-change: transform, box-shadow;
}
.admin-entry.admin-entry-heart:hover {
  transform: scale(1.15);
  background: rgba(255, 100, 200, 0.4);
}

.admin-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  background: linear-gradient(160deg, #0a1530 0%, #1a2a52 45%, #3a2a99 100%);
  color: #fff;
  padding: 32px 24px 60px;
  display: none;
  flex-direction: column;
  align-items: center;
}
.admin-screen.is-active {
  display: flex;
}

.admin-header {
  width: min(860px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.admin-title {
  font-size: clamp(20px, 4vw, 28px);
  margin: 0;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #ff64c8, #f5d75e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.admin-status {
  width: min(860px, 100%);
  color: #c5c9d5;
  font-size: 14px;
  margin: 0 0 20px;
}

/* 批量操作栏 */
.admin-bulk-bar {
  width: min(860px, 100%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}
.admin-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c5c9d5;
  font-size: 14px;
  cursor: pointer;
}
.admin-select-all input[type="checkbox"],
.admin-check {
  width: 18px;
  height: 18px;
  accent-color: #ff64c8;
  cursor: pointer;
}
.admin-selected-count {
  flex: 1;
  color: #ffd0e6;
  font-size: 14px;
}
.button-danger {
  background: rgba(224, 49, 49, 0.85);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.button-danger:hover:not(:disabled) {
  background: #e03131;
  transform: translateY(-2px);
}
.button-danger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.admin-card.admin-card-selected {
  border-color: rgba(255, 100, 200, 0.7);
  box-shadow: 0 0 0 2px rgba(255, 100, 200, 0.3);
}

.admin-list {
  width: min(860px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.admin-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 18px;
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.admin-card.admin-card-in {
  animation: admin-card-in 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.admin-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 100, 200, 0.5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
@keyframes admin-card-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.admin-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.admin-avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff64c8, #5645d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 100, 200, 0.4);
}
.admin-card-name {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-card-name strong {
  font-size: 16px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-card-name small {
  color: #a4a097;
  font-size: 12px;
}
.admin-delete {
  border: 0;
  background: transparent;
  color: #a4a097;
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.admin-delete:hover {
  color: #e03131;
  background: rgba(224, 49, 49, 0.15);
}

.admin-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.admin-tag {
  background: rgba(255, 100, 200, 0.15);
  color: #ffd0e6;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
}
.admin-address {
  color: #c5c9d5;
  font-size: 13px;
  margin: 0 0 8px;
}
.admin-plan {
  color: #e6e0f5;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 8px;
}

.admin-pagination {
  width: min(860px, 100%);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 24px;
}
.pg-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s, transform 0.2s;
}
.pg-btn:hover:not(:disabled) {
  background: rgba(255, 100, 200, 0.3);
  transform: translateY(-2px);
}
.pg-btn.pg-active {
  background: linear-gradient(135deg, #ff64c8, #5645d4);
  border-color: transparent;
  font-weight: 600;
}
.pg-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== 管理员：标签页 + 题目管理 ===== */
.admin-tabs {
  width: min(860px, 100%);
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.admin-tab {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #c5c9d5;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
}
.admin-tab.is-active {
  background: linear-gradient(135deg, #ff64c8, #5645d4);
  color: #fff;
  border-color: transparent;
}

.admin-questions-toolbar {
  width: min(860px, 100%);
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-questions-list {
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* 管理面板容器：限制宽度不超出视口（避免手机端内容撑开溢出） */
.admin-panel {
  width: 100%;
  max-width: 860px;
  min-width: 0;
}
.admin-q-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 100%;
  min-width: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-q-card.dragging {
  opacity: 0.5;
  border-color: #ff64c8;
}
.admin-q-drag {
  cursor: grab;
  color: #a4a097;
  font-size: 20px;
  touch-action: none;
  padding: 6px;
  user-select: none;
  flex-shrink: 0;
}
/* 拖拽占位：被拖卡片浮起时占据原位置，防止其他卡片上移占位重叠（透明，不显示边框） */
.admin-q-placeholder {
  flex-shrink: 0;
}
.admin-q-body {
  flex: 1;
  min-width: 0;
}
.admin-q-head {
  display: flex;
  gap: 8px;
  align-items: center;
}
.admin-q-detail {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.admin-q-card.is-open .admin-q-detail {
  display: block;
}
.admin-q-toggle {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 6px;
  width: 32px;
  height: 36px;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.admin-q-card.is-open .admin-q-toggle {
  transform: rotate(180deg);
}
.admin-q-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.admin-q-id {
  color: #ff64c8;
  font-weight: 600;
  font-size: 13px;
  min-width: 28px;
}
.admin-q-input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
}
.admin-q-input:focus {
  border-color: #ff64c8;
  outline: none;
}
.admin-q-input.admin-q-value {
  flex: 0 0 100px;
}
.admin-q-emoji {
  width: 40px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 6px;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}
.admin-q-emoji:hover {
  border-color: #ff64c8;
  background: rgba(255, 100, 200, 0.2);
}
.admin-q-type select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  margin-bottom: 8px;
}
.admin-q-type select option {
  color: #1a1a1a;
}
.admin-q-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-q-opt {
  display: flex;
  gap: 6px;
  align-items: center;
}
.admin-q-del-opt {
  border: 0;
  background: transparent;
  color: #a4a097;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
}
.admin-q-del-opt:hover {
  color: #e03131;
}
.admin-q-add-opt {
  align-self: flex-start;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #c5c9d5;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  margin-top: 4px;
}
.admin-q-add-opt:hover {
  border-color: #ff64c8;
  color: #ff64c8;
}
.admin-q-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-q-del {
  border: 1px solid rgba(224, 49, 49, 0.4);
  background: transparent;
  color: #e03131;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
}
.admin-q-del:hover {
  background: rgba(224, 49, 49, 0.15);
}

/* emoji 选择弹层 */
.emoji-picker {
  position: fixed;
  z-index: 1100;
  width: 260px;
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}
.emoji-picker[hidden] {
  display: none;
}
.emoji-opt {
  border: 0;
  background: transparent;
  font-size: 20px;
  padding: 4px;
  cursor: pointer;
  border-radius: 6px;
  line-height: 1.2;
}
.emoji-opt:hover {
  background: #f0f0f5;
}
.emoji-opt.is-selected {
  background: #ffe0ee;
  outline: 2px solid #ff64c8;
}


/* ---- 主页装饰 emoji 交互优化 ---- */
/* 缩小命中 box，贴合字形，减少"离得还远就判定悬停" */
.hero-screen .sticker {
  line-height: 1;
  padding: 0;
  margin: 0;
  width: fit-content;
  height: fit-content;
  cursor: default;
}
/* 主页除按钮外不显示 I-beam 文本光标、不可选中文字 */
.hero-screen {
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}
.hero-screen .hero-cta {
  cursor: pointer;
}

/* 层级：齿轮 + 好呀按钮 > 装饰 emoji > 定制约会内容 > 背景 */
.hero-content {
  z-index: 2;
}
.hero-screen .sticker {
  z-index: 10;
}
.hero-screen .hero-cta {
  position: relative;
  z-index: 20;
}
.admin-entry {
  z-index: 30;
}
.hero-glow,
.wave-art {
  z-index: 0;
}

/* 悬停动画：作用于内层 .sticker-glyph，与外层 GSAP 漂浮位置分离，保证原地缩放不跳动 */
.sticker-glyph {
  display: inline-block;
  transform-origin: 50% 50%;
}
/* 爱心：像地图定位标/愿意按钮那样有节奏的两次心跳（慢速、渐变） */
@keyframes ambient-heart {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.22) translateY(-1px); }
  26% { transform: scale(1); }
  40% { transform: scale(1.12) translateY(-1px); }
  54% { transform: scale(1); }
}
/* 爱心光晕：粉色光晕随心跳节奏扩散消退 */
@keyframes ambient-heart-glow {
  0%, 100% { text-shadow: 0 0 4px rgba(255, 100, 200, 0); }
  14% { text-shadow: 0 0 12px rgba(255, 100, 200, 0.8), 0 0 30px rgba(255, 100, 200, 0.5); }
  26% { text-shadow: 0 0 4px rgba(255, 100, 200, 0); }
  40% { text-shadow: 0 0 10px rgba(255, 100, 200, 0.7), 0 0 24px rgba(255, 100, 200, 0.4); }
  54% { text-shadow: 0 0 4px rgba(255, 100, 200, 0); }
}
/* 星星/月亮/流星：变暗再变亮（渐变闪烁，频率低不抽搐） */
@keyframes ambient-twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
/* 圆圈：原地变大变小（慢速渐变） */
@keyframes ambient-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}
/* 通用 emoji：轻微放大漂浮感 */
@keyframes ambient-emoji {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.14) translateY(-3px); }
}

.sticker.is-hover-heart .sticker-glyph { animation: ambient-heart 1.8s ease-in-out infinite, ambient-heart-glow 1.8s ease-in-out infinite !important; }
.sticker.is-hover-star .sticker-glyph { animation: ambient-twinkle 1.8s ease-in-out infinite !important; }
.sticker.is-hover-circle .sticker-glyph { animation: ambient-pulse 1.6s ease-in-out infinite !important; }
.sticker.is-hover-emoji .sticker-glyph { animation: ambient-emoji 1.6s ease-in-out infinite !important; }

