/* Reset e base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: url("../img/index-background.png") no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("../img/index-background.png") no-repeat center center / cover;
  opacity: 0.21;
  z-index: -1;
  filter: blur(13px) brightness(0.75);
}

/* Logo centralizada e maior */
.header-logo {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 46px;
  margin-bottom: 22px;
}
.header-logo img {
  height: 60px;
  max-width: 350px;
  width: auto;
  object-fit: contain;
}

/* Container centralizado com espaçamento lateral */
.login-container {
  background: rgba(0,0,0,0.80);
  padding: 42px 30px 32px 30px;
  border-radius: 14px;
  box-shadow: 0 0 24px rgba(0,0,0,0.12), 0 1.5px 24px rgba(0,0,0,0.09);
  max-width: 410px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Título */
h1 {
  margin-bottom: 24px;
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: #fff;
}

/* Formulários */
.form-block {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 10px;
  width: 100%;
}

input[type="email"], input[type="password"], input[type="text"] {
  padding: 13px 12px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  background-color: #1e1e1e;
  color: #f2f2f2;
  transition: background-color 0.3s;
}

input:focus {
  outline: none;
  background-color: #2a2a2a;
}

/* Botões padrão (incluindo Google) */
button[type="submit"],
#google-login,
#logout-btn {
  background-color: #0f9d58;
  color: white;
  padding: 13px 0;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  margin-top: 5px;
  margin-bottom: 4px;
  transition: background-color 0.3s;
  min-width: 0;
  box-sizing: border-box;
}

#google-login {
  background-color: #fff;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px auto 0 auto;
  max-width: 260px;
  min-height: 46px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

#google-login img {
  width: 20px;
  height: 20px;
}

#google-login:hover {
  background-color: #f0f0f0;
  color: #111;
}

button[type="submit"]:hover, #logout-btn:hover {
  background-color: #0c7b43;
}

/* Links de navegação entre telas */
.links {
  margin: 6px 0 2px 0;
  display: flex;
  justify-content: center;
  gap: 7px;
  font-size: 15px;
  flex-wrap: wrap;
}
.links a {
  color: #4ba0fa;
  text-decoration: none;
  font-weight: 500;
}
.links a:hover {
  text-decoration: underline;
}

/* Mensagem/Erro */
.erro {
  color: #ff6262;
  margin-top: 13px;
  font-size: 15px;
  min-height: 20px;
  word-break: break-word;
}

/* Overlay de Loading */
.loading-overlay {
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(12,12,12,0.40);
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 14px;
  transition: opacity 0.22s;
}
.spinner {
  width: 54px;
  height: 54px;
  border: 5px solid #eee;
  border-top: 5px solid #0f9d58;
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}

/* Melhorando acessibilidade do overlay no mobile */
@media (max-width: 600px) {
  .loading-overlay {
    border-radius: 9px;
  }
}
@media (max-width: 400px) {
  .loading-overlay {
    border-radius: 6px;
  }
}

/* Footer rodapé créditos */
.footer-credits {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 8px;
  color: #fff;
  text-align: center;
  font-size: 13.5px;
  font-weight: 500;
  text-shadow: 0 2px 8px #000;
  z-index: 5;
  width: 100vw;
  letter-spacing: 0.1px;
  user-select: none;
  pointer-events: none;
  line-height: 1.24;
}
.footer-desc {
  color: #e0e0e0;
  font-size: 13px;
  font-weight: 400;
  margin-top: 2px;
  letter-spacing: 0.05em;
}

/* Responsivo */
@media (max-width: 600px) {
  .header-logo {
    margin-top: 24px;
    margin-bottom: 16px;
  }
  .header-logo img {
    max-width: 73vw;
    height: 55px;
  }
  .login-container {
    padding: 20px 4vw 16px 4vw;
    max-width: 96vw;
    border-radius: 9px;
  }
  h1 {
    font-size: 19px;
  }
  .form-block input,
  .form-block button,
  #google-login {
    font-size: 15px;
    padding: 10px;
  }
  .footer-credits {
    font-size: 12px;
  }
}
@media (max-width: 400px) {
  .header-logo img {
    height: 35px;
    max-width: 90vw;
  }
  .login-container {
    padding: 9px 2vw 10px 2vw;
    border-radius: 6px;
  }
  h1 {
    font-size: 15px;
  }
}