:root {
  --bg: #040b15;
  --panel: rgba(9, 29, 43, 0.74);
  --panel-strong: rgba(12, 39, 55, 0.92);
  --line: rgba(118, 242, 224, 0.18);
  --line-strong: rgba(118, 242, 224, 0.42);
  --text: #f2fbff;
  --muted: #9eb2c1;
  --cyan: #45f2df;
  --blue: #56b9ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 42%, rgba(69, 242, 223, 0.15), transparent 28rem),
    radial-gradient(circle at 85% 20%, rgba(86, 185, 255, 0.13), transparent 26rem),
    linear-gradient(180deg, #071321 0%, #03101a 50%, #02070d 100%);
  overflow-x: hidden;
}

button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }

.ambient {
  position: fixed;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  filter: blur(46px);
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
}
.ambient-one { background: var(--cyan); left: -9rem; top: 35rem; }
.ambient-two { background: var(--blue); right: -12rem; top: 7rem; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: clamp(1.45rem, 4vw, 2.15rem);
  font-weight: 900;
  letter-spacing: -0.05em;
}
.brand > span:last-child span, .hero h1 span { color: var(--cyan); }
.brand-mark {
  display: grid;
  grid-template-columns: repeat(4, 0.28rem);
  align-items: center;
  gap: 0.24rem;
  height: 2.4rem;
}
.brand-mark span {
  display: block;
  width: 0.28rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
  box-shadow: 0 0 22px rgba(69, 242, 223, 0.62);
}
.brand-mark span:nth-child(1), .brand-mark span:nth-child(4) { height: 1.45rem; }
.brand-mark span:nth-child(2) { height: 2.35rem; }
.brand-mark span:nth-child(3) { height: 1.9rem; }
.secure-badge, .privacy-strip span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(69, 242, 223, 0.08);
  color: #c9fff7;
  box-shadow: inset 0 0 20px rgba(69, 242, 223, 0.03);
}
.secure-badge { padding: 0.85rem 1.25rem; font-weight: 800; }
.secure-badge svg, .trust-row svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }

.page-shell { width: min(1120px, calc(100% - 2rem)); margin: 0 auto 4rem; }
.hero { padding: clamp(3rem, 8vw, 6.5rem) 0 2rem; text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.35rem;
  color: #9ffcf1;
  font-weight: 900;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.eyebrow span { width: 0.75rem; height: 0.75rem; border-radius: 99px; background: var(--cyan); box-shadow: 0 0 26px var(--cyan); }
.hero h1 {
  max-width: 920px;
  margin: 0 auto;
  font-size: clamp(3rem, 10vw, 6.7rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}
.hero-copy { max-width: 760px; margin: 1.5rem auto 0; color: var(--muted); font-size: clamp(1.08rem, 2.5vw, 1.45rem); line-height: 1.8; }
.privacy-strip { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.8rem; }
.privacy-strip span { padding: 0.62rem 0.9rem; color: var(--muted); }

.steps { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 1.1rem; margin: 2.5rem 0 2rem; }
.steps::before, .steps::after { content: ""; display: block; height: 1px; background: var(--line); }
.step { display: flex; align-items: center; justify-content: center; gap: 0.8rem; color: #698091; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; }
.step span { display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%; background: rgba(30, 57, 77, 0.74); border: 1px solid rgba(255,255,255,0.08); letter-spacing: 0; }
.step.is-active { color: var(--text); }
.step.is-active span { color: #05231f; background: var(--cyan); box-shadow: 0 0 28px rgba(69, 242, 223, 0.65); }

.glass-card {
  margin-top: 1.4rem;
  padding: clamp(1.2rem, 4vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: linear-gradient(145deg, var(--panel), rgba(3, 18, 30, 0.76));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
}
.glass-card.is-disabled { opacity: 0.54; pointer-events: none; }
.section-heading p { margin: 0 0 0.3rem; color: var(--cyan); font-size: 0.8rem; font-weight: 900; letter-spacing: 0.2em; text-transform: uppercase; }
.section-heading h2 { margin: 0 0 1.25rem; font-size: clamp(1.4rem, 3vw, 2.1rem); letter-spacing: -0.04em; }

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 25rem;
  padding: 2rem;
  border: 1.5px dashed rgba(130, 255, 239, 0.42);
  border-radius: 1.4rem;
  background: rgba(7, 35, 48, 0.58);
  text-align: center;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.drop-zone:hover, .drop-zone.is-dragover { transform: translateY(-3px); border-color: var(--cyan); box-shadow: 0 0 45px rgba(69, 242, 223, 0.13); background: rgba(9, 48, 62, 0.72); }
.drop-zone input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }
.upload-icon { display: grid; place-items: center; width: 6.4rem; height: 6.4rem; border-radius: 999px; background: rgba(69, 242, 223, 0.1); box-shadow: 0 0 0 1rem rgba(69, 242, 223, 0.035), 0 0 34px rgba(69, 242, 223, 0.2); }
.upload-icon svg { width: 2.4rem; height: 2.4rem; fill: var(--cyan); }
.drop-zone strong { margin-top: 1.3rem; font-size: clamp(1.3rem, 3vw, 2rem); }
.drop-zone small { color: var(--muted); font-size: 1.05rem; }
.drop-zone em { max-width: 620px; color: #6f8796; font-style: normal; line-height: 1.5; }
.file-meta { margin-top: 1rem; padding: 1rem; border-radius: 1rem; background: rgba(69, 242, 223, 0.08); color: #d9fffb; }
.trust-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem; margin-top: 1.7rem; color: #91a6b5; }
.trust-row span { display: inline-flex; align-items: center; gap: 0.55rem; }

.mode-grid, .settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.mode-option {
  min-height: 13rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: rgba(8, 28, 42, 0.82);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.mode-option:hover, .mode-option.is-selected { transform: translateY(-4px); border-color: var(--cyan); background: rgba(10, 49, 62, 0.88); box-shadow: 0 0 36px rgba(69, 242, 223, 0.12); }
.mode-icon { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; margin-bottom: 1rem; border-radius: 1rem; color: var(--cyan); background: rgba(69, 242, 223, 0.12); font-size: 1.8rem; }
.mode-option strong { display: block; font-size: 1.35rem; margin-bottom: 0.55rem; }
.mode-option small { color: var(--muted); line-height: 1.6; }

.waveform-shell { border: 1px solid var(--line); border-radius: 1.25rem; background: rgba(4, 16, 26, 0.76); overflow: hidden; }
#waveformCanvas { display: block; width: 100%; height: min(260px, 45vw); cursor: crosshair; touch-action: none; }
.selection-readout { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; padding: 1rem; color: var(--muted); border-top: 1px solid var(--line); }
.selection-readout strong { color: var(--cyan); }
.hint { color: var(--muted); line-height: 1.6; }
.settings-grid { grid-template-columns: repeat(3, 1fr); align-items: end; }
.settings-grid label { display: grid; gap: 0.7rem; color: var(--muted); }
select, input[type="range"] { width: 100%; accent-color: var(--cyan); }
select { min-height: 3.15rem; border: 1px solid var(--line); border-radius: 0.9rem; background: rgba(5, 18, 28, 0.9); color: var(--text); padding: 0 0.9rem; }
.check-row { grid-template-columns: auto 1fr; align-items: center; min-height: 3.15rem; padding: 0 1rem; border: 1px solid var(--line); border-radius: 0.9rem; background: rgba(5, 18, 28, 0.6); }

.primary-btn, .secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.4rem;
  margin-top: 1rem;
  padding: 0.9rem 1.25rem;
  border: 0;
  border-radius: 1rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}
.primary-btn { color: #042622; background: linear-gradient(135deg, var(--cyan), var(--blue)); box-shadow: 0 12px 34px rgba(69, 242, 223, 0.2); }
.primary-btn:hover, .secondary-btn:hover { transform: translateY(-2px); }
.primary-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.secondary-btn { color: var(--text); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255,255,255,0.1); }
.progress-track { height: 0.75rem; border-radius: 99px; background: rgba(255,255,255,0.08); overflow: hidden; }
.progress-track span { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--blue)); transition: width 260ms ease; }
#statusText { color: var(--muted); }
#previewPlayer { width: 100%; filter: drop-shadow(0 12px 30px rgba(69, 242, 223, 0.08)); }
.result-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

@media (max-width: 760px) {
  .site-header { padding-top: 1.35rem; }
  .secure-badge { padding: 0.7rem 0.85rem; font-size: 0.9rem; }
  .steps { grid-template-columns: 1fr; gap: 0.75rem; }
  .steps::before, .steps::after { display: none; }
  .step { justify-content: flex-start; }
  .drop-zone { min-height: 20rem; padding: 1.2rem; }
  .mode-grid, .settings-grid { grid-template-columns: 1fr; }
  .selection-readout { display: grid; grid-template-columns: 1fr; }
}
