:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fffefa;
  color: #101827;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #fffefa;
}

button,
input {
  font: inherit;
}

.site-header {
  width: min(100% - 48px, 1080px);
  height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  color: #081225;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 0;
  text-decoration: none;
}

.logo span {
  color: #17243b;
}

.nav-upload,
.hero-button,
.primary-button,
.copy-row button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: #0d1728;
  font-weight: 800;
  cursor: pointer;
}

.nav-upload {
  min-width: 82px;
  height: 38px;
  padding: 0 20px;
  font-size: 16px;
}

.hero {
  width: min(100% - 48px, 1080px);
  min-height: calc(100vh - 158px);
  margin: 0 auto;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
}

.hero-copy {
  text-align: center;
  padding: 86px 0 40px;
}

h1 {
  margin: 0;
  color: #101827;
  font-size: clamp(48px, 5vw, 62px);
  line-height: 0.97;
  letter-spacing: 0;
  font-weight: 900;
}

h1 span {
  color: #525b69;
}

.hero-copy p {
  margin: 24px 0 38px;
  color: #11203a;
  font-size: 21px;
  font-weight: 500;
}

.hero-button {
  min-width: 181px;
  height: 50px;
  padding: 0 28px;
  font-size: 16px;
}

.upload-panel {
  width: min(100%, 560px);
  margin: 0 auto 52px;
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 168px;
  border: 1px dashed #b3bdcc;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: #0d1728;
  background: #f8fafc;
}

.dropzone input {
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-content {
  display: grid;
  gap: 8px;
  text-align: center;
  padding: 24px;
}

.drop-content strong {
  color: #101827;
  font-size: 22px;
}

.drop-content span,
.status {
  color: #758197;
}

.preview,
.watch-player {
  width: 100%;
  max-height: 62vh;
  margin-top: 18px;
  border-radius: 8px;
  background: #050607;
}

.progress-wrap {
  height: 8px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf3;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #2f8cff;
  transition: width 120ms ease;
}

.primary-button {
  width: 100%;
  height: 54px;
  margin-top: 18px;
  border-radius: 8px;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.result {
  margin-top: 22px;
}

.result label {
  display: block;
  margin-bottom: 8px;
  color: #17243b;
  font-weight: 700;
}

.copy-row {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 10px;
}

.copy-row input {
  min-width: 0;
  height: 48px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  padding: 0 14px;
  color: #101827;
  background: #ffffff;
}

.copy-row button {
  border-radius: 8px;
}

.watch-link {
  display: inline-block;
  margin-top: 14px;
  color: #315d9d;
  text-decoration: none;
  font-weight: 700;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 181px;
  height: 50px;
  padding: 0 28px;
  border-radius: 999px;
  color: #ffffff;
  background: #0d1728;
  text-decoration: none;
  font-weight: 800;
}

.status {
  min-height: 24px;
  margin: 16px 0 0;
}

.status.error {
  color: #c72d2d;
}

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 24px;
  display: flex;
  justify-content: center;
  gap: 34px;
  pointer-events: none;
}

.site-footer a {
  color: #8b98ad;
  font-size: 12px;
  text-decoration: none;
  pointer-events: auto;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
}

.upload-modal {
  position: relative;
  width: min(100%, 400px);
  min-height: 170px;
  border-radius: 14px;
  padding: 26px 24px 24px;
  background: #ffffff;
  color: #1c2028;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.26);
}

.upload-modal h2 {
  margin: 0 0 16px;
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: 0;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #7e8490;
  border-radius: 50%;
  color: #5b626e;
  background: #ffffff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.modal-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #d3d3d3;
}

.modal-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #171717;
  transition: width 120ms ease;
}

.modal-percent {
  margin-top: 12px;
  color: #2f3b50;
  text-align: center;
  font-size: 14px;
}

.modal-spinner {
  width: 28px;
  height: 28px;
  margin: 34px auto 28px;
  border: 3px solid #e0e3e8;
  border-top-color: #101827;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.upload-modal p {
  margin: 16px 0 0;
  color: #697386;
  text-align: center;
  font-size: 14px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-page {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 24px;
  text-align: center;
}

.error-page h1 {
  margin: 0;
  font-size: 40px;
}

.error-page p {
  margin: 14px 0 18px;
  color: #303846;
}

.error-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  color: #ffffff;
  background: #0d0d0d;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
}

.watch-shell {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
  padding: 28px 0;
}

.watch-player {
  display: block;
  margin-top: 20px;
}

@media (max-width: 520px) {
  .site-header,
  .hero {
    width: min(100% - 32px, 1080px);
  }

  h1 {
    font-size: 43px;
  }

  .hero-copy p {
    font-size: 18px;
  }

  .copy-row {
    grid-template-columns: 1fr;
  }

  .copy-row button {
    height: 46px;
  }

  .site-footer {
    position: static;
    padding: 22px 0;
  }

  .watch-shell {
    width: 100%;
    padding: 12px 8px 20px;
  }

  .watch-player {
    width: 100%;
    max-height: 78vh;
    margin-top: 12px;
    border-radius: 6px;
  }

  .back-link {
    margin-left: 8px;
  }
}
