body {
  overflow-x: hidden;
}

#container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  width: 90vw;
  max-width: calc(100vw - 20px);
  margin: 10px auto;
  gap: 20px;
}

button {
  font: inherit;
}

#controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 30%;
  margin-left: 0;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

#preview {
  flex: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 70%;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

#output-video {
  margin-top: 20px;
  max-width: 100%;
}

#upload {
  margin-bottom: 20px;
}

#process-btn,
#download-btn {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  font: inherit;
}

#process-btn:hover,
#download-btn:hover {
  background-color: #0056b3;
}

#message {
  margin-top: 10px;
  font-size: 16px;
  color: green;
}

.spinner {
  margin-top: 10px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: #007bff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.progress {
  display: none;
  flex-direction: column;
  align-items: center;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background-color: #f3f3f3;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-bar-fill {
  height: 100%;
  background-color: #007bff;
  width: 0;
  border-radius: 10px;
  transition: width 0.5s;
}

@media (max-width: 768px) {
  #container {
    flex-direction: column;
    align-items: center;
  }

  #controls {
    width: 95%;
    max-width: 100%;
  }

  #preview {
    width: 95%;
    max-width: 100%;
  }
}

body.dark-mode #controls,
body.dark-mode #preview {
  background-color: #333;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
