body {
  font-family: Arial, sans-serif;
  padding: 20px;
  background: #050505;
  color: #f5f5f5;
  display: flex;
  justify-content: center;
}

.app {
  width: 90%; /* Ambil 90% layar */
  max-width: 768px; /* Maksimal tetap rapi di desktop */
  margin: 0 auto; /* Center */
}

h2,
h3 {
  margin-bottom: 10px;
  text-align: center;
}

.step {
  display: none;
  margin-top: 24px;
  padding: 18px;
  background: #111;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.step.active {
  display: block;
}

.video-frame,
.result-frame {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.video-frame video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: #000;
  border-radius: 16px;
}

.result-frame {
  aspect-ratio: 768 / 1344;
  margin: 0 auto 10px;
}

.result-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

button {
  padding: 12px 20px;
  margin: 6px 0;
  width: 100%;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff3864, #ff6f3c);
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Biarkan tombol Back tetap style Bootstrap */
button.btn-back {
  background: #6c757d; /* Bootstrap secondary gray */
  color: #fff;
  border: none;
  border-radius: 10px;
  width: auto; /* Tidak full width jika mau */
  padding: 10px 20px;
}

/* Jika mau full width tapi tetap gray */
button.btn-back.full {
  width: 100%;
}

button.btn-download {
  background: #28a745; /* Bootstrap success green */
  color: #fff;
  border: none;
  border-radius: 10px;
  width: auto; /* Tidak full width jika mau */
  padding: 10px 20px;
}

/* Jika mau full width tapi tetap green */
button.btn-download.full {
  width: 100%;
}

.theme-options {
  display: flex;
  flex-wrap: wrap; /* ⬅️ Biar tombol pindah baris saat sempit */
  gap: 10px; /* Jarak antar tombol */
  justify-content: center; /* Tombol di tengah */
  padding: 10px;
}

.themeBtn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  background: linear-gradient(90deg, #ff6a88, #ff9350);
  color: #fff;
  white-space: nowrap; /* Biar teks tidak turun baris */
}

@media (min-width: 480px) {
  .theme-options {
    flex-direction: row;
  }
}

.controls {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#upload-area {
  margin-top: 12px;
  text-align: left;
  font-size: 0.9rem;
}

#upload-area input[type="file"] {
  margin-top: 4px;
  width: 100%;
}

#webcam {
  transform: scaleX(-1);
}

.countdown {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 120px;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 20px black;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.countdown.show {
  opacity: 1;
}

.hidden {
  display: none;
}
