/* ==================== 「玄策 | XUANCE」东方未来主义视觉体系 ==================== */
:root {
  --bg-obsidian: #0B1110;
  --bg-surface: rgba(16, 26, 24, 0.86);
  --bg-surface-solid: #101A18;
  --bg-card: rgba(20, 34, 31, 0.72);
  --jade: #22C3A6;
  --jade-bright: #3CE6C6;
  --jade-dim: rgba(34, 195, 166, 0.16);
  --gold: #D6B676;
  --gold-bright: #EED091;
  --gold-dim: rgba(214, 182, 118, 0.16);
  --danger: #F06D6D;
  --text-main: #EDF6F4;
  --text-sub: #9CB4AE;
  --text-muted: #6C857F;
  --border-jade: rgba(34, 195, 166, 0.24);
  --border-gold: rgba(214, 182, 118, 0.34);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --vvh: 100dvh;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-obsidian);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* ==================== 背景层：深青墨光晕 + 科技网格 + 流线 ==================== */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, #102824 0%, var(--bg-obsidian) 65%);
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.42;
}

.bg-glow-1 {
  width: 320px;
  height: 320px;
  top: -80px;
  left: -60px;
  background: radial-gradient(circle, rgba(34, 195, 166, 0.45), transparent 70%);
}

.bg-glow-2 {
  width: 280px;
  height: 280px;
  bottom: -60px;
  right: -60px;
  background: radial-gradient(circle, rgba(214, 182, 118, 0.3), transparent 70%);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(34, 195, 166, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 195, 166, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 50% 35%, black 35%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 35%, black 35%, transparent 85%);
}

.bg-streamline {
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent 38%, rgba(34, 195, 166, 0.05) 50%, rgba(214, 182, 118, 0.04) 54%, transparent 66%);
}

/* ==================== 应用主容器 ==================== */
.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: env(safe-area-inset-top, 0px) 16px env(safe-area-inset-bottom, 16px);
  display: flex;
  flex-direction: column;
}

.view {
  display: none;
  flex-direction: column;
  width: 100%;
  flex: 1;
}

.view.active {
  display: flex;
}

/* ==================== 通用按钮 ==================== */
.btn {
  appearance: none;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  text-decoration: none;
  transition: transform 0.14s ease, opacity 0.16s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  user-select: none;
}

.btn:active:not(:disabled) {
  transform: scale(0.975);
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #22C3A6 0%, #179E87 100%);
  color: #061411;
  box-shadow: 0 8px 24px rgba(34, 195, 166, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-secondary {
  background: rgba(24, 41, 37, 0.85);
  color: var(--text-main);
  border: 1px solid var(--border-jade);
}

.btn-gold {
  background: linear-gradient(135deg, #EED091 0%, #D6B676 55%, #B8934E 100%);
  color: #161108;
  box-shadow: 0 6px 20px rgba(214, 182, 118, 0.28);
}

.btn-ghost {
  background: transparent;
  color: var(--text-sub);
  border: 1px solid rgba(156, 180, 174, 0.24);
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.icon-sm {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.icon-xs {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ==================== 页面一：首页 ==================== */
.view-home {
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 14px;
  gap: 14px;
}

.home-header {
  display: flex;
  justify-content: center;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 28, 25, 0.85);
  border: 1px solid var(--border-gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--gold);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

.brand-pill-svg {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.hero-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-jade);
  border-radius: var(--radius-lg);
  padding: 20px 16px 16px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(34, 195, 166, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-emblem {
  position: relative;
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
}

.hero-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border-gold);
  position: relative;
  z-index: 2;
}

.hero-ring {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  border: 1px solid rgba(34, 195, 166, 0.45);
  animation: pulseRing 3s ease-in-out infinite;
}

@keyframes pulseRing {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.9; }
}

.hero-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0.6px;
  background: linear-gradient(120deg, #FFFFFF 15%, var(--jade-bright) 55%, var(--gold) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
  cursor: pointer;
}

.hero-subtitle {
  margin: 0 0 16px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.55;
}

.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.rule-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(11, 17, 16, 0.7);
  border: 1px solid rgba(34, 195, 166, 0.16);
}

.rule-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}

.rule-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rule-body strong {
  font-size: 13px;
  color: var(--text-main);
}

.rule-body span {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.prize-tiers-bar {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(34, 195, 166, 0.2);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.tier-chip {
  font-size: 11px;
  color: var(--gold);
  background: rgba(214, 182, 118, 0.1);
  border: 1px solid rgba(214, 182, 118, 0.25);
  padding: 3px 8px;
  border-radius: 999px;
}

.home-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-start {
  width: 100%;
  padding: 15px 18px;
  justify-content: space-between;
  font-size: 16px;
}

.btn-start-main {
  font-weight: 800;
  letter-spacing: 0.5px;
}

.attempts-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(6, 20, 17, 0.22);
  color: #061411;
}

.btn-history {
  width: 100%;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 14px;
}

.count-pill {
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--jade-dim);
  border: 1px solid var(--border-jade);
  color: var(--jade-bright);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-footer {
  display: flex;
  justify-content: center;
  padding-top: 2px;
}

.powered-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-sub);
  text-decoration: none;
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 999px;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.powered-link strong {
  color: var(--gold);
}

.powered-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: cover;
}

/* ==================== 页面二：挑战页 + 键盘防遮挡 ==================== */
.view-challenge {
  height: var(--vvh, 100dvh);
  max-height: var(--vvh, 100dvh);
  padding-top: 10px;
  padding-bottom: 10px;
  gap: 10px;
  overflow: hidden;
  transition: height 0.18s ease;
}

.challenge-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 4px 2px;
}

