:root {
  --bg: #121418;
  --surface: #1b1e24;
  --surface-2: #242830;
  --line: #333844;
  --ink: #eceef2;
  --muted: #a3a9b5;
  --accent: #6344ed;        /* violeta da marca alieniatools */
  --accent-hover: #5127e2;
  --teal: #2fbfb3;          /* turquesa do logo */
  --danger: #ff8a7a;
  --radius: 10px;
  --m: clamp(16px, 4vw, 40px);
  font-family: Inter, system-ui, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f6f8; --surface: #ffffff; --surface-2: #eef0f4; --line: #d9dde5;
    --ink: #151820; --muted: #555c6a; --teal: #11857c; --danger: #b3261e;
  }
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; }
a { color: inherit; }
button, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1180px; margin: 0 auto; padding: 16px var(--m); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.brand img { border-radius: 8px; }
.bar-link { font-size: 15px; color: var(--muted); text-decoration: none; }
.bar-link:hover { color: var(--ink); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 24px var(--m) 64px; }
.intro h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.025em; }
.intro p { margin: 12px 0 0; max-width: 62ch; color: var(--muted); font-size: 17px; }
.intro b { color: var(--ink); font-weight: 600; }

.tool { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; margin-top: 32px; align-items: start; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 20px; }

.drop {
  display: block; cursor: pointer; text-align: left;
  border: 1.5px dashed var(--line); border-radius: 8px; padding: 22px 18px;
  transition: border-color .15s, background-color .15s;
}
.drop:hover, .drop.is-over, .drop:focus-within { border-color: var(--teal); background: var(--surface-2); }
.drop-main { display: block; font-weight: 600; overflow-wrap: anywhere; }
.drop-hint { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }
audio { width: 100%; margin-top: 14px; }

.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.opts label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
select {
  width: 100%; min-width: 0;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px;
  padding: 9px 10px; color: var(--ink);
}

.btn {
  width: 100%; margin-top: 18px; min-height: 48px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 600;
  transition: background-color .15s, transform .1s;
}
.btn:hover:not(:disabled) { background: var(--accent-hover); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.note { margin: 10px 0 0; font-size: 14px; color: var(--muted); }

.out { min-height: 420px; display: flex; flex-direction: column; }
.status-text { margin: 0; color: var(--muted); }
.status-text.is-error { color: var(--danger); }
.meter { height: 6px; margin-top: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--teal); transition: width .3s; }

.tabs { display: flex; gap: 4px; margin-top: 16px; }
.tabs button {
  border: 0; background: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; color: var(--muted);
}
.tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.text {
  flex: 1; width: 100%; min-height: 280px; margin-top: 12px; resize: vertical;
  background: var(--surface-2); border: 0; border-radius: 8px; padding: 14px; line-height: 1.6;
}
.segs { flex: 1; list-style: none; margin: 12px 0 0; padding: 0; max-height: 420px; overflow: auto; }
.segs li { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 8px 10px; border-radius: 6px; }
.segs li:nth-child(odd) { background: var(--surface-2); }
.segs time { font-size: 14px; color: var(--teal); font-variant-numeric: tabular-nums; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn-2 {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 8px; cursor: pointer;
  background: var(--surface-2); border: 0; text-decoration: none; font-size: 15px; font-weight: 500;
  transition: background-color .15s;
}
.btn-2:hover { background: var(--line); }

.foot { padding: 24px var(--m) 40px; max-width: 1180px; margin: 0 auto; font-size: 14px; color: var(--muted); }

@media (max-width: 820px) {
  .tool { grid-template-columns: 1fr; }
  .out { min-height: 0; }
  .text { min-height: 220px; }
  .segs li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 420px) {
  .opts { grid-template-columns: 1fr; }
  .bar-link { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
