/* 实干跨境 · 科技黑主题 */
:root {
  --fw-deep: #030508;
  --fw-panel: rgba(12, 18, 32, 0.72);
  --fw-panel-solid: #0c1220;
  --fw-border: rgba(0, 212, 255, 0.22);
  --fw-border-soft: rgba(255, 255, 255, 0.08);
  --fw-glow: rgba(0, 212, 255, 0.45);
  --fw-text: #e8eef7;
  --fw-muted: #8b9bb5;
  --fw-accent: #00d4ff;
  --fw-accent-dim: rgba(0, 212, 255, 0.65);
}

html {
  scroll-behavior: smooth;
}

html[data-bs-theme='dark'] {
  --bs-body-bg: var(--fw-deep);
  --bs-body-color: var(--fw-text);
}

.theme-tech-dark {
  color: var(--fw-text);
  background: var(--fw-deep);
}

/* 动态背景画布 */
.fw-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.fw-page {
  position: relative;
  z-index: 1;
}

/* 顶栏玻璃：抬高层级，避免首页 Hero 等内容盖住下拉菜单（个人中心等） */
.fw-navbar-glass {
  position: relative;
  z-index: 1030;
  background: linear-gradient(
    180deg,
    rgba(8, 14, 28, 0.94) 0%,
    rgba(6, 10, 20, 0.88) 100%
  ) !important;
  border-bottom: 1px solid var(--fw-border-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.fw-navbar-glass .navbar-brand,
.fw-navbar-glass .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
}

.fw-navbar-glass .nav-link:hover {
  color: var(--fw-accent) !important;
}

.fw-navbar-glass .dropdown-menu {
  z-index: 1040;
  background: rgba(10, 16, 30, 0.96);
  border: 1px solid var(--fw-border-soft);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.fw-nav-active {
  font-weight: 600;
  color: var(--fw-accent) !important;
}

.navbar .nav-link.fw-nav-active::after {
  content: '';
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.25rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--fw-accent), transparent);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--fw-glow);
}

/* 工具区快捷条：与顶栏同属导航层，避免被下方卡片压住 */
.fw-quicknav {
  position: relative;
  z-index: 1025;
  background: rgba(8, 14, 26, 0.82);
  border-bottom: 1px solid var(--fw-border-soft);
  backdrop-filter: blur(10px);
}

.fw-quicknav-label {
  letter-spacing: 0.06em;
  color: var(--fw-muted) !important;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.fw-quick-btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fw-quick-btn:hover {
  transform: translateY(-2px);
}

/* Hero */
.fw-hero {
  position: relative;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(0, 90, 140, 0.35) 0%,
    rgba(12, 20, 45, 0.92) 45%,
    rgba(5, 8, 20, 0.95) 100%
  );
  border: 1px solid var(--fw-border);
  box-shadow: 0 0 40px rgba(0, 180, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.fw-hero::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(0, 212, 255, 0.12) 50%,
    transparent 70%
  );
  pointer-events: none;
  animation: fw-hero-scan 8s ease-in-out infinite;
}

@keyframes fw-hero-scan {
  0%,
  100% {
    opacity: 0.4;
    transform: translateX(-8%);
  }
  50% {
    opacity: 0.85;
    transform: translateX(8%);
  }
}

/* 功能分区 */
.fw-tech-section {
  margin-bottom: 2.5rem;
}

.fw-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--fw-border-soft);
}

.fw-section-tag {
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--fw-accent);
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--fw-border);
  border-radius: 4px;
  background: rgba(0, 212, 255, 0.06);
}

.fw-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
  letter-spacing: 0.02em;
}

.fw-section-desc {
  width: 100%;
  margin: 0;
  font-size: 0.88rem;
  color: var(--fw-muted);
}

