/* ===========================
   液态玻璃 · 图像工坊
   Design tokens & globals
   =========================== */
:root {
  --bg-0: #07080d;
  --bg-1: #0b0e18;
  --bg-2: #111521;
  --ink-0: #f4f6fb;
  --ink-1: #c7cce0;
  --ink-2: #8a90a8;
  --ink-3: #5a6075;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --glass-1: rgba(255, 255, 255, 0.04);
  --glass-2: rgba(255, 255, 255, 0.06);
  --glass-3: rgba(255, 255, 255, 0.10);
  --accent: #7c5cff;
  --accent-2: #4cd2ff;
  --accent-3: #ff6ad5;
  --accent-grad: linear-gradient(135deg, #7c5cff 0%, #4cd2ff 100%);
  --accent-grad-2: linear-gradient(135deg, #ff6ad5 0%, #7c5cff 50%, #4cd2ff 100%);
  --danger: #ff5a6e;
  --success: #4ade80;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-glow: 0 0 40px -8px rgba(124, 92, 255, 0.55);
  --font-display: "Space Grotesk", "PingFang SC", system-ui, sans-serif;
  --font-body: "Inter", "PingFang SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html, body {
  height: 100%;
  background: var(--bg-0);
  color: var(--ink-0);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
  position: relative;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input, select {
  font-family: inherit;
  color: inherit;
}

/* ===========================
   背景装饰
   =========================== */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.mesh-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: float 18s ease-in-out infinite;
}

.mesh-blob-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #7c5cff 0%, transparent 70%);
  top: -120px;
  left: -80px;
}

.mesh-blob-2 {
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, #4cd2ff 0%, transparent 70%);
  bottom: -200px;
  right: -120px;
  animation-delay: -6s;
}

.mesh-blob-3 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #ff6ad5 0%, transparent 70%);
  top: 30%;
  left: 45%;
  animation-delay: -12s;
  opacity: 0.35;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.05); }
  66% { transform: translate(-30px, 20px) scale(0.95); }
}

.mesh-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/></svg>");
  opacity: 0.12;
  mix-blend-mode: overlay;
}

/* ===========================
   顶部导航
   =========================== */
.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 14, 24, 0.7) 0%, rgba(11, 14, 24, 0.3) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 24px -8px rgba(124, 92, 255, 0.6);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.18em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--glass-2);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-1);
}

.meta-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-3);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s;
}

.topbar-meta.is-ready .meta-dot {
  background: var(--success);
  box-shadow: 0 0 12px var(--success);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.meta-label {
  letter-spacing: 0.05em;
}

/* ===========================
   主体布局
   =========================== */
.layout {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  padding: 20px 28px 28px;
  min-height: 0;
}

/* ===========================
   左侧舞台
   =========================== */
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* 上传区 */
.dropzone {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--glass-2), var(--glass-1));
  border: 1.5px dashed var(--line-strong);
  overflow: hidden;
  transition: all 0.3s;
}

.dropzone.is-dragover {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.08), rgba(76, 210, 255, 0.04));
}

.dropzone-inner {
  text-align: center;
  padding: 40px;
  max-width: 460px;
  position: relative;
  z-index: 2;
}

.dropzone-icon {
  display: inline-flex;
  width: 100px;
  height: 100px;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background: var(--glass-3);
  border: 1px solid var(--line);
  color: var(--ink-1);
  margin-bottom: 24px;
  position: relative;
}

.dropzone-icon::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  padding: 1px;
  background: var(--accent-grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
}

.dropzone-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #fff 0%, #b0b5c8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dropzone-hint {
  color: var(--ink-2);
  font-size: 14px;
  margin-bottom: 24px;
}

.dropzone-formats {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.dropzone-formats span {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--glass-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  letter-spacing: 0.05em;
}

.dropzone-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(124, 92, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s;
}

.dropzone.is-dragover .dropzone-glow {
  opacity: 1;
}

/* 画布区 */
.canvas-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  animation: fadeIn 0.4s ease;
}

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

.canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--glass-2);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink-1);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: var(--glass-2);
  border-color: var(--line);
  color: var(--ink-0);
}

.icon-btn svg {
  opacity: 0.8;
}

.info-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--glass-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  letter-spacing: 0.04em;
}

.canvas-frame {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(45deg, var(--bg-1) 25%, transparent 25%),
    linear-gradient(-45deg, var(--bg-1) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--bg-1) 75%),
    linear-gradient(-45deg, transparent 75%, var(--bg-1) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-color: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
  min-height: 0;
  box-shadow: var(--shadow-lg);
}

.canvas-frame canvas {
  max-width: 100%;
  max-height: 100%;
  display: block;
  image-rendering: high-quality;
}

/* ===========================
   右侧控制面板
   =========================== */
.panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--glass-3), var(--glass-1));
  border: 1px solid var(--line);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  min-height: 0;
  transition: opacity 0.3s;
}

.panel[data-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

.panel::-webkit-scrollbar {
  width: 6px;
}
.panel::-webkit-scrollbar-track {
  background: transparent;
}
.panel::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}
.panel::-webkit-scrollbar-thumb:hover {
  background: var(--line-strong);
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}

.panel-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
}

.section-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-0);
  flex: 1;
}

.value-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--accent-grad);
  color: white;
  min-width: 36px;
  text-align: center;
}

/* 效果卡片 */
.effect-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.effect-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: var(--radius-md);
  background: var(--glass-2);
  border: 1px solid var(--line);
  transition: all 0.2s;
  text-align: center;
}

.effect-card:hover {
  background: var(--glass-3);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.effect-card.is-active {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(76, 210, 255, 0.10));
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px -8px rgba(124, 92, 255, 0.4);
}

