:root {
  color-scheme: dark;
  --bg: #09100e;
  --panel: #101a17;
  --panel-soft: #14211d;
  --ink: #f4f7f2;
  --muted: #9fb0a8;
  --line: rgba(255, 255, 255, 0.13);
  --green: #35c5a4;
  --green-dark: #167d6f;
  --amber: #d8ad4f;
  --red: #ff6b6b;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(53, 197, 164, 0.24), transparent 34rem),
    linear-gradient(135deg, #080d0c 0%, #101711 48%, #15120d 100%);
  color: var(--ink);
}

button,
input,
audio {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  min-height: 260px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 48px 0 28px;
}

.hero h1 {
  margin: 8px 0 14px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  margin: 0;
  color: #d3ddd8;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.7;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  align-self: start;
  padding: 10px 14px;
  border: 1px solid rgba(53, 197, 164, 0.38);
  border-radius: 999px;
  background: rgba(53, 197, 164, 0.1);
  color: #d8fff4;
  font-weight: 800;
  white-space: nowrap;
}

.privacy-pill span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

.workbench,
.notes {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 26, 23, 0.92);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.workbench {
  padding: 24px;
}

.drop-zone {
  min-height: 250px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 28px;
  border: 1px dashed rgba(244, 247, 242, 0.32);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--green);
  background: rgba(53, 197, 164, 0.11);
  transform: translateY(-1px);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(53, 197, 164, 0.16);
  color: var(--green);
  font-size: 34px;
  font-weight: 300;
}

.drop-zone strong {
  margin-top: 6px;
  font-size: 22px;
}

.drop-zone small,
.file-meta,
.notes p,
#progressDetail {
  color: var(--muted);
  line-height: 1.65;
}

.file-card,
.fixed-settings,
.progress-panel,
.result-panel,
.error-panel {
  margin-top: 18px;
}

.file-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.file-name {
  margin: 0 0 4px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.file-meta {
  margin: 0;
  font-size: 14px;
}

.fixed-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.fixed-settings div,
.metrics div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.fixed-settings span,
.metrics span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.fixed-settings strong,
.metrics strong {
  font-size: 18px;
}

.primary-button,
.download-button,
.ghost-button {
  border: 0;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  min-height: 58px;
  margin-top: 18px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #031311;
  font-size: 18px;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.ghost-button {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border: 1px solid var(--line);
}

.progress-panel,
.result-panel,
.error-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.progress-head,
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.progress-track {
  height: 12px;
  margin: 14px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

#progressBar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber));
  transition: width 0.18s ease;
}

.result-head h2 {
  margin: 4px 0 0;
  font-size: 26px;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  background: var(--green);
  color: #041311;
  white-space: nowrap;
}

audio {
  width: 100%;
  margin-top: 18px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.error-panel {
  color: #ffdede;
  border-color: rgba(255, 107, 107, 0.5);
  background: rgba(255, 107, 107, 0.1);
}

.notes {
  margin-top: 20px;
  padding: 20px 24px;
}

.notes h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.notes p {
  margin: 0;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 16px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 32px 0 20px;
  }

  .privacy-pill {
    justify-self: start;
  }

  .workbench {
    padding: 14px;
  }

  .drop-zone {
    min-height: 220px;
    padding: 18px;
  }

  .fixed-settings,
  .metrics {
    grid-template-columns: 1fr;
  }

  .result-head,
  .progress-head,
  .file-card {
    align-items: stretch;
    flex-direction: column;
  }

  .download-button,
  .ghost-button {
    width: 100%;
  }
}
