/* AI 提示词库 · 磨砂玻璃工作台视觉层（仅 UI，不改结构） */

/* ── 背景装饰 ── */
body[data-theme="light"]::before,
body[data-theme="light"]::after{
  content:"";
  position:fixed;
  pointer-events:none;
  z-index:0;
  border-radius:50%;
}
body[data-theme="light"]::before{
  width:520px;height:520px;left:-120px;top:18%;
  background:radial-gradient(circle,rgba(99,102,241,0.10),transparent 68%);
}
body[data-theme="light"]::after{
  width:440px;height:440px;right:-80px;bottom:8%;
  background:radial-gradient(circle,rgba(56,189,248,0.08),transparent 70%);
}
.app-shell,.mode-stage,.workspace{position:relative;z-index:1}
.topbar{position:relative;z-index:100}

/* ── 磨砂玻璃面板 ── */
body[data-theme="light"] .card,
body[data-theme="light"] .topbar{
  background:linear-gradient(180deg,rgba(255,255,255,0.88),rgba(255,255,255,0.62));
  border:1px solid rgba(121,142,180,0.20);
  box-shadow:var(--shadow);
  backdrop-filter:blur(22px);
  -webkit-backdrop-filter:blur(22px);
}
body[data-theme="light"] .card::before,
body[data-theme="light"] .topbar::before{
  content:"";
  position:absolute;inset:0;
  border-radius:inherit;
  background:linear-gradient(135deg,rgba(255,255,255,0.55),transparent 38%);
  pointer-events:none;
  z-index:0;
}
body[data-theme="light"] .card > *,
body[data-theme="light"] .topbar > *{position:relative;z-index:1}

body[data-theme="light"] .topbar{
  border-radius:var(--radius-lg);
  padding:14px 20px;
  margin-bottom:22px;
  border:1px solid rgba(121,142,180,0.18);
  box-shadow:var(--shadow-soft);
}

