/* ==========================================================================
   鉴定师工具箱 · views.css
   --------------------------------------------------------------------------
   01 idle 屏幕       02 wizard 屏幕      03 result 屏幕（含赝品）
   04 keyframes       05 降级 / 打印
   ========================================================================== */

/* ==========================================================================
   01 idle 屏幕
   ========================================================================== */
.screen--idle {
  padding-top: 2px;
}

.idle-title {
  margin-top: 0;
  color: var(--ink-0);
  font-size: clamp(32px, 4.2vw, 54px);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.06;
  text-shadow:
    2px 0 0 rgb(var(--accent-2-rgb) / 0.22),
    -2px 0 0 rgb(var(--accent-rgb) / 0.2),
    0 0 42px rgb(var(--accent-rgb) / 0.16);
}

.idle-title-en {
  margin-top: 2px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: clamp(9px, 0.9vw, 10.5px);
  letter-spacing: 0.48em;
  line-height: 1.4;
  text-transform: uppercase;
}

.idle-copy .lede {
  margin-top: 0;
  font-size: 13.5px;
  line-height: 1.7;
}

.idle-copy .eyebrow {
  margin-bottom: 2px;
}

/* ==========================================================================
   02 wizard 屏幕
   ========================================================================== */
.step-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 2px;
}

.step-head__title {
  position: relative;
  color: var(--ink-0);
  font-size: clamp(23px, 2.6vw, 33px);
  font-weight: 650;
  letter-spacing: 0.05em;
  line-height: 1.14;
}

.step-head__title::after {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin-top: 10px;
  background: linear-gradient(90deg, var(--accent), transparent);
  box-shadow: 0 0 12px rgb(var(--accent-rgb) / 0.55);
}

.step-head__hint {
  max-width: 62ch;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.7;
}

.wizard__body .reference-card {
  animation: fade-up 0.34s var(--ease) both;
}

.wizard__body .step-form {
  animation: fade-up 0.38s 0.05s var(--ease) both;
}

.wizard__body .step-nav {
  animation: fade-up 0.4s 0.08s var(--ease) both;
}

/* ==========================================================================
   03 result 屏幕（含赝品）
   ========================================================================== */
.result-verdict .eyebrow {
  margin-bottom: 4px;
}

/* 标题稳定装饰线（替代程序化聚焦的焦点框） */
.verdict-title::after {
  content: "";
  display: block;
  width: 46px;
  height: 2px;
  margin-top: 10px;
  background: linear-gradient(90deg, var(--accent), transparent);
  box-shadow: 0 0 12px rgb(var(--accent-rgb) / 0.55);
}

.screen--result[data-status="counterfeit"] .verdict-title::after {
  background: linear-gradient(90deg, var(--danger), transparent);
  box-shadow: 0 0 12px rgba(255, 77, 99, 0.55);
}

.screen--result[data-status="genuine"] .verdict-title__cn {
  text-shadow:
    0 0 36px rgb(var(--accent-rgb) / 0.3),
    0 0 100px rgb(var(--accent-rgb) / 0.14);
}

.screen--result[data-status="genuine"] .price-display {
  box-shadow:
    inset 0 0 60px rgb(var(--accent-rgb) / 0.06),
    0 0 40px rgb(var(--accent-rgb) / 0.06);
}

/* --- 赝品：危险色覆盖（不改变 body 的物证强调色） --- */
.screen--result[data-status="counterfeit"] .eyebrow__code {
  border-color: rgba(255, 77, 99, 0.42);
  background: rgba(255, 77, 99, 0.08);
  color: #ff97a3;
}

.screen--result[data-status="counterfeit"] .verdict-title__cn {
  color: #ffe9ec;
  text-shadow:
    0 0 34px rgba(255, 77, 99, 0.4),
    0 0 90px rgba(255, 77, 99, 0.18);
  animation: glitch-flicker 5.5s steps(1, end) infinite;
}

