/* ============================================================
   AI 创作工坊 —— DeepSeek 风格视觉主题
   深空蓝底 + 蓝紫极光 + 玻璃拟态 + 渐变描边 + 微动效
   ============================================================ */
:root {
  --bg: #070b16;
  --bg-2: rgba(255, 255, 255, 0.04);
  --panel: rgba(255, 255, 255, 0.045);
  --panel-solid: #0e1424;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef2ff;
  --text-dim: #8b94b0;
  --primary: #4d6bfe;
  --primary-2: #7c96ff;
  --cyan: #3fd2ff;
  --violet: #9a6bff;
  --accent: #3fd2ff;
  --success: #34d399;
  --danger: #ff6b7a;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(2, 6, 20, 0.55);
  --glow-primary: 0 6px 24px rgba(77, 107, 254, 0.45);
  --grad-brand: linear-gradient(120deg, #4d6bfe 0%, #7c6bff 45%, #3fd2ff 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

::selection { background: rgba(77, 107, 254, 0.4); }

/* ===== 极光背景舞台 ===== */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(77, 107, 254, 0.16), transparent 60%),
    radial-gradient(900px 600px at 10% 110%, rgba(154, 107, 255, 0.14), transparent 60%),
    var(--bg);
}
.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.aurora-1 {
  width: 560px; height: 560px;
  top: -180px; left: -120px;
  background: radial-gradient(circle, rgba(77, 107, 254, 0.55), transparent 65%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.aurora-2 {
  width: 480px; height: 480px;
  top: 20%; right: -160px;
  background: radial-gradient(circle, rgba(154, 107, 255, 0.5), transparent 65%);
  animation: drift2 32s ease-in-out infinite alternate;
}
.aurora-3 {
  width: 520px; height: 520px;
  bottom: -220px; left: 30%;
  background: radial-gradient(circle, rgba(63, 210, 255, 0.38), transparent 65%);
  animation: drift3 38s ease-in-out infinite alternate;
}
@keyframes drift1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(120px, 90px) scale(1.15); }
}
@keyframes drift2 {
  from { transform: translate(0, 0) scale(1.1); }
  to   { transform: translate(-140px, 110px) scale(0.95); }
}
@keyframes drift3 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-90px, -120px) scale(1.2); }
}
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}
.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  .aurora { animation: none; }
}

/* ===== 鼠标跟随光效 ===== */
#fluidBg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  filter: blur(26px) saturate(1.25); /* gooey 液态玻璃融合 */
}
.topbar, .container, .footer { position: relative; z-index: 1; }
.topbar { z-index: 50; }

/* 面板/卡片内光斑跟随鼠标（JS 写入 --mx/--my） */
.panel, .result-card, .status, .tabs, .engine-bar { overflow: hidden; }
.panel::after, .result-card::after, .status::after, .tabs::after, .engine-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, -20%), rgba(124, 150, 255, 0.13), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.panel:hover::after, .result-card:hover::after, .status:hover::after,
.tabs:hover::after, .engine-bar:hover::after { opacity: 1; }
.panel, .tabs, .engine-bar, .status { position: relative; }

/* ===== 顶栏 ===== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 11, 22, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  position: sticky;
  top: 0;
  z-index: 50;
}

.logo { display: flex; align-items: center; gap: 14px; }
.logo-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--glow-primary);
  position: relative;
}
.logo-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(255,255,255,0.35), transparent 45%);
  pointer-events: none;
}
.logo-icon svg { width: 22px; height: 22px; }
.logo h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.2px;
  background: linear-gradient(100deg, #fff 20%, #a8b8ff 60%, #3fd2ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subtitle { font-size: 12.5px; color: var(--text-dim); margin-top: 1px; letter-spacing: 0.5px; }

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 13px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.25s;
}
.back-home svg { width: 15px; height: 15px; }
.back-home:hover {
  color: var(--text);
  border-color: rgba(124, 150, 255, 0.6);
  background: rgba(77, 107, 254, 0.12);
  box-shadow: 0 0 18px rgba(77, 107, 254, 0.25);
}

/* ===== 主容器 ===== */
.container { max-width: 1000px; margin: 0 auto; padding: 34px 24px 90px; }

/* ===== 标签页 ===== */
.tabs {
  display: flex;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  margin-bottom: 22px;
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--shadow);
}
.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 600;
  border-radius: 13px;
  cursor: pointer;
  transition: all 0.25s;
}
.tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.tab.active {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--glow-primary);
}
.tab-icon { width: 18px; height: 18px; }

