/* ==========================================================================
   木盒官网 · 首屏可交互桌面客户端模拟器（Deep Space 主题）
   ========================================================================== */

.brand-mark { width: 28px; height: 28px; flex: none; }
.footer .brand-mark { width: 24px; height: 24px; }

/* ---------- 外层透视舞台与切换胶囊 ---------- */

.mockup {
  position: relative;
  max-width: 1060px;
  margin: 56px auto 0;
  perspective: 1700px;
}

.mockup::before {
  content: '';
  position: absolute;
  inset: 30px 10% auto;
  height: 56%;
  background: var(--grad);
  filter: blur(100px);
  opacity: 0.28;
  z-index: -1;
  pointer-events: none;
}

.demo-bar {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(18, 22, 28, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.demo-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  overflow: hidden;
  transition: color 0.25s, background 0.25s;
}

.demo-tab:hover { color: var(--text); }

.demo-tab.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.demo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dc, var(--brand));
  box-shadow: 0 0 8px var(--dc, var(--brand));
}

.demo-progress {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(0);
  opacity: 0;
}

.demo-tab.is-active .demo-progress {
  opacity: 1;
  animation: demo-tick var(--demo-dur, 7.5s) linear forwards;
}

.mockup.is-paused .demo-tab.is-active .demo-progress {
  animation-play-state: paused;
}

@keyframes demo-tick {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---------- 3D 视差窗口壳 ---------- */

.mockup-frame {
  position: relative;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: var(--app-bg);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  text-align: left;
  transform: rotateX(var(--rx, 8deg)) rotateY(var(--ry, 0deg));
  transform-origin: 50% 0;
  transition: transform 0.45s var(--ease);
  will-change: transform;
}

.frame-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: radial-gradient(620px circle at var(--fx, 50%) var(--fy, 0%), rgba(255, 213, 138, 0.11), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s;
}

.mockup-frame:hover .frame-shine {
  opacity: 1;
}

/* ---------- 桌面端主体布局 ---------- */

.app {
  display: flex;
  flex-direction: column;
  background: var(--app-bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.app-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 14px;
  background: #1a1f26;
  border-bottom: 1px solid var(--app-border);
}

.app-titlebar .brand-mark { width: 18px; height: 18px; }
.app-titlebar b { font-weight: 600; font-size: 13px; }
.app-crumb { color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.app-top-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.app-top-chip {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--app-border);
  background: var(--app-panel);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.app-pill-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgb(var(--brand-rgb) / 0.32);
  background: rgb(var(--brand-rgb) / 0.12);
  font-size: 11px;
  color: var(--brand-soft);
  white-space: nowrap;
}

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

.app-win {
  margin-left: 14px;
  display: flex;
  gap: 14px;
  color: var(--dim);
  font-size: 11.5px;
}

.app-body {
  display: grid;
  grid-template-columns: 184px 1fr;
  min-height: 454px;
}

/* ---------- 左侧真实主栏 ---------- */

.app-sider {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  background: #1d2229;
  border-right: 1px solid var(--app-border);
}

.app-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 1px solid var(--app-border);
  border-radius: 9px;
  background: var(--app-panel);
}

.app-switch b { display: block; font-size: 12.5px; font-weight: 600; }
.app-switch span { display: block; font-size: 10.5px; color: var(--dim); }
.app-chev { font-style: normal; color: var(--dim); font-size: 12px; }

.app-label {
  margin: 10px 10px 4px;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--dim);
}

.app-item {
  width: 100%;
  text-align: left;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.18s, color 0.18s;
}

button.app-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.app-item.active {
  background: color-mix(in srgb, var(--app-accent) 13%, var(--app-panel));
  color: var(--app-accent);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgb(var(--brand-rgb) / 0.24);
}

/* ---------- 右侧动态工作区 ---------- */

.app-workspace {
  display: grid;
  grid-template-columns: 162px 1fr;
  min-width: 0;
}

.app-workspace[hidden] {
  display: none;
}

.app-workspace.is-active {
  animation: ws-enter 0.36s var(--ease);
}

@keyframes ws-enter {
  from { opacity: 0; transform: translateY(6px); }
}

.app-subnav {
  padding: 12px 8px;
  background: var(--app-panel);
  border-right: 1px solid var(--app-border);
}

.app-subnav h4 { margin: 0 8px 4px; font-size: 13px; font-weight: 600; }
.app-subnav .app-label { margin: 9px 8px 3px; }

.app-main {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
  padding: 14px 18px;
}

.geo-cmd-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 11px;
  border-radius: 10px;
  border: 1px solid var(--app-border);
  background: var(--app-input);
  font-size: 11.5px;
  color: var(--muted);
}

