@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

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

:root {
  --red:      #8b0000;
  --red-glow: rgba(139, 0, 0, 0.35);
  --bg:       #1c1c28;
  --card:     rgba(36, 36, 52, 0.97);
  --border:   rgba(139, 0, 0, 0.30);
  --text:     #bbb;
  --dim:      #888;
  --font:     'Share Tech Mono', 'Courier New', monospace;
}

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  font-family: var(--font);
  color: var(--text);
  overflow: hidden;
}

/* Grid de fondo */
.grid-bg {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(139,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,0,0,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

/* Punto rojo pulsando en esquina */
.grid-bg::after {
  content: '';
  position: fixed;
  bottom: 24px; right: 24px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red-glow);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

/* Contenedor centrado */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 1rem;
}

/* Tarjeta */
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2.5rem 2.8rem;
  position: relative;
}

/* Esquinas decorativas */
.auth-card::before,
.auth-card::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--red);
  border-style: solid;
}
.auth-card::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.auth-card::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

/* Marca */
.brand {
  text-align: center;
  margin-bottom: 2.2rem;
}

.logo {
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.5em;
  color: var(--red);
  text-shadow: 0 0 30px var(--red-glow), 0 0 60px rgba(139,0,0,0.15);
  display: block;
}

.tagline {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--dim);
  margin-top: 0.4rem;
}

/* Título de sección */
.section-title {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--dim);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 1.6rem;
}

/* Campos */
.field { margin-bottom: 1.25rem; }

.field label {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--dim);
  margin-bottom: 0.45rem;
}

.field input {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-bottom-color: rgba(139,0,0,0.25);
  color: #ccc;
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 0.6rem 0.8rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.field input:focus {
  border-color: rgba(139,0,0,0.55);
  background: rgba(139,0,0,0.03);
}

.field input::placeholder { color: #666; }

/* Error */
.error-msg {
  font-size: 0.72rem;
  color: #cc2222;
  letter-spacing: 0.05em;
  min-height: 1.1rem;
  margin-bottom: 0.9rem;
}

/* Botón principal */
.btn-primary {
  width: 100%;
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red);
  font-family: var(--font);
  font-size: 0.82rem;
  letter-spacing: 0.38em;
  padding: 0.8rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
  text-transform: uppercase;
  margin-top: 0.3rem;
}

.btn-primary:hover:not(:disabled) {
  background: var(--red);
  color: #fff;
  box-shadow: 0 0 22px var(--red-glow);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Links */
.auth-links {
  margin-top: 1.6rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--dim);
  letter-spacing: 0.1em;
}

.auth-links a {
  color: var(--red);
  text-decoration: none;
  margin-left: 0.5rem;
  letter-spacing: 0.18em;
  transition: text-shadow 0.2s;
}

.auth-links a:hover {
  text-shadow: 0 0 10px var(--red-glow);
}

/* Requisitos de contraseña */
.pw-hint {
  font-size: 0.6rem;
  color: var(--dim);
  letter-spacing: 0.05em;
  margin-top: 0.3rem;
}