/* 玻璃卡（首页入口） */
.fw-glass-card {
  position: relative;
  display: block;
  height: 100%;
  background: var(--fw-panel);
  border: 1px solid var(--fw-border-soft);
  border-radius: 14px;
  padding: 1.5rem 1rem;
  text-align: center;
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.fw-glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(0, 212, 255, 0.12),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.fw-glass-card:hover {
  transform: translateY(-6px);
  border-color: var(--fw-border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 28px rgba(0, 212, 255, 0.12);
}

.fw-glass-card:hover::before {
  opacity: 1;
}

.fw-glass-card .fw-tile-icon {
  font-size: 2.25rem;
  line-height: 1;
  display: inline-block;
}

.fw-glass-card .fw-card-title {
  font-weight: 600;
  margin-top: 0.85rem;
  color: #fff;
  font-size: 1rem;
}

.fw-glass-card .fw-card-sub {
  font-size: 0.78rem;
  color: var(--fw-muted);
  margin-top: 0.35rem;
}

/* 链接拆分类 — 独占宽卡 */
.fw-glass-card-fw {
  padding: 1.75rem 1.5rem;
}

/* 底部信息卡 */
.fw-info-card {
  background: var(--fw-panel);
  border: 1px solid var(--fw-border-soft);
  border-radius: 14px;
  backdrop-filter: blur(8px);
}

.fw-info-card .card-title {
  color: #fff;
  font-size: 1rem;
}

.fw-info-card,
.fw-info-card .text-muted {
  color: var(--fw-muted) !important;
}

.fw-info-card a {
  color: var(--fw-accent-dim);
}

.fw-info-card a:hover {
  color: var(--fw-accent);
}

/* 旧 tile 兼容（内页） */
.fw-tile-icon {
  font-size: 2rem;
  line-height: 1;
  display: block;
}

.text-fw-purple {
  color: #a78bfa !important;
}

.fw-tool-card {
  background: var(--fw-panel) !important;
  border: 1px solid var(--fw-border-soft) !important;
  color: var(--fw-text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fw-tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--fw-border) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

.fw-tool-card h5 {
  color: #fff;
}

.fw-tool-card .text-muted {
  color: var(--fw-muted) !important;
}

.theme-tech-dark .fw-img-gen-card {
  background: var(--fw-panel);
  border: 1px solid var(--fw-border-soft) !important;
  border-radius: 14px;
  backdrop-filter: blur(10px);
  color: var(--fw-text);
}

.fw-img-gen-hint code {
  font-size: 0.85em;
}

.fw-img-gen-control.form-control,
.fw-img-gen-control.form-select {
  background: rgba(8, 14, 28, 0.85);
  border-color: var(--fw-border-soft);
  color: var(--fw-text);
}

.fw-img-gen-control:focus {
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: 0 0 0 0.15rem rgba(0, 212, 255, 0.18);
}

.fw-img-task-accordion .fw-img-acc-item {
  background: rgba(8, 14, 28, 0.72);
  border: 1px solid var(--fw-border-soft);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.fw-img-acc-btn:not(.collapsed) {
  background: rgba(0, 212, 255, 0.08);
  color: #f8fafc;
}

.fw-img-acc-btn {
  background: transparent;
  color: var(--fw-text);
  box-shadow: none !important;
}

.fw-img-task-accordion .accordion-body {
  background: rgba(4, 8, 18, 0.55);
}

.fw-img-gen-result {
  max-height: 280px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.35);
}

/* Bootstrap flex child 内需 min-height:0 才能内部滚动且不撑破父布局 */
.min-h-0 {
  min-height: 0 !important;
}

/* 图片 / 视频工具右侧 JSON 控制台 */
.fw-tools-studio-json-out {
  max-height: min(620px, 58vh);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 工作台栅格锚点 · 适用于商品参考生图及同壳图片 / 视频子页 (#fw-ref-studio-grid)；须保持横向多栏 */
body.fw-ref-studio-layout .fw-img-gen-shell.fw-ref-studio {
  width: 100%;
  min-width: 0;
}

body.fw-ref-studio-layout .fw-ref-grid-root,
.fw-ref-studio .fw-ref-fixed-layout.fw-ref-grid-root {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.fw-ref-studio .fw-ref-center-panel,
.fw-ref-studio .fw-ref-results-stack {
  min-height: 0;
}

body.fw-ref-studio-layout .fw-ref-side-rail {
  min-width: 0;
}

/* 较窄屏：左侧导航单独一行，表单与生成结果并排两列（门槛略低于 Bootstrap sm，减轻「整页竖排」体感） */
@media (min-width: 400px) and (max-width: 767.98px) {
  body.fw-ref-studio-layout .fw-ref-grid-root,
  .fw-ref-studio .fw-ref-fixed-layout.fw-ref-grid-root {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  body.fw-ref-studio-layout .fw-ref-side-rail,
  .fw-ref-studio .fw-ref-side-rail {
    grid-column: 1 / -1;
  }

  body.fw-ref-studio-layout .fw-ref-grid-root.fw-ref-grid--editor-full,
  .fw-ref-studio .fw-ref-fixed-layout.fw-ref-grid-root.fw-ref-grid--editor-full {
    grid-template-columns: 1fr;
  }

  body.fw-ref-studio-layout .fw-ref-grid-root.fw-ref-grid--editor-full > .fw-ref-editor-main,
  .fw-ref-studio .fw-ref-fixed-layout.fw-ref-grid-root.fw-ref-grid--editor-full > .fw-ref-editor-main {
    grid-column: auto;
    min-width: 0;
  }

  body.fw-ref-studio-layout .fw-ref-center-panel,
  body.fw-ref-studio-layout .fw-ref-results-stack,
  .fw-ref-studio .fw-ref-center-panel,
  .fw-ref-studio .fw-ref-results-stack {
    min-width: 0;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  body.fw-ref-studio-layout .fw-ref-grid-root,
  .fw-ref-studio .fw-ref-fixed-layout.fw-ref-grid-root {
    grid-template-columns: minmax(180px, 200px) minmax(220px, 440px) minmax(240px, 1fr);
  }

  body.fw-ref-studio-layout .fw-ref-grid-root.fw-ref-grid--editor-full,
  .fw-ref-studio .fw-ref-fixed-layout.fw-ref-grid-root.fw-ref-grid--editor-full {
    grid-template-columns: minmax(180px, 200px) minmax(0, 1fr);
  }

  body.fw-ref-studio-layout .fw-ref-grid-root.fw-ref-grid--editor-full > .fw-ref-editor-main,
  .fw-ref-studio .fw-ref-fixed-layout.fw-ref-grid-root.fw-ref-grid--editor-full > .fw-ref-editor-main {
    grid-column: 2 / -1;
    min-width: 0;
  }

  body.fw-ref-studio-layout .fw-ref-side-rail,
  .fw-ref-studio .fw-ref-side-rail {
    grid-column: auto;
  }
}

@media (min-width: 992px) {
  body.fw-ref-studio-layout .fw-ref-grid-root,
  .fw-ref-studio .fw-ref-fixed-layout.fw-ref-grid-root {
    grid-template-columns: 228px minmax(260px, 480px) minmax(280px, 1fr);
    /* 兼容不支持 dvh 的环境，避免整块声明被跳过 */
    min-height: calc(100vh - 10.5rem);
    max-height: calc(100vh - 10.5rem);
    min-height: calc(100dvh - 10.5rem);
    max-height: calc(100dvh - 10.5rem);
  }

  /* 仅侧栏 + 快图编辑器：两栏铺满，避免误用三栏模板把主区限制在 480px */
  body.fw-ref-studio-layout .fw-ref-grid-root.fw-ref-grid--editor-full,
  .fw-ref-studio .fw-ref-fixed-layout.fw-ref-grid-root.fw-ref-grid--editor-full {
    grid-template-columns: 228px minmax(0, 1fr);
  }

  /* 若仍按三栏占位，强制主区占满第 2～末列（根除右侧大块留白） */
  body.fw-ref-studio-layout .fw-ref-grid-root.fw-ref-grid--editor-full > .fw-ref-editor-main,
  .fw-ref-studio .fw-ref-fixed-layout.fw-ref-grid-root.fw-ref-grid--editor-full > .fw-ref-editor-main {
    grid-column: 2 / -1;
    min-width: 0;
  }

  body.fw-ref-studio-layout .fw-ref-side-rail,
  .fw-ref-studio .fw-ref-side-rail {
    grid-column: auto;
  }
}

/* 快图 iframe：大屏交给栅格高度链，小屏给足最小高度以免画布被压扁 */
.fw-ref-editor-main .fw-ref-editor-iframe-wrap {
  flex: 1 1 auto;
  min-height: min(72vh, 720px);
}

@media (min-width: 992px) {
  .fw-ref-editor-main .fw-ref-editor-iframe-wrap {
    min-height: 0;
  }

  .fw-ref-editor-main .fw-ref-editor-iframe {
    height: 100%;
    min-height: 480px;
  }
}

/* 快图编辑器：顶栏下铺满视口（layout 已去页脚） */
body.fw-fabric-editor-page .fw-page > .container-fluid {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.fw-fabric-editor-page .fw-img-gen-shell.fw-ref-studio {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.fw-fabric-editor-page .fw-ref-editor-main {
  flex: 1 1 auto;
  min-height: 0;
  background: rgba(5, 10, 22, 0.35);
}

body.fw-fabric-editor-page .fw-ref-editor-main .fw-ref-editor-iframe-wrap {
  flex: 1 1 auto;
  min-height: 0;
}

body.fw-fabric-editor-page .fw-ref-editor-main .fw-ref-editor-iframe {
  height: 100%;
  min-height: 320px;
}

@media (min-width: 992px) {
  body.fw-fabric-editor-page.fw-ref-studio-layout .fw-ref-grid-root.fw-ref-grid--editor-full,
  body.fw-fabric-editor-page .fw-ref-studio .fw-ref-fixed-layout.fw-ref-grid-root.fw-ref-grid--editor-full {
    min-height: calc(100dvh - 6.25rem);
    max-height: calc(100dvh - 6.25rem);
    min-height: calc(100vh - 6.25rem);
    max-height: calc(100vh - 6.25rem);
  }
}

/* 快图编辑器 · 独立全屏路由（无站内顶栏/侧栏） */
html.fw-fabric-fullscreen-html {
  height: 100%;
}

body.fw-fabric-fullscreen-body {
  margin: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
}

.fw-fabric-fullscreen-bar {
  flex-shrink: 0;
  min-height: 48px;
  background: rgba(6, 10, 20, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
}

.fw-fabric-fullscreen-frame {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  background: var(--fw-deep, #030508);
}

.fw-fabric-fullscreen-frame .fw-custom-editor-root {
  height: 100%;
}

.fw-fabric-fullscreen-iframe {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* 生成结果 · 批量选择（默认隐藏勾选列） */
.fw-ref-results-viewport .fw-ref-task-select {
  display: none;
}

.fw-ref-results-viewport.fw-ref-select-mode .fw-ref-task-select {
  display: block;
}

@media (max-width: 991.98px) {
  .fw-ref-studio .fw-ref-results-stack .fw-img-gen-card.fw-ref-fixed-card,
  .fw-ref-studio .fw-ref-center-panel .fw-img-gen-card.fw-ref-fixed-card {
    max-height: none !important;
    height: auto !important;
  }
}

.fw-ref-side-rail {
  background: rgba(5, 10, 22, 0.55);
}

.fw-img-gen-card.fw-ref-fixed-card {
  overflow: hidden;
}

@media (min-width: 992px) {
  .fw-img-gen-card.fw-ref-fixed-card {
    max-height: calc(100dvh - 10.5rem);
  }
}

.fw-ref-panel-scroll {
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.fw-ref-results-viewport {
  min-height: 220px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.fw-ref-results-host {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 生成结果（排队中）：自适应列数铺满容器，避免右侧大块留白 */
.fw-ref-results-host .fw-ref-slot-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.5rem 0.65rem;
  min-height: min-content;
  justify-content: stretch;
  width: 100%;
  align-content: start;
  --fw-ref-thumb: 148px;
}

@media (max-width: 991.98px) {
  .fw-ref-results-host .fw-ref-slot-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 0.4rem 0.48rem;
    --fw-ref-thumb: 132px;
  }
}

@media (max-width: 575.98px) {
  .fw-ref-results-host .fw-ref-slot-grid {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    --fw-ref-thumb: 118px;
  }
}

/* 单列宽于缩略保底值时放大卡片填满格子（与 mosaic 一致） */
.fw-ref-results-host .fw-ref-slot-grid .fw-ref-result-card--thumb {
  max-width: 100%;
}

.fw-ref-results-host .fw-ref-slot-grid .fw-ref-result-img-wrap,
.fw-ref-results-host .fw-ref-slot-grid .fw-ref-scan-wrap {
  height: auto;
  max-height: none;
  aspect-ratio: 1;
  min-height: 118px;
}

.fw-ref-results-host .fw-ref-slot-item {
  min-width: 0;
  max-width: 100%;
}

.fw-ref-results-host .fw-ref-slot-item--full {
  grid-column: 1 / -1;
  justify-self: stretch;
  width: 100%;
  max-width: none !important;
}

.fw-ref-results-host .fw-ref-result-card--thumb {
  width: 100%;
  max-width: min(100%, var(--fw-ref-thumb, 148px));
}

.fw-ref-results-host .fw-ref-result-card--fail {
  background: rgba(7, 14, 28, 0.96);
  border: 1px solid rgba(34, 211, 238, 0.22);
  color: rgba(226, 232, 240, 0.92);
  box-shadow: 0 1px 0 rgba(34, 211, 238, 0.06);
}

.fw-ref-results-host .fw-ref-result-card--fail .fw-ref-fail-thumb-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  background: #0b1220;
  border-top: 1px solid rgba(34, 211, 238, 0.1);
  padding: 0.42rem 0.48rem;
  box-sizing: border-box;
  overflow: hidden;
}

.fw-ref-results-host .fw-ref-result-card--fail .fw-ref-result-head {
  background: rgba(11, 22, 40, 0.98) !important;
  border-bottom: 1px solid rgba(34, 211, 238, 0.16) !important;
}

.fw-ref-results-host .fw-ref-result-card--fail .fw-ref-result-title {
  color: rgba(251, 191, 36, 0.95) !important;
}

.fw-ref-results-host .fw-ref-fail-hint {
  display: block;
  font-size: 0.65rem;
  color: rgba(148, 163, 184, 0.88);
}

.fw-ref-results-mosaic .fw-ref-slot-item {
  width: 100%;
  max-width: 100%;
}

.fw-ref-results-host .fw-ref-fail-reason {
  color: rgba(252, 211, 211, 0.9) !important;
  font-size: 0.62rem !important;
  line-height: 1.35 !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  margin: 0 !important;
  max-height: 100%;
  overflow-y: auto;
  padding-right: 0.15rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.35) transparent;
}

.fw-ref-fail-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(251, 191, 36, 0.95);
  letter-spacing: 0.06em;
}

.fw-ref-admin-log-pre {
  max-height: 240px;
  overflow-y: auto;
  word-break: break-word;
}

.fw-ref-results-host .fw-ref-result-img-wrap,
.fw-ref-results-host .fw-ref-scan-wrap {
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: unset;
  height: var(--fw-ref-thumb, 112px);
  max-height: var(--fw-ref-thumb, 112px);
  overflow: hidden;
  min-height: 0;
  flex-shrink: 0;
}

.fw-ref-results-host .fw-ref-result-img-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.fw-ref-results-host .fw-ref-result-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  vertical-align: middle;
}

.fw-ref-results-host .fw-ref-result-img-wrap .fw-ref-result-img-btn,
.fw-ref-results-host .fw-ref-result-img-wrap .fw-ref-result-img {
  max-height: none;
}

.fw-img-gen-shell.fw-ref-studio .fw-ref-tpl-details summary {
  cursor: pointer;
}

.fw-ref-results-host .fw-ref-result-head {
  padding: 0.28rem 0.35rem;
}

.fw-ref-results-host .fw-ref-result-title {
  font-size: 0.7rem;
}

.fw-ref-results-host .fw-ref-btn-regen,
.fw-ref-results-host .fw-ref-btn-fail-retry,
.fw-ref-results-host .fw-ref-btn-dl {
  font-size: 0.6rem;
}

.fw-ref-results-host .fw-ref-scan-footer {
  font-size: 0.6rem;
  padding: 0.22rem 0.35rem !important;
}

/* 右侧生成结果：不展示长表头（#模型/时间/提示词），悬浮缩略可看 title「任务 #id」） */
.fw-ref-results-host .fw-ref-task-meta {
  display: none !important;
}

/* 多条「已完成」缩略汇入同一网格：按容器宽度自动多列并排 */
.fw-ref-results-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.55rem 0.68rem;
  justify-content: stretch;
  align-content: start;
  width: 100%;
  margin-bottom: 0.65rem;
  --fw-ref-thumb: 172px;
}

@media (max-width: 991.98px) {
  .fw-ref-results-mosaic {
    grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
    gap: 0.42rem 0.52rem;
    --fw-ref-thumb: 152px;
  }
}

@media (max-width: 575.98px) {
  .fw-ref-results-mosaic {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    --fw-ref-thumb: 138px;
  }
}

/* 马赛克：每格同高，卡片铺满格子，避免失败长文案撑开或与其他格视觉重叠 */
.fw-ref-results-mosaic .fw-ref-mosaic-cell {
  min-width: 0;
}

.fw-ref-results-mosaic .fw-ref-mosaic-cell > .flex-grow-1 {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.fw-ref-results-mosaic .fw-ref-result-card--thumb {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-width: 100%;
  width: 100%;
}

.fw-ref-results-mosaic .fw-ref-result-card--fail .fw-ref-fail-thumb-wrap {
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: 1;
  max-height: none;
}

.fw-ref-results-mosaic .fw-ref-result-img-wrap,
.fw-ref-results-mosaic .fw-ref-scan-wrap {
  height: auto;
  max-height: none;
  aspect-ratio: 1;
  min-height: 120px;
}

/* —— 图片翻译：大块「翻译区 / 无字区」并排网格，容器内按比例展示不同长宽比 —— */
.fw-xi-zone-title {
  font-size: clamp(1rem, 2.35vw, 1.125rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(103, 232, 249, 0.98);
}
#fw-xi-results.fw-ref-results-host .fw-xi-zone-mosaic.fw-ref-slot-grid .fw-ref-result-img-wrap,
#fw-xi-results.fw-ref-results-host .fw-xi-zone-mosaic.fw-ref-slot-grid .fw-ref-scan-wrap {
  height: auto !important;
  max-height: min(460px, 52vh) !important;
  min-height: 112px !important;
  aspect-ratio: auto !important;
}
#fw-xi-results.fw-ref-results-host .fw-xi-zone-mosaic .fw-ref-result-img {
  width: 100%;
  height: auto;
  max-height: min(440px, 50vh);
  object-fit: contain;
}

.fw-ref-slot-grid {
  min-height: min-content;
}

.fw-ref-slot-grid > .col {
  min-width: 0;
}

.fw-ref-result-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 0.5rem;
  overflow: hidden;
  color: #0f172a;
}

.fw-ref-result-head {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.9);
}

.fw-ref-result-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.fw-ref-result-img-wrap {
  aspect-ratio: 1 / 1.7;
  background: rgb(249, 250, 251);
}

/* Bootstrap 弹层遮罩挂在 body(z-index 1050±)；此处 .fw-page 曾设 z-index:1，
   会形成整页的 stacking context，导致弹窗内容留在该层之内、指针全落在遮罩上无法点击。
   任意 Modal 展开时暂时取消 fw-page 的 z-index（BS5+ 或无 .modal-open 时用 :has）。
   https://stackoverflow.com/questions/42664537 */
body.modal-open .fw-page,
body:has(.modal.show) .fw-page {
  z-index: auto;
}

/* 工作台 · 大图弹层（参考生图 + 图片翻译等共用） */
#fw-ref-img-lightbox .modal-header,
#fw-xi-img-lightbox .modal-header {
  position: relative;
  z-index: 5;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

#fw-ref-img-lightbox .btn-close,
#fw-xi-img-lightbox .btn-close {
  opacity: 1;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

#fw-ref-img-lightbox .modal-body.fw-ref-lightbox-body img,
#fw-ref-img-lightbox .modal-body img,
#fw-xi-img-lightbox .modal-body.fw-ref-lightbox-body img,
#fw-xi-img-lightbox .modal-body img {
  max-height: min(78vh, 920px);
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}

#fw-xi-img-lightbox .modal-content {
  position: relative;
  z-index: 2;
}

.fw-ref-result-img-btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.fw-ref-result-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}

.fw-ref-result-img-btn:hover .fw-ref-result-img {
  transform: scale(1.02);
}

.fw-ref-btn-regen,
.fw-ref-btn-fail-retry {
  color: rgb(124, 58, 237) !important;
  font-size: 0.72rem;
  padding: 0.15rem 0.35rem;
}

.fw-ref-btn-regen:hover,
.fw-ref-btn-fail-retry:hover {
  color: rgb(109, 40, 217) !important;
}

.fw-ref-btn-regen:disabled,
.fw-ref-btn-fail-retry:disabled {
  opacity: 0.4 !important;
}

.fw-ref-btn-dl {
  font-size: 0.72rem;
  padding: 0.15rem 0.35rem;
}

.fw-ref-scan-wrap {
  aspect-ratio: 1 / 1.7;
  position: relative;
  background: #0b1220;
  overflow: hidden;
}

.fw-ref-scan-bg {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  object-fit: contain;
}

.fw-ref-scan-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(34, 211, 238, 0.07) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(34, 211, 238, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.7;
  pointer-events: none;
}

.fw-ref-scan-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  animation: fw-ref-scan-sweep 2.8s ease-in-out infinite;
  pointer-events: none;
}

.fw-ref-scan-bar-line {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(103, 232, 249, 0.95),
    transparent
  );
  box-shadow: 0 0 18px 3px rgba(34, 211, 238, 0.75);
}

.fw-ref-scan-bar-glow {
  height: 3rem;
  margin-top: -3rem;
  opacity: 0.65;
  background: linear-gradient(
    rgba(34, 211, 238, 0.32),
    rgba(34, 211, 238, 0)
  );
}

.fw-ref-scan-corner {
  position: absolute;
  width: 1.15rem;
  height: 1.15rem;
  border-color: rgba(103, 232, 249, 0.78);
  pointer-events: none;
}

.fw-ref-scan-corner.tr {
  top: 0.45rem;
  right: 0.45rem;
  border-top: 2px solid;
  border-right: 2px solid;
}
.fw-ref-scan-corner.tl {
  top: 0.45rem;
  left: 0.45rem;
  border-top: 2px solid;
  border-left: 2px solid;
}
.fw-ref-scan-corner.br {
  bottom: 0.45rem;
  right: 0.45rem;
  border-bottom: 2px solid;
  border-right: 2px solid;
}
.fw-ref-scan-corner.bl {
  bottom: 0.45rem;
  left: 0.45rem;
  border-bottom: 2px solid;
  border-left: 2px solid;
}

.fw-ref-scan-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgb(103, 232, 249);
  text-shadow: 0 0 8px rgba(34, 211, 238, 0.45);
  pointer-events: none;
}

.fw-ref-progress-label {
  width: 96%;
  max-width: 280px;
  margin: 0 auto;
  text-align: center;
  font-size: 10px;
  line-height: 1.35rem;
  min-height: 1.35rem;
  letter-spacing: 0.08em;
  color: rgba(165, 243, 252, 0.95);
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fw-ref-progress-label--busy .fw-ref-progress-label-text {
  animation: fw-ref-progress-breathe 2.1s ease-in-out infinite;
}

@keyframes fw-ref-progress-breathe {
  0%,
  100% {
    opacity: 0.86;
  }
  50% {
    opacity: 1;
  }
}

.fw-ref-scan-progress {
  width: 66%;
  height: 2px;
  border-radius: 999px;
  background: rgba(8, 47, 73, 0.75);
  overflow: hidden;
}

.fw-ref-scan-progress-bar {
  height: 100%;
  background: rgb(103, 232, 249);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.85);
  transition: width 0.6s ease;
}

.fw-ref-scan-progress-bar--busy {
  animation: fw-ref-bar-busy 1.65s ease-in-out infinite;
}

@keyframes fw-ref-bar-busy {
  0%,
  100% {
    opacity: 0.78;
    filter: brightness(0.92);
  }
  50% {
    opacity: 1;
    filter: brightness(1.18);
  }
}

@keyframes fw-ref-scan-sweep {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(calc(100% * 1.62));
  }
  100% {
    transform: translateY(0);
  }
}

