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

body {
  font-family: Arial, Helvetica, sans-serif;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.container {
  background-color: rgba(0, 0, 0, 0.85);
  padding: 28px 18px;
  border-radius: 18px;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.8);
  color: white;
  z-index: 2;
  width: 95vw;
  max-width: 400px;
  animation: fadeIn 0.8s ease-in-out;
}

fieldset {
  border: 0.3vh solid #7c3aed;
  padding: 2.5vh 2vw;
  border-radius: 1.5vh;
}

legend {
  border: 0.2vh solid #7c3aed;
  padding: 0.8vh 2vw;
  background-color: #7c3aed;
  color: white;
  border-radius: 1vh;
  font-weight: bold;
  font-size: 2vh;
}

.inputBox {
  position: relative;
  margin-bottom: 3vh;
  text-align: left;
}

.inputUser {
  background: none;
  border: none;
  border-bottom: 0.3vh solid white;
  outline: none;
  color: white;
  font-size: 1.8vh;
  width: 100%;
  padding: 1vh 0;
  letter-spacing: 0.1vh;
}

.inputBox > .labelInput {
  display: block;
  margin-bottom: 1.2vh;
  position: static;
  font-size: 1.5vh;
  color: #b9b9b9;
}

.inputUser:focus ~ .labelInput,
.inputUser:valid ~ .labelInput {
  top: -2vh;
  font-size: 1.4vh;
  color: #7c3aed;
}

.togglePassword {
  position: absolute;
  right: 0;
  top: 1.2vh;
  cursor: pointer;
  color: #ccc;
  font-size: 1.8vh;
  user-select: none;
}

.togglePassword:hover {
  color: #7c3aed;
}

#data_nascimento {
  width: 100%;
  padding: 1vh;
  font-size: 1.8vh;
  border: 0.2vh solid #ccc;
  border-radius: 1vh;
  background-color: transparent;
  color: white;
  margin-bottom: 2.5vh;
  outline: none;
}

#submit {
  background-image: linear-gradient(135deg, #7c3aed, #2a2a2a);
  width: 100%;
  border: none;
  padding: 1.2vh;
  color: white;
  font-size: 2vh;
  cursor: pointer;
  border-radius: 1.2vh;
  transition: 0.3s;
  font-weight: bold;
}

#submit:hover {
  background-image: linear-gradient(to right, #7c3aed, #4c1d95);
  transform: scale(1.03);
  box-shadow: 0 0 1vh #7c3aed;
}

p {
  color: white;
  margin-bottom: 1vh;
  font-weight: bold;
  font-size: 1.8vh;
}

.radio-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 2.5vh;
}

.radio-group div {
  display: flex;
  align-items: center;
  margin-bottom: 1vh;
}

.radio-group label {
  color: white;
  margin-left: 1vh;
  font-size: 1.8vh;
}

#data_nascimento + br {
  display: none;
}

/* Botão Voltar */
.botao-voltar {
  margin-top: 2.5vh;
  text-align: center;
}

.botao-voltar button {
  padding: 1vh 2.5vw;
  background-color: #4c1d95;
  border: none;
  border-radius: 1vh;
  color: white;
  font-weight: bold;
  font-size: 1.7vh;
  cursor: pointer;
  transition: 0.3s;
}

.botao-voltar button:hover {
  background-color: #7c3aed;
  transform: scale(1.05);
  box-shadow: 0 0 0.8vh #7c3aed;
}

/* Animação */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(2vh);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilo para botões de seleção de curso e módulo */
.curso-btn-group, .modulo-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7vw 1vw;
  margin: 0.5vh 0 1.2vh 0;
  justify-items: center;
}

.curso-btn, .modulo-btn {
  background: linear-gradient(135deg, #7c3aed, #4c1d95);
  color: #fff;
  border: none;
  border-radius: 1vh;
  padding: 0.7vh 1vw;
  font-size: 1.3vh;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 0.5vh #7c3aed33;
  outline: none;
  margin-bottom: 0.2vh;
  letter-spacing: 0.2px;
  opacity: 0.85;
}

.curso-btn:hover, .modulo-btn:hover {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 0 1.2vh #7c3aed;
  opacity: 1;
}

input[type="radio"]:checked + .curso-btn,
input[type="radio"]:checked + .modulo-btn {
  background: linear-gradient(135deg, #fff, #7c3aed);
  color: #4c1d95;
  border: 2px solid #7c3aed;
  box-shadow: 0 0 1.5vh #7c3aed;
  opacity: 1;
}

.curso-btn, .modulo-btn {
  user-select: none;
}