@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --preto: #050607;
  --preto-2: #0b0d10;
  --preto-3: #111418;
  --borda: rgba(255, 255, 255, 0.08);
  --borda-forte: rgba(255, 255, 255, 0.16);
  --texto: #eef1f3;
  --texto-fraco: #97a1a9;
  --acento: #2dd4bf;
  --acento-2: #38bdf8;
  --acento-glow: rgba(45, 212, 191, 0.35);
  --erro: #f87171;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(1100px 600px at 15% -10%, rgba(45, 212, 191, 0.10), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(56, 189, 248, 0.08), transparent 55%),
    var(--preto);
  color: var(--texto);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--acento-glow);
  color: #fff;
}

/* ---------- Topo ---------- */

header.topo {
  padding: 56px 20px 40px;
  text-align: center;
  position: relative;
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border: 1px solid var(--borda);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--texto-fraco);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.marca-icone {
  color: var(--acento);
  filter: drop-shadow(0 0 8px var(--acento-glow));
  flex-shrink: 0;
}

header.topo h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #b7c1c9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

header.topo p {
  margin: 0 auto;
  max-width: 480px;
  color: var(--texto-fraco);
  font-size: 1.02rem;
}

/* ---------- Layout ---------- */

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 20px 80px;
}

/* Página de treinamento individual: mais larga pro vídeo ganhar espaço */
.main-largo {
  max-width: 1080px;
}

.main-largo .card-senha {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--borda);
  border-radius: 16px;
  padding: 36px;
  margin-bottom: 20px;
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}

.card h2 {
  margin-top: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--texto);
}

.card > p {
  color: var(--texto-fraco);
}

.centro {
  text-align: center;
}

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--acento), var(--acento-2));
  color: #04211d;
  border: none;
  padding: 13px 26px;
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 8px 24px -8px var(--acento-glow);
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 12px 30px -8px var(--acento-glow);
}

.btn:active {
  transform: translateY(0);
}

.btn-secundario {
  background: rgba(255, 255, 255, 0.04);
  color: var(--texto);
  border: 1px solid var(--borda-forte);
  box-shadow: none;
}

.btn-secundario:hover {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

/* ---------- Fluxo guiado (passos do treinamento) ---------- */

.voltar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--texto-fraco);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 14px;
  transition: color 0.15s ease, transform 0.15s ease;
}

.voltar:hover {
  color: var(--acento);
  transform: translateX(-2px);
}

.titulo-linha {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.titulo-linha h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.btn-compartilhar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--texto-fraco);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--borda-forte);
  border-radius: 9px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-compartilhar:hover {
  color: var(--texto);
  background: rgba(255, 255, 255, 0.07);
}

.btn-compartilhar.copiado {
  color: var(--acento);
  border-color: rgba(45, 212, 191, 0.5);
}

.descricao-treino {
  color: var(--texto-fraco);
  margin-top: -6px;
}

.video-fallback {
  margin: -8px 0 16px;
  font-size: 0.85rem;
  color: #6b747c;
}

.video-fallback a {
  color: var(--texto-fraco);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.video-fallback a:hover {
  color: var(--acento);
}

.passo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 14px;
}

.passo-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: var(--acento);
  font-weight: 800;
  font-size: 0.85rem;
}

.passo-rotulo {
  font-weight: 700;
  color: var(--texto);
}

.passo-linha {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 0;
  margin-top: 16px;
  border-top: 1px solid var(--borda);
}

.passo-linha .btn {
  margin-left: auto;
}

.proximo-treino {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid var(--borda);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012));
  text-decoration: none;
  color: var(--texto);
  transition: border-color 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.proximo-treino:hover {
  border-color: var(--borda-forte);
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-2px);
}

.proximo-treino svg {
  flex-shrink: 0;
  color: var(--texto-fraco);
  transition: transform 0.15s ease, color 0.15s ease;
}

.proximo-treino:hover svg {
  transform: translateX(3px);
  color: var(--acento);
}

.proximo-rotulo {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--texto-fraco);
  margin-bottom: 4px;
}

/* ---------- Formulário de senha ---------- */

.icone-cadeado {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.18), rgba(56, 189, 248, 0.12));
  border: 1px solid var(--borda);
  margin-bottom: 18px;
  color: var(--acento);
}

.senha-linha {
  position: relative;
  margin-bottom: 14px;
}

.senha-linha input {
  width: 100%;
  padding: 14px 52px 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--texto);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--borda-forte);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.senha-linha input::placeholder {
  color: #6b747c;
}

.senha-linha input:focus {
  border-color: var(--acento);
  box-shadow: 0 0 0 3px var(--acento-glow);
}

/* esconde o olhinho nativo do Edge/IE pra não duplicar com o nosso */
.senha-linha input::-ms-reveal,
.senha-linha input::-ms-clear {
  display: none;
}

.btn-olho {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 9px;
  color: #78838c;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-olho:hover {
  color: var(--texto);
  background: rgba(255, 255, 255, 0.07);
}

.btn-olho:active {
  transform: translateY(-50%) scale(0.94);
}

.btn-olho.ativo {
  color: var(--acento);
}

