/* ===== SPACE QUESTIONS - CSS COMPLETO PARA PÁGINA DE LOGIN ===== */

/* === VARIÁVEIS === */
:root {
  --preto-espacial: #050505;
  --roxo-escuro: #1a0033;
  --roxo-medio: #2b0b4f;
  --roxo-claro: #8a1155;
  --roxo-brilhante: #b429a9;
  --cinza-claro: #999999;
  --branco: #ffffff;
  --erro: #ff3860;
  --sucesso: #23d160;
  --aviso: #ffdd57;
  --transicao: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --sombra-principal: 0 8px 32px rgba(31, 38, 135, 0.37);
  --borda-glassmorphism: 1px solid rgba(255, 255, 255, 0.18);
  --blur-glassmorphism: blur(8px);
}

/* === RESET E BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: var(--preto-espacial);
  color: var(--branco);
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

/* === BACKGROUND ESPACIAL APRIMORADO === */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 30%, rgba(43, 11, 79, 0.7) 0%, transparent 20%),
    radial-gradient(circle at 80% 10%, rgba(138, 17, 85, 0.5) 0%, transparent 30%),
    radial-gradient(circle at 40% 80%, rgba(26, 0, 51, 0.6) 0%, transparent 40%),
    radial-gradient(ellipse at bottom, var(--roxo-escuro) 0%, var(--preto-espacial) 100%);
  z-index: -2;
}

/* === ESTRELAS E NEBULOSAS === */
@keyframes twinkle {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0.3;
  }
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: radial-gradient(1px 1px at 10% 10%, var(--branco) 1px, transparent 0),
    radial-gradient(1.5px 1.5px at 20% 50%, var(--branco) 1px, transparent 0),
    radial-gradient(2px 2px at 30% 30%, var(--branco) 1px, transparent 0),
    radial-gradient(2.5px 2.5px at 40% 70%, var(--branco) 1px, transparent 0),
    radial-gradient(1px 1px at 50% 40%, var(--branco) 1px, transparent 0),
    radial-gradient(3px 3px at 60% 80%, var(--branco) 1px, transparent 0),
    radial-gradient(2px 2px at 70% 20%, var(--branco) 1px, transparent 0),
    radial-gradient(1.5px 1.5px at 80% 60%, var(--branco) 1px, transparent 0),
    radial-gradient(2px 2px at 90% 30%, var(--branco) 1px, transparent 0);
  background-repeat: repeat;
  background-size: 200vw 200vh;
  opacity: 0.5;
  z-index: -1;
  animation: float 150s linear infinite;
}

/* Estrelas brilhantes */
.interface::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: radial-gradient(2px 2px at 15% 15%, var(--roxo-brilhante) 1px, transparent 0),
    radial-gradient(2px 2px at 35% 45%, var(--roxo-brilhante) 1px, transparent 0),
    radial-gradient(2px 2px at 55% 25%, var(--roxo-brilhante) 1px, transparent 0),
    radial-gradient(2px 2px at 75% 65%, var(--roxo-brilhante) 1px, transparent 0),
    radial-gradient(2px 2px at 85% 35%, var(--roxo-brilhante) 1px, transparent 0);
  opacity: 0.7;
  z-index: -1;
  animation: twinkle 5s infinite alternate;
}

/* === HEADER E NAVEGAÇÃO === */
header {
  position: relative;
  padding: 20px 0;
  z-index: 100;
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: var(--blur-glassmorphism);
  -webkit-backdrop-filter: var(--blur-glassmorphism);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

header .interface {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logotipo {
  height: 50px;
  transition: var(--transicao);
}

.logotipo:hover {
  filter: drop-shadow(0 0 8px var(--roxo-claro));
  transform: scale(1.05);
}

/* === MENU DESKTOP === */
.menu-desktop {
  display: flex;
}

.menu-desktop ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

.menu-desktop a {
  color: var(--branco);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 1px;
  padding: 8px 0;
  position: relative;
  transition: var(--transicao);
}

.menu-desktop a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--roxo-claro), var(--roxo-brilhante));
  transition: var(--transicao);
  border-radius: 2px;
}

.menu-desktop a:hover {
  color: var(--roxo-brilhante);
  text-shadow: 0 0 10px rgba(180, 41, 169, 0.5);
}

.menu-desktop a:hover::before {
  width: 100%;
}

/* === MENU MOBILE === */
.btn-abrir-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.btn-abrir-menu img {
  width: 30px;
  height: 30px;
  transition: var(--transicao);
}

.btn-abrir-menu:hover img {
  transform: scale(1.1);
  filter: drop-shadow(0 0 5px var(--roxo-claro));
}

.menu-mobile {
  position: fixed;
  top: 0;
  right: -100%;
  width: 70%;
  max-width: 360px;
  height: 100vh;
  background: rgba(26, 0, 51, 0.95);
  backdrop-filter: var(--blur-glassmorphism);
  -webkit-backdrop-filter: var(--blur-glassmorphism);
  z-index: 200;
  padding: 40px 20px;
  transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
  border-left: var(--borda-glassmorphism);
}

