:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --border: #ecdce5;
  --text: #2b2530;
  --muted: #9a8b96;
  --accent: #e6497e;
  --accent-hover: #f16093;
  --danger: #d9364f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  width: 100%;
  padding: 20px 28px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

header a {
  color: var(--text);
  text-decoration: none;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

header a span { color: var(--accent); }

main {
  width: 100%;
  max-width: 640px;
  padding: 0 16px 48px;
  flex: 1;
}

.tagline {
  padding: 36px 8px 22px;
  text-align: center;
}

.tagline h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
}

.tagline h1 .accent-word {
  color: var(--accent);
}

.tagline .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 6px 14px;
  background: rgba(230, 73, 126, 0.08);
  border: 1px solid rgba(230, 73, 126, 0.25);
  border-radius: 999px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
}

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

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: rgba(230, 73, 126, 0.05);
}

.dropzone p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.dropzone .icon { color: var(--accent); display: flex; justify-content: center; }

input[type="file"] { display: none; }

.progress-wrap {
  margin-top: 20px;
  display: none;
}

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

.progress-label {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.result { margin-top: 20px; display: none; }

.result label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0 6px;
}

.copy-row {
  display: flex;
  gap: 8px;
}

.copy-row input, .copy-row textarea {
  flex: 1;
  background: #fdf7fa;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 13px;
  font-family: monospace;
  resize: none;
}

button {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: white;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

button:hover { background: var(--accent-hover); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.error-box {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(217, 54, 79, 0.08);
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 8px;
  font-size: 13px;
}

.card {
  box-shadow: 0 1px 3px rgba(43, 37, 48, 0.06);
}

video {
  width: 100%;
  border-radius: 12px;
  background: black;
  display: block;
}

.watch-meta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

.new-upload-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
}

@media (max-width: 480px) {
  header {
    padding: 16px 18px;
  }

  header a {
    font-size: 19px;
  }

  main {
    padding: 0 12px 32px;
  }

  .tagline {
    padding: 26px 4px 18px;
  }

  .tagline h1 {
    font-size: 26px;
  }

  .tagline .badge {
    font-size: 12px;
    padding: 5px 12px;
  }

  .card {
    padding: 20px 16px;
    border-radius: 12px;
  }

  .dropzone {
    padding: 32px 14px;
  }

  .dropzone p:first-of-type {
    font-size: 13px;
  }

  .copy-row {
    flex-direction: column;
  }

  .copy-row button {
    width: 100%;
    padding: 11px 16px;
  }

  /* Prevent iOS Safari from auto-zooming when a field is focused */
  .copy-row input,
  .copy-row textarea,
  .field input,
  .field textarea {
    font-size: 16px;
  }
}
