/* =====================================================
   GFotos — Auth Page Styles
   Fuente: Nunito | Fondo oscuro | Tarjeta translúcida
   ===================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep:    #050d1a;
  --bg-card:    rgba(255,255,255,0.06);
  --border:     rgba(255,255,255,0.12);
  --green:      #4ade80;
  --blue:       #38bdf8;
  --yellow:     #fbbf24;
  --pink:       #f472b6;
  --text:       #e2e8f0;
  --text-muted: #94a3b8;
  --radius:     16px;
  --shadow:     0 8px 40px rgba(0,0,0,.5);
}

body.auth-page {
  font-family: 'Nunito', sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-x: hidden;
  position: relative;
}

/* ESTRELLAS */
.stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: twinkle linear infinite;
}
@keyframes twinkle {
  0%,100% { opacity: 0; transform: scale(1); }
  50%      { opacity: .8; transform: scale(1.4); }
}

/* CONTENEDOR */
.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

/* BRAND */
.auth-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}
.brand-icon {
  font-size: 3rem;
  filter: drop-shadow(0 0 12px var(--blue));
  margin-bottom: .4rem;
}
.brand-title {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-sub { color: var(--text-muted); font-size: .9rem; margin-top: .2rem; }

/* TARJETA */
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  padding: 2rem;
}

/* TABS */
.tabs {
  display: flex;
  background: rgba(0,0,0,.3);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 1.5rem;
}
.tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  padding: .6rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
}
.tab.active {
  background: linear-gradient(135deg, var(--blue), #6366f1);
  color: #fff;
  box-shadow: 0 2px 10px rgba(56,189,248,.4);
}

/* ALERTAS */
.alert {
  border-radius: 10px;
  padding: .75rem 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: .9rem;
}
.alert-error   { background: rgba(239,68,68,.15);  border: 1px solid rgba(239,68,68,.4);  color: #fca5a5; }
.alert-success { background: rgba(74,222,128,.15); border: 1px solid rgba(74,222,128,.4); color: #86efac; }
.alert-info    { background: rgba(56,189,248,.15); border: 1px solid rgba(56,189,248,.4); color: #7dd3fc; }

/* FORMULARIO */
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-form.hidden { display: none; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-group label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: .95rem;
  padding: .7rem 1rem;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.form-group input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(56,189,248,.2);
}

.input-eye { position: relative; }
.input-eye input { padding-right: 2.8rem; }
.eye-btn {
  position: absolute; right: .8rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1rem; line-height: 1;
}

/* Badge de dominio */
.email-wrapper { position: relative; }
.domain-badge {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 6px;
  margin-top: .3rem;
}
.domain-badge.ok      { background: rgba(74,222,128,.15); color: var(--green); }
.domain-badge.pending { background: rgba(251,191,36,.15);  color: var(--yellow); }
.domain-badge.hidden  { display: none; }

/* Fuerza de contraseña */
.pass-strength {
  font-size: .78rem;
  font-weight: 700;
  min-height: 1.1em;
  transition: color .3s;
}

/* AVATARES */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .5rem;
}
.avatar-btn {
  background: rgba(255,255,255,.05);
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 1.6rem;
  padding: .5rem;
  cursor: pointer;
  transition: all .2s;
  line-height: 1;
}
.avatar-btn:hover, .avatar-btn.selected {
  border-color: var(--blue);
  background: rgba(56,189,248,.15);
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(56,189,248,.4);
}

/* CURSOS */
.curso-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.curso-btn {
  background: rgba(255,255,255,.05);
  border: 2px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  padding: .4rem .8rem;
  cursor: pointer;
  transition: all .2s;
}
.curso-btn:hover, .curso-btn.selected {
  border-color: var(--pink);
  background: rgba(244,114,182,.15);
  color: var(--pink);
}

/* BOTÓN PRINCIPAL */
.btn {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  padding: .8rem 1.5rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), #6366f1);
  color: #fff;
  box-shadow: 0 4px 20px rgba(56,189,248,.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(56,189,248,.5);
}
.btn-full { width: 100%; margin-top: .5rem; }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* Utilidades */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); font-size: .9rem; }

/* RESPONSIVE */
@media (max-width: 480px) {
  .auth-card { padding: 1.4rem; }
  .form-row { grid-template-columns: 1fr; }
  .avatar-grid { grid-template-columns: repeat(5, 1fr); }
}
