:root {
  --bg: #07080d;
  --panel: #0f1220;
  --panel2: #14182b;
  --cyan: #00e5ff;
  --magenta: #ff2fb9;
  --gold: #ffcc00;
  --line: #232840;
  --txt: #e8ecff;
  --dim: #8892b8;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(circle at 50% -10%, #1a1035 0%, var(--bg) 55%);
  color: var(--txt);
  font-family: "JetBrains Mono", monospace;
  min-height: 100vh;
}

.wrap { max-width: 820px; margin: 0 auto; padding: 24px 16px 60px; position: relative; }

.bg-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(500px 300px at 15% 20%, rgba(0,229,255,0.10), transparent 70%),
    radial-gradient(500px 300px at 85% 30%, rgba(255,47,185,0.10), transparent 70%);
}
.wrap > * { position: relative; z-index: 1; }

/* header */
.hdr { text-align: center; margin-bottom: 26px; animation: rise .6s ease both; }
.surround-badge {
  display: inline-block; font-family: "Orbitron"; font-weight: 800; font-size: 11px;
  letter-spacing: 3px; color: #07080d; padding: 4px 12px; border-radius: 20px;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  animation: pulse 1.6s infinite; margin-bottom: 14px;
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(0,229,255,.5);} 50% { box-shadow: 0 0 22px 4px rgba(0,229,255,.35);} }
.title {
  font-family: "Orbitron"; font-weight: 900; font-size: clamp(22px, 6vw, 40px);
  margin: 0; line-height: 1.15;
  background: linear-gradient(180deg, #ffffff, #9fb4ff 60%, #4a5a9e);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 30px rgba(0,229,255,.2);
}
.title .arrow { color: var(--cyan); -webkit-text-fill-color: var(--cyan); }
.title .deluxe { color: var(--gold); -webkit-text-fill-color: var(--gold); font-size: .7em; }
.tagline { color: var(--dim); font-style: italic; margin: 10px 0 6px; font-size: 13px; }
.link-btn { background: none; border: none; color: var(--cyan); text-decoration: underline; cursor: pointer; font-family: inherit; font-size: 12px; }

/* dropzone */
.dropzone {
  border: 2px dashed var(--line); border-radius: 16px; padding: 40px 20px; text-align: center;
  cursor: pointer; transition: .25s; background: rgba(20,24,43,.5); margin-bottom: 18px;
}
.dropzone:hover, .dropzone.drag { border-color: var(--cyan); background: rgba(0,229,255,.06); box-shadow: 0 0 40px rgba(0,229,255,.15) inset; }
.dropzone.has-file { border-style: solid; border-color: var(--magenta); }
.dz-big { font-family: "Orbitron"; font-weight: 700; font-size: 20px; }
.dz-sub { color: var(--dim); font-size: 12px; margin: 6px 0 16px; }
.choose-btn { display: inline-block; padding: 8px 20px; border-radius: 8px; background: linear-gradient(180deg, #2a3358, #171c30); border: 1px solid var(--line); font-size: 13px; }
.file-meta .fm-name { font-weight: 600; font-size: 15px; word-break: break-all; }
.file-meta .fm-sub { color: var(--cyan); font-size: 12px; margin-top: 6px; }
.file-meta .fm-hint { color: var(--dim); font-size: 11px; margin-top: 8px; }

.err { background: rgba(255,60,90,.12); border: 1px solid rgba(255,60,90,.4); color: #ff8ba0; padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; }

/* convert */
.convert-panel { text-align: center; margin-bottom: 20px; }
.convert-btn {
  font-family: "Orbitron"; font-weight: 800; font-size: 16px; letter-spacing: 1px;
  padding: 16px 30px; border: none; border-radius: 12px; cursor: pointer; color: #07080d;
  background: linear-gradient(100deg, var(--cyan), var(--magenta), var(--gold));
  background-size: 200% 100%; position: relative; overflow: hidden;
  animation: shimmer 3s linear infinite; box-shadow: 0 8px 30px rgba(255,47,185,.3);
}
.convert-btn:hover { transform: translateY(-2px); }
@keyframes shimmer { 0% { background-position: 0% 0;} 100% { background-position: 200% 0;} }

.prog-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.prog-msg { font-size: 13px; color: var(--cyan); margin-bottom: 12px; min-height: 18px; }
.eq-bar { display: flex; gap: 3px; height: 30px; align-items: flex-end; justify-content: center; }
.eq-seg { flex: 1; max-width: 14px; height: 40%; background: #1c2138; border-radius: 3px 3px 0 0; transition: .2s; }
.eq-seg.eq-on { height: 100%; background: linear-gradient(180deg, var(--gold), var(--magenta)); box-shadow: 0 0 8px var(--magenta); }
.prog-pct { font-family: "Orbitron"; font-weight: 700; margin-top: 10px; }

/* dashboard */
.dashboard { animation: rise .5s ease both; }
.stamp {
  display: inline-block; transform: rotate(-6deg); border: 3px double var(--gold); color: var(--gold);
  font-family: "Orbitron"; font-weight: 800; font-size: 13px; padding: 6px 14px; border-radius: 6px;
  margin: 0 auto 18px; text-align: center; letter-spacing: 1px; opacity: .9;
}

.room {
  background: repeating-linear-gradient(45deg, #0d1020, #0d1020 12px, #101430 12px, #101430 24px);
  border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px;
}
.screen { text-align: center; font-family: "Orbitron"; font-size: 10px; letter-spacing: 4px; color: var(--dim);
  background: linear-gradient(180deg, rgba(0,229,255,.25), transparent); border-radius: 6px; padding: 6px; margin-bottom: 14px; }
.spk-grid {
  display: grid; gap: 10px;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas:
    "fl c fr"
    "x1 sofa x2"
    "rl lfe rr";
  align-items: center; justify-items: center;
}
.speaker {
  width: 62px; height: 54px; border-radius: 10px; background: linear-gradient(180deg, #1b2murder, #12162a);
  background: linear-gradient(180deg, #1b2036, #12162a); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform .08s, box-shadow .08s;
}
.speaker-ghost { border-style: dashed; opacity: .85; }
.speaker-ico { font-size: 20px; color: var(--cyan); }
.speaker-lb { font-size: 9px; color: var(--dim); font-weight: 600; letter-spacing: 1px; margin-top: 2px; }
.sofa { font-size: 30px; opacity: .7; }

.ultra-badge { text-align: center; color: var(--gold); font-size: 12px; margin-bottom: 12px; animation: pulse 1.2s infinite; }

.wave { width: 100%; height: 90px; background: #0a0c16; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; display: block; }

.player { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 16px; }
.play-btn { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: none; cursor: pointer; font-size: 15px; color: #07080d;
  background: linear-gradient(180deg, var(--cyan), #009fb0); box-shadow: 0 0 16px rgba(0,229,255,.4); }
.scrub { flex: 1; accent-color: var(--magenta); }
.time { font-size: 11px; color: var(--dim); white-space: nowrap; }

.dolby-meter { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.dm-row { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 8px; }
.dm-label { color: var(--gold); font-weight: 700; }
.dm-bar { height: 12px; background: #0a0c16; border-radius: 8px; overflow: hidden; }
.dm-fill { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--gold)); transition: width .3s; }

.controls { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.slider-row { margin-bottom: 16px; }
.sl-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.sl-val { color: var(--cyan); font-weight: 700; }
.slider { width: 100%; accent-color: var(--cyan); }
.cinema-toggle { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; margin-top: 6px; }
.cinema-toggle input { width: 18px; height: 18px; accent-color: var(--gold); }

.download-btn { width: 100%; padding: 16px; border: none; border-radius: 12px; cursor: pointer; font-family: "Orbitron"; font-weight: 800; font-size: 14px; color: #07080d;
  background: linear-gradient(100deg, var(--gold), var(--cyan)); box-shadow: 0 6px 24px rgba(255,204,0,.25); }
.download-btn:disabled { opacity: .6; cursor: wait; }

.ftr { text-align: center; margin-top: 36px; color: var(--dim); font-size: 11px; }
.ftr .remix { color: var(--magenta); text-decoration: none; font-weight: 600; display: inline-block; margin-top: 8px; }
.ftr .remix:hover { text-decoration: underline; }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(3,4,10,.8); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; animation: fade .2s; }
.modal { background: var(--panel2); border: 1px solid var(--cyan); border-radius: 16px; padding: 24px; max-width: 460px; box-shadow: 0 0 60px rgba(0,229,255,.2); }
.modal-h { font-family: "Orbitron"; margin: 0 0 12px; color: var(--cyan); }
.modal p { font-size: 13px; line-height: 1.6; color: var(--txt); margin: 0 0 12px; }
.modal-close { width: 100%; margin-top: 8px; padding: 12px; border: none; border-radius: 10px; cursor: pointer; font-family: inherit; font-weight: 700; color: #07080d; background: linear-gradient(90deg, var(--cyan), var(--magenta)); }

@keyframes rise { from { opacity: 0; transform: translateY(14px);} to { opacity: 1; transform: none;} }
@keyframes fade { from { opacity: 0;} to { opacity: 1;} }

@media (max-width: 560px) {
  .speaker { width: 52px; height: 48px; }
  .title { font-size: 24px; }
}