.screen--result[data-status="counterfeit"] .verdict-title__en {
  color: var(--danger);
}

.screen--result[data-status="counterfeit"] .verdict-note {
  color: var(--ink-2);
}

.screen--result[data-status="counterfeit"] .price-display {
  border-color: rgba(255, 77, 99, 0.38);
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(255, 77, 99, 0.16), transparent 58%),
    linear-gradient(160deg, rgba(30, 14, 22, 0.92), rgba(8, 8, 13, 0.95));
  box-shadow:
    inset 0 0 60px rgba(255, 77, 99, 0.08),
    0 0 40px rgba(255, 77, 99, 0.07);
}

.screen--result[data-status="counterfeit"] .price-display::before {
  border-color: rgba(255, 77, 99, 0.7);
}

.screen--result[data-status="counterfeit"] .price-display::after {
  border-color: rgba(255, 77, 99, 0.7);
}

.screen--result[data-status="counterfeit"] .price-display__label,
.screen--result[data-status="counterfeit"] .price-display__unit {
  color: rgba(255, 151, 163, 0.85);
}

.screen--result[data-status="counterfeit"] .price-display__number {
  color: #ff97a3;
  text-shadow:
    0 0 30px rgba(255, 77, 99, 0.5),
    0 0 80px rgba(255, 77, 99, 0.22);
}

.screen--result[data-status="counterfeit"] .ledger__row--final {
  border-color: rgba(255, 77, 99, 0.36);
  background: rgba(255, 77, 99, 0.07);
}

.screen--result[data-status="counterfeit"] .ledger__row--final .ledger__value {
  color: #ff97a3;
  text-shadow: 0 0 18px rgba(255, 77, 99, 0.45);
}

.screen--result[data-status="counterfeit"] .abort-panel {
  animation: fade-up 0.4s 0.12s var(--ease) both;
}

/* 结果页左栏动作区下方的存档条码装饰（真品 / 桌面两栏时显示） */
@media (min-width: 1024px) {
  .screen--result[data-status="genuine"] .result-verdict::after {
    content: "APPRAISAL ARCHIVE // LOCAL TERMINAL // VERIFIED";
    display: block;
    width: 100%;
    height: 104px;
    margin-top: 26px;
    padding-top: 10px;
    background-image:
      repeating-linear-gradient(
        90deg,
        rgb(var(--accent-rgb) / 0.22) 0 2px,
        transparent 2px 5px,
        rgb(var(--accent-rgb) / 0.11) 5px 6px,
        transparent 6px 10px
      ),
      linear-gradient(90deg, rgb(var(--accent-rgb) / 0.26), transparent 78%);
    background-repeat: no-repeat, no-repeat;
    background-position:
      left 34px,
      left 28px;
    background-size:
      100% 56px,
      100% 1px;
    color: rgb(var(--accent-rgb) / 0.34);
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 0.3em;
    line-height: 1.5;
    opacity: 0.75;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.3) 72%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.3) 72%, transparent 100%);
  }
}

/* ==========================================================================
   04 keyframes
   ========================================================================== */

/* 屏幕入场 */
@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 通用淡入上浮 */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 背景透视网格缓慢漂移（一格 = 54px） */
@keyframes grid-drift {
  from {
    transform: perspective(520px) rotateX(64deg) scale(1.55) translate3d(0, 0, 0);
  }
  to {
    transform: perspective(520px) rotateX(64deg) scale(1.55) translate3d(0, 54px, 0);
  }
}

/* 背景光晕呼吸 */
@keyframes glow-breathe-a {
  from {
    opacity: 0.62;
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    opacity: 1;
    transform: translate3d(4vw, 3vh, 0) scale(1.12);
  }
}

@keyframes glow-breathe-b {
  from {
    opacity: 0.5;
    transform: translate3d(0, 0, 0) scale(1.06);
  }
  to {
    opacity: 0.9;
    transform: translate3d(-3vw, -2vh, 0) scale(0.96);
  }
}