.fw-ref-lightbox-body img {
  max-width: 100%;
  max-height: calc(100dvh - 8rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

.fw-ref-thumb-img {
  cursor: zoom-in;
}

.fw-ref-studio .fw-ref-drop {
  background: rgba(4, 10, 22, 0.45);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.fw-ref-studio .fw-ref-drop:focus-visible {
  outline: 2px solid rgba(0, 212, 255, 0.45);
  outline-offset: 2px;
}
.fw-ref-studio .fw-ref-drop--drag {
  border-color: rgba(0, 212, 255, 0.55) !important;
  box-shadow: 0 0 0 0.12rem rgba(0, 212, 255, 0.2);
}

.fw-ref-thumb-slot {
  max-height: 168px;
  overflow: hidden;
  width: 100%;
}
.fw-ref-thumb-inner {
  max-height: 160px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 工作台 · 参考图至多 5 张缩略条 */
.fw-ref-thumb-strip {
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  align-content: flex-start;
}
.fw-ref-thumb-strip .fw-ref-thumb-img {
  max-height: 96px;
  max-width: 96px;
  width: auto;
  height: auto;
  object-fit: cover;
  vertical-align: middle;
}

.fw-ref-thumb-img {
  max-width: 100%;
  max-height: 154px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  background: rgba(0, 0, 0, 0.35);
}

.fw-ref-mod-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.fw-ref-mod {
  border-color: var(--fw-border-soft);
  background: rgba(6, 12, 26, 0.55);
  color: var(--fw-text);
}
.fw-ref-mod:hover {
  border-color: rgba(0, 212, 255, 0.35);
  background: rgba(0, 212, 255, 0.06);
}
.fw-ref-mod--on {
  border-color: rgba(0, 212, 255, 0.65) !important;
  background: rgba(0, 212, 255, 0.1) !important;
  box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.2);
}

/* 反推 · 素材准备：类型卡片 + 悬停气泡 */
.fw-rp-preset {
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.fw-rp-preset .fw-ref-mod-sub {
  font-size: 0.8rem;
}
.fw-rp-hint-trigger {
  font-size: 0.75rem;
  opacity: 0.72;
}
.fw-rp-preset-wrap:hover .fw-rp-hint-trigger,
.fw-rp-preset-wrap:focus-within .fw-rp-hint-trigger {
  opacity: 1;
  color: rgba(0, 212, 255, 0.85) !important;
}
.fw-rp-hint-bubble {
  position: fixed;
  z-index: 1080;
  max-width: min(22rem, calc(100vw - 1.5rem));
  padding: 0.75rem 0.85rem;
  border-radius: 0.65rem;
  background: rgba(10, 18, 34, 0.97);
  border: 1px solid rgba(0, 212, 255, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.12s ease, visibility 0.12s ease, transform 0.12s ease;
}
.fw-rp-hint-bubble.fw-rp-hint-bubble--show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.fw-rp-hint-bubble .fw-rp-hint-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(0, 212, 255, 0.9);
  margin-bottom: 0.5rem;
}
.fw-rp-hint-bubble .fw-rp-hint-p {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}
.fw-rp-hint-bubble .fw-rp-hint-p + .fw-rp-hint-p {
  margin-top: 0.45rem;
}

.fw-ref-job-card {
  flex: 0 0 272px;
  width: 272px;
  background: rgba(6, 14, 28, 0.65);
  border: 1px solid var(--fw-border-soft);
  border-radius: 12px;
  overflow: hidden;
  align-self: stretch;
  height: auto;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
}

@media (max-width: 520px) {
  .fw-ref-job-card {
    flex-basis: 85vw;
    width: 85vw;
  }
}

.fw-ref-job-head {
  background: rgba(0, 212, 255, 0.04);
}

.fw-ref-job-body {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: 100%;
  overflow: hidden auto;
}

.fw-ref-studio .fw-ref-job-card .fw-img-gen-result {
  max-height: 216px !important;
}

.fw-ref-md-preview strong {
  color: #7eeefe;
}

.fw-ref-rail-nav .fw-ref-rail-link {
  padding-left: 0.65rem !important;
}

.fw-tool-card .badge {
  background: rgba(0, 212, 255, 0.12) !important;
  color: var(--fw-muted) !important;
  border: 1px solid var(--fw-border-soft);
}

.tools-grid .card {
  min-height: 0;
}

/* 主内容区卡片 / 表单 */
.theme-tech-dark .card.card-body,
.theme-tech-dark .card {
  background: var(--fw-panel-solid);
  border: 1px solid var(--fw-border-soft);
  color: var(--fw-text);
}

.theme-tech-dark .card .text-muted {
  color: var(--fw-muted) !important;
}

.theme-tech-dark .form-control,
.theme-tech-dark .form-select {
  background: rgba(6, 10, 20, 0.85);
  border-color: var(--fw-border-soft);
  color: var(--fw-text);
}

.theme-tech-dark .form-control:focus,
.theme-tech-dark .form-select:focus {
  border-color: var(--fw-accent);
  box-shadow: 0 0 0 0.2rem rgba(0, 212, 255, 0.2);
  background: rgba(8, 14, 26, 0.95);
  color: var(--fw-text);
}

.theme-tech-dark .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--fw-text);
  border-color: var(--fw-border-soft);
}

/* 个人中心 / 订单·消耗·历史：深色玻璃表格（勿使用 bg-white，否则会浅色字叠白底） */
.fw-user-table-wrap {
  background: var(--fw-panel);
  border: 1px solid var(--fw-border-soft);
  border-radius: 14px;
  padding: 0.35rem 0.55rem;
  backdrop-filter: blur(10px);
  overflow-x: auto;
}

.fw-user-table-wrap .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--fw-text);
  --bs-table-border-color: rgba(255, 255, 255, 0.12);
  margin-bottom: 0;
}