.menu-mobile.aberto {
  right: 0;
}

.btn-fechar {
  background: none;
  border: none;
  align-self: flex-end;
  margin-bottom: 40px;
  cursor: pointer;
}

.close-menu {
  width: 24px;
  height: 24px;
  transition: var(--transicao);
}

.btn-fechar:hover .close-menu {
  transform: rotate(90deg);
  filter: drop-shadow(0 0 5px var(--roxo-claro));
}

.nav-mobile ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nav-mobile a {
  color: var(--branco);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 1px;
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transicao);
}

.nav-mobile a:hover {
  color: var(--roxo-brilhante);
  transform: translateX(10px);
  border-bottom-color: var(--roxo-claro);
  text-shadow: 0 0 10px rgba(180, 41, 169, 0.5);
}

.overlay-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: var(--transicao);
}

.overlay-menu.aberto {
  opacity: 1;
  visibility: visible;
}

/* === SEÇÃO FORMULÁRIO === */
.formulario {
  padding: 60px 0;
  position: relative;
  min-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 500px;
  width: 90%;
  margin: 0 auto;
}

/* === TÍTULO === */
.titulo {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
  letter-spacing: 2px;
  position: relative;
  color: var(--branco);
  text-shadow: 0 0 15px rgba(138, 17, 85, 0.6);
}

.titulo span {
  color: var(--roxo-claro);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    text-shadow: 0 0 5px rgba(138, 17, 85, 0.5);
  }
  50% {
    text-shadow: 0 0 20px rgba(138, 17, 85, 0.8);
  }
  100% {
    text-shadow: 0 0 5px rgba(138, 17, 85, 0.5);
  }
}

/* === FORMULÁRIO === */
form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  background: rgba(26, 0, 51, 0.6);
  backdrop-filter: var(--blur-glassmorphism);
  -webkit-backdrop-filter: var(--blur-glassmorphism);
  border-radius: 20px;
  border: var(--borda-glassmorphism);
  box-shadow: var(--sombra-principal);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  transition: var(--transicao);
}

form:hover {
  box-shadow: 0 15px 45px rgba(138, 17, 85, 0.4);
  transform: translateY(-5px);
}

/* Efeito de brilho nos cantos */
form::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  pointer-events: none;
  z-index: -1;
  animation: shine 8s infinite linear;
}

@keyframes shine {
  0% {
    transform: rotate(30deg) translateY(0%);
  }
  50% {
    transform: rotate(30deg) translateY(5%);
  }
  100% {
    transform: rotate(30deg) translateY(0%);
  }
}

.form-group {
  position: relative;
}

/* === INPUTS === */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 15px 45px 15px 45px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--branco);
  font-size: 1rem;
  transition: var(--transicao);
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="email"]::placeholder,
input[type="password"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
  transition: var(--transicao);
}

input[type="email"]:focus,
input[type="password"]:focus {
  border-color: var(--roxo-claro);
  box-shadow: 0 0 15px rgba(138, 17, 85, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

input[type="email"]:focus::placeholder,
input[type="password"]:focus::placeholder {
  opacity: 0.5;
  transform: translateX(10px);
}

/* Validação visual */
input:valid:not(:placeholder-shown) {
  border-color: var(--sucesso);
}

input:invalid:not(:placeholder-shown):not(:focus) {
  border-color: var(--erro);
}

/* === ÍCONES NOS INPUTS === */
.input-icon {
  position: absolute;
  left: 15px;
  color: var(--cinza-claro);
  transition: var(--transicao);
  pointer-events: none;
}

input:focus ~ .input-icon {
  color: var(--roxo-claro);
  transform: scale(1.2);
  filter: drop-shadow(0 0 5px var(--roxo-claro));
}

/* === BOTÃO MOSTRAR SENHA === */
.toggle-password {
  position: absolute;
  right: 15px;
  background: none;
  border: none;
  color: var(--cinza-claro);
  cursor: pointer;
  transition: var(--transicao);
  z-index: 1;
}

.toggle-password:hover {
  color: var(--branco);
  transform: scale(1.1);
  filter: drop-shadow(0 0 5px var(--roxo-claro));
}

/* === BOTÃO DE LOGIN === */
.btn-submit {
  position: relative;
  padding: 15px 30px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(45deg, var(--roxo-escuro), var(--roxo-claro));
  color: var(--branco);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  overflow: hidden;
  transition: var(--transicao);
  box-shadow: 0 5px 15px rgba(138, 17, 85, 0.3);
  text-transform: uppercase;
  margin-top: 10px;
}

.btn-submit::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(138, 17, 85, 0.5);
}

.btn-submit:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(138, 17, 85, 0.3);
}

.btn-submit:hover::before {
  left: 100%;
}

/* === LOADING SPINNER === */
.loading-spinner {
  display: inline-block;
  width: 25px;
  height: 25px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--branco);
  animation: spin 1s ease-in-out infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--branco);
  font-size: 0.9rem;
  margin: 10px 0;
  height: 30px;
}