.challenge-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 10px var(--jade);
}

.timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(34, 195, 166, 0.14);
  border: 1px solid var(--border-jade);
  color: var(--jade-bright);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.timer-pill.is-urgent {
  background: rgba(214, 182, 118, 0.22);
  border-color: var(--gold);
  color: var(--gold-bright);
  box-shadow: 0 0 18px rgba(214, 182, 118, 0.45);
  animation: urgentPulse 0.85s ease-in-out infinite;
}

@keyframes urgentPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.challenge-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.target-image-card {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 170px;
  max-height: 44vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #080E0D;
  border: 1px solid var(--border-jade);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  cursor: zoom-in;
  transition: max-height 0.22s ease, min-height 0.22s ease;
}

.target-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.target-img-overlay {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.target-title-tag,
.zoom-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(11, 17, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 11.5px;
  color: var(--text-main);
  backdrop-filter: blur(6px);
}

.prompt-panel {
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-jade);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prompt-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.char-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.prompt-textarea {
  width: 100%;
  min-height: 92px;
  resize: none;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(34, 195, 166, 0.28);
  background: rgba(9, 15, 14, 0.92);
  color: var(--text-main);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.prompt-textarea:focus {
  border-color: var(--jade);
  box-shadow: 0 0 0 3px rgba(34, 195, 166, 0.16);
}

.prompt-textarea::placeholder {
  color: var(--text-muted);
  font-size: 13.5px;
}

.prompt-tip {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-muted);
}

.challenge-footer {
  flex-shrink: 0;
}

.btn-submit {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
}

/* 软键盘弹起紧凑布局：目标图缩略至上方保持可见，输入框与提交按钮绝不被遮挡 */
.view-challenge.keyboard-open {
  gap: 8px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.view-challenge.keyboard-open .target-image-card {
  flex: 0 0 auto;
  min-height: 96px;
  height: 108px;
  max-height: 112px;
}

.view-challenge.keyboard-open .prompt-panel {
  flex: 1;
  min-height: 0;
  padding: 10px;
}

.view-challenge.keyboard-open .prompt-textarea {
  flex: 1;
  min-height: 68px;
}

.view-challenge.keyboard-open .prompt-tip {
  display: none;
}

/* ==================== 页面三：AI 生成中 ==================== */
.view-generating {
  justify-content: space-between;
  align-items: center;
  padding: 28px 6px 18px;
}

.gen-card {
  width: 100%;
  margin: auto 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-jade);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

.gen-visual {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
}

.gen-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}

.gen-orbit-1 {
  border-top-color: var(--jade);
  border-right-color: rgba(34, 195, 166, 0.35);
  animation: spin 1.6s linear infinite;
}

.gen-orbit-2 {
  inset: 10px;
  border-bottom-color: var(--gold);
  border-left-color: rgba(214, 182, 118, 0.35);
  animation: spinReverse 2.2s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes spinReverse {
  to { transform: rotate(-360deg); }
}

.gen-core {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(34, 195, 166, 0.14);
  border: 1px solid var(--border-jade);
  display: grid;
  place-items: center;
}

.gen-core-svg {
  width: 28px;
  height: 28px;
}

.gen-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.gen-desc {
  margin: 0 0 22px;
  font-size: 13.5px;
  color: var(--jade-bright);
}

.gen-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.gen-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(11, 17, 16, 0.65);
  border: 1px solid rgba(156, 180, 174, 0.14);
  color: var(--text-muted);
  font-size: 13.5px;
  transition: all 0.22s ease;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.gen-step.is-active {
  border-color: var(--jade);
  background: rgba(34, 195, 166, 0.12);
  color: var(--text-main);
  font-weight: 600;
}

.gen-step.is-active .step-dot {
  background: var(--jade);
  box-shadow: 0 0 10px var(--jade);
}

.gen-step.is-done {
  border-color: rgba(214, 182, 118, 0.35);
  color: var(--gold);
}

.gen-step.is-done .step-dot {
  background: var(--gold);
}

.gen-preview-box {
  margin-top: 18px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(11, 17, 16, 0.8);
  border: 1px solid var(--border-gold);
}

.gen-preview-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-jade);
}

.gen-preview-note {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--gold);
}

.gen-error-box {
  margin-top: 18px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(240, 109, 109, 0.1);
  border: 1px solid rgba(240, 109, 109, 0.35);
}