.fw-user-table-wrap .table th {
  font-weight: 600;
  color: #f1f5f9;
  border-bottom-color: rgba(0, 212, 255, 0.28);
}

.fw-user-table-wrap .table td {
  color: var(--fw-text);
}

.fw-user-table-wrap .table tbody tr:nth-of-type(even) td {
  background: rgba(255, 255, 255, 0.04);
}

.fw-user-table-wrap .table a {
  color: var(--fw-accent-dim);
}

.fw-user-table-wrap .table a:hover {
  color: var(--fw-accent);
}

.fw-user-table-wrap code {
  color: #a5f3fc;
  background: rgba(0, 0, 0, 0.38);
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  font-size: 0.86em;
}

.fw-user-page-heading {
  color: var(--fw-text);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.fw-user-back-link {
  color: var(--fw-accent-dim) !important;
  text-decoration: none;
}

.fw-user-back-link:hover {
  color: var(--fw-accent) !important;
  text-decoration: underline;
}

.fw-user-hint {
  color: var(--fw-muted);
}

/* 用户充值页 */
.fw-recharge-page {
  max-width: 1100px;
}

.fw-recharge-baseline {
  border: 1px solid var(--fw-border-soft);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  background: rgba(0, 212, 255, 0.06);
  color: var(--fw-muted);
  font-size: 0.9rem;
}

.fw-recharge-tier-panel {
  border-radius: 14px;
  padding: 1rem 1.1rem;
  height: 100%;
  border: 1px solid var(--fw-border-soft);
  background: rgba(8, 18, 38, 0.72);
}

.fw-recharge-tier-panel--vip {
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12);
}

