:root {
  --bg: #0d1117;
  --card: #161b22;
  --accent: #3b82f6;
  --text: #e6edf3;
  --muted: #8b949e;
}

* {
  box-sizing: border-box;
  font-family: "Segoe UI", Roboto, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg);
  color: var(--text);
}

.wrapper {
  background: var(--card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  max-width: 600px;
  width: 100%;
  text-align: center;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.8rem;
}

.subtitle {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.upload-area {
  border: 2px dashed var(--muted);
  padding: 2rem;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 1.5rem;
  transition: 0.2s;
}
.upload-area:hover {
  border-color: var(--accent);
}
.upload-area input {
  display: none;
}

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.options label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: var(--muted);
}
.options input {
  margin-top: 4px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: var(--text);
  width: 100px;
  text-align: center;
}

.actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.2rem 0;
}
button,
a.download {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #30363d;
  color: var(--text);
  text-decoration: none;
  transition: 0.2s;
}
button:hover,
a.download:hover {
  background: #444c56;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.primary {
  background: var(--accent);
  color: #fff;
}
button.primary:hover {
  background: #2563eb;
}

.progress {
  height: 10px;
  background: #30363d;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #06b6d4);
}

footer {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1rem;
}

video {
  width: 100%;
  border-radius: 8px;
  margin: 1rem 0;
}

button,
a.download {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #30363d;
  color: var(--text);
  text-decoration: none;
  transition: 0.2s;
}

a.download:hover {
  background: #444c56;
}

@media (max-width: 600px) {
  body {
    align-items: stretch;
    background: var(--bg);
  }

  .wrapper {
    border-radius: 0;
    max-width: 100%;
    min-height: 100vh;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1.2rem;
    box-shadow: none;
  }

  h1 {
    font-size: 1.6rem;
    text-align: left;
  }

  .subtitle {
    font-size: 1rem;
    text-align: left;
    color: var(--muted);
  }

  .upload-area {
    border: 2px dashed var(--accent);
    background: rgba(59, 130, 246, 0.05);
    padding: 2rem 1rem;
    font-size: 1rem;
    border-radius: 12px;
  }

  .options {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    background: #1c222c;
    padding: 1rem;
    border-radius: 12px;
  }

  .options label {
    font-size: 0.95rem;
    color: var(--text);
  }

  .options input {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border-radius: 8px;
  }

  .actions {
    flex-direction: column;
    gap: 0.8rem;
  }

  button,
  a.download {
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 10px;
  }

  button.primary {
    background: linear-gradient(135deg, var(--accent), #06b6d4);
  }

  .progress {
    height: 12px;
    border-radius: 999px;
  }

  footer {
    font-size: 0.75rem;
    margin-top: auto;
    text-align: center;
    opacity: 0.7;
  }
}
