body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background: #222;
  color: #eee;
}
.container {
  max-width: 800px;
  margin: 2em auto;
  padding: 1em;
  background: #333;
  border-radius: 8px;
}
h1 {
  text-align: center;
}
#controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1em;
  align-items: end;
}
#controls label {
  display: flex;
  flex-direction: column;
}
#controls input {
  margin-top: 0.3em;
  padding: 0.3em;
}
#controls button {
  padding: 0.6em 1em;
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
#controls button:hover {
  background: #45a049;
}
#preview {
  display: flex;
  gap: 1em;
  margin-top: 1em;
  flex-wrap: wrap;
  justify-content: center;
}
#preview video,
#preview canvas {
  background: #000;
  max-width: 100%;
  border: 4px solid #444;
  border-radius: 4px;
}
#downloadSection {
  text-align: center;
  margin-top: 1.5em;
}
#downloadLink {
  display: none;
  color: #0f0;
  text-decoration: none;
  font-weight: bold;
  padding: 0.6em 1.2em;
  background: #111;
  border: 2px solid #0f0;
  border-radius: 4px;
}
#downloadLink:hover {
  background: #1a1;
}

.stutter-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

#stutterBtn {
  background: #666;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  padding: 0.6em 1em;
}

#stutterBtn.active {
  background: #f44336;
}

#stutterBtn:disabled {
  background: #444;
  cursor: not-allowed;
}

.preview-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

#originalBtn, #fullVersionBtn {
  background: #2196F3;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  padding: 0.6em 1em;
}

#originalBtn:disabled, #fullVersionBtn:disabled {
  background: #444;
  cursor: not-allowed;
}

#originalBtn:hover:not(:disabled), #fullVersionBtn:hover:not(:disabled) {
  background: #1976D2;
}