* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #010313;
  color: #f1f5f9;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}

.loginForm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* ===== FONDO DINÁMICO (canvas de estrellas y cometas) ===== */
#dynamic-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: radial-gradient(circle at 20% 30%, #03061a, #000000);
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(5, 10, 25, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #22c55e30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #86efac);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn-outline-light {
  background: transparent;
  border: 1.5px solid #22c55e;
  padding: 6px 18px;
  border-radius: 40px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline-light:hover {
  background: #22c55e20;
  border-color: #4ade80;
  transform: scale(0.97);
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.container {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border-radius: 32px;
  padding: 32px 28px;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(34, 197, 94, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 0.6s ease-out;
}

.container:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 50px -15px rgba(34, 197, 94, 0.2);
  border-color: #22c55e60;
}

h2 {
  text-align: center;
  margin-bottom: 24px;
  color: #22c55e;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

h2 i {
  font-size: 2rem;
}

input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 60px;
  border: none;
  background: #1e293b;
  color: white;
  font-size: 1rem;
  transition: all 0.2s;
  outline: none;
}

input:focus {
  background: #2d3a4e;
  box-shadow: 0 0 0 2px #22c55e40;
}

button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(105deg, #22c55e 0%, #16a34a 100%);
  border: none;
  border-radius: 60px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 16px;
  transition: all 0.2s;
  color: #010313;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

button:hover {
  transform: scale(0.98);
  background: linear-gradient(105deg, #2ecc71, #1f9a4a);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.5);
}

.switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: #86efac;
  cursor: pointer;
  transition: 0.2s;
}

.switch:hover {
  color: #facc15;
  text-decoration: underline;
}

.error {
  color: #ef4444;
  text-align: center;
  margin-top: 12px;
  font-size: 0.85rem;
  background: #ef444420;
  padding: 6px;
  border-radius: 30px;
}

.registerForm {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== ELEMENTOS FLOTANTES (temática juegos) ===== */
.floating-icon {
  height: 80px;
  position: fixed;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
  font-size: 2.5rem;
  animation: floatAround 20s infinite linear;
}

@keyframes floatAround {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  25% {
    transform: translate(30px, -20px) rotate(5deg);
  }

  50% {
    transform: translate(10px, -40px) rotate(-3deg);
  }

  75% {
    transform: translate(-20px, -15px) rotate(2deg);
  }

  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

/* Responsive */
@media (max-width: 550px) {
  .container {
    padding: 24px 20px;
    margin: 16px;
  }

  .logo span {
    display: none;
  }

  .navbar {
    padding: 10px 16px;
  }
}