/* =========================================================
   PAGINA DE VIDEO (index.html) — animação num card 1080x1920
========================================================= */

:root {
  --accent: #0a84ff;
  --track-bg: #e3e3e8;
  --pill-bg: #ffffff;
  --text-active: #000000;
  --text-inactive: rgba(255, 255, 255, 0.7);
}

@font-face {
  font-family: "Helvetica Neue Condensed";
  src: url("fonts/HelveticaNeueCondensed.woff2") format("woff2"),
       url("fonts/Helvetica_Neue_97_Black_Condensed.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

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

body {
  min-height: 100vh;
  height: auto;

  margin: 0;
  padding: 24px;

  color: #fff;
  font-family: Arial, Helvetica, sans-serif;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;

  overflow-x: hidden;

  background: #070707; /* fundo neutro atrás do card */
}

/* =========================
   CARD / STAGE — formato 1080x1920 (9:16)
   é o "palco" onde a animação roda
========================= */
.stage {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1080 / 1920;
  flex-shrink: 0;

  border-radius: 20px;
  overflow: hidden;

  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  background: #000;
}

#stageWrap {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
#stage {
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
}

/* controles abaixo do card, fluxo normal */
.controls {
  position: relative;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  max-width: 420px;
  width: 100%;
  margin: 0 auto 24px;
  z-index: 10;
}

textarea {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #333;
  outline: none;
  text-align: center;
  resize: none;
  background: #111;
  color: #fff;
  font-family: inherit;
}
textarea:focus { border-color: #666; }

#btnGravar {
  padding: 12px 20px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #fff;
  background: #fff;
  color: #000;
  cursor: pointer;
  font-family: inherit;
  transition: 0.15s ease;
    white-space: nowrap;    /* texto do botão não quebra */
  flex-shrink: 0;         /* botão não encolhe */
}
#btnGravar:hover:not(:disabled) { transform: scale(1.03); }
#btnGravar:disabled { opacity: 0.4; cursor: default; }

.print {
    font-size: 1.1rem;
  opacity: 0.55;
  color: #fff;
  min-height: 1.1em;
  text-align: center;
}

.progress {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: #FF00D2;
  transition: width 0.2s ease;
}

/* =========================
   BARRA / SEGMENTED CONTROL
========================= */
.segmented {
  position: relative;
  display: inline-flex;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 3px;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  z-index: 20;
  align-self: center;
  margin-top: 4px;
}
.segmented .pill {
  position: absolute;
  top: 3px;
  left: 3px;
  height: calc(100% - 6px);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12), 0 1px 1px rgba(0,0,0,0.04);
  transition: transform 0.32s cubic-bezier(0.4,0,0.2,1),
              width 0.32s cubic-bezier(0.4,0,0.2,1);
  z-index: 0;
}
.segmented label {
  position: relative;
  z-index: 1;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-inactive);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: color 0.25s ease;
}
.segmented input { display: none; }
.segmented label:not(:first-of-type)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  height: 56%;
  width: 1px;
  background: rgba(120,120,128,0.28);
  transition: opacity 0.25s ease;
}
.segmented input:checked + label::before { opacity: 0; }
.segmented input:checked + label + input + label::before { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .segmented .pill { transition: none; }
}


.linha-input {
  display: flex;
  gap: 10px;
  width: 100%;
  align-items: stretch;   /* botão acompanha a altura do textarea */
}

.linha-input textarea {
  flex: 1;                /* input ocupa o espaço disponível */
}


@media (max-width: 420px) {
  .linha-input { flex-direction: column; }
}


@media (max-width: 600px) {
  .segmented {
    align-self: stretch;
    width: 100%;
    display: flex;             /* em vez de inline-flex */
    justify-content: space-between;
  }
  .segmented label {
    padding: 8px 0;            /* tira o padding lateral */
    flex: 1;                   /* cada item divide o espaço igualmente */
    font-size: 13px;
    text-align: center;
  }
}