.fw-recharge-tier-panel--svip {
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.15);
}

.fw-recharge-tier-panel h6 {
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.fw-recharge-tier-panel--vip h6 {
  color: #93c5fd;
}

.fw-recharge-tier-panel--svip h6 {
  color: #fcd34d;
}

.fw-recharge-tier-panel .fw-recharge-discount-range {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--fw-text);
}

.fw-recharge-tier-samples {
  font-size: 0.82rem;
  color: var(--fw-muted);
  margin-top: 0.65rem;
  margin-bottom: 0;
}

.fw-recharge-tier-samples li {
  margin-bottom: 0.2rem;
}

.fw-recharge-section-box {
  border: 1px solid var(--fw-border-soft);
  border-radius: 16px;
  padding: 1.25rem 1.35rem 1.35rem;
  margin-bottom: 1.5rem;
  background: rgba(6, 14, 32, 0.72);
}

.fw-recharge-section-box--compare {
  border-color: rgba(148, 163, 184, 0.35);
}

.fw-recharge-section-box--svip {
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.08);
}

.fw-recharge-section-box--vip {
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.08);
}

.fw-recharge-section-box--resource {
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.06);
}

.fw-recharge-section-box .fw-recharge-section-title {
  margin-top: 0;
}

.fw-recharge-compare-table thead th {
  font-size: 0.82rem;
  color: var(--fw-muted);
  border-bottom-color: var(--fw-border-soft);
  white-space: nowrap;
}

