/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100dvh; /* altura dinâmica correta em celulares */
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: Arial, sans-serif;
  background: linear-gradient(to bottom, #4b0082, #9370db);
}

/* Cabeçalho fixo */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 1000;
}

/* Estilo do título */
.titulo {
  display: inline-block;
  background-color: #ffffff33;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 1.4em; /* ligeiramente maior */
  font-weight: bold;
  margin: 10px 0;
  transition: background 0.3s;
}

.titulo:hover {
  background-color: #ffffff55;
}

/* Container */
.container {
  margin-top: 30%;
  text-align: center;
  color: white;
  padding: 50px;
  width: 90%;
  max-width: 500px;
}

/* Título */
h1 {
  font-size: clamp(1.8em, 5vw, 2.4em);
}

/* Texto */
p {
  font-size: 1.2em;
  margin-bottom: 20px;
}

/* Botão */
button {
  width: 100%;
  max-width: 250px;
  padding: 14px;
  font-size: 18px; /* aumentei */
  background-color: #4b0082;
  color: white;
  border: 1px solid #ffffff;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background-color: #5a0aa3;
}

/* Select */
select {
  width: 100%;
  max-width: 300px;
  padding: 12px;
  font-size: 18px; /* aumentei */
  margin-bottom: 15px;
  border: 1px solid #15001b;
  border-radius: 5px;
  text-align: center;
}

/* Versão do sistema (rodapé) */
.versao-sistema {
  margin-top: auto;
  padding: 12px 0 20px;
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

/* Responsividade para celular */
@media (max-width: 480px) {
  .container {
    width: 95%;
    max-width: none;
    margin-top: 80px;
  }

  h1 {
    font-size: 2em;
  }

  p {
    font-size: 1.4em;
  }

  select,
  button {
    width: 100%;
    font-size: 20px;
    padding: 14px;
  }

  .titulo {
    font-size: 1.6em;
  }
}

/* Modal de Versão - Estilo Alerta */
.modal-versao {
  display: flexbox; /* fallback if display: flex not supported */
  display: none;
  position: fixed;
  z-index: 9999; /* Máxima prioridade */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75); /* Fundo escuro para destacar a caixa */
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white; /* Fundo branco conforme solicitado */
  border: 4px solid red; /* Borda vermelha para destaque */
  border-radius: 12px;
  padding: 30px;
  max-width: 450px;
  width: 90%;
  color: red; /* Texto vermelho conforme solicitado */
  text-align: center;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-50px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-content h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: red;
  border-bottom: 2px solid red;
  padding-bottom: 15px;
  text-transform: uppercase;
  font-weight: bold;
}

.modal-content .texto-aviso {
  line-height: 1.6;
  margin-bottom: 25px;
  font-size: 1.1em;
  font-weight: bold;
}

.modal-content .btn-fechar-aviso {
  background: red;
  color: white;
  border: none;
  padding: 12px 35px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1em;
  cursor: pointer;
  display: inline-block;
  transition: transform 0.2s, background 0.2s;
  text-transform: uppercase;
}

.modal-content .btn-fechar-aviso:hover {
  transform: scale(1.05);
  background: #cc0000;
}
