/* ===== ANIMACIÓN BASE ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== VARIABLES ===== */
:root {
  --bg1: #020617;
  --bg2: #0f172a;
  --card: rgba(15, 23, 42, 0.78);

  --blue: #00d9ff;
  --purple: #8b5cf6;

  --text: #ffffff;
  --input: rgba(30, 41, 59, 0.9);
}

/* ===== BODY ===== */
body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;

  padding: 20px;

  font-family: Arial, sans-serif;

  background: radial-gradient(
    circle at top left,
    #111827 0%,
    #020617 55%,
    #000000 100%
  );

  color: var(--text);
  overflow: hidden;
}

/* ===== GLASS CARD ===== */
.card {
  width: 100%;
  max-width: 420px;

  padding: 40px;

  border-radius: 24px;

  background: var(--card);
  backdrop-filter: blur(15px);

  border: 1px solid rgba(255, 255, 255, 0.08);

  box-shadow:
    0 0 25px rgba(0, 217, 255, 0.15),
    0 0 60px rgba(139, 92, 246, 0.1);

  transition: 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
}

/* ===== TITULO ===== */
.card h2 {
  text-align: center;
  margin-bottom: 25px;

  font-size: 24px;

  color: var(--blue);

  text-shadow: 0 0 10px rgba(0, 217, 255, 0.6);
}

/* ===== INPUTS ===== */
input {
  width: 100%;
  padding: 14px;

  margin-bottom: 15px;

  border: none;
  outline: none;

  border-radius: 12px;

  background: var(--input);
  color: white;

  font-size: 14px;

  border: 1px solid transparent;

  transition: 0.3s;
}

input::placeholder {
  color: #94a3b8;
}

input:focus {
  border-color: var(--blue);

  box-shadow:
    0 0 12px rgba(0, 217, 255, 0.4);
}

/* ===== BUTTON ===== */
button {
  width: 100%;
  padding: 14px;

  border: none;
  border-radius: 12px;

  cursor: pointer;

  font-size: 15px;
  font-weight: bold;

  color: white;

  background: linear-gradient(
    135deg,
    var(--blue),
    var(--purple)
  );

  transition: 0.3s ease;

  box-shadow: 0 0 12px rgba(0, 217, 255, 0.3);
}

button:hover {
  transform: translateY(-2px);

  box-shadow:
    0 0 20px rgba(0, 217, 255, 0.7),
    0 0 35px rgba(139, 92, 246, 0.4);
}

button:active {
  transform: scale(0.98);
}

/* ===== ERROR ===== */
.error {
  color: #f87171;
  text-align: center;

  margin-top: 12px;
  min-height: 18px;

  font-size: 13px;
}

/* ===== REGISTER LINK ===== */
.register {
  text-align: center;
  margin-top: 18px;

  font-size: 13px;

  color: #94a3b8;
}

.register a {
  color: var(--blue);
  text-decoration: none;
}

.register a:hover {
  text-shadow: 0 0 8px rgba(0, 217, 255, 0.8);
}

/* ===== TABLET ===== */
@media (max-width: 768px) {
  .card {
    padding: 32px 24px;
  }

  .card h2 {
    font-size: 22px;
  }
}

/* ===== MOBILE ===== */
@media (max-width: 480px) {
  body {
    padding: 15px;
  }

  .card {
    padding: 26px 18px;
    border-radius: 18px;
  }

  input,
  button {
    padding: 13px;
    font-size: 14px;
  }
}
/* ===== PAGE FADE ===== */
.page {
  opacity: 0;
  animation: pageFade 0.5s ease forwards;
}

@keyframes pageFade {
  to {
    opacity: 1;
  }
}

/* ===== CARD ANIMATION ===== */
.animate-in {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  animation: cardIn 0.6s ease forwards;
}

@keyframes cardIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== INPUT STAGGER EFFECT ===== */
.card input,
.card button,
.card .registerText {
  opacity: 0;
  transform: translateY(10px);
  animation: itemIn 0.5s ease forwards;
}

.card input:nth-child(2) { animation-delay: 0.1s; }
.card input:nth-child(3) { animation-delay: 0.2s; }
.card button { animation-delay: 0.3s; }
.card .registerText { animation-delay: 0.4s; }

@keyframes itemIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}