.fw-recharge-compare-table tbody td {
  vertical-align: middle;
  border-color: rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
}

.fw-recharge-compare-table tbody tr:hover td {
  background: rgba(0, 212, 255, 0.04);
}

.fw-recharge-compare-vip {
  color: #93c5fd;
}

.fw-recharge-compare-table .text-warning {
  color: #fcd34d !important;
}

.fw-recharge-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.75rem 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--fw-text);
}

.fw-recharge-section-title .badge {
  font-weight: 600;
}

.fw-recharge-card {
  border: 1px solid var(--fw-border-soft);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(12, 28, 58, 0.95), rgba(6, 14, 32, 0.98));
  padding: 1.1rem 1.15rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}

.fw-recharge-card:hover {
  border-color: var(--fw-border);
  transform: translateY(-2px);
}

.fw-recharge-card--svip {
  border-color: rgba(251, 191, 36, 0.35);
}

.fw-recharge-card--vip {
  border-color: rgba(96, 165, 250, 0.35);
}

.fw-recharge-card--resource {
  border-color: rgba(34, 211, 238, 0.25);
}

.fw-recharge-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--fw-text);
}

.fw-recharge-card-price {
  font-size: 1.65rem;
  font-weight: 800;
  color: #7dd3fc;
  line-height: 1.2;
}

