/* iptalk 主题：经典 / 专业 / 导演 */

:root,
[data-theme="classic"] {
  --ipt-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  --ipt-bg: #f0f4f8;
  --ipt-bg-image: none;
  --ipt-text: #333;
  --ipt-text-muted: #475569;
  --ipt-page-pad: 12px;

  --ipt-header-bg: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  --ipt-header-shadow: none;
  --ipt-header-radius: 12px;
  --ipt-header-title-size: 20px;

  --ipt-card-bg: #fff;
  --ipt-card-border: 1px solid #e2e8f0;
  --ipt-card-radius: 14px;
  --ipt-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  --ipt-card-pad: 8px 16px 4px 16px;

  --ipt-card-title-bg: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  --ipt-card-title-color: #1e3a5f;
  --ipt-card-title-border: 2px solid #2563eb;
  --ipt-card-title-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);

  --ipt-primary: #2563eb;
  --ipt-primary-dark: #1d4ed8;
  --ipt-primary-light: #3b82f6;
  --ipt-primary-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  --ipt-primary-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
  --ipt-focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.12);

  --ipt-input-bg: #fff;
  --ipt-input-border: #e2e8f0;
  --ipt-input-text: #333;
  --ipt-input-radius: 10px;
  --ipt-grid-gap: 8px;

  --ipt-progress-done: #86efac;
  --ipt-progress-current: #fde047;
  --ipt-progress-current-glow: 0 0 0 2px rgba(253, 224, 71, 0.35);

  --ipt-header-btn-bg: rgba(255, 255, 255, 0.08);
  --ipt-header-btn-border: rgba(255, 255, 255, 0.35);
}