.geo-cmd-icon {
  color: var(--brand);
  font-family: var(--mono);
  font-size: 11px;
}

.geo-cmd-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-cmd-send {
  margin-left: auto;
  padding: 3px 11px;
  border-radius: 7px;
  border: 1px solid rgb(var(--brand-rgb) / 0.35);
  background: rgb(var(--brand-rgb) / 0.18);
  color: var(--brand-soft);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.18s var(--ease);
}

.geo-cmd-send:hover {
  background: rgb(var(--brand-rgb) / 0.3);
  border-color: rgb(var(--brand-rgb) / 0.65);
  color: #fff;
}

.app-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-head h5 { margin: 0; font-size: 15px; font-weight: 650; }
.app-head p { margin: 1px 0 0; font-size: 11.5px; color: var(--dim); }

.app-tag {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  background: rgb(var(--brand-rgb) / 0.14);
  color: var(--app-accent);
  transition: background 0.3s, color 0.3s;
}

.app-tag.done {
  background: rgb(var(--ok-rgb) / 0.15);
  color: var(--ok);
}

/* GEO 对比切换 */

.geo-phase-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--app-border);
  background: var(--app-input);
}

.phase-btn {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  transition: background 0.22s, color 0.22s;
}

.phase-btn.is-active {
  background: rgb(var(--brand-rgb) / 0.2);
  color: var(--brand-soft);
  font-weight: 600;
}

.phase-badge {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgb(var(--ok-rgb) / 0.14);
  color: var(--ok);
}

.app-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.app-metric,
.app-card {
  padding: 12px 14px;
  border: 1px solid var(--app-border);
  border-radius: 11px;
  background: var(--app-panel);
}

.app-metric span { display: block; font-size: 11px; color: var(--dim); white-space: nowrap; }
.app-metric b { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.app-metric b.warn-num { color: var(--warn); }
.app-metric em { margin-left: 6px; font-size: 11px; font-style: normal; color: var(--ok); white-space: nowrap; display: inline-block; }

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

.app-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.app-card h6 { margin: 0; font-size: 12px; font-weight: 600; }

.app-flow { display: flex; flex-direction: column; gap: 7px; margin: 0; padding: 0; list-style: none; }
.app-flow li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--app-input);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.js .app-flow li:not(.shown) { opacity: 0.36; }

.app-dot {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--app-border);
  border-radius: 50%;
  transition: background 0.3s, border-color 0.3s;
}

.app-flow li.shown .app-dot { border-color: var(--ok); background: var(--ok); }
.app-flow li.shown .app-dot::after {
  content: '';
  position: absolute;
  left: 4.2px;
  top: 1.6px;
  width: 4px;
  height: 8px;
  border: solid #0f1f17;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg);
}

.app-flow b { font-size: 12px; font-weight: 500; }
.app-flow small { margin-left: auto; font-size: 10.5px; color: var(--dim); white-space: nowrap; }

.app-bars { display: flex; flex-direction: column; gap: 11px; }
.app-bar {
  display: grid;
  grid-template-columns: 60px 1fr 34px;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
}

.app-bar i { position: relative; height: 7px; border-radius: 4px; background: var(--app-input); overflow: hidden; }
.app-bar i::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), #ffe0a3);
  transition: width 0.65s var(--ease);
}

.app-bar em { font-style: normal; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.app-note { margin-top: 10px; font-size: 11px; color: var(--dim); }

/* ---------- 首屏短剧模拟器 ---------- */

.drama-stage {
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  flex: 1;
  min-height: 0;
}

.drama-monitor {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #0b111d;
  aspect-ratio: 9 / 16;
  align-self: start;
  box-shadow: 0 0 0 1px var(--app-border), 0 16px 36px -14px rgba(0, 0, 0, 0.75);
}

.drama-shots-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.mini-tl {
  position: relative;
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--app-border);
  background: var(--app-input);
}

.mini-tl-row {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 6px;
}

.mini-tl-row > span { font-size: 10px; color: var(--dim); }

.mini-tl-bar {
  position: relative;
  display: flex;
  gap: 3px;
  height: 18px;
}

