/* ========================================
   全能AI 创作站 - PicFactory style
   暗色创作画布 + 图片/视频工厂
   ======================================== */

/* ── Design Tokens ────────────────────────── */
:root {
  --color-bg-primary: #09090b;
  --color-bg-secondary: #18181b;
  --color-bg-tertiary: #27272a;
  --color-bg-card: rgba(39, 39, 42, 0.6);
  --color-bg-hover: rgba(99, 102, 241, 0.08);

  --color-border: rgba(63, 63, 70, 0.5);
  --color-border-hover: rgba(99, 102, 241, 0.4);

  --color-text-primary: #fafafa;
  --color-text-secondary: #a1a1aa;
  --color-text-muted: #71717a;

  --color-brand: #6366f1;
  --color-brand-hover: #818cf8;
  --color-brand-active: #4f46e5;
  --color-brand-glow: rgba(99, 102, 241, 0.3);

  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Segoe UI", Roboto, sans-serif;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px var(--color-brand-glow);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ─────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
}

/* ── Page Layout ──────────────────────────── */
.page { min-height: 100vh; display: flex; flex-direction: column; }

/* ── Hero / Header ────────────────────────── */
.hero {
  padding: 16px var(--space-lg) 0;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.06) 0%, transparent 100%);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  max-width: 1400px;
  margin: 0 auto;
  padding-left: var(--space-lg);
  flex-wrap: wrap;
}

.brand-logo { flex-shrink: 0; }
.brand-logo .logo {
  width: auto; height: 56px;
  opacity: 0.95;
  filter: drop-shadow(0 0 14px var(--color-brand-glow));
  transition: var(--transition-base);
  vertical-align: middle;
}
.brand-logo .logo:hover { transform: scale(1.06); filter: drop-shadow(0 0 22px var(--color-brand-glow)); }

.brand-text { display: flex; flex-direction: column; justify-content: center; gap: 4px; line-height: 1.1; }

.brand-text h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #e0e0ff 50%, var(--color-brand) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.hero-badge {
  display: inline-block;
  font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--color-brand) 0%, #8b5cf6 100%);
  padding: 3px 14px; border-radius: 16px;
  letter-spacing: 0.4px;
  border: 1.5px solid rgba(255,255,255,0.18);
  box-shadow: 0 3px 12px rgba(99,102,241,0.25);
  align-self: flex-start;
}

.top-nav {
  margin-left: auto;
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}

.nav-link {
  padding: 10px 18px;
  font-size: 14px; font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
  border: none; background: none; cursor: pointer; font-family: inherit;
}

.nav-link:hover { color: var(--color-text-primary); background: var(--color-bg-hover); }
.nav-link.active { color: var(--color-brand); background: rgba(99,102,241,0.12); }

.lang-switcher {
  margin-left: 8px;
  padding: 9px 18px;
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.06));
  border: 1.5px solid var(--color-border);
  border-radius: 28px;
  color: var(--color-text-primary);
  font-size: 14px; font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  letter-spacing: 0.5px;
}
.lang-switcher::before { content: "\1F310"; font-size: 15px; }
.lang-switcher:hover {
  background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(139,92,246,0.14));
  border-color: var(--color-brand); color: var(--color-brand); transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99,102,241,0.2);
}

/* ── Workspace ────────────────────────────── */
.workspace {
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-lg) var(--space-xl);
  width: 100%;
}

.page-section { display: none; animation: fadeIn 0.35s ease; }
.page-section.active { display: grid; grid-template-columns: 420px 1fr; gap: var(--space-lg); }
.page-section.static.active { display: block; max-width: 900px; margin: 0 auto; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-left { position: sticky; top: 24px; height: fit-content; max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: thin; }
.panel-left::-webkit-scrollbar { width: 4px; }
.panel-left::-webkit-scrollbar-track { background: transparent; }
.panel-left::-webkit-scrollbar-thumb { background: var(--color-bg-tertiary); border-radius: 2px; }

.panel {
  background: var(--color-bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.panel-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.panel-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.panel-subtitle { font-size: 13px; color: var(--color-text-muted); }

.panel-content { padding: var(--space-lg); }

/* ── Control Sections ─────────────────────── */
.control-section { margin-bottom: var(--space-lg); }
.control-section:last-child { margin-bottom: 0; }

.field-label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--color-text-secondary);
  letter-spacing: 0.3px;
  margin-bottom: var(--space-sm);
}
.field-label .optional { color: var(--color-text-muted); font-weight: 400; margin-left: 4px; }

.field-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-sm); }