.gen-error-msg {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: #FFB4B4;
}

.gen-error-actions {
  display: flex;
  gap: 10px;
}

.gen-error-actions .btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 14px;
}

.gen-footer {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==================== 弹窗通用 ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(4, 8, 7, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 10px env(safe-area-inset-bottom, 12px);
}

@media (min-width: 520px) {
  .modal-backdrop {
    align-items: center;
  }
}

.modal-sheet {
  width: 100%;
  max-width: 460px;
  max-height: 92dvh;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-jade);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: sheetUp 0.22s ease-out;
}

@keyframes sheetUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header-simple {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(34, 195, 166, 0.16);
}

.modal-header-simple h2 {
  margin: 0;
  font-size: 17px;
  color: var(--text-main);
}

.modal-sub {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.icon-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(156, 180, 174, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-sub);
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* ==================== 页面四：结果弹窗 ==================== */
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(90deg, rgba(34, 195, 166, 0.14), rgba(214, 182, 118, 0.12));
  border-bottom: 1px solid var(--border-gold);
}

.verify-block {
  display: flex;
  flex-direction: column;
}

.verify-label {
  font-size: 11px;
  color: var(--text-sub);
}

.verify-code {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.8px;
  color: var(--gold-bright);
}

.result-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.prize-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  color: var(--gold-bright);
}

.res-time {
  font-size: 11px;
  color: var(--text-muted);
}

.result-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.compare-item {
  margin: 0;
  cursor: zoom-in;
}

.compare-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #080E0D;
  border: 1px solid var(--border-jade);
}

.compare-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.compare-tag {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(11, 17, 16, 0.82);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.compare-tag-ai {
  border-color: var(--border-jade);
  color: var(--jade-bright);
}

.score-showcase {
  text-align: center;
  padding: 14px 12px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at 50% 0%, rgba(34, 195, 166, 0.16), rgba(11, 17, 16, 0.8));
  border: 1px solid var(--border-jade);
}

.score-label {
  font-size: 12px;
  color: var(--text-sub);
  letter-spacing: 0.6px;
}

.score-value-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 6px;
}

.score-num {
  font-family: var(--font-mono);
  font-size: 46px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--gold-bright) 10%, var(--jade-bright) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.score-total {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
}

.res-comment {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.5;
}

.prompt-review-box {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(11, 17, 16, 0.72);
  border: 1px solid rgba(156, 180, 174, 0.16);
}

.prompt-review-label {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.prompt-review-text {
  margin: 0;
  font-size: 13px;
  color: var(--text-sub);
  word-break: break-word;
}

.xuance-promo-card {
  padding: 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(214, 182, 118, 0.12), rgba(34, 195, 166, 0.1));
  border: 1px solid var(--border-gold);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.xuance-promo-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.xuance-promo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-gold);
  flex-shrink: 0;
}

.xuance-promo-title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
}

.xuance-promo-sub {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--gold);
}

.btn-xuance-cta {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
}

.result-footer {
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(34, 195, 166, 0.16);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-footer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.result-footer .btn {
  padding: 11px 12px;
  font-size: 14px;
}

/* ==================== 历史回顾弹窗 ==================== */
.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.history-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: rgba(11, 17, 16, 0.78);
  border: 1px solid var(--border-jade);
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.14s ease;
}

.history-card:active {
  transform: scale(0.985);
}

.history-thumbs {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.history-thumb {
  width: 52px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
  background: #080E0D;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.history-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.history-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.history-score {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--jade-bright);
}

.history-tier {
  font-size: 11px;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 2px 7px;
  border-radius: 999px;
}

.history-prompt {
  margin: 4px 0;
  font-size: 12.5px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-bottom-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

/* ==================== 成绩长图预览弹窗 ==================== */
.poster-preview-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  justify-content: center;
  background: #070B0A;
}

.poster-preview-img {
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border-gold);
}

.poster-footer {
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(34, 195, 166, 0.16);
}

.poster-footer .btn {
  width: 100%;
}

/* ==================== 工作人员口令弹窗 ==================== */
.staff-form {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.staff-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-jade);
  background: rgba(9, 15, 14, 0.9);
  color: var(--text-main);
  font-size: 15px;
  outline: none;
}

.staff-input:focus {
  border-color: var(--gold);
}

/* ==================== 图片全屏放大 ==================== */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(20, 20, 20, 0.75);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80dvh;
  object-fit: contain;
  border-radius: 12px;
}

.lightbox-caption {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-sub);
}

/* ==================== Toast 提示 ==================== */
.toast-container {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 400px;
  pointer-events: none;
}

.toast {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(16, 28, 25, 0.95);
  border: 1px solid var(--border-jade);
  color: var(--text-main);
  font-size: 13.5px;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  animation: toastIn 0.2s ease;
}

.toast.is-error {
  border-color: rgba(240, 109, 109, 0.6);
  color: #FFC0C0;
}

.toast.is-gold {
  border-color: var(--border-gold);
  color: var(--gold-bright);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