/* ── 模式切换胶囊 ── */
body[data-theme="light"] .mode-switch-wrap{
  --seg-pad:4px;
  --seg-inner-r:var(--radius-pill);
  border:1px solid rgba(121,142,180,0.22);
  border-radius:var(--radius-pill);
  padding:var(--seg-pad);
  background:rgba(255,255,255,0.55);
  backdrop-filter:blur(16px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.75),0 8px 24px rgba(99,102,241,0.08);
}
body[data-theme="light"] .mode-seg-indicator{
  top:var(--seg-pad);
  left:var(--seg-pad);
  width:calc((100% - var(--seg-pad) - var(--seg-pad) - var(--seg-gap))/2);
  height:var(--seg-h);
  border-radius:var(--seg-inner-r);
  background:linear-gradient(135deg,var(--primary),var(--primary-2) 52%,var(--primary-3));
  box-shadow:0 8px 22px rgba(99,102,241,0.32),inset 0 1px 0 rgba(255,255,255,0.25);
}
body[data-theme="light"] .mode-seg{color:var(--muted)}
body[data-theme="light"] .mode-seg.active{color:#fff;text-shadow:0 1px 2px rgba(15,23,42,0.12)}

/* ── 左侧内容类型 ── */
body[data-theme="light"] .type-panel.card,
body[data-theme="light"] .sorter-panel.card{
  border-radius:var(--radius-xl);
}
body[data-theme="light"] .content-tab.active::after{
  content:"✓";
  position:absolute;right:14px;top:50%;transform:translateY(-50%);
  width:22px;height:22px;border-radius:50%;
  display:grid;place-items:center;
  font-size:11px;font-weight:800;color:#fff;
  background:linear-gradient(135deg,var(--primary),var(--primary-3));
  box-shadow:0 4px 12px rgba(99,102,241,0.28);
}
body[data-theme="light"] .content-tab.active{
  padding-right:44px;
  border-left:3px solid var(--primary);
}

/* ── 模块排序 ── */
body[data-theme="light"] .sort-item.active,
body[data-theme="light"] .sort-item.active:hover{
  border-color:var(--border-strong)!important;
  background:linear-gradient(90deg,rgba(37,99,235,0.10),rgba(255,255,255,0.72))!important;
  box-shadow:var(--shadow-soft)!important;
  border-left:3px solid var(--primary);
  padding-left:7px;
}

/* ── 中间构建区 ── */
.builder-card{
  min-height:720px;
  border-radius:var(--radius-xl);
}
.builder-list{padding:16px 20px 12px}
.module-card{
  border:1px solid rgba(121,142,180,0.18);
  border-radius:var(--radius-md);
  background:rgba(255,255,255,0.55);
  backdrop-filter:blur(10px);
}
.module-card:hover{
  border-color:var(--border-strong);
  transform:translateY(-2px);
  box-shadow:var(--shadow-soft);
}
.module-card.open{
  border-color:rgba(37,99,235,0.28);
  box-shadow:0 12px 32px rgba(37,99,235,0.08);
}
.module-body{
  background:rgba(248,250,255,0.72);
  border-top:1px solid rgba(121,142,180,0.14);
}
.module-card.open .module-summary{
  border-bottom:1px solid rgba(121,142,180,0.10);
}
.icon-box{
  background:linear-gradient(135deg,rgba(37,99,235,0.08),rgba(99,102,241,0.04));
  border:1px solid rgba(121,142,180,0.12);
}
.hint-line{
  text-align:center;color:var(--muted-light);font-size:12px;
  padding:14px 20px 20px;
  border-top:1px solid rgba(121,142,180,0.12);
  margin-top:4px;
}

/* ── 表单 ── */
.field label{color:var(--text-soft);font-weight:750}
.field select,.desc-input,.module-custom-input{
  color:var(--text);
}
.field select::placeholder,.desc-input::placeholder{color:var(--muted-light)}
.commerce-present-row{
  background:rgba(255,255,255,0.62);
  border:1px solid rgba(121,142,180,0.16);
  border-radius:var(--radius-md);
}
.commerce-present-row input[type=checkbox]{
  accent-color:var(--primary-2);
  width:15px;height:15px;
}
.mode-philosophy-banner{
  border-left:3px solid var(--primary-2);
  padding:10px 14px;margin:0 20px 8px;
  border-radius:0 var(--radius-md) var(--radius-md) 0;
  background:linear-gradient(90deg,rgba(99,102,241,0.08),transparent);
}

/* ── 右侧输出区（核心） ── */
.right-col{gap:18px}
.output-card{
  padding-bottom:18px;
  border-radius:var(--radius-xl);
  border-color:rgba(37,99,235,0.18);
  box-shadow:0 24px 80px rgba(37,99,235,0.10),var(--shadow);
}
.output-head{padding-bottom:14px}
.output-head h2{font-size:18px;letter-spacing:-.01em}
.bolt{
  display:inline-grid;place-items:center;
  width:26px;height:26px;margin-right:4px;
  border-radius:8px;
  background:linear-gradient(135deg,rgba(37,99,235,0.14),rgba(139,92,246,0.10));
  color:var(--primary);
  font-weight:900;
}
.counter{
  font-size:13px;color:var(--muted);
  padding:6px 12px;border-radius:var(--radius-pill);
  background:rgba(255,255,255,0.55);
  border:1px solid rgba(121,142,180,0.16);
}
.textarea-wrap::after{
  content:"";
  position:absolute;right:8px;bottom:36px;
  width:100px;height:72px;pointer-events:none;
  background:radial-gradient(circle at 100% 100%,rgba(56,189,248,0.12),transparent 70%);
  border-radius:0 0 20px 0;
}
.textarea-wrap textarea::placeholder{color:var(--muted-light)}
.textarea-wrap textarea{
  border-color:rgba(37,99,235,0.22);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.85),0 8px 28px rgba(37,99,235,0.06);
}
.prompt-sub-mode-chips{margin-top:10px}
.prompt-sub-chip.active{
  background:linear-gradient(135deg,rgba(37,99,235,0.12),rgba(99,102,241,0.08));
  border-color:var(--border-strong);
  color:var(--primary);
}

