.rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -10;
  overflow: hidden;
}

.rain .drop {
  position: absolute;
  top: -140px;
  display: block;
  background-image: url("../../src//img//pngegg.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: blur(0.6px);
  transform-origin: center;
  will-change: transform, opacity;
  animation-name: fall-rotate;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@font-face {
  font-family: "Green Energy";
  src: url("../../src/fonts/Green_Energy.ttf") format("truetype");
}

@keyframes fall-rotate {
  0% {
    transform: translateY(-140px) rotate(var(--rot-start, 0deg));
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  70% {
    opacity: 1;
  }

  100% {
    transform: translateY(110vh)
      rotate(calc(var(--rot-start, 0deg) + var(--rot-delta, 0deg)));
    opacity: 0;
  }
}

:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: #000000;
}

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 420px);
  padding: 32px;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.205);
  border: 1px solid rgba(148, 184, 150, 0.24);
  box-shadow: 0px 2px 80px rgba(9, 77, 9, 0.45);
  backdrop-filter: blur(10px);
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 2.1rem;
  font-family: "Green Energy";
  text-shadow:
    0 0 2px #5e5e5e,
    0 0 20px #5e5e5e,
    0 0 10px #5e5e5e;
}

.login-card h1 span {
  margin: 0 0 8px;
  font-size: 2.1rem;
  font-family: "Green Energy";
  text-shadow:
    0 0 2px #00ff55,
    0 0 20px #00ff55,
    0 0 10px #00ff55;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d3d3d3;
  font-family: "Nova Square", sans-serif;
  font-size: 0.8rem;
  font-style: normal;
}

.subtitle {
  margin: 0 0 24px;
  color: #d3d3d3;
  font-family: "Nova Square", sans-serif;
  font-size: 1rem;
  font-style: normal;
}

form {
  display: grid;
  gap: 14px;
}

label {
  font-weight: 600;
  color: #d3d3d3;
  font-family: "Nova Square", sans-serif;
  font-style: normal;
}

input {
  width: 100%;
  border: 1.8px solid rgba(85, 85, 85, 0.384);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(4, 12, 5, 0.95);
  color: #f8fafc;
  box-shadow:
    0 0 15px rgba(0, 34, 2, 0.425),
    0 0 20px rgba(0, 53, 22, 0.514);
  font-family: "Nova Square", sans-serif;
  font-size: 1rem;
  font-style: normal;
}

input:focus {
  outline: 2px solid rgba(5, 29, 0, 0.6);
  border-color: transparent;
}

button {
  border: 1px solid rgba(85, 85, 85, 0.384);
  border-radius: 999px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 700;
  color: #d3d3d3;
  background: linear-gradient(135deg, #001f02, #021600);
  cursor: pointer;
  font-family: "Nova Square", sans-serif;
  font-size: 1rem;
  font-style: normal;
}

button:hover {
  filter: brightness(1.05);
}

button:disabled {
  cursor: wait;
  opacity: 0.8;
}

#login-message {
  min-height: 1.5rem;
  margin: 0;
  font-size: 0.95rem;
  text-align: center;
}

.footer-login {
  position: absolute;
  bottom: 10px;
  width: 100%;
  left: 0;
  z-index: 999;
  text-align: center;
}

.footer-login .disclaimer {
  font-size: 0.75rem;
  color: #888888;
  margin-bottom: 8px;
}

.footer-login .disclaimer a {
  color: #4CAF50;
  text-decoration: none;
  font-weight: bold;
}

.footer-login .disclaimer a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   AJUSTE DESKTOP: TELA DE CADASTRO MAIS LARGA E EM DUPLAS
   ========================================================================== */
@media (min-width: 769px) {
  /* 1. Deixa APENAS o card de cadastro mais largo para caber as duplas */
  #register-section {
    width: min(100%, 650px); 
  }

  /* 2. Transforma o formulário de cadastro num Grid de 2 colunas */
  #formCadastro {
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    row-gap: 6px; /* Reduz o espaço pra label e input ficarem coladinhos */
  }

  /* 3. Posiciona os Labels usando o tabuleiro do Grid */
  #formCadastro label:nth-of-type(1) { grid-column: 1; grid-row: 1; }
  #formCadastro label:nth-of-type(2) { grid-column: 2; grid-row: 1; }
  #formCadastro label:nth-of-type(3) { grid-column: 1; grid-row: 3; margin-top: 10px; }
  #formCadastro label:nth-of-type(4) { grid-column: 2; grid-row: 3; margin-top: 10px; }

  /* 4. Posiciona os Inputs logo abaixo dos seus Labels */
  #formCadastro input:nth-of-type(1) { grid-column: 1; grid-row: 2; }
  #formCadastro input:nth-of-type(2) { grid-column: 2; grid-row: 2; }
  #formCadastro input:nth-of-type(3) { grid-column: 1; grid-row: 4; }
  #formCadastro input:nth-of-type(4) { grid-column: 2; grid-row: 4; }

  /* 5. Faz o Botão e as Mensagens de erro/link ocuparem a tela toda na base */
  #register-button,
  #formCadastro > p {
    grid-column: 1 / -1; /* Ocupa de ponta a ponta nas colunas */
  }
  
  #register-button {
    margin-top: 15px; /* Dá um respiro antes do botão */
  }
}

/* ==========================================================================
   AJUSTE MOBILE
   ========================================================================== */
@media (max-width: 768px) {
  body {
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: 100dvh; 
    overflow-y: auto;
    overflow-x: hidden;
  }


  .page-shell {
    min-height: unset;
    display: flex;
    justify-content: center; 
    padding: 15px;
  }

  .login-card {
    padding: 24px 20px; 
    margin-top: -25px;
  }

  .login-card h1, .login-card h1 span {
    font-size: 1.7rem;
  }

  .footer-login {
    position: relative;
    bottom: auto;
    padding-bottom: 20px;
  }
}

/* Acesso como visitante */
.btn-visitante,
.btn-visitante:visited {
    display: block;
    text-align: center;
    margin-top: 18px;
    padding: 12px 16px;
    border: 1px solid rgba(0, 255, 102, 0.35);
    border-radius: 999px;
    background: rgba(0, 255, 102, 0.04);
    color: #00ff66;
    font-family: "Nova Square", sans-serif;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-visitante:hover {
    background: rgba(0, 255, 102, 0.1);
    border-color: #00ff66;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.2);
}