* {
  box-sizing: border-box;
}

body {
  margin: 0; height: 100vh; background: radial-gradient(circle at top, #0f172a, #020617); font-family: Inter, system-ui; display: flex; justify-content: center; align-items: center; color: #e5e7eb;
}
.auth-card {
  max-width: 460px;
  width: 100%;
  padding: 40px;
  border-radius: 18px;

  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.08),
    rgba(255,255,255,0.03)
  );

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border: 1px solid rgba(255,255,255,0.12);

  box-shadow:
    0 20px 50px rgba(0,0,0,.45),
    inset 0 0 0 1px rgba(255,255,255,0.02);

  text-align: center;
}



.auth-card h1 {
  letter-spacing: 3px;
  margin-bottom: 5px;
}

.subtitle {
  font-size: 14px;
  color: #cbd5f5;
  margin-bottom: 30px;
}

.auth-form {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  width: 100%;
  left: 0;
  top: 0;
  transition: opacity .4s ease;
}

.auth-form.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  position: relative;
}




.auth-form input:focus {
  outline: none;
  background: transparent;
  box-shadow: none;
}


.auth-form button {
  width: 100%;
  padding: 11px;
  border-radius: 15px;
  border: none;
  background: #FEC601;
  color: #020617;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
}

.auth-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(254,198,1,.35);
}

.links {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.links a {
  color: #cbd5f5;
  text-decoration: none;
}

.links a:hover {
  text-decoration: underline;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.logo-wrapper {
  position: relative;
  width: 110px;
  height: 120px;
  margin: 0 auto 20px;
}

.logo {
  width: 110px;
  height: 110px;
  z-index: 2;
  position: relative;
}

.pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(233, 231, 237, 0.11);
  animation: pulse 4.5s ease-out infinite;
}

.pulse-2 { animation-delay: 1.5s; }
.pulse-3 { animation-delay: 3s; }

@keyframes pulse {
  0%   { transform: scale(1); opacity: .6; }
  100% { transform: scale(2.6); opacity: 0; }
}

.auth-form.active {
  animation: appear .1s ease forwards;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===============================
   INPUTS FUTURISTAS TIPO LÍNEA
================================ */

.field {
  position: relative;
  margin-bottom: 34px;
  text-align: left;
}

.auth-form#registerForm .field {
  max-width: 100%;
}


.field input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  padding: 10px 0;
  color: #e5e7eb;
  font-size: 15px;
  letter-spacing: .5px;
  caret-color: #FEC601;
}

.field select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  padding: 10px 0;
  color: #e5e7eb;
  font-size: 15px;
  letter-spacing: .5px;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  cursor: pointer;
}

.field select option {
  background: #0f172a;   /* fondo oscuro */
  color: #e5e7eb;        /* texto claro */
}

.field select:focus {
  outline: none;
}
/* Label flotante para select */
.field select:focus ~ label,
.field select:valid ~ label {
  outline: none;
  top: -12px;
  font-size: 11px;
  color: #FEC601;
}



.field input:focus {
  outline: none;
}

/* Label flotante */
.field label {
  position: absolute;
  top: 10px;
  left: 0;
  font-size: 13px;
  color: #94a3b8;
  pointer-events: none;
  transition: all .35s ease;
}

/* Línea animada */
.field .line {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0%;
  background: #FEC601;
  transition: width .4s ease;
}

.field input:focus ~ .line {
  width: 100%;
}

/* Label activa */
.field input:focus ~ label,
.field input:not(:placeholder-shown) ~ label {
  top: -12px;
  font-size: 11px;
  color: #FEC601;
}

/* Estados de error */
.field.error input {
  border-bottom-color: #ef4444;
}

.field.error .line {
  background: #ef4444;
  width: 100%;
}

.error-msg {
  font-size: 11px;
  color: #ef4444;
  margin-top: 6px;
  display: none;
}

.field.error .error-msg {
  display: block;
}

/* ===============================
   FIX AUTOFILL CHROME / EDGE
   (evita fondos blancos)
================================ */

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: #e5e7eb;
  -webkit-box-shadow: 0 0 0px 1000px transparent inset;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: #FEC601;
}

/* ===============================
   ACCIONES LOGIN (UX MOBILE SAFE)
================================ */

.actions {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
  color: #e5e7eb;
  font-size: 14px;
  cursor: pointer;
  transition: all .25s ease;
}

