/* ═══════════════════════════════════════════════════════════
   custom-phone-cases.com — 预览方案对比
   基调：暖黑 + 单一朱红强调。衬线标题当"时装感"，等宽当"仪器感"。
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #0b0a09;
  --bg-2: #100e0c;
  --surf: #16130f;
  --line: #2a2521;
  --line-2: #3d362f;
  --ink: #f4efe6;
  --mute: #8c8276;
  --dim: #5d564d;
  --acc: #ff5b2e;
  --acc-dim: #a3341a;
  --serif: "Instrument Serif", "Songti SC", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.6 var(--mono);
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 颗粒 + 蓝图网格：给纯色背景一点空气 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 92px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 92px 100%;
  opacity: .28;
  mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 20%, transparent 78%);
}
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 999;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }

.wrap { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 0 28px; }

/* ── 顶栏 ───────────────────────────────────────────────── */
.top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 22px 28px;
  border-bottom: 1px solid var(--line);
}
.top__b { display: flex; align-items: baseline; gap: 10px; }
.top__b b { font: 400 21px/1 var(--serif); letter-spacing: .01em; }
.top__b i {
  font-style: normal; font-size: 9px; letter-spacing: .18em;
  color: var(--acc); border: 1px solid var(--acc-dim);
  padding: 3px 7px; border-radius: 2px;
}
.top__n { display: flex; gap: 22px; font-size: 11px; letter-spacing: .1em; color: var(--mute); }
.top__n a { transition: color .3s var(--ease); }
.top__n a:hover, .top__n a[aria-current] { color: var(--acc); }

/* ── 首页 hero ──────────────────────────────────────────── */
.hero { padding: 92px 0 64px; position: relative; }
.hero__k {
  font-size: 10px; letter-spacing: .3em; color: var(--acc);
  margin: 0 0 26px; display: flex; align-items: center; gap: 12px;
}
.hero__k::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--acc-dim), transparent); }
.hero h1 {
  font: 400 clamp(44px, 7.4vw, 96px)/0.98 var(--serif);
  margin: 0 0 28px; letter-spacing: -.01em; max-width: 22ch;
}
.hero h1 em { font-style: italic; color: var(--acc); }
.hero p {
  max-width: 58ch; color: var(--mute); font-size: 13.5px; line-height: 1.85; margin: 0;
}
.hero p strong { color: var(--ink); font-weight: 400; }

/* 入场：错峰揭示 */
.rv { opacity: 0; transform: translateY(18px); animation: rv .95s var(--ease) forwards; }
@keyframes rv { to { opacity: 1; transform: none; } }
.d1 { animation-delay: .05s } .d2 { animation-delay: .16s } .d3 { animation-delay: .28s }
.d4 { animation-delay: .4s } .d5 { animation-delay: .52s }
@media (prefers-reduced-motion: reduce) { .rv { animation: none; opacity: 1; transform: none; } }

/* ── 版本卡：故意不对称 ─────────────────────────────────── */
.cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line); margin: 8px 0 0;
}
.card {
  position: relative; background: var(--bg-2); padding: 38px 34px 30px;
  display: flex; flex-direction: column; min-height: 460px;
  transition: background .45s var(--ease);
  overflow: hidden;
}
.card:nth-child(2) { padding-top: 68px; }
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--acc); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .6s var(--ease);
}
.card:hover { background: var(--surf); }
.card:hover::before { transform: scaleX(1); }
.card__n {
  font: 400 62px/1 var(--serif); color: var(--line-2);
  position: absolute; top: 20px; right: 26px; transition: color .5s var(--ease);
}
.card:hover .card__n { color: var(--acc-dim); }
.card__t { font: 400 30px/1.15 var(--serif); margin: 0 0 6px; }
.card__s { font-size: 11px; letter-spacing: .14em; color: var(--acc); margin: 0 0 22px; }
.card__d { color: var(--mute); font-size: 12.5px; line-height: 1.9; margin: 0 0 26px; max-width: 40ch; }

