:root {
  --paper: #FAFAF8;
  --surface: #FFFFFF;
  --surface-2: #F1F0EA;
  --border: #E3E1D9;
  --ink: #16181B;
  --ink-muted: #6B6E76;
  --ink-faint: #9C9EA4;
  --teal: #0F6E64;
  --teal-hover: #0B5850;
  --teal-tint: #E3F3F1;
  --amber: #B4741F;
  --amber-tint: #F7EBDA;
  --red: #B5402B;
  --red-tint: #FBEAE6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 32px 20px;
}

.wrap { width: 100%; max-width: 460px; }

.site-header {
  text-align: center;
  margin-bottom: 24px;
}

.wordmark-lg {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 8px;
}

.tagline {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-muted);
  margin: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px 32px;
}

.hidden { display: none !important; }
.center { text-align: center; }

.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--teal);
  background: var(--teal-tint);
}

.upload-icon { color: var(--ink-muted); margin-bottom: 14px; }
.dropzone.dragover .upload-icon { color: var(--teal); }

.drop-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.muted { color: var(--ink-muted); font-size: 14px; margin: 0; }
.error-title { color: var(--red); }

.spinner {
  width: 30px;
  height: 30px;
  margin: 0 auto 16px;
  border: 3px solid var(--surface-2);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.progress-label {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin: 0 0 14px;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--teal);
  border-radius: 999px;
  transition: width 0.15s ease;
}

.check {
  width: 44px;
  height: 44px;
  line-height: 44px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--teal-tint);
  color: var(--teal);
  font-size: 22px;
}

.link-row {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.link-input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
}

.btn {
  padding: 10px 16px;
  border-radius: 7px;
  border: none;
  background: var(--teal);
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn:hover { background: var(--teal-hover); }

.link-reset {
  margin-top: 16px;
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

.expiry-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--teal-tint);
  color: var(--teal-hover);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.expiry-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

.expiry-chip.is-expired {
  background: var(--red-tint);
  color: var(--red);
}
.expiry-chip.is-expired .dot { background: var(--red); }

.wordmark {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.15s ease;
}
.wordmark:hover { color: var(--ink); }

.ad-slot {
  margin-top: 16px;
  min-height: 50px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
}

.footer-link {
  font-size: 12.5px;
  color: var(--ink-muted);
  text-decoration: none;
}
.footer-link:hover { color: var(--teal); text-decoration: underline; }

/* Privacy / legal prose page */
.prose {
  text-align: left;
  padding: 44px 40px;
}
.prose h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}
.prose h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  margin: 28px 0 8px;
}
.prose p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 4px;
}
.prose ul {
  margin: 6px 0 4px;
  padding-left: 20px;
}
.prose li {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 4px;
}
.prose a { color: var(--teal); }
.prose a:hover { color: var(--teal-hover); }

/* Watch page */
.video-card { padding: 0; overflow: hidden; }
.video-card video-player { display: block; width: 100%; aspect-ratio: 16 / 9; }
.video-meta { padding: 18px 24px 22px; }
.video-filename {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 4px;
  word-break: break-word;
}

.expired-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
