/* ============================================================
   珺博智创 · macOS Liquid Glass 深色皮肤
   基于 Apple Liquid Glass / macOS Tahoe 设计语言
   仅增强视觉，不改变任何功能与数据结构
   ============================================================ */
:root, html.dark {
  --lg-accent: #0a84ff;
  --lg-accent-2: #6e5bff;
  --lg-glass: rgba(21, 25, 37, 0.46);
  --lg-glass-strong: rgba(23, 28, 41, 0.64);
  --lg-glass-soft: rgba(255, 255, 255, 0.055);
  --lg-border: rgba(255, 255, 255, 0.12);
  --lg-hi: rgba(255, 255, 255, 0.16);
  --el-color-primary: #0a84ff;
  --el-color-success: #30d158;
  --el-color-warning: #ff9f0a;
  --el-color-danger: #ff453a;
  --el-color-error: #ff453a;
  --el-color-info: #98989d;
}
/* ---------- 动态玻璃背景 ---------- */
html {
  background:
    radial-gradient(1100px 760px at 12% -10%, rgba(64, 100, 255, 0.22), transparent 62%),
    radial-gradient(980px 700px at 104% 4%, rgba(130, 70, 255, 0.16), transparent 62%),
    radial-gradient(1100px 900px at 50% 118%, rgba(0, 170, 255, 0.1), transparent 62%),
    linear-gradient(180deg, #0b1228 0%, #060a17 46%, #03050c 100%) !important;
  background-attachment: fixed;
}
body {
  background: transparent !important;
}
#app {
  position: relative;
  z-index: 1;
  background: transparent !important;
}
/* 流动光斑（Liquid Glass 动态光照） */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
}
body::before {
  width: 680px;
  height: 680px;
  left: -180px;
  top: -160px;
  background: radial-gradient(circle, rgba(74, 108, 255, 0.32), rgba(74, 108, 255, 0) 70%);
  animation: lg-orb-a 22s ease-in-out infinite alternate;
}
body::after {
  width: 820px;
  height: 820px;
  right: -220px;
  bottom: -200px;
  background: radial-gradient(circle, rgba(150, 80, 255, 0.26), rgba(150, 80, 255, 0) 70%);
  animation: lg-orb-b 26s ease-in-out infinite alternate;
}
@keyframes lg-orb-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(120px, 70px) scale(1.15); }
}
@keyframes lg-orb-b {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-90px, -70px) scale(1.12); }
}
/* ---------- 玻璃面板通用 ---------- */
.editor-toolbar,
.shot-list-panel,
.shot-edit-panel,
.shot-preview-panel,
.login-box,
.register-box,
.p-card,
.asset-card,
.stat-card,
.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03)),
    var(--lg-glass) !important;
  border: 1px solid var(--lg-border) !important;
  border-radius: 16px !important;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -10px 20px rgba(0, 0, 0, 0.3),
    0 22px 50px rgba(0, 0, 0, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(20px) saturate(170%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(170%) !important;
}
/* ---------- 工具栏（frameless 顶栏，两栏合一） ---------- */
.editor-toolbar {
  position: relative;
  -webkit-app-region: drag;          /* 整条工具栏可拖动窗口 */
  user-select: none;
}
.editor-toolbar::before {
  content: none !important;           /* 移除 macOS 红黄绿三点 */
}
/* 工具栏内可点击控件不参与拖拽 */
.editor-toolbar button,
.editor-toolbar .el-button,
.editor-toolbar .el-dropdown,
.editor-toolbar .toolbar-left,
.editor-toolbar input,
.editor-toolbar .win-controls,
.editor-toolbar .win-btn {
  -webkit-app-region: no-drag;
}
/* 图三：返回 + 项目名贴到最左（红点删除后左移） */
.toolbar-left {
  margin-left: 0 !important;
  padding-left: 0 !important;
}
/* 图二：功能按钮组整体靠右（窗口按钮已独立为顶部栏，无需让位） */
.toolbar-right {
  margin-right: 0 !important;
  display: flex;
  align-items: center;
  gap: 6px !important;
}
.toolbar-right .el-button,
.toolbar-right .el-dropdown {
  margin-right: 0 !important;
}
/* ---------- 自绘窗口控制按钮（最小化 / 最大化 / 关闭） ----------
   独立成顶部一条玻璃栏（macOS 风格），与项目栏/工具栏彻底分开：
   整条栏可拖动窗口，按钮本身 no-drag，header 与侧边栏下移 32px 让位 */
.win-controls {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 32px;
  z-index: 99999 !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  padding-right: 6px;
  -webkit-app-region: drag !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(10, 13, 22, 0.32);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.win-btn {
  width: 40px;
  height: 26px;
  border: none;
  -webkit-app-region: no-drag !important;
  position: relative;
  z-index: 100000;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.win-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.win-btn.win-close:hover {
  background: #ff453a;
  color: #fff;
}
/* header 独立玻璃：模糊层移到 ::before。原规则中 backdrop-filter 会创建定位基准，
   导致内部 fixed 的窗口按钮相对 header 而非视口定位，无法形成独立顶部栏 */
.layout-container .header {
  position: relative;
  isolation: isolate;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.layout-container .header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 1px solid var(--lg-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03)),
    var(--lg-glass);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -10px 20px rgba(0, 0, 0, 0.3),
    0 22px 50px rgba(0, 0, 0, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  z-index: -1;
}
/* 顶部独立栏让位：header 与侧边栏整体下移 32px，与窗口按钮栏分开 */
.layout-container .header {
  margin-top: 32px !important;
}
.layout-container .el-aside {
  padding-top: 32px !important;
}
/* 宽屏合并模式下工具栏也保持玻璃底 */
@media (min-width: 1100px) {
  .layout-container:has(.shot-editor) .editor-toolbar {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
      rgba(16, 19, 30, 0.5) !important;
    border-bottom: 1px solid var(--lg-border) !important;
    box-shadow: 0 10px 30px rgba(2, 4, 10, 0.35) !important;
    backdrop-filter: blur(18px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
  }
}
/* ---------- 面板内部 ---------- */
.panel-header {
  background: rgba(255, 255, 255, 0.03);
}
.shot-list {
  padding: 9px !important;
}
.shot-item {
  border-radius: 10px !important;
}
.shot-item:hover {
  background: rgba(255, 255, 255, 0.07) !important;
}
.shot-item.active {
  background: linear-gradient(90deg, rgba(10, 132, 255, 0.24), rgba(10, 132, 255, 0.05)) !important;
  border-color: rgba(10, 132, 255, 0.45) !important;
  box-shadow: inset 3px 0 0 var(--lg-accent) !important;
}
.shot-number {
  background: rgba(255, 255, 255, 0.13) !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
}
.shot-thumb {
  border-radius: 10px !important;
  background: rgba(0, 0, 0, 0.28) !important;
}
.step-card,
.element-card,
.match-box,
.staging-box,
.gen-settings {
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.045) !important;
}
.step-fusion {
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.15), rgba(110, 91, 255, 0.05)) !important;
  border-color: rgba(10, 132, 255, 0.42) !important;
}
.match-thumb img,
.chip-img,
.upload-placeholder,
.first-frame img {
  border-radius: 10px !important;
}
.asset-chip,
.asset-card {
  border-radius: 12px !important;
}
/* ---------- 控件 ---------- */
.el-button {
  border-radius: 11px !important;
}
.el-button--primary {
  background: linear-gradient(135deg, #0a84ff, #5b6bff) !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(10, 132, 255, 0.26) !important;
}
.el-button--primary:hover,
.el-button--primary:focus {
  background: linear-gradient(135deg, #1b90ff, #6a79ff) !important;
  box-shadow: 0 3px 10px rgba(10, 132, 255, 0.32) !important;
}
.el-button--success {
  background: linear-gradient(135deg, rgba(48, 209, 88, 0.3), rgba(48, 209, 88, 0.12)) !important;
  border-color: rgba(48, 209, 88, 0.45) !important;
}
.el-button--warning {
  background: linear-gradient(135deg, rgba(255, 159, 10, 0.3), rgba(255, 159, 10, 0.12)) !important;
  border-color: rgba(255, 159, 10, 0.45) !important;
}
.el-button--danger {
  background: linear-gradient(135deg, rgba(255, 69, 58, 0.32), rgba(255, 69, 58, 0.12)) !important;
  border-color: rgba(255, 69, 58, 0.45) !important;
}
.el-button.is-plain:hover {
  background: rgba(255, 255, 255, 0.12) !important;
}
.el-input__wrapper,
.el-select__wrapper,
.el-textarea__inner,
.el-input-number .el-input__wrapper {
  border-radius: 11px !important;
  background: rgba(255, 255, 255, 0.055) !important;
  box-shadow: inset 0 0 0 1px var(--lg-border) !important;
}
.el-input__wrapper.is-focus,
.el-select__wrapper.is-focused,
.el-textarea__inner:focus {
  box-shadow:
    inset 0 0 0 1px var(--lg-accent),
    0 0 0 4px rgba(10, 132, 255, 0.16) !important;
}
/* 阶段切换分段控件 */
.stage-switch .el-radio-group {
  border-radius: 12px !important;
  background: rgba(0, 0, 0, 0.25) !important;
}
.stage-switch .el-radio-button.is-active .el-radio-button__inner {
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.92), rgba(91, 107, 255, 0.85)) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.4) !important;
}
/* Tabs */
.el-tabs__item {
  border-radius: 9px 9px 0 0 !important;
}
.el-tabs__item.is-active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.07);
}
.el-tabs__active-bar {
  height: 3px !important;
  background: linear-gradient(90deg, #0a84ff, #6e5bff) !important;
}
/* 开关 */
.el-switch__core {
  border-radius: 999px !important;
}
.el-switch.is-checked .el-switch__core {
  border-color: transparent !important;
  background: linear-gradient(135deg, #0a84ff, #5b6bff) !important;
}
/* 标签 */
.el-tag {
  border-radius: 9px !important;
  backdrop-filter: blur(8px);
}
.el-tag--success {
  background: rgba(48, 209, 88, 0.16) !important;
  border-color: rgba(48, 209, 88, 0.42) !important;
  color: #7ae29a !important;
}
.el-tag--warning {
  background: rgba(255, 159, 10, 0.16) !important;
  border-color: rgba(255, 159, 10, 0.42) !important;
  color: #ffc05c !important;
}
.el-tag--danger {
  background: rgba(255, 69, 58, 0.16) !important;
  border-color: rgba(255, 69, 58, 0.42) !important;
  color: #ff8179 !important;
}
.el-tag--info {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}
/* 弹窗 / 气泡 / 下拉 */
.el-dialog,
.el-message-box,
.el-popper,
.el-dropdown__popper,
.el-select__popper {
  border-radius: 18px !important;
  background: rgba(28, 32, 45, 0.9) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 30px 90px rgba(0, 0, 0, 0.55) !important;
}
.el-message {
  border: 1px solid var(--lg-border) !important;
  border-radius: 14px !important;
  background: rgba(28, 32, 45, 0.92) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(24px);
}
.el-overlay {
  background: rgba(4, 6, 12, 0.6) !important;
  backdrop-filter: blur(10px);
}
/* ---------- 登录 / 注册页 ---------- */
.login-container,
.register-container {
  background: transparent !important;
}
.login-box,
.register-box {
  border-radius: 24px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    rgba(20, 24, 36, 0.42) !important;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.2),
    inset 0 -12px 24px rgba(0, 0, 0, 0.3),
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 3px 8px rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: blur(26px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(26px) saturate(180%) !important;
}
.login-header h1,
.register-header h1 {
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff, #b9c6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
.login-header p,
.register-header p {
  color: rgba(255, 255, 255, 0.55) !important;
}
/* ---------- 其它页面 ---------- */
.hero-img {
  filter: saturate(1.1) contrast(1.02);
}
.p-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.p-card:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 22px 50px rgba(2, 4, 10, 0.5) !important;
}
/* ---------- 滚动条 / 微调 ---------- */
*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
}
.editor-body {
  gap: 12px !important;
}
.main-content {
  padding: 14px !important;
}
/* ---------- 界面精简：隐藏「直连灵科 / 出片后自动下载」设置行（保持默认开启） ---------- */
.auto-dl-row {
  display: none !important;
}
/* ---------- 视频阶段界面皮肤：与图片阶段完全统一 ---------- */
/* 视频参数区 = 图片阶段同款玻璃面板 */
.edit-content > .gen-settings,
.edit-content > div > .gen-settings {
  border-radius: 14px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.045) !important;
  border: 1px solid var(--lg-border) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  margin-bottom: 12px;
}
/* 视频「首帧与参考图」卡片 = 图片阶段「融合图」同款蓝色渐变 */
.edit-content .match-box {
  background:
    linear-gradient(180deg, rgba(10, 132, 255, 0.13), rgba(110, 91, 255, 0.04)),
    rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(10, 132, 255, 0.4) !important;
  border-radius: 14px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  margin-bottom: 14px;
}
.edit-content .match-title {
  color: #7fb4ff !important;
}
/* 视频提示词区（textarea 容器）玻璃统一 */
.edit-content .el-form-item__label {
  color: rgba(255, 255, 255, 0.78) !important;
  font-weight: 600;
}
/* 多图参考提示：玻璃化，贴近整体皮肤 */
.model-feed-hint {
  background: rgba(10, 132, 255, 0.1) !important;
  border: 1px solid rgba(10, 132, 255, 0.32) !important;
  color: #b9d3ff !important;
  border-radius: 9px !important;
}
/* 视频提示词编辑区与图片阶段同宽同风格 */
.edit-content .el-textarea__inner {
  background: rgba(255, 255, 255, 0.055) !important;
  color: rgba(255, 255, 255, 0.88) !important;
}
/* ---------- 品牌 LOGO：侧边栏图标换成「珺博智创」LOGO ---------- */
.sidebar .logo {
  position: relative;
  gap: 10px;
}
.sidebar .logo .el-icon {
  display: none !important;
}
.sidebar .logo::before {
  content: "";
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  background: url(/assets/junbo-logo.png) center / cover no-repeat;
  border-radius: 7px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
/* ---------- frameless：登录/注册页浮动窗口按钮 + 拖拽 ----------
   与主界面一致：独立成顶部一条玻璃栏 */
.win-controls-abs {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 32px;
  z-index: 9999 !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  padding-right: 6px;
  -webkit-app-region: drag !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(10, 13, 22, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.win-controls-abs .win-btn {
  height: 26px;
}
/* ShotEditor 页：工具栏内不再放窗口按钮（统一用顶部独立栏），隐藏避免重复 */
.layout-container:has(.editor-toolbar) .editor-toolbar .win-controls {
  display: none !important;
}
.login-container,
.register-container {
  -webkit-app-region: drag;
}
.login-container input,
.login-container button,
.login-container .el-input__wrapper,
.login-container .el-button,
.login-container .el-checkbox,
.login-container .el-link,
.register-container input,
.register-container button,
.register-container .el-input__wrapper,
.register-container .el-button,
.register-container .el-checkbox,
.register-container .el-link {
  -webkit-app-region: no-drag;
}
/* ShotEditor 页：编辑态把 header 压成 0 高（用户信息区一并隐藏），
   但保留 fixed 顶部栏窗口按钮（win-controls 在 header 内，display:none 会连带隐藏）；
   工具栏下移 32px 让位顶部独立栏，独占一行 */
.layout-container:has(.shot-editor) .header {
  margin-top: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible !important;
}
.layout-container:has(.shot-editor) .header::before {
  display: none !important;
}
.layout-container:has(.shot-editor) .header-right {
  height: 0 !important;
  overflow: visible !important;
}
/* 隐藏用户信息标签（管理员/资料已连接/admin 头像），fixed 顶部栏按钮保留 */
.layout-container:has(.shot-editor) .header-right .balance-tag,
.layout-container:has(.shot-editor) .header-right .el-tag,
.layout-container:has(.shot-editor) .header-right .user-info,
.layout-container:has(.shot-editor) .header-right .el-avatar,
.layout-container:has(.shot-editor) .header-right .username {
  display: none !important;
}
.layout-container:has(.shot-editor) .header .page-title {
  display: none !important;
}
.layout-container:has(.shot-editor) .main-content {
  padding-top: 0 !important;
}
.layout-container:has(.shot-editor) .editor-toolbar {
  margin-top: 32px !important;
}
/* ShotEditor 页：编辑主体（分镜列表/编辑区/预览区）紧贴工具栏下方 */
.layout-container:has(.shot-editor) .editor-body {
  margin-top: 8px !important;
}
/* 窗口按钮已独立为顶部栏：header 右侧元素不再让位 */
.header .header-right {
  padding-right: 0 !important;
}
/* ============================================================
   修复：窗口按钮字符与热区错位
   问题：— □ × 字符被 Vue 渲染为按钮的兄弟文本节点（在按钮右侧），
   用户点击字符落在按钮热区外，需点字符左侧按钮区域才触发。
   方案：隐藏容器内字符文本，改用按钮 ::after 居中显示，
   使字符视觉位置 == 按钮热区中心，点击字符即命中按钮。
   ============================================================ */
.win-controls,
.win-controls-abs {
  font-size: 0 !important;
}
.win-controls .win-btn,
.win-controls-abs .win-btn {
  font-size: 0 !important;
}
.win-controls .win-btn::after,
.win-controls-abs .win-btn::after {
  font-size: 13px !important;
  content: "—";
}
.win-controls .win-btn:nth-of-type(2)::after,
.win-controls-abs .win-btn:nth-of-type(2)::after {
  content: "□";
}
.win-controls .win-btn.win-close::after,
.win-controls-abs .win-btn.win-close::after {
  content: "×";
}
.studio-steps .el-step:nth-child(n+5){display:none!important}.studio-steps .el-step:nth-child(-n+4){flex-basis:25%!important}
.studio-steps{display:none!important}