.fw-recharge-card-price small {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fw-muted);
}

.fw-recharge-card-perks {
  flex: 1;
  font-size: 0.88rem;
  color: var(--fw-muted);
  margin: 0.65rem 0 0.75rem;
}

.fw-recharge-card-perks li {
  margin-bottom: 0.25rem;
}

.fw-recharge-save-badge {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.fw-recharge-unit-price {
  font-size: 0.8rem;
  color: #a5b4fc;
}

.fw-recharge-card .btn-order {
  align-self: flex-start;
  margin-top: auto;
}

.theme-tech-dark pre.bg-black {
  background: #050a14 !important;
  border: 1px solid var(--fw-border-soft) !important;
  color: #7dd3fc !important;
}

.fw-btn-back {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--fw-border-soft) !important;
  color: var(--fw-text) !important;
}

.fw-btn-back:hover {
  background: rgba(0, 212, 255, 0.12) !important;
  border-color: var(--fw-border) !important;
  color: var(--fw-accent) !important;
}

/* 页脚 */
.fw-footer {
  background: rgba(4, 8, 16, 0.92);
  border-top: 1px solid var(--fw-border-soft);
  color: var(--fw-muted);
  backdrop-filter: blur(8px);
}

.fw-footer .text-muted {
  color: var(--fw-muted) !important;
}

