:root {
  --bg-0: #071018;
  --bg-1: #0f1f2e;
  --panel: #0f1f31;
  --line: #2b4258;
  --line-soft: #355876;
  --text: #e7f1fb;
  --muted: #9bb4c8;
  --accent: #34d3a2;
  --accent-2: #1fb985;
  --accent-soft: rgba(52, 211, 162, 0.16);
  --danger: #f66f84;
  --shadow: rgba(2, 9, 14, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 20% -10%, #1a4e68 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 115%, #27417b 0%, transparent 52%),
    linear-gradient(165deg, var(--bg-0), var(--bg-1));
  min-height: 100vh;
}

.app-shell {
  width: min(880px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2.1rem 0 1.6rem;
}

.hero {
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0.45rem 0;
  font-size: clamp(2rem, 5.5vw, 3.1rem);
  letter-spacing: -0.02em;
}

.eyebrow {
  margin: 0;
  font-size: 0.83rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.subtitle {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.4;
}

.panel {
  margin-top: 0.9rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(170deg, rgba(15, 31, 49, 0.92), rgba(9, 19, 30, 0.96));
  box-shadow: 0 18px 40px var(--shadow);
}

.drop-zone {
  border: 2px dashed var(--line-soft);
  border-radius: 14px;
  min-height: 146px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.38rem;
  cursor: pointer;
  transition: all 160ms ease;
  padding: 1rem;
}

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

.drop-title {
  font-size: 1.07rem;
  font-weight: 650;
}

.drop-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

.message {
  min-height: 1.3rem;
  color: var(--muted);
  margin-top: 0.7rem;
}

.message.warn {
  color: #ffd27d;
}

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

.video-info {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.85rem;
}

.video-info p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.preview-wrap {
  position: relative;
  width: fit-content;
  max-width: 100%;
  max-width: 680px;
}

.preview-wrap video {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 56vh;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #02070a;
  display: block;
}

.wm-overlay {
  position: absolute;
  border: 2px solid var(--danger);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  display: none;
}

.controls {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 1.03rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 10px;
  padding: 0.62rem 1rem;
  font-weight: 650;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.btn-primary:hover:enabled {
  background: var(--accent-2);
}

.btn-secondary {
  border-color: #5f8faa;
  color: var(--text);
  background: transparent;
}

.progress-wrap {
  margin-top: 0.8rem;
}

.progress-wrap progress {
  width: min(620px, 100%);
  height: 12px;
  appearance: none;
  border: none;
  border-radius: 999px;
  overflow: hidden;
}

progress::-webkit-progress-bar {
  background: #102434;
  border-radius: 999px;
}

progress::-webkit-progress-value {
  background: linear-gradient(90deg, #2ec9b2, #49de97);
  border-radius: 999px;
}

progress::-moz-progress-bar {
  background: linear-gradient(90deg, #2ec9b2, #49de97);
  border-radius: 999px;
}

.progress-wrap p {
  margin: 0.43rem 0 0;
  color: var(--muted);
}

.footer {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.donate-wrap {
  margin-top: 0.75rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .app-shell {
    width: calc(100vw - 1.2rem);
    padding-top: 1rem;
  }

  .panel {
    padding: 0.78rem;
  }

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

  .checkbox {
    font-size: 0.98rem;
  }
}
