@import url("https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400;700&family=Poppins:wght@400;600&display=swap");

:root {
  --primary: #1f4e79;
  --secondary: #003f63;
  --accent: #00c6ff;
  --bg-gradient: linear-gradient(135deg, #003f63, #1f4e79, #00c6ff);
  --white-glass: rgba(255, 255, 255, 0.15);
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  --text-light: #eaf3ff;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: "Poppins", sans-serif;
  color: var(--text-light);
  overflow: hidden;
}

/* Fundo animado */
body {
  background: var(--bg-gradient);
  background-size: 300% 300%;
  animation: gradientFlow 8s ease infinite;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 198, 255, 0.2), transparent 70%);
  top: -20%;
  left: -10%;
  filter: blur(100px);
  animation: floatLight 10s infinite alternate ease-in-out;
}

/* Card de login */
.login-container {
  position: relative;
  z-index: 2;
  background: var(--white-glass);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 2.8rem 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
  text-align: center;
  animation: fadeIn 0.8s ease-in-out;
}

.login-title {
  font-family: "Roboto Slab", serif;
  font-size: 2.1rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

.login-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* Campos */
.login-form-group {
  text-align: left;
  margin-bottom: 1.3rem;
}

.login-label {
  display: block;
  font-weight: 600;
  color: #dce8f5;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.login-input {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: 0.3s ease;
}

.login-input:focus {
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 10px rgba(0, 198, 255, 0.5);
  transform: scale(1.02);
}

/* Botão */
.login-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #1f4e79);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-family: "Roboto Slab", serif;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 198, 255, 0.4);
}

.login-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(0, 198, 255, 0.6);
}

/* Footer */
.login-footer {
  margin-top: 1.8rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}
.login-footer a {
  color: #00c6ff;
  text-decoration: none;
}
.login-footer a:hover {
  text-decoration: underline;
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes floatLight {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(30px) rotate(20deg); }
}

/* =========================
   RESPONSIVIDADE GLOBAL
========================= */

/* Tablets e pequenas telas */
@media (max-width: 768px) {
  body {
    padding: 2rem;
    overflow: auto;
  }

  .login-container {
    padding: 2.2rem 1.6rem;
    max-width: 340px;
  }

  .login-title {
    font-size: 1.9rem;
  }

  .login-subtitle {
    font-size: 0.95rem;
  }

  .login-btn {
    font-size: 1rem;
  }
}

/* Celulares médios */
@media (max-width: 480px) {
  body {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }

  .login-container {
    width: 100%;
    margin: 0 1rem;
    padding: 1.8rem 1.2rem;
    max-width: 100%;
  }

  .login-title {
    font-size: 1.7rem;
  }

  .login-subtitle {
    font-size: 0.9rem;
  }

  .login-input {
    font-size: 0.95rem;
    padding: 10px;
  }

  .login-btn {
    font-size: 0.9rem;
    padding: 10px;
  }

  .login-footer {
    font-size: 0.8rem;
  }
}

/* Celulares muito pequenos (até 360px) */
@media (max-width: 360px) {
  .login-container {
    padding: 1.4rem 1rem;
    border-radius: 10px;
  }

  .login-title {
    font-size: 1.5rem;
  }

  .login-subtitle {
    font-size: 0.85rem;
  }
}

.divider {
  margin: 1.4rem 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,.7);
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  width: 40%;
  background: rgba(255,255,255,.3);
  position: absolute;
  top: 50%;
}

.divider::before { left: 0; }
.divider::after  { right: 0; }

/* botão cadastro */
.register-btn {
  display: block;
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;

  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.5);

  transition: .3s ease;
}

.register-btn:hover {
  background: rgba(255,255,255,.15);
  transform: translateY(-2px);
}

.success-message {
  background: #e6f9f0;
  color: #1f7a55;
  border: 1px solid #b6ead3;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  animation: fadeInSuccess 0.4s ease-in-out;
}

@keyframes fadeInSuccess {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-switch {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,.8);
}

.login-switch a {
  color: #00c6ff;
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
}

.login-switch a:hover {
  text-decoration: underline;
}