:root {
  --bg: #f9f9f9;
  --ink: #0f0f0f;
  --muted: #606060;
  --panel: #ffffff;
  --line: #e5e5e5;
  --accent: #ff0033;
  --accent-dark: #cc0029;
  --accent-soft: #fff0f3;
  --danger: #c00;
  --black: #0f0f0f;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(255, 0, 51, 0.12), transparent 310px),
    linear-gradient(180deg, #ffffff, transparent 360px),
    var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

.topbar {
  display: flex;
  width: min(1120px, calc(100% - 32px));
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--black);
  font-size: 20px;
  font-weight: 850;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 29px;
  border-radius: 8px;
  background: var(--accent);
  box-shadow: 0 8px 20px rgba(255, 0, 51, 0.24);
}

.brand-mark::after,
.mini-play::after,
.input-play::after,
.thumb-play::after,
.download-icon::after {
  position: absolute;
  content: "";
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid currentColor;
}

.brand-mark::after {
  top: 8px;
  left: 17px;
  color: #ffffff;
}

.pill {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}

.app {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 56px;
}

.hero {
  display: grid;
  min-height: 220px;
  align-items: end;
  padding-bottom: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.mini-play {
  position: relative;
  display: inline-flex;
  width: 23px;
  height: 16px;
  border-radius: 5px;
  background: var(--accent);
  color: #ffffff;
}

.mini-play::after {
  top: 3px;
  left: 9px;
  border-top-width: 5px;
  border-bottom-width: 5px;
  border-left-width: 8px;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: 0;
}

.lede {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.tool {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(15, 15, 15, 0.1);
  overflow: hidden;
}

.form {
  display: grid;
  gap: 12px;
  padding: 22px;
}

label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
}

.url-shell {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  min-width: 0;
  min-height: 50px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.input-play {
  position: relative;
  display: grid;
  width: 28px;
  height: 20px;
  place-self: center;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
}

.input-play::after {
  top: 4px;
  left: 11px;
  border-top-width: 6px;
  border-bottom-width: 6px;
  border-left-width: 9px;
}

input[type="url"] {
  min-width: 0;
  min-height: 48px;
  border: 0;
  outline: 0;
  padding: 12px 16px 12px 0;
  color: var(--ink);
  background: transparent;
}

button,
.download {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  padding: 12px 18px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.download:hover {
  background: var(--accent-dark);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-weight: 650;
}

.check input {
  width: 17px;
  height: 17px;
  margin-top: 1px;
}

.status {
  min-height: 0;
  padding: 0 22px 18px;
  color: var(--muted);
  font-size: 14px;
}

.status.error {
  color: var(--danger);
}

.result {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #fff7f8);
}

.result[hidden] {
  display: none;
}

.thumb-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #111111;
}

.result img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0;
  background: var(--accent-soft);
}

.thumb-play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 54px;
  height: 38px;
  transform: translate(-50%, -50%);
  border-radius: 10px;
  background: rgba(255, 0, 51, 0.94);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

.thumb-play::after {
  top: 11px;
  left: 22px;
  border-top-width: 8px;
  border-bottom-width: 8px;
  border-left-width: 13px;
}

.duration-chip {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-height: 22px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.82);
  color: #ffffff;
  padding: 3px 6px;
  font-size: 12px;
  font-weight: 800;
}

.result-copy {
  min-width: 0;
  align-self: center;
}

h2 {
  margin: 4px 0 8px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.download {
  gap: 9px;
  width: fit-content;
  margin-top: 18px;
}

.download-icon {
  position: relative;
  width: 22px;
  height: 16px;
  border-radius: 5px;
  background: #ffffff;
  color: var(--accent);
}

.download-icon::after {
  top: 4px;
  left: 9px;
  border-top-width: 4px;
  border-bottom-width: 4px;
  border-left-width: 7px;
}

.turnstile-slot {
  margin-top: 14px;
}

.turnstile-slot:empty {
  display: none;
}

.transcript-card {
  padding: 22px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.transcript-card[hidden] {
  display: none;
}

.transcript-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-kicker {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.transcript-head h2 {
  margin: 0;
  font-size: 20px;
}

.transcript-meta {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.transcript-status {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.transcript-status.error {
  color: var(--danger);
}

.transcript-text {
  max-height: 260px;
  margin: 14px 0 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
  color: var(--ink);
  padding: 14px;
  font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  .topbar {
    min-height: 62px;
  }

  .pill {
    display: none;
  }

  .app {
    padding: 18px 0 34px;
  }

  .input-row,
  .result {
    grid-template-columns: 1fr;
  }

  .transcript-head {
    display: grid;
  }

  h1 {
    font-size: 42px;
  }
}