/* ── 输出区按钮 ── */
.output-card .output-toolbar .primary-btn{
  flex:1.2 1 calc(18% - 6px);
  font-weight:800;
}
.output-card .output-toolbar .secondary-btn,
.output-card .output-toolbar .danger-btn{
  background:rgba(255,255,255,0.78);
  backdrop-filter:blur(8px);
}
.output-card .output-toolbar .danger-btn{
  color:#dc2626;
  border-color:rgba(239,68,68,0.32);
}
.output-card .output-quick-row button{
  background:rgba(255,255,255,0.72);
  border-color:rgba(121,142,180,0.18);
  font-weight:700;
}
.output-card .output-quick-row button:nth-child(6n+1){
  border-color:rgba(37,99,235,0.22);background:rgba(37,99,235,0.06);color:#1d4ed8;
}
.output-card .output-quick-row button:nth-child(6n+2){
  border-color:rgba(99,102,241,0.22);background:rgba(99,102,241,0.06);color:#4338ca;
}
.output-card .output-quick-row button:nth-child(6n+3){
  border-color:rgba(236,72,153,0.22);background:rgba(236,72,153,0.06);color:#be185d;
}
.output-card .output-quick-row button:nth-child(6n+4){
  border-color:rgba(245,158,11,0.24);background:rgba(245,158,11,0.07);color:#b45309;
}
.output-card .output-quick-row button:nth-child(6n+5){
  border-color:rgba(56,189,248,0.22);background:rgba(56,189,248,0.06);color:#0369a1;
}
.output-card .output-quick-row button:nth-child(6n){
  border-color:rgba(107,114,128,0.20);background:rgba(107,114,128,0.05);color:var(--text-soft);
}
.output-card .output-quick-row button.quick-highlight{
  border-color:rgba(37,99,235,0.30);
  background:linear-gradient(135deg,rgba(37,99,235,0.10),rgba(99,102,241,0.06));
  color:var(--primary);
  font-weight:800;
}

/* ── 底部工具卡片（弱化） ── */
.lower-grid{gap:16px}
.tools-card,.api-card{
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-soft);
  opacity:0.98;
}
.tools-card h2,.api-card h2{font-size:15px}
.tools-card p,.api-card p{font-size:12px;color:var(--muted-light)}
.tool-tile{
  background:rgba(255,255,255,0.55);
  border-radius:var(--radius-md);
}
.api-line{
  background:rgba(255,255,255,0.62);
  border-color:rgba(121,142,180,0.18);
  border-radius:var(--radius-md);
}

/* ── 文字库模式同步 ── */
body[data-theme="light"] .short-sidebar.card,
body[data-theme="light"] .short-aside.card,
body[data-theme="light"] .short-hero.card,
body[data-theme="light"] .short-section.card,
body[data-theme="light"] .short-modal-panel.card{
  background:linear-gradient(180deg,rgba(255,255,255,0.88),rgba(255,255,255,0.62));
  border:1px solid rgba(121,142,180,0.20);
  backdrop-filter:blur(22px);
  border-radius:var(--radius-xl);
}

/* ── 弹层 / 下拉 ── */
body[data-theme="light"] .director-menu,
body[data-theme="light"] .help-modal-panel,
body[data-theme="light"] .template-modal-panel{
  background:linear-gradient(180deg,rgba(255,255,255,0.94),rgba(255,255,255,0.82));
  backdrop-filter:blur(24px);
  border:1px solid rgba(121,142,180,0.22);
  border-radius:var(--radius-lg);
}

/* ── 全局 hover 动效 ── */
body[data-theme="light"] button:not(:disabled):hover{
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease,filter .18s ease;
}
body[data-theme="light"] .card:hover{
  border-color:rgba(121,142,180,0.28);
}

/* ── 深色模式保留可用性 ── */
body[data-theme="dark"] .logo img{display:block}
body[data-theme="dark"] .logo::after{display:none}
body[data-theme="dark"] .logo{background:transparent;box-shadow:0 8px 18px rgba(0,0,0,0.24)}
body[data-theme="dark"]::before,
body[data-theme="dark"]::after{display:none}

/* ── 响应式 ── */
@media (max-width:1200px){
  .output-card{max-width:none}
  body[data-app-mode="director"] .director-side-stick-right .textarea-wrap textarea{
    height:260px;min-height:200px;
  }
}
@media (max-width:900px){
  body[data-theme="light"] .topbar{border-radius:var(--radius-md)}
  .type-panel.card,.sorter-panel.card,.builder-card,.output-card{
    border-radius:var(--radius-lg);
  }
  .content-tab.active::after{right:10px}
}
