:root {
  color-scheme: dark;
  --bg: #0a0b0f;
  --panel: rgba(20, 21, 27, 0.84);
  --panel-solid: #15161c;
  --line: rgba(255, 255, 255, 0.1);
  --muted: #9597a2;
  --text: #f5f4ef;
  --acid: #d8ff62;
  --violet: #9a7cff;
  --danger: #ff7d7d;
  --radius: 24px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: radial-gradient(circle at 45% -20%, #242035 0, transparent 42%), var(--bg); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.ambient { position: fixed; width: 420px; height: 420px; border-radius: 50%; filter: blur(140px); opacity: .12; pointer-events: none; }
.ambient-one { background: var(--violet); top: 18%; left: -260px; }
.ambient-two { background: var(--acid); right: -280px; bottom: -120px; }
.shell { position: relative; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding-bottom: 80px; }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--acid); color: #10110c; font-weight: 900; font-style: italic; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .04em; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.key-button { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.03); cursor: pointer; }
.key-button:hover { border-color: rgba(216,255,98,.45); }
.key-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 10px currentColor; }
.key-button.ready .key-dot { background: var(--acid); }
.hero { padding: 88px 0 58px; text-align: center; }
.eyebrow { margin: 0 0 18px; color: var(--acid); font-size: 11px; font-weight: 800; letter-spacing: .24em; }
.hero h1 { margin: 0; font-size: clamp(46px, 7vw, 84px); line-height: .98; letter-spacing: -.055em; }
.hero h1 em { color: var(--muted); font-style: normal; font-weight: 500; }
.hero-copy { max-width: 620px; margin: 28px auto 20px; color: #afb0b7; font-size: 16px; line-height: 1.8; }
.hero-pills { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.hero-pills span { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; }
.workspace, .editor { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 28px 90px rgba(0,0,0,.36); backdrop-filter: blur(20px); overflow: hidden; }
.upload-form { padding: 36px; }
.section-heading { display: flex; gap: 16px; align-items: center; margin-bottom: 28px; }
.section-heading .step { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(216,255,98,.4); color: var(--acid); font-size: 12px; }
.section-heading h2, .section-heading p { margin: 0; }
.section-heading h2 { font-size: 23px; }
.section-heading p { color: var(--muted); margin-top: 5px; font-size: 13px; }
.upload-grid { display: grid; grid-template-columns: .9fr 1.5fr; gap: 18px; }
.dropzone, .lyrics-card { min-height: 316px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.025); }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 28px; text-align: center; cursor: pointer; transition: .2s ease; }
.dropzone:hover, .dropzone.dragging, .dropzone.has-file { border-color: rgba(216,255,98,.55); background: rgba(216,255,98,.045); }
.dropzone input, .lyrics-file input { position: absolute; opacity: 0; pointer-events: none; }
.drop-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 8px; border-radius: 18px; background: #22242b; color: var(--acid); font-size: 28px; }
.dropzone strong { font-size: 17px; }
.dropzone span:not(.drop-icon), .dropzone small { color: var(--muted); }
.dropzone small { margin-top: 12px; font-size: 11px; }
.lyrics-card { display: flex; flex-direction: column; overflow: hidden; }
.lyrics-tabs { height: 54px; padding: 8px; display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.lyrics-tabs button { border: 0; border-radius: 9px; padding: 0 14px; background: transparent; color: var(--muted); cursor: pointer; }
.lyrics-tabs button.active { background: rgba(255,255,255,.08); color: var(--text); }
.lyrics-tabs span { margin-left: auto; padding: 10px; color: var(--muted); font-size: 12px; }
.lyrics-card textarea { flex: 1; width: 100%; padding: 20px; resize: vertical; border: 0; outline: none; color: var(--text); background: transparent; line-height: 1.75; }
.lyrics-file { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: pointer; }
.lyrics-file small { color: var(--muted); }
.file-symbol { display: grid; place-items: center; width: 54px; height: 64px; border: 1px solid var(--line); border-radius: 10px; color: var(--acid); font-size: 11px; font-weight: 800; }
.metadata { margin-top: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metadata summary { padding: 18px 2px; cursor: pointer; font-size: 13px; font-weight: 700; }
.metadata summary span { margin-left: 6px; color: var(--muted); font-weight: 400; }
.metadata-grid { display: grid; grid-template-columns: 1fr 1fr .65fr; gap: 14px; padding-bottom: 18px; }
.metadata-grid label, .key-dialog label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; }
input, select { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; outline: none; color: var(--text); background: #101116; }
input:focus, select:focus, textarea:focus { border-color: rgba(216,255,98,.55); }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 26px; }
.privacy-note { color: var(--muted); font-size: 12px; }
.privacy-note span { color: var(--acid); margin-right: 7px; }
.primary-button, .secondary-button, .danger-button, .text-button { border: 0; cursor: pointer; }
.primary-button { display: inline-flex; align-items: center; gap: 22px; padding: 14px 18px 14px 22px; border-radius: 12px; background: var(--acid); color: #12130e; font-weight: 800; }
.primary-button b { font-size: 19px; }
.primary-button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.primary-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.secondary-button { padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.04); }
.secondary-button:hover { border-color: rgba(255,255,255,.25); }
.danger-button { width: 100%; margin-top: 24px; padding: 11px; border: 1px solid rgba(255,125,125,.22); border-radius: 10px; background: transparent; color: #d99595; }
.text-button { margin-top: 24px; background: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
.inline-error { margin-top: 16px; padding: 12px 14px; border: 1px solid rgba(255,125,125,.22); border-radius: 10px; color: #ffaaaa; background: rgba(255,125,125,.07); font-size: 13px; }
.progress-card { min-height: 470px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 50px; text-align: center; }
.orb { position: relative; width: 92px; height: 92px; margin-bottom: 26px; border-radius: 50%; border: 1px solid rgba(216,255,98,.18); }
.orb span { position: absolute; inset: 17px; border-radius: 50%; background: var(--acid); filter: blur(3px); box-shadow: 0 0 45px rgba(216,255,98,.4); }
.orb i { position: absolute; inset: -7px; border: 1px dashed rgba(216,255,98,.55); border-radius: 50%; animation: spin 7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-card h2 { margin: 0 0 10px; font-size: 28px; }
.progress-card > p:not(.eyebrow) { margin: 0; color: var(--muted); }
.progress-track { width: min(460px, 100%); height: 5px; margin-top: 32px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--violet), var(--acid)); transition: width .4s ease; }
.progress-meta { width: min(460px, 100%); display: flex; justify-content: space-between; margin-top: 9px; color: var(--muted); font-size: 11px; }
.editor { overflow: visible; background: transparent; border: 0; box-shadow: none; }
.editor-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 12px 0 25px; }
.editor-head h2 { margin: 0; font-size: 34px; }
.editor-head p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); }
.editor-actions { display: flex; gap: 9px; }
.quality-banner { margin-bottom: 16px; padding: 15px 18px; border: 1px solid rgba(216,255,98,.18); border-radius: 13px; background: rgba(216,255,98,.055); color: #dce8ba; font-size: 13px; }
.quality-banner.warning { border-color: rgba(255,183,91,.28); background: rgba(255,183,91,.07); color: #f3c58b; }
.editor-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
.player-panel, .cue-panel { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.player-panel { position: sticky; top: 20px; padding: 22px; text-align: center; }
.cover-art { position: relative; display: grid; place-items: center; aspect-ratio: 1; margin-bottom: 20px; overflow: hidden; border-radius: 15px; background: radial-gradient(circle at 30% 25%, #5e5875, #22232b 42%, #101115); }
.cover-art::before { content: ""; width: 62%; height: 62%; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 18px rgba(255,255,255,.025), 0 0 0 37px rgba(255,255,255,.018); }
.cover-art span { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--acid); color: #111; font-size: 22px; z-index: 1; }
.cover-art i { position: absolute; width: 180px; height: 1px; background: linear-gradient(90deg, transparent, var(--acid), transparent); transform: rotate(-35deg); opacity: .6; }
.player-panel h3 { margin: 0; font-size: 18px; }
.player-panel > p { margin: 6px 0 16px; color: var(--muted); font-size: 13px; }
audio { width: 100%; height: 38px; }
.player-tip { margin-top: 14px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.job-facts { margin: 20px 0 0; border-top: 1px solid var(--line); }
.job-facts div { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.job-facts dt { color: var(--muted); }
.job-facts dd { margin: 0; }
.cue-panel { overflow: hidden; }
.cue-toolbar { min-height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.cue-toolbar strong, .cue-toolbar span { display: block; }
.cue-toolbar span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.cue-header, .cue-row { display: grid; grid-template-columns: 42px 94px 94px minmax(160px,1fr); gap: 10px; align-items: center; }
.cue-header { padding: 10px 17px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.cue-list { max-height: 660px; overflow: auto; }
.cue-row { padding: 10px 17px; border-top: 1px solid rgba(255,255,255,.055); cursor: pointer; }
.cue-row:hover, .cue-row.playing { background: rgba(216,255,98,.035); }
.cue-row .number { color: var(--muted); font-size: 11px; text-align: center; }
.cue-row input { min-width: 0; padding: 9px; background: rgba(4,5,8,.45); font-size: 12px; }
.cue-row input.lyric { font-size: 14px; }
.cue-panel .inline-error { margin: 14px; }
.key-dialog { width: min(430px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 20px; color: var(--text); background: #17181e; box-shadow: 0 30px 100px rgba(0,0,0,.7); }
.key-dialog::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(8px); }
.key-dialog form { position: relative; padding: 32px; }
.key-dialog h2 { margin: 0 0 10px; }
.key-dialog p:not(.eyebrow) { margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.key-dialog label { margin-bottom: 20px; }
.dialog-close { position: absolute; top: 14px; right: 16px; border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.full { width: 100%; justify-content: space-between; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 10; max-width: 360px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 11px; color: var(--text); background: #24252c; box-shadow: 0 15px 50px rgba(0,0,0,.45); font-size: 13px; }

@media (max-width: 800px) {
  .shell { width: min(100% - 24px, 680px); }
  .topbar { height: 74px; }
  .hero { padding: 58px 0 38px; }
  .hero h1 { font-size: clamp(42px, 13vw, 64px); }
  .upload-form { padding: 22px; }
  .upload-grid, .editor-layout { grid-template-columns: 1fr; }
  .dropzone { min-height: 230px; }
  .metadata-grid { grid-template-columns: 1fr; }
  .form-footer, .editor-head { align-items: stretch; flex-direction: column; }
  .primary-button { justify-content: space-between; }
  .editor-actions { width: 100%; }
  .editor-actions button { flex: 1; }
  .player-panel { position: static; }
  .cue-header, .cue-row { grid-template-columns: 30px 75px 75px minmax(130px,1fr); gap: 6px; padding-left: 8px; padding-right: 8px; }
}

