* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  --bg: #0b0e13;
  --panel: #141a23;
  --panel2: #10151d;
  --line: #283343;
  --text: #edf3fb;
  --muted: #9aa9bb;
  --blue: #25a7f2;
  --blue2: #087ac0;
  --green: #42c98a;
}
body {
  margin: 0; min-height: 100vh; padding: 28px 14px;
  background: radial-gradient(circle at top, #14283a 0, var(--bg) 46%);
  color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.app { width: min(760px, 100%); margin: 0 auto; }
.header { display: flex; align-items: center; gap: 15px; margin: 8px 0 25px; }
.brand-icon {
  width: 54px; height: 54px; display: grid; place-items: center;
  border-radius: 15px; background: linear-gradient(135deg, #167fc0, #24c1d6);
  color: white; font-size: 31px; font-weight: 800;
}
h1 { margin: 0; font-size: clamp(22px, 4vw, 30px); letter-spacing: -.7px; }
h1 span { color: var(--blue); }
.header p { margin: 3px 0 0; color: var(--muted); }
.panel {
  background: rgba(20, 26, 35, .96); border: 1px solid var(--line);
  border-radius: 16px; padding: 22px; margin-bottom: 18px;
  box-shadow: 0 12px 35px #0003;
}
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 17px; }
h2 { font-size: 17px; margin: 0; }
.tag { white-space: nowrap; font-size: 11px; padding: 5px 9px; border-radius: 30px; color: #9ddaff; background: #12334a; }
.tag.muted { color: var(--muted); background: #222b37; }
.drop-zone {
  min-height: 175px; border: 2px dashed #3b5269; border-radius: 13px;
  background: var(--panel2); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px; text-align: center;
  cursor: pointer; padding: 18px; transition: .2s;
}
.drop-zone:hover, .drop-zone.drag { border-color: var(--blue); background: #102435; }
.upload-icon { font-size: 30px; color: var(--blue); line-height: 1.1; }
.drop-zone span:not(.upload-icon) { color: var(--muted); font-size: 13px; }
.drop-zone small { color: #72859a; margin-top: 6px; }
#audioFile { display: none; }
.file-info { margin-top: 12px; padding: 10px 12px; background: #0e2635; border-radius: 9px; color: #bfe8ff; font-size: 13px; overflow-wrap: anywhere; }
.hidden { display: none !important; }
.settings { margin: 18px 0; }
.settings label { display: block; font-weight: 650; margin-bottom: 7px; }
select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 9px; background: #0d131b; color: var(--text); font: inherit;
}
.hint { color: var(--muted); font-size: 12px; margin: 7px 0 0; }
button {
  border: 0; border-radius: 9px; padding: 12px 17px; font: 700 14px system-ui;
  cursor: pointer; transition: .18s;
}
button:disabled { opacity: .42; cursor: not-allowed; }
.primary { width: 100%; background: var(--blue); color: #03121d; }
.primary:not(:disabled):hover { background: #61c4ff; transform: translateY(-1px); }
.secondary { background: #253345; color: var(--text); border: 1px solid #3b4c60; }
.secondary:not(:disabled):hover { background: #31445a; }
.status { margin-top: 13px; padding: 10px 12px; border-radius: 8px; color: var(--muted); background: #0e131a; font-size: 13px; }
.status.error { color: #ffb6b6; background: #35191d; }
.status.ok { color: #9de8c4; background: #123126; }
.progress-wrap { margin-top: 13px; }
.progress-bar { height: 7px; background: #263343; border-radius: 9px; overflow: hidden; }
.progress-bar div { width: 5%; height: 100%; background: linear-gradient(90deg, #168dd2, #50d3cf); transition: width .3s; }
#progressText { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); }
textarea {
  display: block; width: 100%; min-height: 270px; resize: vertical;
  border: 1px solid var(--line); border-radius: 10px; padding: 14px;
  background: #090d12; color: #d7e7f5; font: 13px/1.65 Consolas, monospace;
}
textarea:focus, select:focus { outline: 2px solid #168dd2; outline-offset: 1px; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
footer { text-align: center; color: #8291a3; font-size: 11px; padding: 8px 8px 20px; }
footer p { margin: 6px 0; }
@media (max-width: 520px) {
  body { padding: 17px 10px; }
  .panel { padding: 16px; }
  .section-title { align-items: flex-start; }
  .actions button { flex: 1; }
}