/* ===== 引擎选择 ===== */
.engine-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding: 10px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.4);
}
.engine-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
  letter-spacing: 0.5px;
}
.engine-options {
  display: inline-flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 4px;
}
.engine-opt {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s;
}
.engine-opt:hover { color: var(--text); }
.engine-opt.active {
  background: linear-gradient(120deg, rgba(77, 107, 254, 0.9), rgba(124, 107, 255, 0.9));
  color: #fff;
  box-shadow: 0 3px 14px rgba(77, 107, 254, 0.4);
}
.engine-hint {
  font-size: 12.5px;
  color: var(--text-dim);
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 面板 ===== */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.4);
  position: relative;
}
/* 顶部渐变描边光带 */
.panel::before {
  content: "";
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 150, 255, 0.55), rgba(63, 210, 255, 0.45), transparent);
  pointer-events: none;
}
.mode-pane { display: none; }
.mode-pane.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin: 18px 0 8px;
  letter-spacing: 0.3px;
}

.input {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  font-family: inherit;
}
.input:hover { border-color: var(--border-strong); }
.input:focus {
  border-color: var(--primary-2);
  background: rgba(0, 0, 0, 0.32);
  box-shadow: 0 0 0 3px rgba(77, 107, 254, 0.18), 0 0 24px rgba(77, 107, 254, 0.12);
}
.prompt-input { resize: vertical; line-height: 1.6; min-height: 90px; }
select.input { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238b94b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
select.input option { background: var(--panel-solid); color: var(--text); }

.row { display: flex; gap: 14px; margin-top: 18px; }
.field { display: flex; flex-direction: column; }
.field.grow { flex: 1; }
.field .field-label { margin-top: 0; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-icon { width: 17px; height: 17px; }

/* 主按钮：渐变 + 流光扫过 + 发光 */
.btn.primary {
  background: var(--grad-brand);
  background-size: 180% 180%;
  color: #fff;
  box-shadow: var(--glow-primary);
  position: relative;
  overflow: hidden;
  animation: gradShift 6s ease infinite;
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.btn.primary::after {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.btn.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(77, 107, 254, 0.55);
}
.btn.primary:hover:not(:disabled)::after { left: 130%; }
.btn.primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text-dim); }
.btn.ghost:hover { color: var(--text); border-color: var(--border-strong); }
.btn.full { width: 100%; }

/* ===== 上传框 ===== */
.upload-box {
  border: 1.5px dashed var(--border-strong);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.25s;
  background: rgba(0, 0, 0, 0.22);
  position: relative;
  overflow: hidden;
}
.upload-box:hover {
  border-color: rgba(124, 150, 255, 0.7);
  background: rgba(77, 107, 254, 0.06);
  box-shadow: inset 0 0 30px rgba(77, 107, 254, 0.08);
}
.upload-box.dragover { border-color: var(--cyan); background: rgba(63, 210, 255, 0.07); }
.upload-placeholder { text-align: center; padding: 24px; color: var(--text-dim); transition: transform 0.25s; }
.upload-box:hover .upload-placeholder { transform: translateY(-2px); }
.upload-icon { width: 36px; height: 36px; display: block; margin: 0 auto 10px; color: var(--primary-2); }
.upload-placeholder .hint { font-size: 12px; margin-top: 6px; opacity: 0.6; }
.upload-preview img { width: 100%; max-height: 280px; object-fit: contain; border-radius: 10px; display: block; }
.remove-btn {
  position: absolute;
  top: 12px; right: 12px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  backdrop-filter: blur(4px);
}
.remove-btn svg { width: 14px; height: 14px; }
.remove-btn:hover { background: var(--danger); transform: rotate(90deg); }

/* ===== 关键帧列表 ===== */
.kf-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.kf-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}
.kf-item img { width: 100%; height: 80px; object-fit: cover; display: block; }
.kf-idx {
  position: absolute;
  top: 4px; left: 4px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: linear-gradient(120deg, #4d6bfe, #7c6bff);
  color: #fff;
  border-radius: 999px;
}
.kf-del {
  position: absolute;
  top: 3px; right: 3px;
  width: 18px; height: 18px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kf-del:hover { background: var(--danger); }
.switch-ml { margin-left: 22px; }
.i2i-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

/* ===== 开关 ===== */
.switch-row { display: flex; align-items: center; margin-bottom: 14px; }
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { display: none; }
.slider {
  width: 46px; height: 24px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
  transition: all 0.25s;
}
.slider::after {
  content: "";
  position: absolute;
  top: 2.5px; left: 2.5px;
  width: 18px; height: 18px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: all 0.25s;
}
.switch input:checked + .slider {
  background: linear-gradient(120deg, #4d6bfe, #7c6bff);
  border-color: transparent;
  box-shadow: 0 0 14px rgba(77, 107, 254, 0.5);
}
.switch input:checked + .slider::after { left: 24px; background: #fff; }
.switch-label { font-size: 14px; font-weight: 600; }

/* ===== 状态区 ===== */
.status {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-top: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.4);
}
.spinner {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #4d6bfe, #7c6bff, #3fd2ff, transparent 75%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: spin 0.9s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status-title { font-size: 15px; font-weight: 700; }
.status-hint { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.status-body { flex: 1; }
.progress-track {
  width: 100%;
  height: 24px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 999px;
  margin-top: 12px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4d6bfe, #7c6bff, #3fd2ff);
  background-size: 200% 100%;
  animation: progressFlow 2.2s linear infinite;
  border-radius: 999px;
  transition: width 0.5s ease;
  position: relative;
  min-width: 34px;
  box-shadow: 0 0 16px rgba(77, 107, 254, 0.5);
}
@keyframes progressFlow {
  from { background-position: 0% 0; }
  to { background-position: 200% 0; }
}
.progress-text {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}
.status-stage {
  font-size: 13px;
  color: var(--cyan);
  margin-top: 8px;
  font-weight: 600;
}
.status-stage.error { color: var(--danger); }
.status-elapsed {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

/* ===== 结果卡片 ===== */
.results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.result-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.4);
  animation: fadeIn 0.35s ease;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.result-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 150, 255, 0.45);
  box-shadow: 0 16px 48px rgba(2, 6, 20, 0.6), 0 0 30px rgba(77, 107, 254, 0.18);
}
.result-media {
  position: relative;
  background: #05070d;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.result-media img, .result-media video { width: 100%; max-height: 420px; object-fit: contain; display: block; }
.result-media img.clickable-img { cursor: zoom-in; }
.zoom-hint {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 11px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 3px 9px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.result-card:hover .zoom-hint { opacity: 1; }
.result-info { padding: 16px; }
.result-tag {
  display: inline-block;
  font-size: 11.5px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(77, 107, 254, 0.16);
  border: 1px solid rgba(124, 150, 255, 0.35);
  color: var(--primary-2);
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.result-prompt {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
  word-break: break-all;
}
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.result-actions .btn { flex: 1; padding: 10px; font-size: 14px; min-width: 88px; }

.btn.download {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn.download:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 14px rgba(63, 210, 255, 0.2); }
.btn.to-i2i {
  background: rgba(77, 107, 254, 0.12);
  border: 1px solid rgba(124, 150, 255, 0.4);
  color: var(--primary-2);
}
.btn.to-i2i:hover { background: rgba(77, 107, 254, 0.22); border-color: var(--primary-2); color: #fff; }
.btn.to-video {
  background: rgba(63, 210, 255, 0.1);
  border: 1px solid rgba(63, 210, 255, 0.35);
  color: var(--cyan);
}
.btn.to-video:hover { background: rgba(63, 210, 255, 0.2); border-color: var(--cyan); color: #fff; }
.btn.retry { background: transparent; border: 1px solid var(--border); color: var(--text-dim); }
.btn.retry:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 80px; left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(14, 20, 36, 0.92);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 100;
  font-size: 14px;
  backdrop-filter: blur(12px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: rgba(255, 107, 122, 0.5); color: var(--danger); }

/* ===== 图片放大灯箱 ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 12, 0.92);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  cursor: zoom-out;
  padding: 24px;
}
.lightbox.show { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(77, 107, 254, 0.15);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, transform 0.25s;
  backdrop-filter: blur(6px);
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.2); transform: rotate(90deg); }
.lightbox-close svg { width: 20px; height: 20px; }

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 36px 24px 52px;
  color: var(--text-dim);
  font-size: 12.5px;
  letter-spacing: 0.5px;
}

.hidden { display: none !important; }

@media (max-width: 720px) {
  .topbar { padding: 16px 18px; }
  .container { padding: 20px 14px 60px; }
  .row { flex-direction: column; gap: 14px; }
  .panel { padding: 20px; }
  .tabs { gap: 6px; padding: 6px; }
  .tab { font-size: 13.5px; padding: 11px 8px; }
  .progress-track { width: 100%; }
  .results { grid-template-columns: 1fr; }
  .status { flex-direction: column; align-items: flex-start; gap: 14px; }
  .aurora-1 { width: 360px; height: 360px; }
  .aurora-2, .aurora-3 { width: 320px; height: 320px; }
}
