:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #65717f;
  --line: #d9e1ea;
  --panel: #ffffff;
  --page: #f4f7fb;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --accent-soft: #d9f3f0;
  --danger: #b42318;
  --shadow: 0 24px 70px rgba(23, 32, 42, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.10), rgba(14, 116, 144, 0.05) 48%, rgba(226, 232, 240, 0.55)),
    var(--page);
  color: var(--ink);
}

button,
select,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.converter {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 0.85fr 1.35fr;
  gap: 28px;
  align-items: start;
}

.intro {
  padding-top: 32px;
}

.eyebrow,
.label {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lede {
  max-width: 34rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.workspace {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(217, 225, 234, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(14px);
}

.drop-zone {
  min-height: 244px;
  border: 2px dashed #a9bacb;
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 26px;
  text-align: center;
  cursor: pointer;
  background: #fbfdff;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: #ecfaf8;
  border-radius: 999px;
}

.upload-icon svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drop-title {
  font-size: 1.18rem;
  font-weight: 800;
}

.drop-subtitle,
.file-meta,
.message {
  color: var(--muted);
}

.details {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  margin-top: 16px;
  align-items: stretch;
}

video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #111827;
  object-fit: contain;
}

.file-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  display: grid;
  align-content: space-between;
  gap: 12px;
}

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

.file-meta {
  margin: 0;
  font-size: 0.92rem;
}

.settings {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
}

.progress-panel {
  margin-top: 18px;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.progress-track {
  height: 10px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf5;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 160ms ease;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

button,
.download {
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary {
  color: #ffffff;
  background: var(--accent);
}

.primary:hover {
  background: var(--accent-dark);
}

.primary:disabled,
.ghost:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.download {
  color: #ffffff;
  background: #1f6feb;
}

.ghost {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
}

.message {
  min-height: 24px;
  margin: 16px 0 0;
  line-height: 1.5;
}

.message.error {
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 820px) {
  .converter {
    grid-template-columns: 1fr;
  }

  .intro {
    padding-top: 0;
  }

  .workspace {
    padding: 16px;
  }
}

@media (max-width: 560px) {
  .details,
  .settings {
    grid-template-columns: 1fr;
  }

  .drop-zone {
    min-height: 210px;
  }

  .actions > * {
    width: 100%;
  }
}
