body {
  margin: 0;
  background: #0a0a0f;
  font-family: "Inter", sans-serif;
  color: #fff;
  text-align: center;
}

.hidden {
  display: none !important;
}

.block-screen {
  padding: 60px 32px;
}

/* STEP 0 / STEP FINAL */
.step-container {
  padding: 40px 32px;
}

.step-title {
  font-size: 28px;
  margin-bottom: 10px;
}

.step-desc {
  font-size: 20px;
  margin-top: 10px;
  line-height: 28px;
}

.step-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  line-height: 28px;
  font-size: 18px;
  color: #ccc;
}

.start-btn {
  margin-top: 25px;
  padding: 14px 28px;
  font-size: 20px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  background: #b9294b;
  color: white;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(185, 41, 75, 0.45);
  transition: 0.25s ease;
}

.start-btn:hover {
  background: #a0203f;
  box-shadow: 0 0 25px rgba(185, 41, 75, 0.6);
}

.start-btn:disabled {
  cursor: default;
  opacity: 0.5;
  box-shadow: none;
}

/* STATUS DO LINK */
.link-status {
  margin-top: 14px;
  font-size: 16px;
  min-height: 18px;
  color: #ccc;
}

/* CAMERA FLOW */
.version {
  color: #888;
  margin-top: 10px;
}

.title {
  font-size: 26px;
  margin-top: 8px;
}

/* Container do vídeo – tamanho fixo */
.camera-container {
  --hold-progress: 0%;
  width: 330px;
  height: 430px;
  margin: 20px auto;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}

/* Círculo base */
.camera-container::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 0 35px rgba(255, 255, 255, 0.18),
    0 0 80px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transform-origin: center;
  transform: scale(0.75);
  transition: transform 0.7s ease;
}

/* CLOSE: círculo maior, vídeo continua do mesmo tamanho */
.camera-container.stage2::before {
  transform: scale(0.95);
}

/* Anel de progresso verde (anda ao redor do círculo) */
.camera-container::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background:
    conic-gradient(#00ff7b var(--hold-progress), transparent 0);
  mask: radial-gradient(farthest-side, transparent 87%, #000 88%);
  -webkit-mask: radial-gradient(farthest-side, transparent 87%, #000 88%);
  opacity: 1;
  transition: opacity 0.2s ease-out;
}

/* Flash de captura */
.camera-container.flash {
  animation: flashCapture 0.25s ease-out;
}

@keyframes flashCapture {
  0% {
    box-shadow: 0 0 80px rgba(0, 255, 80, 1);
  }
  100% {
    box-shadow: 0 0 40px rgba(255, 0, 80, 0.3);
  }
}

#cameraMask {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  position: relative;
}

/* VÍDEO SEMPRE NO MESMO TAMANHO RELATIVO AO CONTAINER */
#camera {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

/* Canvas para processamento (mesmo tamanho do vídeo) */
#output {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.status {
  margin: 20px auto 0;
  font-size: 20px;
  min-height: 48px;
  max-width: 340px;
  padding: 0 24px;
  line-height: 1.4;
}

.powered {
  margin-top: 30px;
  color: #ccc;
}

.logo {
  width: 150px;
  opacity: 0.9;
  margin-top: 5px;
}

/* DEBUG IMAGES */
.debug-images {
  margin-top: 30px;
  padding: 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.debug-title {
  font-size: 20px;
  margin-bottom: 8px;
}

.debug-desc {
  font-size: 16px;
  color: #ccc;
}

.debug-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
}

.debug-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.debug-label {
  font-size: 16px;
  margin-bottom: 6px;
  color: #ccc;
}

.debug-img {
  width: 140px;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* PROGRESS BAR STYLES */
.progress-container {
  margin: 30px auto 20px;
  max-width: 320px;
}

.progress-bar-bg {
  width: 100%;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00ff7b, #00d664);
  border-radius: 14px;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 15px rgba(0, 255, 123, 0.5);
}

.progress-text {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 600;
  color: #00ff7b;
}

.progress-description {
  margin-top: 20px;
  font-size: 18px;
  line-height: 1.5;
  color: #ccc;
}

/* Processing animation */
.processing {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* ORIENTATION OVERLAY (celular deitado) */
#orientationBlock {
  position: fixed;
  inset: 0;
  background: #0a0a0f;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.orientation-image {
  width: 200px;
  max-width: 70%;
  margin-top: 24px;
}