/* ── Ratio Selector ───────────────────────── */
.ratio-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-sm);
}

.ratio-btn {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-xs);
  padding: var(--space-sm);
  background: var(--color-bg-tertiary);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
}
.ratio-btn:hover { background: var(--color-bg-hover); border-color: var(--color-border-hover); color: var(--color-text-primary); }
.ratio-btn.active { background: rgba(99,102,241,0.15); border-color: var(--color-brand); color: var(--color-brand); }

.ratio-preview {
  border: 2px solid currentColor;
  border-radius: 3px;
  transition: var(--transition-fast);
}
.ratio-btn.active .ratio-preview { border-color: var(--color-brand); box-shadow: 0 0 8px var(--color-brand-glow); }

.square { width: 22px; height: 22px; }
.wide { width: 26px; height: 20px; }
.portrait { width: 20px; height: 26px; }
.ultrawide { width: 30px; height: 18px; }
.tall { width: 18px; height: 30px; }

/* ── Select / Input ───────────────────────── */
.custom-select {
  width: 100%; padding: 12px 40px 12px 14px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: 14px; font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.custom-select:hover { background-color: rgba(255,255,255,0.06); border-color: var(--color-border-hover); }
.custom-select:focus { outline: none; border-color: var(--color-brand); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.custom-select option { background: #27272a; color: #fafafa; }

input[type="number"], input[type="text"], input[type="password"] {
  width: 100%; padding: 12px 14px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: 14px; font-family: inherit;
  transition: var(--transition-fast);
}
input:focus { outline: none; border-color: var(--color-brand); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }

.checkbox-label { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--color-text-secondary); cursor: pointer; }
.checkbox-label input { width: 18px; height: 18px; accent-color: var(--color-brand); cursor: pointer; }

/* ── Upload Zone ──────────────────────────── */
.upload-zone {
  position: relative; width: 100%; height: 180px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.02);
}
.upload-zone:hover { border-color: var(--color-brand); background: var(--color-bg-hover); }

.upload-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-sm);
  padding: var(--space-lg); pointer-events: none;
}
.upload-icon { width: 40px; height: 40px; color: var(--color-text-muted); transition: var(--transition-fast); }
.upload-zone:hover .upload-icon { color: var(--color-brand); transform: scale(1.05); }
.upload-text { font-size: 14px; color: var(--color-text-secondary); font-weight: 500; }
.upload-hint { font-size: 12px; color: var(--color-text-muted); }

.uploaded-image { width: 100%; height: 100%; object-fit: contain; padding: var(--space-sm); }

.remove-btn {
  position: absolute; top: 8px; right: 8px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(0,0,0,0.7);
  color: #fff; border: none; cursor: pointer;
  transition: var(--transition-fast);
}
.remove-btn:hover { background: var(--color-error); transform: scale(1.1); }
.remove-btn svg { width: 16px; height: 16px; }

.img2img-hint {
  font-size: 12px; color: var(--color-brand);
  background: rgba(99,102,241,0.08);
  border-radius: var(--radius-sm);
  padding: 8px 12px; margin-top: 8px; line-height: 1.5;
}
.img2img-hint strong { font-weight: 700; color: var(--color-brand); }

/* ── Strength Range ───────────────────────── */
.strength-value { font-size: 14px; font-weight: 600; color: var(--color-brand); min-width: 45px; text-align: right; }

.custom-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px;
  background: var(--color-bg-tertiary);
  border-radius: 3px; outline: none; cursor: pointer;
}
.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; background: var(--color-brand);
  border-radius: 50%; cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 2px 8px rgba(99,102,241,0.4);
}
.custom-range::-webkit-slider-thumb:hover { transform: scale(1.15); box-shadow: 0 4px 12px rgba(99,102,241,0.5); }

.range-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--color-text-muted); margin-top: var(--space-xs); }

/* ── Generate Button ──────────────────────── */
.btn-generate {
  display: flex; align-items: center; justify-content: center; gap: var(--space-sm);
  width: 100%; padding: 16px 28px;
  background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-active) 100%);
  color: #fff; border: none; border-radius: var(--radius-md);
  font-size: 17px; font-weight: 700;
  font-family: var(--font-body);
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: 0 4px 20px rgba(99,102,241,0.4);
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.btn-generate:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(99,102,241,0.5); }
.btn-generate:active:not(:disabled) { transform: translateY(0); }
.btn-generate:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-icon { width: 22px; height: 22px; }