.spec { border-top: 1px solid var(--line); margin: auto 0 24px; }
.spec div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 11.5px;
}
.spec span { color: var(--dim); letter-spacing: .06em; }
.spec b { font-weight: 400; color: var(--ink); }
.spec b.g { color: #7bc47f; }
.spec b.w { color: #d9a441; }

.go {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  border: 1px solid var(--line-2); color: var(--ink);
  padding: 12px 20px; font-size: 11.5px; letter-spacing: .14em;
  transition: all .35s var(--ease);
}
.go:hover { border-color: var(--acc); color: var(--acc); gap: 16px; }

/* ── 结论区 ─────────────────────────────────────────────── */
.verdict { padding: 84px 0 110px; }
.verdict h2 { font: 400 34px/1.2 var(--serif); margin: 0 0 30px; }
.verdict h2 em { font-style: italic; color: var(--acc); }
.vg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.vg > div { background: var(--bg-2); padding: 26px 24px; }
.vg h3 { font-size: 11px; letter-spacing: .16em; color: var(--acc); margin: 0 0 14px; font-weight: 400; }
.vg p { margin: 0; color: var(--mute); font-size: 12.5px; line-height: 1.9; }
.vg code { color: var(--ink); background: #221d18; padding: 1px 5px; font-size: 11.5px; }

/* ── 编辑器 ─────────────────────────────────────────────── */
.ed {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) 336px;
  height: calc(100dvh - 67px);
}
.stage {
  display: flex; flex-direction: column; min-width: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, #1c1814 0%, transparent 72%),
    var(--bg);
}
.stage__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line);
}
.stage__view { position: relative; flex: 1; display: grid; place-items: center; min-height: 0; padding: 12px; }
.stage__foot {
  padding: 12px 24px; border-top: 1px solid var(--line);
  font-size: 10.5px; letter-spacing: .08em; color: var(--dim); min-height: 41px;
}

.preview {
  filter: drop-shadow(0 32px 46px rgba(0, 0, 0, .78)) drop-shadow(0 4px 10px rgba(0, 0, 0, .5));
  cursor: default; touch-action: none;
  animation: drop 1s var(--ease) both;
}
.preview.is-drag { cursor: grabbing; }
@keyframes drop { from { opacity: 0; transform: translateY(-14px) scale(.97); } }

.view3d { position: absolute; inset: 0; display: none; }
.stage__view.is-3d .preview { display: none; }
.stage__view.is-3d .view3d { display: block; }

.badge { display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .16em; color: var(--mute); }
.badge i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--acc);
  box-shadow: 0 0 0 0 var(--acc); animation: pulse 2.4s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(255, 91, 46, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 91, 46, 0); } }