.fw-footer-line {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--fw-muted);
}

.fw-footer-line + .fw-footer-line {
  margin-top: 0.35rem;
}

.fw-footer-beian {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.65rem;
}

.fw-footer-beian-sep {
  opacity: 0.45;
  user-select: none;
}

.fw-footer-beian-link {
  color: var(--fw-muted);
  text-decoration: none;
}

.fw-footer-beian-link:hover {
  color: var(--fw-accent);
  text-decoration: underline;
}

.fw-footer-beian-text {
  color: var(--fw-muted);
}

.fw-footer-extra {
  font-size: 0.75rem;
  opacity: 0.85;
}

/* 公告条 */
.fw-notice {
  background: rgba(0, 80, 120, 0.2);
  border: 1px solid var(--fw-border) !important;
  color: var(--fw-muted);
}

/* Flash */
.theme-tech-dark .alert-success {
  background: rgba(25, 135, 84, 0.2);
  border-color: rgba(25, 135, 84, 0.4);
  color: #90eeb0;
}

.theme-tech-dark .alert-danger {
  background: rgba(220, 53, 69, 0.18);
  border-color: rgba(220, 53, 69, 0.45);
  color: #ffb4bd;
}

.theme-tech-dark .alert-info {
  background: rgba(0, 150, 200, 0.12);
  border-color: var(--fw-border);
  color: #9eeefd;
}

.dropdown-menu-dark .dropdown-item:hover {
  background-color: rgba(0, 212, 255, 0.12);
}

@media (max-width: 991px) {
  .navbar .nav-link.fw-nav-active::after {
    display: none;
  }
}

/* AI 视频 · 与参考生图统一的缩略图 / 弹层比例 */
.fw-ref-results-host .fw-veo-aspect-port {
  aspect-ratio: 9 / 16 !important;
  max-height: min(52vh, 320px);
}

.fw-ref-results-host .fw-veo-aspect-land {
  aspect-ratio: 16 / 9 !important;
  max-height: none;
}

.fw-veo-video-poster {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(8, 47, 73, 0.88));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: rgba(34, 211, 238, 0.95);
  position: relative;
}

.fw-veo-video-poster--has-img {
  color: #fff;
}

.fw-veo-video-poster--has-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.42));
  pointer-events: none;
}

.fw-veo-video-poster--has-img .bi-play-circle-fill,
.fw-veo-video-poster--has-img span {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

.fw-veo-expire-badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.fw-veo-expire-badge--urgent {
  background-color: rgba(220, 53, 69, 0.92) !important;
  color: #fff !important;
}

.fw-tool-results-empty img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.fw-veo-video-poster .bi-play-circle-fill {
  font-size: clamp(2rem, 8vw, 2.75rem);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.fw-veo-lightbox-player {
  max-height: min(78vh, 720px);
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  background: #000;
}

/* 全站右下角微信客服 */
.fw-wechat-float {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 1040;
}

.fw-wechat-float-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, #07c160, #06ad56);
  color: #fff;
  font-size: 1.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(7, 193, 96, 0.45);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.fw-wechat-float-btn:hover {
  transform: scale(1.06);
}

.fw-wechat-float-panel {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: 200px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(22, 28, 38, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.fw-wechat-float--open .fw-wechat-float-panel {
  display: block;
}

.fw-wechat-float-panel img {
  border-radius: 8px;
  width: 100%;
  height: auto;
}
