:root {
  --bg-main: #07040d;
  --bg-card: rgba(16, 9, 28, 0.8);
  --bg-card-strong: rgba(23, 13, 39, 0.95);
  --line: rgba(255, 255, 255, 0.1);
  --text-main: #f6eeff;
  --text-soft: #d7c3f3;
  --text-muted: #9f91ba;
  --accent: #b06cff;
  --accent-2: #f0abfc;
  --shadow: 0 30px 80px rgba(47, 16, 78, 0.42);
  --stage-text-size: 52px;
  --stage-line-height: 1.08;
  --stage-text-width: 84%;
  --effect-strength: 0.6;
  --bg-blur: 8px;
  --bg-zoom: 1.12;
  --bg-float: 8;
  --watermark-opacity: 1;
  --stage-font-family: "Manrope", sans-serif;
}

* { box-sizing: border-box; user-select: none; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top, rgba(152, 92, 255, 0.18), transparent 26%),
    radial-gradient(circle at 80% 16%, rgba(236, 72, 153, 0.12), transparent 24%),
    linear-gradient(180deg, #05020a 0%, #0a0612 45%, #05030a 100%);
}
textarea { user-select: text; }
button, a, label { user-select: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; border: none; }
a { color: inherit; text-decoration: none; }
code {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #f2d9ff;
  font-size: 0.9em;
}

.main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  margin-bottom: 20px;
}
.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-brand h1 {
  margin: 0;
  font-size: 20px;
  font-family: "Unbounded", sans-serif;
}
.nav-author {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  gap: 8px;
}
.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  border: 1px solid transparent;
  font-weight: 600;
  transition: all 180ms ease;
}
.nav-link:hover, .nav-link.active {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(176, 108, 255, 0.18);
}

.page {
  opacity: 1;
  transition: opacity 200ms ease;
}
.page.hidden {
  display: none;
  opacity: 0;
}

.features-showcase {
  margin-top: 20px;
}
.features-showcase h3 {
  margin: 0 0 18px;
  font-size: 28px;
  font-family: "Unbounded", sans-serif;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.feature-item {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  transition: all 180ms ease;
}
.feature-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}
.feature-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.feature-item h4 {
  margin: 8px 0 4px;
  font-size: 16px;
}
.feature-item p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.guide-section {
  margin-top: 0;
}
.guide-section h2 {
  margin: 0 0 24px;
  font-size: 32px;
  font-family: "Unbounded", sans-serif;
}
.guide-card {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.guide-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-family: "Unbounded", sans-serif;
}
.guide-card h4 {
  margin: 0 0 8px;
  font-size: 16px;
}
.guide-card p {
  margin: 8px 0;
  line-height: 1.6;
  color: var(--text-soft);
}
.guide-card ul, .guide-card ol {
  margin: 8px 0;
  padding-left: 20px;
  color: var(--text-soft);
}
.guide-card li {
  margin: 4px 0;
}

.hero-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: previewFloat 8s ease-in-out infinite;
}

@keyframes previewFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.page-shell { width: min(1360px, calc(100% - 28px)); margin: 0 auto; padding: 18px 0 40px; }
.hero, .glass-card {
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(16, 9, 28, 0.88), rgba(8, 4, 16, 0.94));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}
.hero { position: relative; overflow: hidden; padding: 24px; }
.glass-card { padding: 22px; }
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  pointer-events: none;
}
.hero::before { width: 260px; height: 260px; top: -80px; right: -60px; background: rgba(176, 108, 255, 0.3); }
.hero::after { width: 220px; height: 220px; left: -50px; bottom: -50px; background: rgba(240, 171, 252, 0.18); }

