/* RESET BÁSICO */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #2557a8; /* azul base Pro-Vida */
  color: #ffffff;
}

/* APP CONTAINER */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* TOPO */
.topo {
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.topo-texto h1 {
  font-size: 1.15rem;
  font-weight: 700;
}

.topo-texto p {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Barra de progresso */
.barra-progresso {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  overflow: hidden;
}

.barra-progresso-inner {
  width: 0%;
  height: 100%;
  background: #ffd600; /* amarelo do traçado cardíaco */
  transition: width 0.3s ease;
}

/* CONTEÚDO */
.conteudo {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 20px 16px 32px;
}

.tela {
  display: none;
  background: #fdfdfd;
  color: #1a1a1a;
  border-radius: 16px;
  padding: 24px 20px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.tela.ativa {
  display: block;
}

.tela h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #193a77;
}

.subtitulo {
  margin-bottom: 18px;
  font-size: 0.96rem;
}

/* LISTA MODALIDADES */
.lista-modalidades {
  list-style: none;
  margin: 12px 0;
}

.lista-modalidades li {
  margin-bottom: 4px;
}

/* TEXTO DA TELA INICIAL */
.texto-tela p {
  margin-bottom: 8px;
}

.texto-tela .destaque {
  margin-top: 10px;
  font-weight: 600;
}

/* AVATAR ANIMADO */
.avatar-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.avatar {
  position: relative;
  width: 120px;
  height: 150px;
  animation: flutuar 2.3s ease-in-out infinite;
}

.avatar-cabeca {
  position: absolute;
  top: 0;
  left: 50%;
  width: 80px;
  height: 80px;
  transform: translateX(-50%);
  background: #ffffff;
  border-radius: 50%;
  border: 4px solid #e53935; /* vermelho */
  box-shadow: 0 0 0 4px #2557a8;
  overflow: hidden;
}

.avatar-viseira {
  position: absolute;
  bottom: 10px;
  left: 50%;
  width: 70px;
  height: 26px;
  transform: translateX(-50%);
  background: #2557a8;
  border-radius: 16px;
}

.avatar-olho {
  position: absolute;
  top: 28px;
  width: 10px;
  height: 10px;
  background: #193a77;
  border-radius: 50%;
}

.olho-esq {
  left: 22px;
}

.olho-dir {
  right: 22px;
}

.avatar-corpo {
  position: absolute;
  top: 70px;
  left: 50%;
  width: 88px;
  height: 70px;
  transform: translateX(-50%);
  background: #2557a8;
  border-radius: 18px;
  border: 3px solid #ffffff;
}

.avatar-faixa {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 10px;
  background: #e53935;
}

.avatar-sombra {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 70px;
  height: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  transform: translateX(-50%);
  filter: blur(3px);
}

/* Opções */
.opcoes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.opcoes.coluna {
  flex-direction: column;
}

.opcao {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  background: #2557a8;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.25s ease, transform 0.1s ease, box-shadow 0.25s ease;
}

.opcao:hover {
  background: #1b417b;
  box-shadow: 0 6px 16px rgba(25, 58, 119, 0.5);
  transform: translateY(-1px);
}

/* Botões gerais */
.botao {
  border-radius: 999px;
  padding: 10px 18px;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.1s ease, box-shadow 0.25s ease;
}

.botao.primario {
  background: #e53935;
  color: #ffffff;
}

.botao.primario:hover {
  background: #c62828;
  box-shadow: 0 8px 18px rgba(198, 40, 40, 0.5);
  transform: translateY(-1px);
}

.botao.secundario {
  background: #e0e0e0;
  color: #1a1a1a;
}

.botao.secundario:hover {
  background: #cccccc;
}

/* Formulário */
.formulario {
  margin-top: 8px;
}

.grupo-campo {
  margin-bottom: 16px;
}

.grupo-campo label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.grupo-campo input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid #c5c5c5;
  font-size: 0.95rem;
  outline: none;
}

.grupo-campo input:focus {
  border-color: #2557a8;
  box-shadow: 0 0 0 2px rgba(37, 87, 168, 0.2);
}

.mensagem-erro {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: #c62828;
}

/* Ações formulário */
.acoes-form {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

/* Info privacidade */
.info-privacidade {
  margin-top: 14px;
  font-size: 0.8rem;
  color: #555;
}

/* Loader / Tela carregando */
.loader {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid #e0e0e0;
  border-top-color: #e53935;
  animation: girar 1s linear infinite;
  margin: 0 auto 18px;
}

/* TELAS DE STATUS */
#tela-carregando h2,
#tela-erro h2 {
  text-align: center;
  margin-bottom: 10px;
}

#tela-carregando p,
#tela-erro p {
  text-align: center;
  font-size: 0.95rem;
}

/* ANIMAÇÕES */
@keyframes flutuar {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

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

/* RESPONSIVO */
@media (max-width: 480px) {
  .tela {
    padding: 20px 16px;
  }

  .topo-texto h1 {
    font-size: 1rem;
  }

  .topo-texto p {
    font-size: 0.8rem;
  }
}
