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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #0f0f0f;
  color: #e0e0e0;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

h1 {
  font-size: 2rem;
  text-align: center;
  letter-spacing: 0.05em;
  color: #fff;
}

h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ccc;
  margin-bottom: 1rem;
}

.card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 1.5rem;
}

.hidden { display: none !important; }

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

label {
  font-size: 0.85rem;
  color: #aaa;
  font-weight: 500;
}

input[type="file"] {
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  color: #ddd;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  font-size: 0.9rem;
}

input[type="file"]:hover { border-color: #555; }

button[type="submit"], .btn {
  display: inline-block;
  background: #4f8ef7;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

button[type="submit"]:hover, .btn:hover { background: #3a7de8; }
button[type="submit"]:disabled { background: #333; color: #666; cursor: not-allowed; }

.btn.secondary { background: #333; }
.btn.secondary:hover { background: #444; }
.btn.danger { background: #c0392b; }
.btn.danger:hover { background: #a93226; }
.btn.small { padding: 0.35rem 0.8rem; font-size: 0.8rem; }

.progress-bar-track {
  background: #2a2a2a;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
  margin: 0.75rem 0 0.4rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f8ef7, #7c3aed);
  border-radius: 999px;
  transition: width 0.4s ease;
}

#progress-percent { font-size: 0.85rem; color: #aaa; text-align: right; }
#progress-message { color: #ccc; }

video {
  width: 100%;
  border-radius: 8px;
  background: #000;
  margin-bottom: 1rem;
}

.result-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.video-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #2a2a2a;
  flex-wrap: wrap;
}

.video-row:last-child { border-bottom: none; }
.video-name { flex: 1; font-size: 0.9rem; word-break: break-all; }
.video-size { color: #777; font-size: 0.8rem; white-space: nowrap; }

.muted { color: #555; font-size: 0.9rem; }

select {
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  color: #ddd;
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
  cursor: pointer;
  appearance: auto;
}

select:hover { border-color: #555; }

.field-hint { color: #666; font-size: 0.8rem; margin-top: 0.3rem; }