.effect-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #2a3a5a 0%, #1a2440 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-block {
  width: 60%;
  height: 60%;
  border-radius: 6px;
  background: linear-gradient(135deg, #ff6ad5 0%, #7c5cff 50%, #4cd2ff 100%);
  position: relative;
}

.effect-thumb-original .thumb-block {
  filter: none;
}

.effect-thumb-gaussian .thumb-block {
  filter: blur(4px);
}

.effect-thumb-frosted .thumb-block {
  filter: blur(2px) brightness(1.1);
}
.effect-thumb-frosted::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(2px);
}

.effect-thumb-liquid .thumb-block {
  filter: url(#svgLiquid);
  transform: scale(1.1);
}

.effect-thumb-distort .thumb-block {
  filter: url(#svgDistort);
  transform: scale(1.1);
}

.effect-thumb-noise .thumb-block {
  filter: url(#svgFrosted);
}
.effect-thumb-noise::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.6;
  mix-blend-mode: overlay;
}

.effect-name {
  font-size: 11px;
  color: var(--ink-1);
  letter-spacing: 0.04em;
}

.effect-card.is-active .effect-name {
  color: var(--ink-0);
  font-weight: 500;
}

/* 滑块 */
.slider-wrap {
  position: relative;
  padding: 8px 0;
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    var(--accent) 0%,
    var(--accent) var(--val, 50%),
    rgba(255, 255, 255, 0.08) var(--val, 50%),
    rgba(255, 255, 255, 0.08) 100%);
  outline: none;
  position: relative;
  z-index: 1;
  transition: background 0.1s;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--accent);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(124, 92, 255, 0.15);
  transition: all 0.15s;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 0 6px rgba(124, 92, 255, 0.25);
}

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--accent);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.slider-track-glow {
  position: absolute;
  top: 50%;
  left: 0;
  height: 14px;
  width: 100%;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, rgba(124, 92, 255, 0.15), transparent);
  filter: blur(8px);
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
}

.slider-marks {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* 4 列分段控件 */
.seg-control.seg-control-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* 禁用态 */
.seg-control[data-disabled="true"],
.slider-wrap[data-disabled="true"] {
  opacity: 0.35;
  pointer-events: none;
}

/* 暗色主题滑块（用于遮罩强度） */
.slider-dark {
  background: linear-gradient(90deg,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.85) var(--val, 50%),
    rgba(255, 255, 255, 0.08) var(--val, 50%),
    rgba(255, 255, 255, 0.08) 100%);
}

.slider-dark::-webkit-slider-thumb {
  border-color: #1a1d2a;
  background: #e8eaf2;
}

.slider-dark::-moz-range-thumb {
  border-color: #1a1d2a;
  background: #e8eaf2;
}

.slider-track-glow-dark {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent);
}

/* 开关 */
.toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--glass-3);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: all 0.25s;
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f4f6fb, #c0c5d5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle input:checked + .toggle-track {
  background: linear-gradient(135deg, #1a1d2a, #3a3f55);
  border-color: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 0 12px -4px rgba(0, 0, 0, 0.4);
}

.toggle input:checked + .toggle-track .toggle-thumb {
  left: 18px;
  background: linear-gradient(180deg, #fff, #b0b5c8);
}

/* 分段控件 */
.seg-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 4px;
  background: var(--glass-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.seg-control-sm {
  grid-template-columns: repeat(3, 1fr);
}

.seg-btn {
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: all 0.2s;
}

.seg-btn:hover {
  color: var(--ink-0);
}

.seg-btn.is-active {
  background: var(--accent-grad);
  color: white;
  box-shadow: 0 4px 12px -4px rgba(124, 92, 255, 0.5);
}

/* 字段输入 */
.compress-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.field label {
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.input-suffix {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--glass-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.2s;
}

.input-suffix:focus-within {
  border-color: var(--accent);
}

.input-suffix input {
  flex: 1;
  padding: 10px 0;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-0);
  width: 100%;
}

.input-suffix input::-webkit-outer-spin-button,
.input-suffix input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-suffix input[type=number] {
  -moz-appearance: textfield;
}

.input-suffix span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--glass-3);
  color: var(--ink-0);
  border: 1px solid var(--line-strong);
}

.btn-primary:hover {
  background: var(--glass-3);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgba(124, 92, 255, 0.4);
}

.btn-accent {
  background: var(--accent-grad);
  color: white;
  box-shadow: 0 8px 24px -8px rgba(124, 92, 255, 0.6);
  border: 1px solid transparent;
}

.btn-accent::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-grad-2);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -8px rgba(124, 92, 255, 0.7);
}

.btn-accent:hover::before {
  opacity: 1;
}

.btn-accent > * {
  position: relative;
  z-index: 1;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.export-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
  letter-spacing: 0.05em;
}

/* ===========================
   加载遮罩
   =========================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 8, 13, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.2s;
}

.overlay-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 32px 40px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--glass-3), var(--glass-1));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--accent-2);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.overlay-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-1);
  letter-spacing: 0.1em;
}

/* ===========================
   响应式
   =========================== */
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(400px, 1fr) auto;
  }
  .panel {
    max-height: 50vh;
  }
}

@media (max-width: 720px) {
  body { overflow-y: auto; }
  html, body { height: auto; min-height: 100%; }
  .topbar { padding: 14px 16px; }
  .layout { padding: 14px 16px 20px; gap: 14px; }
  .dropzone-title { font-size: 22px; }
  .dropzone-inner { padding: 24px; }
  .canvas-frame { min-height: 320px; }
  .panel { max-height: none; }
  .effect-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .effect-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-meta .meta-label { display: none; }
}