.btn-olho:focus-visible {
  outline: 2px solid var(--acento);
  outline-offset: 2px;
}

@keyframes tremer {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

.tremer {
  animation: tremer 0.5s ease;
}

#erro-senha {
  color: var(--erro);
  font-size: 0.9rem;
  margin: -6px 0 14px;
  display: none;
}

/* ---------- Lista de treinamentos ---------- */

.treinamento-item {
  display: block;
  border: 1px solid var(--borda);
  border-radius: 14px;
  margin-bottom: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.treinamento-item:hover {
  border-color: var(--borda-forte);
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-2px);
}

.treinamento-cabecalho {
  padding: 20px 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  user-select: none;
}

.icone-play {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 212, 191, 0.1);
  color: var(--acento);
}

.titulo-treino {
  flex: 1;
  min-width: 0;
}

.treinamento-cabecalho h3 {
  margin: 0;
  color: var(--texto);
  font-size: 1.05rem;
  font-weight: 700;
}

.subtitulo-treino {
  margin: 4px 0 0;
  color: var(--texto-fraco);
  font-size: 0.88rem;
  font-weight: 400;
}

.treinamento-cabecalho .seta {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--texto-fraco);
  transition: transform 0.15s ease, color 0.15s ease;
}

.treinamento-item:hover .seta {
  transform: translateX(3px);
  color: var(--acento);
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--borda);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Card da página de treinamento: vídeo em destaque */
.card-video {
  padding: 28px 28px 26px;
}

.card-video h2 {
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  margin: 0;
}

/* ---------- Responsivo (tablet e celular) ---------- */

@media (max-width: 900px) {
  .main-largo {
    padding-left: 14px;
    padding-right: 14px;
  }

  .card-video {
    padding: 20px 16px 18px;
  }
}

@media (max-width: 640px) {
  header.topo {
    padding: 34px 16px 22px;
  }

  header.topo h1 {
    font-size: clamp(1.6rem, 7vw, 2.1rem);
  }

  header.topo p {
    font-size: 0.94rem;
  }

  .marca {
    font-size: 0.7rem;
    padding: 6px 12px;
    margin-bottom: 16px;
  }

  main {
    padding: 4px 12px 56px;
  }

  .card {
    padding: 22px 18px;
    border-radius: 14px;
  }

  /* Vídeo colado nas bordas do card pra ganhar largura no celular */
  .card-video {
    padding: 16px 12px 16px;
  }

  .card-video .video-wrapper {
    border-radius: 10px;
  }

  .passo-linha {
    flex-wrap: wrap;
  }

  .passo-linha .btn {
    margin-left: 0;
    width: 100%;
  }

  .proximo-treino {
    padding: 16px 16px;
  }

  .treinamento-cabecalho {
    padding: 16px 14px;
    gap: 12px;
  }

  .treinamento-cabecalho h3 {
    font-size: 0.98rem;
  }

  .btn {
    padding: 13px 20px;
  }
}

/* ---------- Rodapé ---------- */

footer {
  text-align: center;
  padding: 26px 20px 34px;
  color: #5f6a71;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 20px;
}

footer p {
  margin: 4px 0;
}

.rodape-marca {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #7c8a92;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.rodape-marca svg {
  color: var(--acento);
  opacity: 0.8;
}

/* ---------- Etiquetas e estados da lista ---------- */

.contagem {
  color: var(--texto-fraco);
  font-size: 0.88rem;
  margin: 0 2px 14px;
}

.tag-novo {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #04211d;
  background: linear-gradient(135deg, var(--acento), var(--acento-2));
  box-shadow: 0 4px 14px -4px var(--acento-glow);
}

.icone-check {
  background: rgba(74, 222, 128, 0.12) !important;
  color: #4ade80 !important;
}

.texto-concluido {
  color: #4ade80 !important;
  font-size: 0.8rem !important;
  font-weight: 600;
}

/* ---------- Animações de entrada ---------- */

@keyframes surgir {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.entrada {
  animation: surgir 0.5s ease backwards;
}

.treinamento-item {
  animation: surgir 0.5s ease backwards;
  animation-delay: calc(var(--i, 0) * 80ms);
}

header.topo .marca,
header.topo h1,
header.topo p {
  animation: surgir 0.6s ease backwards;
}

header.topo h1 {
  animation-delay: 0.08s;
}

header.topo p {
  animation-delay: 0.16s;
}

/* ---------- Loading do vídeo ---------- */

.video-wrapper::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--acento);
  animation: girar 0.9s linear infinite;
}

@keyframes girar {
  to { transform: rotate(360deg); }
}

.video-wrapper iframe {
  opacity: 0;
  transition: opacity 0.45s ease;
}

.video-wrapper.pronto iframe {
  opacity: 1;
}

.video-wrapper.pronto::before {
  display: none;
}

/* ---------- Scrollbar escura ---------- */

html {
  scrollbar-color: #232a31 var(--preto);
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--preto);
}

::-webkit-scrollbar-thumb {
  background: #232a31;
  border-radius: 8px;
  border: 3px solid var(--preto);
}

::-webkit-scrollbar-thumb:hover {
  background: #2f3841;
}

/* ---------- Acessibilidade ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