.topbar, .hero-grid, .workspace-layout { position: relative; z-index: 1; }
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.topbar { margin-bottom: 28px; }
.topbar-actions, .hero-actions, .action-row, .chip-grid, .toolbar, .stage-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.toolbar { margin-bottom: 32px; }
.chip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.action-row { margin-top: 28px; justify-content: stretch; }
.action-row button { flex: 1; }
.export-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.export-note {
  display: block;
  margin-top: 10px;
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 14px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f4c6ff 0%, #8b5cf6 100%);
  box-shadow: 0 0 26px rgba(176, 108, 255, 0.55);
}
.brand-kicker, .section-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.brand h1, .hero-copy h2, h3, h4 {
  margin: 0;
  font-family: "Unbounded", sans-serif;
  letter-spacing: -0.03em;
}
.brand h1 { font-size: 24px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 24px;
  align-items: center;
}
.hero-copy { padding: 12px 8px 12px 2px; }
.hero-copy h2 { max-width: 11ch; font-size: clamp(38px, 5vw, 70px); line-height: 0.94; }
.hero-text {
  max-width: 58ch;
  margin: 18px 0 24px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-soft);
}

.primary-button, .secondary-button, .ghost-button, .chip, .tab-button, .format-chip, .swatch, .floating-button {
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, opacity 180ms ease;
}
.primary-button, .secondary-button, .ghost-button, .floating-button {
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  min-width: 80px;
  text-align: center;
}
.primary-button, .floating-button.primary {
  color: #15091f;
  background: linear-gradient(135deg, #f4c6ff 0%, #b06cff 56%, #8b5cf6 100%);
  box-shadow: 0 18px 38px rgba(139, 92, 246, 0.28);
}
.secondary-button, .floating-button {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ghost-button {
  color: var(--text-soft);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.ghost-button.active {
  color: var(--text-main);
  background: rgba(176, 108, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: 0 0 0 3px rgba(176, 108, 255, 0.12);
}
.primary-button:disabled, .secondary-button:disabled, .ghost-button:disabled, .floating-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.primary-button:hover, .secondary-button:hover, .ghost-button:hover, .chip:hover, .tab-button:hover, .format-chip:hover, .swatch:hover, .floating-button:hover {
  transform: translateY(-2px);
}

.preview-card {
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
}
.preview-chip, .status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--text-soft);
  font-size: 13px;
}
.mini-stage, .edit-stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.mini-stage {
  margin-top: 16px;
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}
.mini-background, .stage-background, .pattern-layer, .pattern-glow, .stage-noise, .playback-flash, .pulse-ring, .orb-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.mini-background { inset: 0; }
.mini-line, .lyric-line {
  position: absolute;
  left: 12%;
  right: 12%;
  color: white;
  text-align: center;
  text-shadow: 0 10px 28px rgba(0,0,0,0.34);
}
.mini-line { font-size: clamp(20px, 3vw, 30px); font-weight: 700; line-height: 1.2; }
.mini-line-top { top: 40%; }
.mini-line-bottom { top: 51%; }
.mini-orb {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  filter: blur(18px);
  background: radial-gradient(circle, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.02) 68%);
  opacity: 0.42;
}
.mini-orb-1 { top: -8%; left: -6%; animation: orbFloatOne 9s ease-in-out infinite alternate; }
.mini-orb-2 { right: -8%; bottom: -10%; animation: orbFloatTwo 11s ease-in-out infinite alternate; }

.workspace-layout {
  display: grid;
  grid-template-columns: minmax(340px, 480px) minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
}
.control-panel, .stage-panel { padding: 28px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 72px;
  margin-bottom: 24px;
  gap: 16px;
}
.panel-head h3 {
  margin: 0;
  font-size: 20px;
}
.section-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stage-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: min(100%, 760px);
  min-height: 72px;
  margin-bottom: 24px;
  gap: 16px;
}
.stage-topbar h3 {
  margin: 0;
  font-size: 20px;
}
.stage-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 24px;
}
.tab-button, .format-chip, .chip {
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: var(--text-soft);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.tab-button.active, .chip.selected, .swatch.selected, .format-chip.active {
  border-color: rgba(255,255,255,0.26);
  background: rgba(176, 108, 255, 0.18);
  box-shadow: 0 0 0 3px rgba(176, 108, 255, 0.12);
}
.tab-panels {
  display: block;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.field { display: grid; gap: 12px; margin-bottom: 24px; }
.field span { font-weight: 600; font-size: 14px; }
.field small { color: var(--text-muted); line-height: 1.5; font-size: 12px; }
.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
textarea, input[type="file"] {
  width: 100%;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: var(--bg-card-strong);
  color: var(--text-main);
  font-size: 14px;
}
textarea { resize: vertical; min-height: 220px; line-height: 1.6; }
input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-size: 13px;
  color: #160920;
  background: linear-gradient(135deg, #f4c6ff 0%, #b06cff 100%);
  cursor: pointer;
}
.file-meta {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
input[type="range"] { width: 100%; height: 6px; accent-color: #d16eff; -webkit-appearance: none; appearance: none; cursor: pointer; background: rgba(255,255,255,0.08); border-radius: 3px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #f4c6ff 0%, #b06cff 100%); box-shadow: 0 4px 12px rgba(176, 108, 255, 0.4); cursor: pointer; border: none; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #f4c6ff 0%, #b06cff 100%); box-shadow: 0 4px 12px rgba(176, 108, 255, 0.4); cursor: pointer; border: none; }
input[type="range"]::-moz-range-track { background: transparent; border: none; }
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.swatch {
  min-height: 72px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--swatch);
  color: white;
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.guide-panel {
  display: grid;
  gap: 12px;
}
.guide-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.guide-card p { margin: 10px 0 0; color: var(--text-soft); line-height: 1.6; }

.categories-section {
  margin-top: 22px;
  padding: 12px;
}
.categories-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cat-button {
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  color: var(--text-soft);
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: all 180ms ease;
}
.cat-button:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.1);
}
.cat-button.active {
  border-color: rgba(255,255,255,0.26);
  background: rgba(176, 108, 255, 0.18);
  box-shadow: 0 0 0 3px rgba(176, 108, 255, 0.12);
}

.stage-frame {
  width: min(100%, 760px);
  display: grid;
  place-items: center;
}
.edit-stage {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 30px;
  background: #12061b;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 30px 90px rgba(29, 6, 49, 0.55);
}
.edit-stage:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
}
.stage-background {
  inset: -8%;
  transform: scale(var(--bg-zoom));
  transform-origin: center;
}
.edit-stage:fullscreen .stage-background {
  inset: 0;
}
.default-bg { filter: saturate(1.05); }
.custom-bg {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(var(--bg-blur)) saturate(1.06);
  animation: customBgFloat calc(18s - (var(--bg-float) * 0.45s)) ease-in-out infinite alternate;
}
.hidden { display: none; }

.background-gradient-1 .default-bg { background: linear-gradient(135deg, #120613 0%, #5b21b6 100%); }
.background-gradient-2 .default-bg { background: linear-gradient(135deg, #12061b 0%, #4c1d95 50%, #d946ef 100%); }
.background-gradient-3 .default-bg { background: linear-gradient(135deg, #0f0a24 0%, #7c3aed 52%, #f5d0fe 100%); }
.background-gradient-4 .default-bg { background: linear-gradient(135deg, #0b0913 0%, #2e1065 46%, #8b5cf6 100%); }
.background-solid-1 .default-bg { background: #14071d; }
.background-solid-2 .default-bg { background: #2e1065; }
.background-solid-3 .default-bg { background: #581c87; }
.background-solid-4 .default-bg { background: #111827; }

.stage-noise {
  opacity: 0.14;
  mix-blend-mode: soft-light;
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 42px 42px;
}
.pattern-glow {
  inset: 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(255,255,255,0.16), transparent 20%),
    radial-gradient(circle at 78% 26%, rgba(255,255,255,0.12), transparent 18%),
    radial-gradient(circle at 32% 84%, rgba(255,255,255,0.12), transparent 18%);
  mix-blend-mode: screen;
  opacity: 0.55;
}
.pattern-layer {
  inset: -16%;
  opacity: 0.64;
}
.pattern-diagonal {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.18) 0 2px, transparent 2px 26px),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 58px);
  background-size: auto;
}
.pattern-mesh {
  background-image:
    linear-gradient(rgba(255,255,255,0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.14) 1px, transparent 1px);
  background-size: 48px 48px;
}
.pattern-streaks {
  background:
    linear-gradient(120deg, transparent 0 30%, rgba(255,255,255,0.16) 30% 32%, transparent 32% 55%, rgba(255,255,255,0.1) 55% 57%, transparent 57% 100%),
    linear-gradient(120deg, transparent 0 50%, rgba(255,255,255,0.12) 50% 51%, transparent 51% 100%);
  background-size: 100% 100%, 140% 140%;
}
.pattern-orbs {
  background:
    radial-gradient(circle at 14% 18%, rgba(255,255,255,0.24) 0 3.2%, transparent 3.6%),
    radial-gradient(circle at 34% 72%, rgba(255,255,255,0.18) 0 4.4%, transparent 4.8%),
    radial-gradient(circle at 74% 32%, rgba(255,255,255,0.2) 0 4.2%, transparent 4.8%),
    radial-gradient(circle at 84% 78%, rgba(255,255,255,0.16) 0 5.6%, transparent 6.1%),
    radial-gradient(circle at 52% 20%, rgba(255,255,255,0.16) 0 2.8%, transparent 3.2%);
  filter: blur(1px);
}
.pattern-none { opacity: 0; }
.direction-ltr .pattern-layer { animation: driftLTR 18s linear infinite; }
.direction-rtl .pattern-layer { animation: driftRTL 18s linear infinite; }

.orb-layer { inset: 0; opacity: 0.9; }
.orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.32) 0%, rgba(255,255,255,0.03) 64%);
  filter: blur(24px);
  opacity: 0.42;
}
.orb-1 { width: 220px; height: 220px; top: 5%; left: 10%; animation: orbFloatOne 12s ease-in-out infinite alternate; }
.orb-2 { width: 180px; height: 180px; top: 35%; right: 10%; animation: orbFloatTwo 14s ease-in-out infinite alternate; }
.orb-3 { width: 160px; height: 160px; bottom: 20%; left: 12%; animation: orbFloatThree 13s ease-in-out infinite alternate; }
.orb-4 { width: 240px; height: 240px; bottom: 5%; right: 8%; animation: orbFloatFour 16s ease-in-out infinite alternate; }

.lyrics-box {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14%;
  text-align: center;
}
.lyric-line {
  margin: 0;
  max-width: var(--stage-text-width);
  font-size: clamp(32px, var(--stage-text-size), 88px);
  font-family: var(--stage-font-family);
  font-weight: 800;
  line-height: var(--stage-line-height);
  letter-spacing: -0.04em;
  opacity: 0;
  transform: scale(0.86) translateY(28px);
}
.lyric-line.active { animation: lyricIn 760ms cubic-bezier(.22, 1, .36, 1) forwards; }
.lyric-line.exit { animation: lyricOut 420ms ease forwards; }
.textfx-glow .lyric-line {
  text-shadow: 0 0 32px rgba(255,255,255,0.18), 0 10px 36px rgba(0,0,0,0.38);
}
.textfx-clean .lyric-line {
  text-shadow: 0 8px 18px rgba(0,0,0,0.32);
}
.textfx-hard .lyric-line {
  text-shadow: 0 0 0 rgba(0,0,0,0), 0 12px 42px rgba(0,0,0,0.42);
}
.lyric-line strong { font-weight: 900; }
.lyric-line em { font-style: italic; }
.lyric-line u { text-decoration-thickness: 0.08em; text-underline-offset: 0.1em; }
.lyric-line s { opacity: 0.76; }
.lyric-line .glow {
  text-shadow: 0 0 14px rgba(255,255,255,0.62), 0 0 34px rgba(240,171,252,0.45);
}

.playback-flash {
  opacity: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.26) 0%, transparent 52%);
  mix-blend-mode: screen;
}
.playback-flash.active { animation: flashPop calc(0.45s + var(--effect-strength)) ease; }
.pulse-ring {
  inset: 24%;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  opacity: 0;
}
.pulse-ring.active { animation: pulseRing calc(1.4s + var(--effect-strength)) ease-out; }

.watermark {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  background: rgba(0,0,0,0.16);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  opacity: var(--watermark-opacity);
}
.progress-bar {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}
.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #f4c6ff 0%, #fff 100%);
  box-shadow: 0 0 20px rgba(255,255,255,0.32);
}
.floating-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(28px);
  z-index: 3;
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 20px;
  background: rgba(10, 6, 18, 0.62);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
}
.edit-stage.controls-visible .floating-controls,
.edit-stage:hover .floating-controls,
.edit-stage:focus-within .floating-controls,
.edit-stage:fullscreen .floating-controls {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.hint-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(100%, 760px);
  gap: 14px;
  margin-top: 18px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
#audioPlayer {
  width: 100%;
  max-width: 320px;
  filter: hue-rotate(280deg) saturate(1.4);
  min-height: 40px;
}

.help-dialog {
  width: min(860px, calc(100% - 20px));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 28px;
  padding: 0;
  background: rgba(12, 7, 22, 0.96);
  color: var(--text-main);
}
.help-dialog::backdrop { background: rgba(5, 2, 9, 0.74); }
.help-sheet { padding: 22px; }
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

@keyframes driftLTR {
  from { transform: translate3d(16%, -16%, 0) scale(1.14); }
  to { transform: translate3d(-16%, 16%, 0) scale(1.2); }
}
@keyframes driftRTL {
  from { transform: translate3d(-16%, 16%, 0) scale(1.14); }
  to { transform: translate3d(16%, -16%, 0) scale(1.2); }
}
@keyframes orbFloatOne {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(34px, 46px, 0) scale(1.16); }
}
@keyframes orbFloatTwo {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-44px, 36px, 0) scale(1.12); }
}
@keyframes orbFloatThree {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(26px, -34px, 0) scale(1.14); }
}
@keyframes orbFloatFour {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-30px, -26px, 0) scale(1.16); }
}
@keyframes customBgFloat {
  from { transform: scale(var(--bg-zoom)) translate3d(-2%, -1%, 0); }
  to { transform: scale(calc(var(--bg-zoom) + 0.06)) translate3d(2%, 2%, 0); }
}
@keyframes lyricIn {
  0% { opacity: 0; transform: scale(0.86) translateY(28px); filter: blur(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}
@keyframes lyricOut {
  0% { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(1.08) translateY(-18px); filter: blur(8px); }
}
@keyframes flashPop {
  0% { opacity: 0; transform: scale(0.92); }
  30% { opacity: 0.76; }
  100% { opacity: 0; transform: scale(1.14); }
}
@keyframes pulseRing {
  0% { opacity: 0.38; transform: scale(0.82); }
  100% { opacity: 0; transform: scale(1.28); }
}

@media (max-width: 1120px) {
  .hero-grid, .workspace-layout { grid-template-columns: 1fr; }
  .hero-copy h2 { max-width: 12ch; }
}
@media (max-width: 760px) {
  .page-shell { width: min(100% - 14px, 100%); padding-top: 10px; }
  .hero, .glass-card, .help-sheet { padding: 18px; border-radius: 24px; }
  .topbar, .panel-head, .stage-topbar, .hint-row, .help-head { align-items: flex-start; flex-direction: column; }
  .tabs, .split-grid, .swatch-grid, .help-grid, .export-row { grid-template-columns: 1fr; }
  .hero-copy h2 { font-size: clamp(34px, 11vw, 52px); }
  .floating-controls { width: calc(100% - 24px); justify-content: center; }
  .floating-button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
