:root {
  --page: #f5f5f7;
  --surface: rgba(255, 255, 255, .82);
  --surface-solid: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --soft: #86868b;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-soft: #e8f2ff;
  --line: rgba(0, 0, 0, .08);
  --line-strong: rgba(0, 0, 0, .13);
  --shadow: 0 24px 70px rgba(0, 0, 0, .08);
  --font: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .82), transparent 34%);
  z-index: -2;
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(4px);
  pointer-events: none;
  z-index: -1;
}
.ambient-one {
  width: 520px;
  height: 520px;
  top: -290px;
  left: calc(50% - 420px);
  background: radial-gradient(circle, rgba(80, 154, 255, .2), rgba(80, 154, 255, 0) 70%);
}
.ambient-two {
  width: 420px;
  height: 420px;
  top: 210px;
  right: -250px;
  background: radial-gradient(circle, rgba(202, 220, 255, .2), rgba(202, 220, 255, 0) 70%);
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid rgba(0, 113, 227, .25);
  outline-offset: 3px;
}

.site-nav {
  width: min(1160px, calc(100% - 48px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: rise .65s cubic-bezier(.22, 1, .36, 1) both;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand-mark {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(145deg, #2b2b2d, #050506);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .22), 0 5px 14px rgba(0, 0, 0, .16);
}
.brand-mark::before, .brand-mark i {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #fff;
}
.brand-mark::before { width: 8px; height: 8px; left: 7px; top: 7px; }
.brand-mark i { width: 8px; height: 8px; right: 7px; bottom: 7px; opacity: .55; }
.nav-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  letter-spacing: .02em;
  backdrop-filter: blur(18px);
}
.nav-status i, .complete-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 0 4px rgba(48, 209, 88, .1);
}

main { width: min(1040px, calc(100% - 48px)); margin: 0 auto; padding: 80px 0 110px; }
.hero {
  max-width: 900px;
  margin: 0 auto 64px;
  text-align: center;
  animation: rise .8s .08s cubic-bezier(.22, 1, .36, 1) both;
}
.hero-badge {
  width: fit-content;
  margin: 0 auto 25px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(0, 113, 227, .14);
  border-radius: 999px;
  color: #1668b2;
  background: rgba(232, 242, 255, .72);
  font-size: 12px;
  font-weight: 600;
}
.hero-badge span { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.hero h1 {
  margin: 0;
  font-size: clamp(48px, 7.4vw, 82px);
  line-height: 1.04;
  letter-spacing: -.065em;
  font-weight: 700;
}
.hero h1 span {
  color: transparent;
  background: linear-gradient(110deg, #5e5e63 8%, #a0a0a6 55%, #57575c 92%);
  background-clip: text;
  -webkit-background-clip: text;
}
.hero p {
  max-width: 620px;
  margin: 27px auto 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: -.015em;
}

.workspace {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 34px;
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(0, 0, 0, .025);
  backdrop-filter: blur(30px) saturate(145%);
  animation: rise .85s .18s cubic-bezier(.22, 1, .36, 1) both;
}
.mode-switch {
  width: fit-content;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 4px;
  border-radius: 13px;
  background: #ececef;
}
.mode-tab {
  min-width: 106px;
  border: 0;
  border-radius: 10px;
  padding: 9px 15px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color .2s, background .2s, box-shadow .2s;
}
.mode-tab.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08), 0 0 0 1px rgba(0, 0, 0, .03);
}
.mode-panel { padding: 36px 32px 28px; animation: panelIn .35s ease both; }
.panel-heading, .result-header, .history-heading, .transcript-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.section-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .16em;
}
.panel-heading h2, .result-header h2, .history-heading h3 {
  margin: 0;
  letter-spacing: -.035em;
  font-weight: 650;
}
.panel-heading h2 { font-size: 25px; }
.panel-note {
  padding: 7px 10px;
  border-radius: 9px;
  color: var(--soft);
  background: #f4f4f6;
  font-size: 11px;
  font-weight: 600;
}

.link-form, .upload-form { margin-top: 25px; }
.link-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .045);
  transition: border-color .2s, box-shadow .2s;
}
.link-form:focus-within { border-color: rgba(0, 113, 227, .42); box-shadow: 0 8px 28px rgba(0, 113, 227, .09); }
.input-wrap { min-width: 0; display: flex; align-items: center; gap: 12px; padding-left: 13px; }
.input-wrap svg { width: 19px; flex: 0 0 19px; fill: none; stroke: #8e8e93; stroke-width: 1.7; stroke-linecap: round; }
.input-wrap input {
  width: 100%;
  min-width: 0;
  padding: 15px 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
}
.input-wrap input::placeholder { color: #a3a3a8; }
.primary-button {
  border: 0;
  border-radius: 13px;
  padding: 14px 20px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 6px 15px rgba(0, 113, 227, .19);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .2s, background .2s, box-shadow .2s;
}
.primary-button:hover { background: var(--blue-hover); box-shadow: 0 8px 20px rgba(0, 113, 227, .24); transform: translateY(-1px); }
.primary-button:active { transform: scale(.98); }
.primary-button span { margin-left: 7px; font-size: 17px; font-weight: 400; }
.support-row { display: flex; align-items: center; gap: 7px; margin-top: 15px; }
.support-row > span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, .5);
  font-size: 10px;
  font-weight: 650;
}
.support-row p { margin: 0 0 0 auto; color: #9a9a9f; font-size: 11px; }

.upload-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.file-picker {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 15px;
  border: 1px dashed rgba(0, 113, 227, .3);
  border-radius: 18px;
  background: rgba(232, 242, 255, .35);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.file-picker:hover { border-color: rgba(0, 113, 227, .58); background: rgba(232, 242, 255, .6); }
.upload-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--blue);
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
  font-size: 23px;
  font-weight: 300;
}
.file-copy { min-width: 0; display: block; }
.file-copy strong, .file-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-copy strong { font-size: 14px; font-weight: 620; }
.file-copy small { margin-top: 5px; color: var(--soft); font-size: 11px; }
.browse-label { margin-left: auto; color: var(--blue); font-size: 13px; font-weight: 600; }
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.status-card {
  position: relative;
  overflow: hidden;
  margin-top: 20px;
  padding: 20px 24px 22px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 22px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .05);
  backdrop-filter: blur(24px);
  animation: panelIn .4s ease both;
}
.status-card > #percent { position: absolute; top: 23px; right: 24px; color: var(--blue); font-size: 14px; font-weight: 700; }
.status-copy { display: flex; align-items: center; gap: 13px; }
.status-copy div { display: flex; flex-direction: column; gap: 3px; }
.status-copy small { color: var(--soft); font-size: 9px; font-weight: 750; letter-spacing: .15em; }
.status-copy b { font-size: 14px; font-weight: 620; }
.status-orb {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(0, 113, 227, .18);
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--blue), #8fc6ff, var(--blue));
  box-shadow: inset 0 0 0 8px #fff;
  animation: spin 1.2s linear infinite;
}
.track { height: 4px; margin-top: 17px; overflow: hidden; border-radius: 999px; background: #e9e9ec; }
.track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0a84ff, #64b5ff); transition: width .45s ease; }
.error { color: #d70015; }

.result-shell { margin-top: 74px; animation: rise .7s cubic-bezier(.22, 1, .36, 1) both; }
.result-header { margin-bottom: 24px; }
.result-header h2 { max-width: 740px; font-size: clamp(28px, 4vw, 42px); line-height: 1.15; }
.result-header p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.complete-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(48, 209, 88, .16);
  border-radius: 999px;
  color: #248a3d;
  background: rgba(48, 209, 88, .08);
  font-size: 11px;
  font-weight: 650;
}
.download-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 16px;
}
.download-actions a {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, .76);
  text-decoration: none;
  box-shadow: 0 7px 22px rgba(0, 0, 0, .025);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.download-actions a:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 113, 227, .24);
  box-shadow: 0 10px 25px rgba(0, 113, 227, .07);
}
.download-actions a > span {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 10px;
  font-weight: 750;
}
.download-actions a:first-child > span { color: #fff; background: var(--blue); font-size: 18px; font-weight: 400; }
.download-actions a div { min-width: 0; }
.download-actions a b, .download-actions a small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.download-actions a b { font-size: 12px; font-weight: 650; }
.download-actions a small { margin-top: 4px; color: var(--soft); font-size: 9px; }
.overview-card {
  position: relative;
  overflow: hidden;
  padding: 38px 40px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, #111113 0%, #27272b 68%, #313136 100%);
  box-shadow: 0 24px 55px rgba(0, 0, 0, .14);
}
.overview-card::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -100px;
  top: -150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(93, 169, 255, .55), rgba(93, 169, 255, 0) 70%);
}
.overview-card > * { position: relative; z-index: 1; }
.overview-card > span { color: #a8cbf6; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.overview-card h2 { max-width: 830px; margin: 14px 0 0; font-size: clamp(22px, 3vw, 32px); line-height: 1.5; letter-spacing: -.025em; font-weight: 570; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.content-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--surface-solid);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .035);
}
.card-title { display: flex; align-items: center; gap: 11px; }
.card-title > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 10px;
  font-weight: 750;
}
.card-title h3 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.points-card ol { margin: 24px 0 0; padding: 0; list-style: none; counter-reset: point; }
.points-card li {
  position: relative;
  margin: 0;
  padding: 14px 0 14px 28px;
  border-top: 1px solid var(--line);
  color: #3a3a3c;
  font-size: 14px;
  line-height: 1.65;
  counter-increment: point;
}
.points-card li:first-child { border-top: 0; }
.points-card li::before { content: counter(point, decimal-leading-zero); position: absolute; left: 0; top: 16px; color: #a0a0a5; font-size: 10px; font-weight: 650; }
#chapters { margin-top: 22px; }
.chapter { padding: 15px 0; border-top: 1px solid var(--line); }
.chapter:first-child { border-top: 0; padding-top: 5px; }
.chapter b { display: inline-block; min-width: 46px; color: var(--blue); font-size: 11px; }
.chapter { color: #343437; font-size: 14px; font-weight: 600; }
.chapter p { margin: 8px 0 0 46px; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.55; }
.transcript { padding: 30px 34px; }
.copy-button {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--ink);
  background: #f8f8fa;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.copy-button:hover { color: var(--blue); border-color: rgba(0, 113, 227, .25); background: var(--blue-soft); }
#segments { margin-top: 24px; }
.segment {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  color: #3a3a3c;
  font-size: 14px;
  line-height: 1.85;
}
.segment time { padding-top: 3px; color: var(--blue); font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }

.history { margin-top: 76px; }
.history-heading { margin-bottom: 16px; }
.history-heading h3 { font-size: 24px; }
.history-heading > span { color: var(--soft); font-size: 11px; }
.history-list { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: rgba(255, 255, 255, .72); }
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.history-item:first-child { border-top: 0; }
.history-item > div { min-width: 0; }
.history-item span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 570; }
.history-item small { display: block; margin-top: 5px; color: var(--soft); font-size: 10px; }
.history-item b { flex: 0 0 auto; padding: 6px 8px; border-radius: 8px; color: #248a3d; background: rgba(48, 209, 88, .08); font-size: 10px; font-weight: 650; }
.empty-history { padding: 25px; color: var(--soft); text-align: center; font-size: 12px; }

footer {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 38px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--soft);
  font-size: 11px;
}
footer span { color: var(--ink); font-weight: 650; }
footer p { margin: 0; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes panelIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .site-nav, main, footer { width: min(100% - 28px, 1040px); }
  main { padding-top: 52px; padding-bottom: 80px; }
  .hero { margin-bottom: 42px; }
  .hero h1 { font-size: clamp(42px, 13vw, 62px); }
  .hero p { font-size: 16px; }
  .workspace { border-radius: 27px; padding: 10px; }
  .mode-panel { padding: 28px 14px 18px; }
  .link-form, .upload-form { grid-template-columns: 1fr; }
  .primary-button { width: 100%; min-height: 50px; }
  .support-row { flex-wrap: wrap; }
  .support-row p { width: 100%; margin: 3px 0 0; }
  .result-grid { grid-template-columns: 1fr; }
  .download-actions { grid-template-columns: 1fr 1fr; }
  .result-header { align-items: flex-start; }
  .overview-card { padding: 30px 25px; border-radius: 24px; }
  .content-card { padding: 25px 21px; }
  .transcript { padding: 25px 21px; }
  .segment { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
}

@media (max-width: 480px) {
  .site-nav { height: 62px; }
  .nav-status { padding: 7px 9px; font-size: 10px; }
  main { padding-top: 38px; }
  .hero-badge { font-size: 10px; }
  .hero h1 { letter-spacing: -.055em; }
  .panel-heading, .result-header { gap: 13px; }
  .panel-heading h2 { font-size: 21px; }
  .panel-note { display: none; }
  .mode-switch { width: calc(100% - 8px); }
  .mode-tab { min-width: 0; }
  .file-copy small { max-width: 190px; }
  .browse-label { display: none; }
  .complete-pill { padding: 7px 8px; font-size: 10px; }
  .download-actions { grid-template-columns: 1fr; }
  .result-header h2 { font-size: 27px; }
  .transcript-head { align-items: flex-start; }
  .history-item { align-items: flex-start; }
  footer { display: block; }
  footer p { margin-top: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