/* 背景扫描光带 */
@keyframes scan-band {
  0% {
    transform: translate3d(0, -110%, 0);
  }
  100% {
    transform: translate3d(0, 320%, 0);
  }
}

/* 顶栏底边扫描光 */
@keyframes header-sweep {
  0% {
    background-position: -40% 0;
  }
  100% {
    background-position: 140% 0;
  }
}

/* 状态点脉冲 */
@keyframes status-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.82);
  }
}

/* 全息视窗扫描 */
@keyframes holo-scan {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(0, 270%, 0);
  }
}

/* boot 屏 */
@keyframes boot-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes boot-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes boot-flicker {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.72;
  }
}

@keyframes boot-scan {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(360%);
  }
}

/* 选项选中扫描光 */
@keyframes opt-scan {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(110%);
  }
}

/* 进度条流光 */
@keyframes progress-sheen {
  0% {
    transform: translateX(-100%);
  }
  60%,
  100% {
    transform: translateX(220%);
  }
}

/* 账本 / 组合依次淡入 */
@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 灯箱 / toast */
@keyframes lb-in {
  from {
    opacity: 0;
    transform: scale(0.985) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* 赝品标题 glitch（仅 counterfeit） */
@keyframes glitch-flicker {
  0%,
  90%,
  100% {
    text-shadow:
      0 0 34px rgba(255, 77, 99, 0.4),
      0 0 90px rgba(255, 77, 99, 0.18);
    transform: translateX(0);
    opacity: 1;
  }
  91% {
    text-shadow:
      -2px 0 0 rgba(255, 61, 154, 0.8),
      2px 0 0 rgba(62, 230, 255, 0.6);
    transform: translateX(2px);
    opacity: 0.86;
  }
  92% {
    text-shadow:
      2px 0 0 rgba(255, 194, 71, 0.7),
      -2px 0 0 rgba(62, 230, 255, 0.6);
    transform: translateX(-2px);
    opacity: 0.95;
  }
  93% {
    text-shadow: 0 0 34px rgba(255, 77, 99, 0.45);
    transform: translateX(0);
    opacity: 1;
  }
  96% {
    text-shadow: -1px 0 0 rgba(255, 61, 154, 0.6);
    transform: translateX(1px);
  }
}

/* ==========================================================================
   05 降级 / 打印
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .holo-frame__scan,
  .fx__scanlines::after {
    display: none;
  }

  .screen--result[data-status="counterfeit"] .verdict-title__cn {
    animation: none;
  }

  .ledger__row,
  .combo,
  .wizard__body .reference-card,
  .wizard__body .step-form,
  .wizard__body .step-nav {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .progressbar__fill::after {
    display: none;
  }
}

@media print {
  .fx,
  .site-header,
  .site-footer,
  .item-switcher,
  .skip-link,
  .result-actions,
  .stage::before,
  .stage::after,
  .lightbox,
  .toast {
    display: none !important;
  }

  body {
    color: #111;
    background: #fff !important;
  }

  .app-main {
    padding: 0;
  }

  .stage {
    min-height: 0;
    padding: 0;
    border: 0;
    background: #fff;
    box-shadow: none;
    clip-path: none;
  }

  .panel,
  .rail-panel,
  .reference-card,
  .combo,
  .abort-panel,
  .meta-panel,
  .verdict-facts,
  .price-display {
    border-color: #bbb;
    background: #fff;
    box-shadow: none;
    clip-path: none;
  }

  .panel__title,
  .verdict-title__cn,
  .price-display__number,
  .ledger__value,
  .verdict-fact__value {
    color: #111 !important;
    text-shadow: none !important;
  }

  .verdict-title__en,
  .price-display__label,
  .price-display__unit,
  .ledger__note,
  .meta-panel__line {
    color: #555 !important;
  }

  .ledger__row,
  .combo {
    opacity: 1;
    animation: none;
  }

  .ledger__row--final {
    background: #f2f2f2;
  }

  .screen {
    animation: none;
  }
}
