/* ── style-pro.css ───────────────────────────────────────────────────────────
   Pro mode: visibility toggle, style cards, genre buttons, settings panel,
   quality badge, share/regen buttons, pro theme vars, ripple animation.
   Loaded by index.html after style.css.
*/

/* ── pro-only 显隐 ── */
.pro-only { display: none !important; }
:root.pro-theme .pro-only { display: revert !important; }
:root.pro-theme .style-group { display: none; }

/* ── pro 平台+类型同行容器 ── */
.style-genre-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.style-genre-divider {
  width: 1px;
  height: 44px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── pro 风格卡片 ── */
.style-cards {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.style-card {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-family: "Noto Sans SC", sans-serif;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
  overflow: hidden;
}

.style-card:hover {
  border-color: var(--accent2);
  color: var(--text);
  box-shadow: 0 0 12px var(--glow);
}

.style-card.active {
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 16px var(--glow);
  background: linear-gradient(135deg, rgba(109,40,217,0.18), rgba(139,92,246,0.1));
}

:root.pro-theme .style-card.active {
  background: linear-gradient(135deg, rgba(109,40,217,0.18), rgba(139,92,246,0.1));
}

/* ── 卡片内元素 ── */
.card-icon { font-size: 1.4rem; flex-shrink: 0; }

.card-name {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.card-sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* hover 时从底部滑入的说明文字 */
.card-desc {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  transform: translateY(100%);
  transition: transform 0.22s ease;
}

.style-card:hover .card-desc { transform: translateY(0); }

/* ── 类型行 ── */
.genre-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.genre-btn {
  padding: 7px 18px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.18s;
}

.genre-btn:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

.genre-btn.active,
:root.pro-theme .genre-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(139, 92, 246, 0.12);
}

/* ── 输出区操作按钮组 ── */
.output-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── 分享图按钮 ── */
#share-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--glow);
  transition: opacity 0.2s, transform 0.15s;
}

#share-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* ── 重新生成按钮 ── */
#regen-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.78rem;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s;
}

#regen-btn:hover:not(:disabled) { border-color: var(--accent2); color: var(--accent2); }
#regen-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── 质量检测标签 ── */
#quality-badge {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 6px;
  letter-spacing: 0.03em;
  align-self: flex-start;
}

#quality-badge.badge-ok {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #34d399;
}

#quality-badge.badge-warn {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fbbf24;
}

/* ── 世界观状态更新面板（右侧滑入对话框） ── */
#wv-update-banner {
  position: fixed;
  right: 24px;
  bottom: 80px;
  max-width: 340px;
  width: calc(100vw - 48px);
  background: var(--surface2, #16162a);
  border: 1px solid var(--accent, #8b5cf6);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 4px 24px rgba(139,92,246,0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
  /* hidden state: off-screen right */
  transform: translateX(calc(100% + 32px));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.22,1,0.36,1), opacity 0.28s ease;
}

#wv-update-banner.wf-visible {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

#wv-update-text {
  font-size: 0.82rem;
  color: var(--text, #e2e2f0);
  line-height: 1.65;
}
.wv-banner-actions { display: flex; gap: 8px; justify-content: flex-end; }
#wv-banner-apply {
  padding: 5px 14px; border-radius: 6px; border: none; cursor: pointer;
  background: var(--accent, #8b5cf6); color: #fff; font-size: 0.8rem;
  transition: opacity 0.15s;
}
#wv-banner-apply:hover { opacity: 0.85; }
#wv-banner-dismiss {
  padding: 5px 10px; border-radius: 6px; cursor: pointer;
  background: transparent; border: 1px solid var(--border, #2e2e42);
  color: var(--muted, #7070a0); font-size: 0.8rem;
  transition: border-color 0.15s;
}
#wv-banner-dismiss:hover { border-color: var(--muted, #7070a0); }

/* ── Chapter summary save banner ── */
#summary-save-banner {
  position: fixed;
  right: 24px;
  bottom: 80px;
  max-width: 340px;
  width: calc(100vw - 48px);
  background: var(--surface2, #16162a);
  border: 1px solid rgba(139,92,246,0.55);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 4px 24px rgba(139,92,246,0.15);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 190;
  transform: translateX(calc(100% + 32px));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.22,1,0.36,1), opacity 0.28s ease;
}
#summary-save-banner.wf-visible {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
#summary-banner-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text, #e2e2f0);
}
#summary-banner-preview {
  font-size: 0.78rem;
  color: var(--muted, #7070a0);
  line-height: 1.55;
  max-height: 80px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}
.summary-banner-actions { display: flex; gap: 8px; justify-content: flex-end; }
#summary-banner-save {
  padding: 5px 14px; border-radius: 6px; border: none; cursor: pointer;
  background: var(--accent, #8b5cf6); color: #fff; font-size: 0.8rem;
  font-family: "Noto Sans SC", sans-serif;
  transition: opacity 0.15s;
}
#summary-banner-save:hover { opacity: 0.85; }
#summary-banner-skip {
  padding: 5px 10px; border-radius: 6px; cursor: pointer;
  background: transparent; border: 1px solid var(--border, #2e2e42);
  color: var(--muted, #7070a0); font-size: 0.8rem;
  font-family: "Noto Sans SC", sans-serif;
  transition: border-color 0.15s;
}
#summary-banner-skip:hover { border-color: var(--muted, #7070a0); }

/* ── WV success toast (bottom-center, clickable) ── */
.wv-success-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #134e26;
  color: #86efac;
  border: 1px solid #166534;
  padding: 11px 28px;
  border-radius: 8px;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 13px;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.wv-success-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ── pro 主题色变量（沿用基础版配色）── */
:root.pro-theme {
  --bg:      #0f0f13;
  --surface: #1a1a24;
  --surface2: #22222f;
  --border:  #2e2e42;
  --accent:  #8b5cf6;
  --accent2: #a78bfa;
  --text:    #e2e2f0;
  --muted:   #7070a0;
  --glow:    rgba(139, 92, 246, 0.35);
}

/* ── 涟漪遮罩（从右上扩散到左下）── */
.pro-ripple {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  clip-path: circle(0% at calc(100% - 60px) 40px);
  transition: clip-path 0.85s cubic-bezier(0.4, 0, 0.2, 1);
}

.pro-ripple.expanding {
  clip-path: circle(200% at calc(100% - 60px) 40px);
}

/* ── 抽屉按钮行（高级参数 + 剧情指导横排）── */
.drawer-toggle-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── pro 高级参数按钮 ── */
.pro-settings-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 7px 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.pro-settings-toggle:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

/* ── 高级参数内容区（max-height 动画）── */
.pro-settings-body {
  flex-direction: column;
  gap: 14px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  padding: 0 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition:
    max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    opacity    0.3s  ease,
    margin-top 0.3s  ease,
    padding    0.3s  ease;
}

.pro-settings-body.open {
  max-height: 500px;
  opacity: 1;
  margin-top: 10px;
  padding: 16px;
}

/* ── 在 pro 模式下显示（非 pro 模式完全隐藏）── */
.pro-drawer-hidden { display: none !important; }
:root.pro-theme .pro-drawer-hidden { display: flex !important; }

.pro-params-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.param-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.param-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.param-name {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.78rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.param-desc {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.7rem;
  color: var(--muted);
  flex: 1;
}

.param-val {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.78rem;
  color: var(--accent2);
  min-width: 38px;
  text-align: right;
}

.param-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.param-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform 0.15s;
}

.param-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

#param-reset-btn {
  align-self: flex-end;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.75rem;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

#param-reset-btn:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}