/* Crear cuenta */
.action-btn.secondary:hover {
  background: rgba(255,255,255,0.08);
}

/* Recuperar acceso */
.action-btn.tertiary {
  background: rgba(255,255,255,0.08);
  color: #FEC601;
}

.action-btn.tertiary:hover {
  background: rgba(255,255,255,0.08);
}


/* Mobile feedback */
.action-btn:active {
  transform: scale(0.98);
}

/* ===============================
   ACCIONES COMPACTAS (LOGIN)
================================ */

.actions.compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.actions.compact .action-btn {
  padding: 10px;
  font-size: 13px;
  border-radius: 12px;
}

/* ===============================
   BACKGROUND RED (DTX STYLE)
================================ */

.network-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Líneas */
.network-bg::before,
.network-bg::after {
  content: "";
  position: absolute;
  width: 120%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(56, 189, 248, 0.35),
    transparent
  );
  top: 30%;
  left: -10%;
  animation: network-move 18s linear infinite;
  opacity: 0.25;
}

.network-bg::after {
  top: 60%;
  animation-delay: 6s;
  opacity: 0.18;
}

@keyframes network-move {
  0% {
    transform: translateX(-20%);
  }
  100% {
    transform: translateX(20%);
  }
}

/* ===============================
   CANVAS RED HEFESTOS
================================ */

#hefNetwork {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35; /* CLAVE: sutil */
}

/* Aseguramos que el login esté arriba */
.auth-container,
.hef-footer {
  position: relative;
  z-index: 2;
}

/* ===============================
   REGISTRO - MODO ANCHO
================================ */

.auth-form#registerForm.active {
  max-width: 540px;
  margin: 0 auto;
}

/* ===============================
   REGISTRO EN DOS COLUMNAS
================================ */

.register-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

/* Campos que ocupan toda la fila */
.register-grid .field.full {
  grid-column: 1 / -1;
}

/* Tablet y desktop */
@media (min-width: 768px) {
  .register-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
  }
}



/* ===============================
   MODAL ALERTA – DTX & PLAYSYNC
================================ */

.hef-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
  z-index: 9999;
}

.hef-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.hef-modal-box {
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 32px 28px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 30px 60px rgba(0,0,0,.55);
  animation: modalPop .35s ease;
}

.hef-modal-box h3 {
  margin: 0 0 12px;
  color: #FEC601;
  letter-spacing: 1px;
}

.hef-modal-box p {
  font-size: 14px;
  color: #e5e7eb;
  line-height: 1.5;
  margin-bottom: 26px;
}

.hef-modal-btn {
  padding: 12px 28px;
  border-radius: 14px;
  border: none;
  background: #FEC601;
  color: #020617;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
}

.hef-modal-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(254,198,1,.35);
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===============================
   FOOTER HEFESTOS – DTX & PLAYSYNC
================================ */

.hef-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px 20px;
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.08);
  z-index: 3;
}

.hef-footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  color: #cbd5f5;
  letter-spacing: .3px;
}

.hef-footer-brand {
  color: #FEC601;
  font-weight: 600;
  letter-spacing: 1.5px;
}

.hef-footer-sep {
  opacity: .4;
}

.hef-footer-link {
  color: #cbd5f5;
  text-decoration: none;
  transition: color .25s ease;
}

.hef-footer-link:hover {
  color: #FEC601;
}


/* ===============================
   HEADER HEFESTOS – MENÚ GLOBAL
================================ */

.hef-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 56px;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 5;
}

.hef-header-inner {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hef-brand {
  color: #FEC601;
  font-weight: 600;
  letter-spacing: 2px;
}

.hef-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hef-user {
  font-size: 13px;
  color: #cbd5f5;
}

.hef-logout {
  font-size: 13px;
  color: #e5e7eb;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all .25s ease;
}

.hef-logout:hover {
  background: rgba(255,255,255,0.08);
  color: #FEC601;
}

/* Empuja el contenido debajo del header */
.hef-main {
  padding-top: 7px;
  min-height: calc(100vh - 56px);
}

/* Icono HEFESTOS en header */
.hef-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hef-brand-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

/* ===============================
   ESTILO ADMIN (SUTIL)
================================ */

.hef-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}

.hef-section h1 {
  color: #FEC601;
  margin-bottom: 12px;
}

.hef-section p {
  color: #cbd5f5;
  opacity: .9;
}