.mini-tl-bar i {
  display: grid;
  place-items: center;
  height: 100%;
  border-radius: 4px;
  font-style: normal;
  font-family: var(--mono);
  font-size: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.mini-tl-bar i.active { background: rgb(var(--brand-rgb) / 0.28); color: var(--brand-soft); box-shadow: inset 0 0 0 1px rgb(var(--brand-rgb) / 0.6); }
.mini-tl-bar i.gen { background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.08) 0 4px, transparent 4px 8px); }
.mini-tl-bar.voice i { position: absolute; height: 100%; background: rgba(169, 156, 255, 0.28); border: 1px solid rgba(169, 156, 255, 0.5); }
.mini-tl-bar.music i { position: absolute; height: 100%; background: rgba(95, 224, 201, 0.16); border: 1px solid rgba(95, 224, 201, 0.4); color: var(--cyan); font-family: var(--font); font-size: 10px; }

.mini-tl-head {
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--brand);
  box-shadow: 0 0 8px var(--brand);
  transition: left 0.4s var(--ease);
  pointer-events: none;
}

/* ---------- 首屏电商模拟器 ---------- */

.ecom-list {
  display: grid;
  gap: 7px;
  list-style: none;
}

.ecom-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--app-input);
  font-size: 12px;
}

.ecom-list b { font-family: var(--mono); font-size: 11px; color: var(--brand-soft); margin-right: 4px; }
.ecom-list em { font-style: normal; font-size: 11px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.ecom-list em.risk { background: rgba(255, 118, 102, 0.16); color: var(--warn); }
.ecom-list em.ok { background: rgb(var(--ok-rgb) / 0.14); color: var(--ok); }

.ecom-feedback {
  margin-top: 8px;
  min-height: 16px;
  font-size: 11.5px;
  color: var(--ok);
}

.receipt-log {
  display: grid;
  gap: 7px;
}

.receipt-log div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--app-input);
  font-size: 11.5px;
}

.receipt-log code { font-family: var(--mono); color: var(--cyan); font-size: 11px; }
.receipt-log span { color: var(--dim); font-size: 11px; }

/* ---------- 首屏工作流模拟器 ---------- */

.hero-wf-stage {
  display: grid;
  grid-template-columns: 1fr 22px 1fr 22px 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.hwf-node {
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--app-border);
  background: var(--app-panel);
  transition: border-color 0.35s, background 0.35s, transform 0.35s var(--ease), box-shadow 0.35s;
}

.hwf-node small { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.hwf-node b { display: block; margin-top: 5px; font-size: 12.5px; color: var(--text); }
.hwf-node span { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }

.hwf-node.is-running {
  border-color: rgb(var(--brand-rgb) / 0.7);
  background: rgb(var(--brand-rgb) / 0.12);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -12px rgb(var(--brand-rgb) / 0.65);
}

.hwf-node.is-done {
  border-color: rgb(var(--ok-rgb) / 0.45);
  background: rgb(var(--ok-rgb) / 0.08);
}

.hwf-arrow {
  height: 2px;
  background: linear-gradient(90deg, var(--app-border), var(--brand));
  border-radius: 2px;
}

.hero-eco-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.hero-eco-bar span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid var(--app-border);
  background: var(--app-panel);
  font-size: 11.5px;
  color: var(--muted);
}

.hero-eco-bar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

/* ---------- 悬浮徽章 ---------- */

.float-badge {
  position: absolute;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(17, 21, 27, 0.86);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  font-size: 11.5px;
  color: var(--muted);
  text-align: left;
  animation: bob 6s ease-in-out infinite;
  transition: opacity 0.25s, transform 0.25s var(--ease);
  z-index: 6;
}

.float-badge strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.float-badge strong.ok { color: var(--ok); }

.fb-1 { right: calc(100% + 18px); top: 28%; white-space: nowrap; }
.fb-2 { left: calc(100% + 18px); bottom: 12%; white-space: nowrap; animation-delay: -3s; }

@keyframes bob {
  50% { transform: translateY(-9px); }
}

/* ---------- Mockup Responsive ---------- */

@media (max-width: 1400px) {
  .float-badge { display: none; }
}

@media (max-width: 960px) {
  .app-workspace { grid-template-columns: 1fr; }
  .app-subnav { display: none; }
  .app-grid { grid-template-columns: 1fr; }
  .hero-wf-stage { grid-template-columns: 1fr; }
  .hwf-arrow { display: none; }
}

@media (max-width: 680px) {
  .app-body { grid-template-columns: 1fr; min-height: 0; }
  .app-sider, .app-win, .app-top-actions { display: none; }
  .app-head { flex-direction: column; align-items: flex-start; }
  .app-metrics { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .app-metric { padding: 10px 9px; }
  .app-metric b { font-size: 16px; display: block; line-height: 1.25; margin-top: 2px; }
  .app-metric em { margin-left: 0; font-size: 10px; }
  .drama-stage { grid-template-columns: 102px minmax(0, 1fr); }
  .demo-bar { border-radius: 16px; }
}