/* 专业：浅色商务 + 三栏创作台 */
[data-theme="pro"] {
  --ipt-font: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  --ipt-bg: #e9edf3;
  --ipt-bg-image: radial-gradient(ellipse 120% 80% at 10% -20%, rgba(37, 99, 235, 0.08), transparent 50%),
    radial-gradient(ellipse 90% 60% at 100% 0%, rgba(15, 23, 42, 0.06), transparent 45%),
    linear-gradient(180deg, #eef2f7 0%, #e4e9f0 100%);
  --ipt-text: #1a2332;
  --ipt-text-muted: #4b5563;
  --ipt-page-pad: 16px;

  --ipt-header-bg: linear-gradient(125deg, #0f172a 0%, #1e293b 38%, #1e3a5f 72%, #1d4ed8 100%);
  --ipt-header-shadow: 0 12px 40px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  --ipt-header-radius: 16px;
  --ipt-header-title-size: 21px;

  --ipt-card-bg: rgba(255, 255, 255, 0.92);
  --ipt-card-border: 1px solid rgba(255, 255, 255, 0.85);
  --ipt-card-radius: 16px;
  --ipt-card-shadow: 0 4px 6px rgba(15, 23, 42, 0.04), 0 16px 40px rgba(15, 23, 42, 0.08);
  --ipt-card-pad: 10px 18px 8px 18px;

  --ipt-card-title-bg: linear-gradient(135deg, rgba(30, 58, 95, 0.06) 0%, rgba(37, 99, 235, 0.1) 100%);
  --ipt-card-title-color: #0f172a;
  --ipt-card-title-border: none;
  --ipt-card-title-shadow: none;

  --ipt-primary: #1d4ed8;
  --ipt-primary-dark: #1e40af;
  --ipt-primary-light: #2563eb;
  --ipt-primary-gradient: linear-gradient(135deg, #1e3a5f 0%, #2563eb 55%, #3b82f6 100%);
  --ipt-primary-shadow: 0 4px 14px rgba(29, 78, 216, 0.35);
  --ipt-focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.18);

  --ipt-input-bg: #fff;
  --ipt-input-border: #d1d9e6;
  --ipt-input-text: #1a2332;
  --ipt-input-radius: 12px;
  --ipt-grid-gap: 12px;

  --ipt-progress-done: #34d399;
  --ipt-progress-current: #fbbf24;
  --ipt-progress-current-glow: 0 0 0 2px rgba(251, 191, 36, 0.4), 0 0 12px rgba(251, 191, 36, 0.25);

  --ipt-header-btn-bg: rgba(255, 255, 255, 0.1);
  --ipt-header-btn-border: rgba(255, 255, 255, 0.22);
}

/* 导演：暗色影院 + 侧栏导航 + 单列流式 */
[data-theme="director"] {
  --ipt-font: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  --ipt-bg: #0c0f14;
  --ipt-bg-image: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(245, 158, 11, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(37, 99, 235, 0.08), transparent 50%);
  --ipt-text: #e8edf5;
  --ipt-text-muted: #94a3b8;
  --ipt-page-pad: 16px;

  --ipt-header-bg: linear-gradient(180deg, #141820 0%, #0f1218 100%);
  --ipt-header-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  --ipt-header-radius: 14px;
  --ipt-header-title-size: 20px;

  --ipt-card-bg: #161b26;
  --ipt-card-border: 1px solid rgba(255, 255, 255, 0.08);
  --ipt-card-radius: 14px;
  --ipt-card-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --ipt-card-pad: 16px 20px 14px 20px;

  --ipt-card-title-bg: transparent;
  --ipt-card-title-color: #f1f5f9;
  --ipt-card-title-border: none;
  --ipt-card-title-shadow: none;

  --ipt-primary: #f59e0b;
  --ipt-primary-dark: #d97706;
  --ipt-primary-light: #fbbf24;
  --ipt-primary-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
  --ipt-primary-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
  --ipt-focus-ring: 0 0 0 3px rgba(245, 158, 11, 0.25);

  --ipt-input-bg: #0f131c;
  --ipt-input-border: rgba(255, 255, 255, 0.12);
  --ipt-input-text: #e2e8f0;
  --ipt-input-radius: 10px;
  --ipt-grid-gap: 24px;

  --ipt-progress-done: #34d399;
  --ipt-progress-current: #fbbf24;
  --ipt-progress-current-glow: 0 0 0 2px rgba(251, 191, 36, 0.45), 0 0 14px rgba(251, 191, 36, 0.3);

  --ipt-header-btn-bg: rgba(255, 255, 255, 0.06);
  --ipt-header-btn-border: rgba(255, 255, 255, 0.14);
}

[data-theme="pro"] .page { animation: iptPageIn 0.45s ease; }
@keyframes iptPageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

[data-theme="pro"] .header {
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
[data-theme="pro"] .header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
  pointer-events: none;
}
[data-theme="pro"] .header-top,
[data-theme="pro"] .workflow-progress { position: relative; z-index: 1; }
[data-theme="pro"] .header h1 { letter-spacing: 0.04em; font-weight: 700; }
[data-theme="pro"] .card {
  backdrop-filter: blur(8px);
  transition: box-shadow 0.25s ease;
}
[data-theme="pro"] .card:hover {
  box-shadow: 0 8px 12px rgba(15, 23, 42, 0.06), 0 24px 48px rgba(15, 23, 42, 0.1);
}
[data-theme="pro"] .card-title {
  border-left: 3px solid var(--ipt-primary);
  border-bottom: none;
  padding-left: 14px;
  font-weight: 700;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
[data-theme="pro"] .card-title .card-step-num {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
[data-theme="pro"] .btn-primary { letter-spacing: 0.02em; font-weight: 600; }
[data-theme="pro"] .modal-box {
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

/* 导演：暗色表单与组件 */
[data-theme="director"] input[type="text"],
[data-theme="director"] input[type="number"],
[data-theme="director"] select,
[data-theme="director"] textarea {
  background: var(--ipt-input-bg);
  border-color: var(--ipt-input-border);
  color: var(--ipt-input-text);
}
[data-theme="director"] input[type="file"] {
  background: var(--ipt-input-bg);
  border-color: var(--ipt-input-border);
  color: var(--ipt-text-muted);
}
[data-theme="director"] .media-box {
  background: #0f131c;
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="director"] .card-title {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
[data-theme="director"] .card-title .card-step-num {
  background: var(--ipt-primary-gradient);
  color: #1a1206;
  box-shadow: var(--ipt-primary-shadow);
}
[data-theme="director"] .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
[data-theme="director"] .btn-upload {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}
[data-theme="director"] .header-tagline {
  display: block;
  color: rgba(251, 191, 36, 0.75);
  letter-spacing: 0.12em;
  font-size: 11px;
  text-transform: uppercase;
}
[data-theme="director"] .workflow-progress { display: none; }
[data-theme="director"] .modal-box {
  background: #1a1f2e;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 720px) {
  .theme-switcher { order: 10; width: 100%; justify-content: center; margin-top: 4px; }
  .header-meta { gap: 8px 10px; }
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.15);
  gap: 2px;
  flex-wrap: wrap;
  max-width: 100%;
}
[data-theme="pro"] .theme-switcher,
[data-theme="director"] .theme-switcher {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}
.theme-switch-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-family: inherit;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.theme-switch-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.theme-switch-btn.active {
  background: rgba(255, 255, 255, 0.95);
  color: #1e3a5f;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
[data-theme="pro"] .theme-switch-btn.active {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #0f172a;
}
[data-theme="director"] .theme-switch-btn.active {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1a1206;
}