/* ── Status ───────────────────────────────── */
.status {
  margin-top: var(--space-sm);
  font-size: 13px; text-align: center;
  padding: var(--space-sm); border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  min-height: 38px;
}
.status[data-type="default"] { color: var(--color-text-muted); }
.status[data-type="loading"] { color: var(--color-brand); }
.status[data-type="success"] { color: var(--color-success); }
.status[data-type="error"] { color: var(--color-error); }

/* ── Prompt Section ───────────────────────── */
.prompt-section textarea {
  width: 100%; min-height: 140px;
  padding: 14px 16px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: 14px; font-family: var(--font-body);
  line-height: 1.6; resize: vertical;
  transition: var(--transition-fast);
}
.prompt-section textarea::placeholder { color: var(--color-text-muted); }
.prompt-section textarea:hover { background: rgba(255,255,255,0.03); }
.prompt-section textarea:focus { outline: none; border-color: var(--color-brand); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); background: rgba(255,255,255,0.04); }

.btn-optimize {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  color: var(--color-text-secondary);
  font-size: 13px; font-weight: 500;
  font-family: inherit; cursor: pointer;
  transition: var(--transition-fast);
}
.btn-optimize:hover { background: rgba(99,102,241,0.12); border-color: var(--color-brand); color: var(--color-brand); }
.btn-optimize svg { width: 14px; height: 14px; }
.btn-optimize:disabled { opacity: 0.5; cursor: not-allowed; }

.quick-prompts { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-md); align-items: center; }
.prompts-label { font-size: 12px; color: var(--color-text-muted); }
.quick-prompt-btn {
  padding: 5px 12px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  color: var(--color-text-secondary);
  font-size: 12px; font-family: inherit;
  cursor: pointer; transition: var(--transition-fast);
}
.quick-prompt-btn:hover { background: rgba(99,102,241,0.12); border-color: var(--color-brand); color: var(--color-brand); }

/* ── Results ──────────────────────────────── */
.results-section { margin-top: var(--space-lg); padding-top: var(--space-lg); border-top: 1px solid var(--color-border); }
.results {
  min-height: 300px; max-height: 560px; overflow-y: auto;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-md);
}
.empty-state { display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); padding: var(--space-xl); text-align: center; }
.empty-icon { width: 64px; height: 64px; color: var(--color-text-muted); opacity: 0.4; }
.empty-text { font-size: 15px; font-weight: 500; color: var(--color-text-secondary); }
.empty-hint { font-size: 13px; color: var(--color-text-muted); }

.result-group { width: 100%; }
.result-prompt {
  font-size: 14px; font-weight: 600; color: var(--color-text-primary);
  margin-bottom: var(--space-md); padding: 12px 16px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-brand);
  line-height: 1.6;
}
.image-grid { display: grid; gap: var(--space-md); width: 100%; }
.image-grid.single { grid-template-columns: 1fr; justify-items: center; }
.image-card { position: relative; border-radius: var(--radius-md); overflow: hidden; background: rgba(255,255,255,0.02); width: 100%; max-width: 100%; display: flex; flex-direction: column; align-items: center; }
.image-card img { width: 100%; max-width: 100%; height: auto; max-height: 480px; display: block; object-fit: contain; margin: 0 auto; }

.download-btn {
  display: block; text-align: center; padding: 12px;
  background: rgba(255,255,255,0.06);
  color: var(--color-text-primary); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: var(--transition-fast);
  border-top: 1px solid var(--color-border); width: 100%;
}
.download-btn:hover { background: var(--color-brand); }