/* === MENSAGENS DE ERRO === */
.error-message {
  color: var(--erro) !important;
  font-size: 0.8rem !important;
  margin-top: 5px !important;
  display: block;
  opacity: 1 !important;
  transition: var(--transicao);
}

/* === FOOTER DO FORMULÁRIO === */
.form-footer {
  text-align: center;
  margin-top: 20px;
  color: var(--cinza-claro);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-footer a {
  color: var(--roxo-claro);
  text-decoration: none;
  position: relative;
  transition: var(--transicao);
}

.form-footer a:hover {
  color: var(--roxo-brilhante);
  text-shadow: 0 0 8px rgba(138, 17, 85, 0.8);
}

.form-footer a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--roxo-claro);
  transition: var(--transicao);
}

.form-footer a:hover::after {
  width: 100%;
}

.forgot-password {
  font-size: 0.85rem;
}

.forgot-password a {
  color: var(--cinza-claro);
}

.forgot-password a:hover {
  color: var(--roxo-claro);
}

/* === FOOTER PRINCIPAL === */
footer {
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: var(--blur-glassmorphism);
  -webkit-backdrop-filter: var(--blur-glassmorphism);
  border-top: 1px solid rgba(138, 17, 85, 0.2);
  position: relative;
  z-index: 10;
  margin-top: 50px;
}

#footer_content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 40px;
}

#footer_contacts {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#footer_contacts h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--branco);
  text-shadow: 0 0 10px rgba(138, 17, 85, 0.5);
}

#footer_contacts p {
  color: var(--cinza-claro);
  font-size: 0.9rem;
}

#footer_social_media {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

#footer_social_media .footer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transicao);
}

#footer_social_media .footer-link i {
  font-size: 1.2rem;
  color: var(--branco);
  transition: var(--transicao);
}

#footer_social_media .footer-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px rgba(138, 17, 85, 0.5);
}

#instagram:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

#tiktok:hover {
  background: linear-gradient(45deg, #25f4ee, #000000, #fe2c55);
}

.footer-list {
  list-style: none;
}

.footer-list h3 {
  color: var(--branco);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-list h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, var(--roxo-claro), transparent);
  border-radius: 2px;
}

.footer-list li {
  margin-bottom: 15px;
}

.footer-link {
  color: var(--cinza-claro);
  text-decoration: none;
  transition: var(--transicao);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-link:hover {
  color: var(--roxo-claro);
  transform: translateX(5px);
}

#footer_copyright {
  padding: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--cinza-claro);
  background-color: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#footer_copyright::before {
  content: "💜";
  animation: heartbeat 1.5s infinite;
  display: inline-block;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* === ANIMAÇÕES PARA PÁGINA === */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main {
  animation: fadeIn 0.8s ease-out;
}

/* === EFEITO DE TRANSIÇÃO DE PÁGINA === */
[data-transition] {
  position: relative;
  overflow: hidden;
}

[data-transition]::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--roxo-claro);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s ease;
  z-index: 999;
  pointer-events: none;
}

[data-transition].transitioning::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* === RESPONSIVIDADE === */
@media (max-width: 1024px) {
  .menu-desktop {
    display: none;
  }

  .btn-abrir-menu {
    display: block;
  }

  .formulario {
    padding: 60px 0;
  }

  form {
    padding: 30px 20px;
  }

  .titulo {
    font-size: 2rem;
  }

  #footer_content {
    justify-content: space-between;
    padding: 30px 20px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 15px 0;
  }

  .logotipo {
    height: 40px;
  }

  .formulario {
    padding: 40px 0;
  }

  form {
    padding: 25px 20px;
  }

  .titulo {
    font-size: 1.8rem;
    margin-bottom: 25px;
  }

  input[type="email"],
  input[type="password"] {
    padding: 12px 40px 12px 40px;
    font-size: 0.9rem;
  }

  .btn-submit {
    padding: 12px 25px;
    font-size: 0.9rem;
  }

  #footer_content {
    flex-direction: column;
    gap: 30px;
    padding: 30px 20px;
  }

  .footer-list {
    width: 100%;
  }
}

@media (max-width: 480px) {
  header .interface {
    padding: 0 15px;
  }

  .logotipo {
    height: 35px;
  }

  .formulario {
    padding: 30px 0;
  }

  form {
    padding: 20px 15px;
  }

  .titulo {
    font-size: 1.6rem;
    margin-bottom: 20px;
  }

  form {
    gap: 15px;
  }

  input[type="email"],
  input[type="password"] {
    padding: 10px 35px 10px 35px;
    font-size: 0.85rem;
  }

  .btn-submit {
    padding: 10px 20px;
    font-size: 0.85rem;
  }

  .form-footer {
    font-size: 0.8rem;
  }

  .menu-mobile {
    width: 85%;
  }
}

/* === PREFERS-REDUCED-MOTION === */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  body::after {
    animation: none;
  }

  .btn-submit::before {
    display: none;
  }
}