.seg { display: flex; border: 1px solid var(--line-2); }
.seg__b {
  position: relative; background: none; border: 0; color: var(--mute);
  font: 400 11px/1 var(--mono); letter-spacing: .16em;
  padding: 9px 20px; cursor: pointer; transition: all .3s var(--ease);
}
.seg__b + .seg__b { border-left: 1px solid var(--line-2); }
.seg__b.is-on { background: var(--acc); color: #180b06; }
.seg__b:not(.is-on):hover { color: var(--ink); }
.spin { display: none; width: 9px; height: 9px; margin-left: 8px; vertical-align: -1px;
  border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; }
.seg__b.is-load .spin { display: inline-block; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ── 控件栏 ─────────────────────────────────────────────── */
.rail {
  border-left: 1px solid var(--line); background: var(--bg-2);
  overflow-y: auto; padding: 4px 22px 28px; scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.grp { padding: 20px 0; border-bottom: 1px solid var(--line); }
.grp__t { font-size: 9.5px; letter-spacing: .22em; color: var(--dim); margin-bottom: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: none; border: 1px solid var(--line); color: var(--mute);
  font: 400 11px/1 var(--mono); padding: 8px 11px; cursor: pointer;
  transition: all .28s var(--ease);
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip.is-on { border-color: var(--acc); color: var(--acc); background: rgba(255, 91, 46, .07); }

.sld { margin-top: 15px; }
.sld__l { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--dim); letter-spacing: .1em; margin-bottom: 7px; }
.sld__v { color: var(--ink); }
.sld input[type=range] { width: 100%; height: 2px; appearance: none; background: var(--line-2); outline: none; }
.sld input[type=range]::-webkit-slider-thumb {
  appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: var(--acc); cursor: pointer; border: 2px solid var(--bg-2);
  transition: transform .2s var(--ease);
}
.sld input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.25); }
.sld input[type=range]::-moz-range-thumb {
  width: 11px; height: 11px; border-radius: 50%; background: var(--acc); border: 2px solid var(--bg-2); cursor: pointer;
}

.dz {
  display: flex; flex-direction: column; gap: 5px; align-items: center; justify-content: center;
  border: 1px dashed var(--line-2); padding: 22px 12px; cursor: pointer; text-align: center;
  transition: all .3s var(--ease);
}
.dz:hover, .dz.is-over { border-color: var(--acc); background: rgba(255, 91, 46, .05); }
.dz b { font-weight: 400; font-size: 12px; color: var(--ink); }
.dz span { font-size: 10px; color: var(--dim); letter-spacing: .06em; }
.dz.is-set { border-style: solid; border-color: var(--acc-dim); }
.dz input { display: none; }

.row { display: flex; gap: 8px; padding: 20px 0 0; }
.txt {
  flex: 1; min-width: 0; background: var(--surf); border: 1px solid var(--line);
  color: var(--ink); font: 400 12px/1 var(--mono); padding: 11px 12px; outline: none;
  transition: border-color .3s var(--ease);
}
.txt:focus { border-color: var(--acc); }
.txt::placeholder { color: var(--dim); }
.col { width: 42px; height: 38px; padding: 2px; background: var(--surf); border: 1px solid var(--line); cursor: pointer; }

.act {
  flex: 1; text-align: center; background: var(--acc); border: 1px solid var(--acc); color: #180b06;
  font: 400 11px/1 var(--mono); letter-spacing: .12em; padding: 13px 14px; cursor: pointer;
  transition: all .3s var(--ease);
}
.act:hover { background: #ff7048; border-color: #ff7048; }
.act--ghost { flex: 0 0 84px; background: none; color: var(--mute); border-color: var(--line-2); }
.act--ghost:hover { background: none; color: var(--ink); border-color: var(--ink); }

.hud { margin-top: 22px; border: 1px solid var(--line); }
.hud__r {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 12px; font-size: 10.5px; letter-spacing: .06em;
}
.hud__r + .hud__r { border-top: 1px solid var(--line); }
.hud__r span { color: var(--dim); }
.hud__r b { font-weight: 400; color: var(--acc); }

/* ── 印刷文件弹层 ───────────────────────────────────────── */
.ov {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: rgba(6, 5, 4, .88); backdrop-filter: blur(6px); padding: 24px;
  animation: fade .3s var(--ease);
}
@keyframes fade { from { opacity: 0 } }
.ov__c {
  position: relative; background: var(--bg-2); border: 1px solid var(--line-2);
  padding: 26px; max-width: 520px; width: 100%; text-align: center;
}
.ov__c img { max-width: 100%; max-height: 56dvh; display: block; margin: 0 auto 18px; background: #fff; }
.ov__m { font-size: 11px; color: var(--ink); margin: 0 0 8px; letter-spacing: .04em; }
.ov__l { font-size: 10px; color: var(--dim); margin: 0 0 18px; line-height: 1.9; }
.ov__l i { display: inline-block; width: 16px; height: 2px; background: var(--c); vertical-align: 3px; margin-right: 6px; }
.ov__x {
  position: absolute; top: 8px; right: 12px; background: none; border: 0;
  color: var(--mute); font-size: 24px; cursor: pointer; line-height: 1;
}
.ov__x:hover { color: var(--acc); }

/* ── 响应式 ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .cards, .vg { grid-template-columns: 1fr; }
  .card:nth-child(2) { padding-top: 38px; }
  .hero { padding: 56px 0 40px; }
  .ed { grid-template-columns: 1fr; height: auto; }
  .stage__view { min-height: 54dvh; }
  .rail { border-left: 0; border-top: 1px solid var(--line); }
  .wrap { padding: 0 20px; }
  .top { padding: 16px 20px; }
  .top__n { gap: 14px; font-size: 10px; }
}