.generating-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; text-align: center; }
.generating-spinner-large { width: 48px; height: 48px; border: 4px solid rgba(99,102,241,0.2); border-top-color: var(--color-brand); border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 20px; }
.generating-text { font-size: 1rem; color: var(--color-text-secondary); line-height: 1.8; margin: 0; }
.generating-elapsed { font-size: 0.85rem; color: var(--color-text-muted); font-weight: 400; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Video Factory Specifics ──────────────── */
.mode-selector {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm);
  padding: var(--space-xs);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-md);
}
.mode-btn {
  padding: 10px;
  background: transparent; border: none; border-radius: var(--radius-sm);
  color: var(--color-text-secondary); font-size: 13px; font-weight: 500;
  font-family: inherit; cursor: pointer; transition: var(--transition-fast);
}
.mode-btn:hover { color: var(--color-text-primary); }
.mode-btn.active { background: var(--color-brand); color: #fff; }

.video-subsection { display: none; }
.video-subsection.active { display: block; }

.video-result video { width: 100%; max-height: 480px; border-radius: var(--radius-md); background: #000; }

/* ── FAQ / About ──────────────────────────── */
.static-content { padding: var(--space-lg); }
.static-content h2 { font-family: var(--font-display); font-size: 24px; margin-bottom: var(--space-md); }
.static-content p { color: var(--color-text-secondary); margin-bottom: var(--space-md); line-height: 1.8; }
.static-content details { margin-bottom: var(--space-md); background: var(--color-bg-tertiary); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.static-content summary { padding: var(--space-md); font-weight: 600; cursor: pointer; color: var(--color-text-primary); }
.static-content details[open] summary { border-bottom: 1px solid var(--color-border); }
.static-content .faq-answer { padding: var(--space-md); color: var(--color-text-secondary); line-height: 1.8; }

/* ── Footer ───────────────────────────────── */
.footer {
  text-align: center; padding: var(--space-xl) var(--space-md);
  border-top: 1px solid var(--color-border); margin-top: auto;
}
.footer-content { max-width: 1400px; margin: 0 auto; }
.footer p { font-size: 13px; color: var(--color-text-muted); }

/* 页脚联系方式 */
.footer-contact {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.contact-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--color-text-secondary); }
.contact-label { color: var(--color-text-muted); }
.contact-value { color: var(--color-brand-hover); font-weight: 600; text-decoration: none; }
a.contact-value:hover { text-decoration: underline; }
.contact-sep { color: var(--color-border); margin: 0 2px; }

/* 关于页联系方式 */
.about-contact { margin-top: var(--space-lg); padding-top: var(--space-lg); border-top: 1px solid var(--color-border); }
.about-contact .contact-title { font-family: var(--font-display); font-size: 18px; color: var(--color-text-primary); margin-bottom: var(--space-md); }
.about-contact .contact-items { display: flex; flex-wrap: wrap; gap: var(--space-md); }
.footer-links { margin-top: var(--space-md); display: flex; justify-content: center; flex-wrap: wrap; gap: var(--space-sm); }
.footer-link { color: var(--color-text-muted); text-decoration: none; font-size: 13px; transition: var(--transition-fast); }
.footer-link:hover { color: var(--color-text-primary); }
.footer-divider { color: var(--color-border); }

/* ===== 首页「最新作品」瀑布流 ===== */
#gallery-section { max-width: 1200px; margin: 32px auto 0; padding: 0 16px; }
#gallery-section .panel { padding: 20px 24px; }
#gallery-page .panel-header { margin-bottom: 18px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.gallery-grid {
  column-count: 5;
  column-gap: 12px;
}
@media (max-width: 1100px) { .gallery-grid { column-count: 4; } }
@media (max-width: 860px)  { .gallery-grid { column-count: 3; } }
@media (max-width: 600px)  { .gallery-grid { column-count: 2; } }

.gallery-item {
  position: relative;
  display: block;
  margin: 0 0 12px;
  break-inside: avoid;
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-bg-card, #13131a);
  border: 1px solid var(--color-border, #2a2a3a);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-item img,
.gallery-item video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: #0a0a0f;
}
.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.18);
}
.gallery-item .gallery-type-badge {
  position: absolute;
  top: 8px; left: 8px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  letter-spacing: 0.5px;
}
.gallery-item .gallery-badge-video { color: #fda4af; }
.gallery-item .gallery-badge-image { color: #93c5fd; }
.gallery-item .gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 10px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gallery-item:hover .gallery-caption { opacity: 1; }
.gallery-empty {
  grid-column: 1 / -1;
  padding: 40px 0;
  text-align: center;
  color: var(--color-text-muted, #8a8a9a);
  font-size: 14px;
}

/* 视频弹窗播放 */
.gallery-video-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.gallery-video-box {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}
.gallery-video-box video {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.gallery-video-close {
  position: absolute;
  top: -14px; right: -14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}
.gallery-video-close:hover { background: rgba(255,255,255,0.28); }


/* ── 买断方案 CTA（简约横排） ─────────────── */
.pricing-cta { max-width: 1400px; margin: 0 auto; padding: var(--space-md) var(--space-lg) 0; }
.pricing-bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-md);
  flex-wrap: wrap;
  background: rgba(99,102,241,0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 13px;
  color: var(--color-text-secondary);
}
.pricing-buy {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg,#f59e0b,#f97316);
  color: #fff; text-decoration: none; font-weight: 600;
  padding: 6px 14px; border-radius: 999px;
  flex: 0 0 auto;
  transition: opacity .15s ease, transform .15s ease;
  box-shadow: 0 2px 10px rgba(245,158,11,0.35);
}
.pricing-buy:hover { opacity: .92; transform: translateY(-1px); }
.pricing-buy-title { font-size: 13px; }
.pricing-buy-price { font-size: 15px; font-weight: 700; letter-spacing: 0; }
.pricing-contacts { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.contact-item { display: inline-flex; align-items: center; gap: 5px; }
.contact-ico { font-size: 13px; opacity: .9; }
.contact-key { color: var(--color-text-muted); font-size: 12px; }
.contact-val { color: var(--color-text-primary); font-weight: 500; }
.contact-val[data-copy] { cursor: pointer; }
.contact-val[data-copy]:hover { color: var(--color-brand); }
a.contact-val { text-decoration: none; }
a.contact-val:hover { color: var(--color-brand); }
.contact-sep { color: var(--color-border); }
@media (max-width: 720px) {
  .pricing-bar { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  .pricing-buy { justify-content: center; }
  .pricing-contacts { justify-content: center; }
}

/* ── Toast ────────────────────────────────── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: rgba(24,24,27,0.98); color: #fff;
  padding: 12px 22px; border-radius: var(--radius-md);
  font-size: 14px; z-index: 9999;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  display: none; animation: toastIn 0.28s ease;
}
.toast.error { background: rgba(239,68,68,0.96); border-color: rgba(239,68,68,0.5); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ── Queue Toast ──────────────────────────── */
.queue-toast {
  position: fixed; bottom: var(--space-xl); left: 50%; transform: translateX(-50%);
  background: var(--color-bg-secondary);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg); min-width: 320px;
  box-shadow: var(--shadow-lg); transition: var(--transition-base); z-index: 1000;
}
.queue-toast.hidden { opacity: 0; transform: translateX(-50%) translateY(20px); pointer-events: none; }
.toast-header { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.toast-icon { width: 18px; height: 18px; color: var(--color-brand); flex-shrink: 0; }
.queue-toast p { font-size: 14px; color: var(--color-text-primary); flex: 1; }
.queue-progress { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.queue-progress-bar { height: 100%; background: linear-gradient(90deg, var(--color-brand), #818cf8); border-radius: 2px; transition: width 0.3s ease; }

/* ── Responsive ───────────────────────────── */
@media (max-width: 1100px) {
  .workspace { padding: var(--space-md) var(--space-md) var(--space-xl); }
  .page-section.active { grid-template-columns: 1fr; }
  .panel-left { position: static; max-height: none; }
  .top-nav { margin-left: 0; margin-top: var(--space-sm); width: 100%; }
}

@media (max-width: 700px) {
  .brand-row { padding-left: 0; justify-content: center; }
  .top-nav { justify-content: center; }
  .lang-switcher { margin-left: auto; margin-right: auto; margin-top: var(--space-sm); }
  .ratio-selector { grid-template-columns: repeat(3, 1fr); }
  .mode-selector { grid-template-columns: 1fr; }
}

/* ── 超限营销卡片 ──────────────────────── */
.limit-card {
  max-width: 520px; margin: 40px auto; text-align: center;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-lg);
}
.limit-icon { font-size: 40px; margin-bottom: 14px; }
.limit-msg { font-size: 15px; line-height: 1.7; color: var(--color-text-primary); margin: 0 0 22px; }
.limit-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.limit-actions .btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: opacity .15s ease, transform .15s ease;
}
.limit-actions .btn-primary { background: linear-gradient(135deg,#f59e0b,#f97316); color: #fff; }
.limit-actions .btn-primary:hover { opacity: .92; transform: translateY(-1px); }
.limit-actions .btn-secondary { background: rgba(255,255,255,0.06); color: var(--color-text-primary); border-color: var(--color-border); }
.limit-actions .btn-secondary:hover { background: rgba(255,255,255,0.12); }

/* ── Scrollbar ────────────────────────────── */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 5px; border: 3px solid var(--color-bg-primary); }
::-webkit-scrollbar-thumb:hover { background: #52525b; }
