/* ============================================================
   DARIO M. — AUTH SYSTEM v3
   macOS Sequoia × Arch Linux
   ============================================================ */

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  min-height: 100vh; min-height: 100dvh;
  overflow-x: hidden;
  color: #cdd6f4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  background: transparent;
}
img { display: block; max-width: 100%; }
button, input, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--neon); color: #000; }

/* ---------- UTILIDADES GLOBALES (terminales) ---------- */
.k { color: var(--neon); }
.v { color: #e0e8ff; font-weight: 600; }
.c { color: rgba(205,214,244,0.35); }

/* ============================================================
   THEME — variables por zona
   Imágenes: bg = 1-4.webp | avatar = Zona-*.webp
   ============================================================ */
:root {
  --neon:      #00f0ff;
  --neon-soft: #00d4e6;
  --neon-dim:  rgba(0, 240, 255, 0.1);
  --neon-glow: rgba(0, 240, 255, 0.4);
  
  /* Zone 1: Principal - Cyan High-Tech */
  --bg-gradient: 
    radial-gradient(circle at 0% 0%, rgba(0, 240, 255, 0.35) 0%, transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(0, 110, 255, 0.2) 0%, transparent 60%),
    radial-gradient(circle at 50% 100%, rgba(0, 240, 255, 0.15) 0%, transparent 70%),
    linear-gradient(rgba(10, 11, 16, 0.7), rgba(10, 11, 16, 0.85));
  --bg-image: url('1.png');
  --avatar-image: url('Zona-principal.webp');

  /* macOS Sequoia glass */
  --win-bg:     rgba(10, 12, 20, 0.85);
  --win-border: rgba(255,255,255,0.07);
  --win-shadow: 0 40px 100px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.04);
  --bar-bg:     rgba(15, 18, 30, 0.95);

  /* texto */
  --t1: #ffffff;
  --t2: rgba(255,255,255,0.7);
  --t3: rgba(255,255,255,0.35);

  /* Catppuccin Mocha terminal */
  --green:  #a6e3a1;
  --blue:   #89b4fa;
  --cyan:   #89dceb;
  --yellow: #f9e2af;
  --red:    #f38ba8;
  --mauve:  #cba6f7;
  --orange: #fab387;
}

body[data-zone="intermedia"] {
  --neon: #ffcc00; --neon-soft: #e6b800;
  --neon-dim: rgba(255, 204, 0, 0.1); --neon-glow: rgba(255, 204, 0, 0.4);
  --bg-gradient: 
    radial-gradient(circle at 50% 0%, rgba(255, 204, 0, 0.28), transparent 75%),
    radial-gradient(circle at 0% 50%, rgba(255, 100, 0, 0.15), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(255, 204, 0, 0.12), transparent 70%),
    linear-gradient(rgba(8, 7, 5, 0.75), rgba(8, 7, 5, 0.88));
  --bg-image: url('2.png');
  --avatar-image: url('Zona-intermedia.webp');
}

body[data-zone="avanzada"] {
  --neon: #bf00ff; --neon-soft: #a600e6;
  --neon-dim: rgba(191, 0, 255, 0.1); --neon-glow: rgba(191, 0, 255, 0.4);
  --bg-gradient: 
    radial-gradient(circle at 0% 100%, rgba(191, 0, 255, 0.3), transparent 70%),
    radial-gradient(circle at 100% 0%, rgba(100, 0, 255, 0.25), transparent 80%),
    radial-gradient(circle at 50% 0%, rgba(191, 0, 255, 0.15), transparent 60%),
    linear-gradient(rgba(8, 5, 10, 0.75), rgba(8, 5, 10, 0.88));
  --bg-image: url('3.png');
  --avatar-image: url('Zona-Avanzada.webp');
}

body[data-zone="master"] {
  --neon: #ff0033; --neon-soft: #e6002e;
  --neon-dim: rgba(255, 0, 51, 0.15); --neon-glow: rgba(255, 0, 51, 0.5);
  --bg-gradient: 
    radial-gradient(circle at 100% 0%, rgba(255, 0, 51, 0.35), transparent 70%),
    radial-gradient(circle at 0% 100%, rgba(150, 0, 0, 0.3), transparent 80%),
    radial-gradient(circle at 50% 50%, rgba(255, 0, 51, 0.1), transparent 60%),
    linear-gradient(rgba(10, 5, 5, 0.75), rgba(10, 5, 5, 0.88));
  --bg-image: url('4.png');
  --avatar-image: url('Zona-Master.webp');
}

/* ============================================================
   BOOT OVERLAY
   ============================================================ */
.boot-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: #0a0b10;
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding: clamp(1.5rem, 6vw, 4rem);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.boot-overlay.done {
  opacity: 0; visibility: hidden; pointer-events: none;
}
.boot-ascii {
  color: var(--neon);
  font-size: clamp(0.62rem, 1.8vw, 0.88rem);
  line-height: 1.3;
  white-space: pre;
  text-shadow: 0 0 18px var(--neon-glow);
  margin-bottom: 1.2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.boot-line {
  font-size: 0.76rem;
  line-height: 1.9;
  color: var(--green);
  opacity: 0;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.2s ease;
}
.boot-line.info { color: var(--blue); }
.boot-line.warn { color: var(--yellow); }
.boot-line.err  { color: var(--red); }
.boot-line::before {
  content: attr(data-pre);
  color: rgba(205,214,244,0.35);
  margin-right: 0.7rem;
  font-size: 0.7rem;
}
.boot-line.ok::after {
  content: '  [ OK ]';
  color: var(--green);
  opacity: 0.6;
}
.boot-bar-wrap {
  margin-top: 1.1rem;
  width: min(400px, 78vw);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.boot-bar-label {
  font-size: 0.68rem;
  color: var(--t3);
  margin-bottom: 0.3rem;
  letter-spacing: 0.12em;
}
.boot-bar {
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  overflow: hidden;
}
.boot-bar-fill {
  height: 100%;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon-glow);
  width: 0;
  border-radius: 999px;
  transition: width 0.1s ease;
}

/* ============================================================
   macOS MENU BAR
   ============================================================ */
.macos-menubar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 28px;
  background: rgba(9,10,18,0.86);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 0.9rem;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.82);
  user-select: none;
}
.mb-left  { display: flex; align-items: center; gap: 1rem; }
.mb-right { display: flex; align-items: center; gap: 0.85rem; }
.mb-logo  { font-size: 0.88rem; }
.mb-app   { font-weight: 700; font-size: 0.76rem; letter-spacing: 0.04em; }
.mb-item  { opacity: 0.62; font-size: 0.72rem; cursor: default; }
.mb-item:hover { opacity: 1; }

/* language switcher */
.lang-switcher {
  display: flex;
  gap: 0.5rem;
  margin-right: 0.5rem;
}
.lang-btn {
  font-size: 0.65rem;
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 0.2s;
  text-transform: uppercase;
  font-weight: 600;
}
.lang-btn:hover, .lang-btn.active {
  opacity: 1;
  color: var(--neon);
}

/* weather widget */
.mb-weather {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.85rem;
  opacity: 0;
  transition: opacity 0.5s ease;
  font-size: 0.72rem;
  color: var(--t2);
}
.mb-weather-city {
  font-weight: 700;
  color: var(--neon);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mb-weather-info {
  opacity: 0.8;
}

.mb-right .mb-item {
  display: flex; align-items: center; gap: 0.28rem;
}
.mb-status-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 6px var(--neon);
  animation: pulse 2s ease-in-out infinite;
}
.mb-clock {
  font-weight: 500; font-size: 0.73rem;
  letter-spacing: 0.04em; min-width: 34px; text-align: right;
}
@media (max-width: 580px) {
  .mb-item:not(.mb-app):not(.mb-clock) { display: none; }
  .mb-logo { display: none; }
}

/* ============================================================
   FONDO + GRANO + CRT
   ============================================================ */
.bg {
  position: fixed; inset: 0; z-index: -5;
  background-image: var(--bg-gradient), var(--bg-image, none);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: #0a0b10;
  transition: background 1.2s cubic-bezier(.4,0,.2,1);
  filter: brightness(0.6) saturate(1.1);
  animation: bgPulse 8s infinite alternate ease-in-out;
}

@keyframes bgPulse {
  0% { filter: brightness(0.6) saturate(1.1); }
  100% { filter: brightness(0.7) saturate(1.25); }
}
/* Default for other zones */
:root { --bg-image: url('1.png'); }
body[data-zone="intermedia"] { --bg-image: url('2.png'); }
body[data-zone="avanzada"] { --bg-image: url('3.png'); }
body[data-zone="master"] { --bg-image: url('4.png'); }

/* Enhanced ambient glow layer */
.bg::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 20%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
}
.bg::after {
  content: '';
  position: absolute; inset: 0;
  background: 
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,0.08) 2px 3px),
    radial-gradient(circle at 50% 100%, var(--neon-dim), transparent 70%);
  pointer-events: none;
}

/* Master zone unique patterns (using CSS only) */
body[data-zone="master"] .bg {
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255, 0, 51, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(100, 0, 0, 0.12) 0%, transparent 55%),
    linear-gradient(45deg, rgba(0,0,0,0) 0%, rgba(255,0,0,0.02) 50%, rgba(0,0,0,0) 100%);
  background-color: transparent;
}
.grain {
  position: fixed; inset: 0; z-index: -2;
  pointer-events: none; opacity: 0.065;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
.crt {
  position: fixed; inset: 0; z-index: -3;
  pointer-events: none;
  background: rgba(23,147,209,0.007);
  animation: flicker 0.2s infinite alternate;
}

/* ============================================================
   SHELL / LAYOUT
   ============================================================ */
.shell {
  min-height: 100vh; min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 1rem;
  max-width: 1440px;
  margin: 0 auto;
  padding-top: calc(28px + 0.8rem);
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.55rem 0.6rem;
  font-size: 0.72rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  animation: fadeDown 0.6s ease both;
}
.brand { display: flex; align-items: center; gap: 0.7rem; letter-spacing: 0.08em; }
.brand-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 10px var(--neon), 0 0 20px var(--neon-glow);
  animation: pulse 1.6s ease-in-out infinite;
}
.brand-name { color: rgba(255,255,255,0.88); font-weight: 700; }
.brand-name span { color: var(--neon); }
.brand-meta { color: var(--t3); letter-spacing: 0.13em; }
.brand-meta b { color: var(--neon); font-weight: 600; }

/* ============================================================
   MAIN GRID
   ============================================================ */
.main {
  display: grid; grid-template-columns: 1fr;
  gap: 1.5rem; align-items: start;
  padding: 1.2rem 0;
}
@media (min-width: 980px) {
  .main { grid-template-columns: 1fr 1.15fr; gap: 2.25rem; align-items: center; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { animation: fadeUp 0.8s 0.1s ease both; text-align: center; }
@media (min-width: 980px) { .hero { text-align: left; } }

.avatar-wrap {
  position: relative;
  width: 188px; height: 188px;
  margin: 0 auto 1.4rem;
}
@media (min-width: 980px) {
  .avatar-wrap { margin: 0 0 1.4rem; width: 210px; height: 210px; }
}
.avatar {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--avatar-image) center/cover no-repeat;
  border: 2px solid var(--neon);
  box-shadow:
    0 0 0 5px rgba(0,0,0,0.55),
    0 0 0 6px var(--neon-dim),
    0 0 40px var(--neon-glow),
    inset 0 0 32px rgba(0,0,0,0.4);
  animation: float 6s ease-in-out infinite;
  transition: background-image 0.6s ease, border-color 0.6s ease;
  position: relative; z-index: 2;
}
.avatar-ring {
  position: absolute; inset: -15px;
  border: 1px dashed var(--neon); border-radius: 50%;
  opacity: 0.38; animation: spin 24s linear infinite;
}
.avatar-ring::before {
  content: ''; position: absolute; inset: -8px;
  border: 1px solid var(--neon-dim); border-radius: 50%;
  border-top-color: var(--neon);
  animation: spin 13s linear infinite reverse;
}
.avatar-corners {
  position: absolute; inset: -21px; pointer-events: none;
}
.avatar-corners::before,
.avatar-corners::after {
  content: ''; position: absolute;
  width: 17px; height: 17px;
  border: 2px solid var(--neon); opacity: 0.65;
}
.avatar-corners::before { top: 0; left: 0; border-right: none; border-bottom: none; }
.avatar-corners::after  { bottom: 0; right: 0; border-left: none; border-top: none; }

/* info block (neofetch style) */
.hero-info {
  display: inline-block; text-align: left;
  background: rgba(0,0,0,0.50);
  border: 1px solid rgba(255,255,255,0.07);
  border-left: 2px solid var(--neon);
  padding: 0.78rem 1rem;
  border-radius: 0 6px 6px 0;
  backdrop-filter: blur(10px);
  margin: 1.1rem 0;
  font-size: 0.75rem; line-height: 1.95;
}
.hero-info .k { color: var(--neon); }
.hero-info .v { color: #e8eeff; font-weight: 600; }
.hero-info .c { color: var(--t3); }

.hero h1 {
  font-size: clamp(1.5rem, 4.5vw, 2.3rem);
  font-weight: 700; line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0.45rem 0; color: #fff;
}
.hero h1::before { content: '> '; color: var(--neon); }
.hero h1 span {
  color: var(--neon);
  text-shadow: 0 0 22px var(--neon-glow);
}
.hero-sub {
  font-size: 0.81rem; color: var(--t2);
  max-width: 460px; line-height: 1.65;
  margin: 0.7rem auto 0;
}
@media (min-width: 980px) { .hero-sub { margin: 0.7rem 0 0; } }

/* ============================================================
   CARD — macOS window
   ============================================================ */
.card {
  background: var(--win-bg);
  backdrop-filter: blur(28px) saturate(155%);
  -webkit-backdrop-filter: blur(28px) saturate(155%);
  border: 1px solid var(--win-border);
  border-radius: 12px;
  overflow: hidden;
  animation: windowOpen 0.6s cubic-bezier(.34,1.4,.64,1) both 0.12s;
  box-shadow: var(--win-shadow), 0 0 55px var(--neon-dim);
  position: relative;
}
/* ambient corner glow */
.card::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 160px; height: 160px;
  background: radial-gradient(circle at top right, var(--neon-dim), transparent 60%);
  pointer-events: none; border-radius: 0 12px 0 0;
}

/* ── window title bar ── */
.win-bar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0 1rem; height: 42px;
  background: var(--bar-bg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.win-dots { display: flex; gap: 7px; align-items: center; }
.win-dots span {
  width: 12px; height: 12px; border-radius: 50%;
  display: block; position: relative;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.win-dots span:hover { filter: brightness(1.3); transform: scale(1.08); }
.win-dots span:nth-child(1) { background: #ff5f57; box-shadow: 0 0 5px rgba(255,95,87,.45); }
.win-dots span:nth-child(2) { background: #febc2e; box-shadow: 0 0 5px rgba(254,188,46,.45); }
.win-dots span:nth-child(3) { background: #28c840; box-shadow: 0 0 5px rgba(40,200,64,.45); }
.win-dots span::after {
  content: attr(data-icon);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; color: rgba(0,0,0,0.5);
  opacity: 0; transition: opacity 0.15s;
}
.win-dots:hover span::after { opacity: 1; }

.win-title {
  flex: 1; text-align: center;
  font-size: 0.71rem; letter-spacing: 0.1em; color: var(--t2);
}
.win-title b { color: var(--neon); }
.win-tag {
  color: var(--neon);
  border: 1px solid rgba(23,147,209,0.38);
  padding: 0.1rem 0.48rem; border-radius: 4px;
  font-size: 0.58rem; letter-spacing: 0.16em;
  background: var(--neon-dim);
}

/* ── terminal body ── */
.term {
  padding: 1.8rem 1.6rem;
  font-size: 0.81rem;
  max-height: 80vh; overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.06) transparent;
}
.term::-webkit-scrollbar { width: 4px; }
.term::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }

/* term log (history) */
.term-log {
  margin-bottom: 1.2rem;
  opacity: 0.6;
  font-size: 0.72rem;
}
.log-line {
  margin-bottom: 0.25rem;
  display: flex;
  gap: 0.6rem;
}
.log-line .out { margin: 0; padding: 0; opacity: 0.8; }

/* ── prompts ── */
.prompt {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.18rem; margin-bottom: 0.35rem;
  font-size: 0.77rem; line-height: 1.4;
}
.prompt .user  { color: var(--green); font-weight: 700; }
.prompt .at    { color: var(--t3); }
.prompt .host  { color: var(--neon); font-weight: 700; }
.prompt .sep   { color: var(--t3); }
.prompt .path  { color: var(--yellow); }
.prompt .sigil { color: var(--neon); font-weight: 700; margin-left: 0.22rem; }
.prompt.root .user  { color: var(--red); }
.prompt.root .sigil { color: var(--red); }

.cmd            { color: rgba(255,255,255,0.9); margin-left: 0.4rem; }
.cmd .flag      { color: var(--neon); }
.cmd .str       { color: var(--yellow); }
.cmd .num       { color: var(--mauve); }

.out {
  color: var(--t2); font-size: 0.74rem;
  margin: 0.18rem 0 0.8rem;
  line-height: 1.6;
}
.out .ok   { color: var(--green); }
.out .warn { color: var(--yellow); }
.out .err  { color: var(--red); }
.out .key  { color: var(--neon); }

/* blinking cursor */
.cursor {
  display: inline-block;
  width: 7px; height: 0.88em;
  background: var(--neon);
  vertical-align: text-bottom;
  margin-left: 2px;
  border-radius: 1px;
  animation: blink 1.05s steps(2) infinite;
}

/* ============================================================
   ZONE SELECTOR — dentro del terminal
   ============================================================ */
.zone-block {
  margin: 0.55rem 0 1.1rem;
  padding: 0.78rem;
  background: rgba(0,0,0,0.42);
  border: 1px solid rgba(255,255,255,0.07);
  border-left: 2px solid var(--neon);
  border-radius: 0 5px 5px 0;
}
.zone-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0.44rem; margin-top: 0.48rem;
}
@media (min-width: 480px) { .zone-grid { grid-template-columns: repeat(4, 1fr); } }

.zone-btn {
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.04);
  color: var(--t3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem; font-weight: 500; letter-spacing: 0.08em;
  padding: 0.7rem 0.4rem;
  border-radius: 8px; cursor: pointer;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  position: relative;
}
.zone-btn:hover { color: var(--t1); background: rgba(255,255,255,0.035); border-color: rgba(255,255,255,0.1); }
.zone-btn.active {
  background: var(--neon-dim);
  border-color: var(--neon);
  color: var(--neon);
  box-shadow: 0 0 14px var(--neon-dim), inset 0 0 10px var(--neon-dim);
}
.zone-btn.active .tier { color: var(--neon); }
.zone-btn.active::after {
  content: '●'; position: absolute; top: 4px; right: 5px;
  font-size: 0.45rem; color: var(--neon);
  animation: pulse 1.3s ease-in-out infinite;
}

/* ============================================================
   FORM FIELDS
   ============================================================ */
.field { margin-bottom: 0.88rem; position: relative; }

.field-label {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.67rem; color: var(--t2);
  margin-bottom: 0.32rem; letter-spacing: 0.05em;
}
.field-label::before { content: '─'; color: var(--neon); flex-shrink: 0; }
.field-label .req { color: var(--neon); }

.field-input {
  display: flex; align-items: center;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px; padding: 0 1rem;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
}
.field-input:focus-within {
  border-color: var(--neon);
  background: rgba(0,0,0,0.45);
  box-shadow: 0 0 20px var(--neon-dim);
}
.field-input.input-err {
  border-color: var(--red);
  box-shadow: 0 0 0 1px rgba(243,139,168,0.2);
}
.field-input.input-ok {
  border-color: var(--green);
  box-shadow: 0 0 0 1px rgba(166,227,161,0.14);
}

.prefix {
  color: var(--neon); font-weight: 700;
  margin-right: 0.5rem; user-select: none; flex-shrink: 0;
}
.field-input input {
  flex: 1; background: transparent; border: none;
  color: #e8eeff; font-size: 0.88rem; padding: 0.82rem 0;
  outline: none; font-family: inherit;
}
.field-input input::placeholder { color: var(--t3); font-style: italic; }

/* password eye toggle */
.pw-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--t3); padding: 0 0.05rem; flex-shrink: 0;
  font-size: 0.78rem; transition: color 0.2s;
  user-select: none; line-height: 1;
}
.pw-toggle:hover { color: var(--neon); }

/* password strength bars */
.pw-strength {
  display: flex; gap: 3px;
  margin-top: 0.42rem; padding: 0 0.04rem;
}
.pw-bar {
  flex: 1; height: 3px; border-radius: 999px;
  background: rgba(255,255,255,0.07);
  transition: background 0.28s ease;
}
.pw-label {
  font-size: 0.59rem; margin-top: 0.2rem;
  color: var(--t3); letter-spacing: 0.1em;
  min-height: 0.85em;
}

/* field-row (remember / forgot) */
.field-row {
  display: flex; justify-content: space-between; align-items: center;
  margin: 0.4rem 0 1.1rem;
  font-size: 0.73rem; flex-wrap: wrap; gap: 0.4rem;
}
.checkbox {
  display: flex; align-items: center; gap: 0.45rem;
  cursor: pointer; color: var(--t2);
}
.checkbox input[type="checkbox"] {
  accent-color: var(--neon); width: 14px; height: 14px;
  cursor: pointer; flex-shrink: 0;
}
.link { color: var(--neon); transition: all 0.18s; }
.link:hover { text-shadow: 0 0 10px var(--neon-glow); text-decoration: underline; }

/* field errors */
.field-error {
  color: var(--red); font-size: 0.67rem;
  margin-top: 0.3rem; letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 0.3rem;
}
.field-error::before { content: '✕'; font-size: 0.58rem; font-weight: 700; flex-shrink: 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  width: 100%;
  background: var(--neon); color: #000;
  border: none; padding: 1.1rem 1rem;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 0.82rem; letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 8px 30px var(--neon-glow);
  text-transform: uppercase;
  position: relative; overflow: hidden;
}
/* "$ " prefix as flex item */
.btn::before {
  content: '$ ';
  font-weight: 800;
  opacity: 0.65;
  flex-shrink: 0;
}
/* shimmer on hover */
.btn::after {
  content: '';
  position: absolute; top: 0; left: -110%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-18deg);
  transition: left 0.44s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 28px var(--neon-glow);
  letter-spacing: 0.1em;
}
.btn:hover::after { left: 130%; }
.btn:active  { transform: translateY(0); }
.btn:disabled { opacity: 0.52; cursor: wait; transform: none; }

/* ghost variant */
.btn-ghost {
  background: transparent; color: var(--t2);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: none; margin-top: 0.52rem;
}
.btn-ghost::before { content: '← '; }
.btn-ghost:hover {
  border-color: var(--neon); color: var(--neon);
  background: var(--neon-dim);
  box-shadow: none; transform: none;
}
.btn-ghost:hover::after { display: none; }

/* spinner inside btn during submit */
.btn-spinner {
  display: inline-block; width: 12px; height: 12px;
  border: 2px solid rgba(0,0,0,0.22); border-top-color: #000;
  border-radius: 50%; animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ============================================================
   DIVIDER + SOCIALS + FOOT LINK
   ============================================================ */
.divider {
  display: flex; align-items: center; gap: 0.55rem;
  margin: 1.2rem 0 1rem;
  font-size: 0.61rem; letter-spacing: 0.18em; color: var(--t3); text-transform: uppercase;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}

.socials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
.social {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--t2); 
  padding: 0.9rem 0.6rem;
  border-radius: 10px; 
  cursor: pointer;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  display: flex; align-items: center; justify-content: center;
  gap: 0.6rem; 
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; 
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.social:hover {
  border-color: var(--neon); 
  color: var(--neon);
  background: var(--neon-dim);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3), 0 0 10px var(--neon-dim);
}

.foot-link {
  text-align: center; margin-top: 1.15rem;
  font-size: 0.74rem; color: var(--t3);
  padding-top: 0.9rem;
  border-top: 1px dashed rgba(255,255,255,0.07);
}
.foot-link::before { content: '# '; color: var(--neon); }
.foot-link a { color: var(--neon); font-weight: 600; margin-left: 0.28rem; }
.foot-link a:hover { text-shadow: 0 0 8px var(--neon-glow); }

/* ============================================================
   BOTTOM BAR
   ============================================================ */
.bottombar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0.8rem;
  font-size: 0.62rem; letter-spacing: 0.12em; color: var(--t3);
  border-top: 1px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.36);
  border-radius: 0 0 8px 8px;
  flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem;
}
.bottombar .status { display: flex; align-items: center; gap: 0.38rem; }
.bottombar .status::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 7px var(--green);
  animation: pulse 1.5s ease-in-out infinite;
}
.bottombar .right { display: flex; gap: 1rem; color: var(--t3); }
.bottombar .right b { color: var(--neon); font-weight: 600; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-wrap {
  position: fixed; top: calc(28px + 0.65rem); right: 0.85rem;
  z-index: 9000;
  display: flex; flex-direction: column; gap: 0.42rem;
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 0.58rem;
  background: rgba(14,17,28,0.96);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 0.72rem 0.95rem;
  backdrop-filter: blur(22px);
  font-size: 0.72rem; line-height: 1.45; color: var(--t1);
  min-width: 220px; max-width: 310px;
  animation: toastIn 0.3s cubic-bezier(.34,1.4,.64,1) both;
  box-shadow: 0 10px 36px rgba(0,0,0,0.55);
  pointer-events: auto; position: relative; overflow: hidden;
}
.toast.hiding { animation: toastOut 0.22s ease forwards; }
.toast-icon { font-size: 0.9rem; flex-shrink: 0; margin-top: 0.05rem; }
.toast-msg  { flex: 1; }
.toast-prog {
  position: absolute; bottom: 0; left: 0;
  height: 2px; border-radius: 0 0 0 10px;
  animation: toastProg linear forwards;
}
.toast.success { border-left: 2px solid var(--green); }
.toast.success .toast-icon { color: var(--green); }
.toast.success .toast-prog { background: var(--green); }
.toast.error   { border-left: 2px solid var(--red); }
.toast.error   .toast-icon { color: var(--red); }
.toast.error   .toast-prog { background: var(--red); }
.toast.info    { border-left: 2px solid var(--neon); }
.toast.info    .toast-icon { color: var(--neon); }
.toast.info    .toast-prog { background: var(--neon); }
.toast.warn    { border-left: 2px solid var(--yellow); }
.toast.warn    .toast-icon { color: var(--yellow); }
.toast.warn    .toast-prog { background: var(--yellow); }

/* ============================================================
   INFO BOX (recuperar.html)
   ============================================================ */
.info-box {
  background: rgba(23,147,209,0.055);
  border: 1px solid rgba(23,147,209,0.17);
  border-radius: 6px; padding: 0.82rem 0.95rem;
  font-size: 0.73rem; line-height: 1.75;
  color: var(--t2); margin: 0.95rem 0 0;
}
.info-box strong { color: var(--neon); font-weight: 700; }

/* ============================================================
   ANIMACIONES
   ============================================================ */
@keyframes windowOpen {
  from { opacity: 0; transform: scale(0.94) translateY(14px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-9px); }
}
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes pulse   {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}
@keyframes blink   { 50% { opacity: 0; } }
@keyframes flicker { 0% { opacity: 0.94; } 100% { opacity: 1; } }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(16px) scale(0.94); }
  to   { opacity: 1; transform: translateX(0)    scale(1); }
}
@keyframes toastOut {
  to   { opacity: 0; transform: translateX(14px) scale(0.94); }
}
@keyframes toastProg { from { width: 100%; } to { width: 0; } }

/* ============================================================
   ACCESIBILIDAD
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .crt { display: none; }
  .boot-overlay { display: none !important; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 520px) {
  .shell   { padding: 0.7rem; padding-top: calc(28px + 0.6rem); }
  .term    { padding: 1.1rem 0.95rem; font-size: 0.76rem; }
  .avatar-wrap { width: 158px; height: 158px; }
  .hero h1 { font-size: 1.4rem; }
  .zone-btn { font-size: 0.62rem; padding: 0.5rem 0.2rem; }
  .zone-btn .tier { font-size: 0.48rem; }
  .win-title { font-size: 0.63rem; }
  .prompt  { font-size: 0.7rem; }
  .out     { font-size: 0.68rem; }
  .btn     { font-size: 0.82rem; }
}
@media (max-width: 360px) {
  .hero h1 { font-size: 1.25rem; }
  .btn     { font-size: 0.78rem; padding: 0.8rem; }
  .term    { padding: 0.88rem 0.82rem; }
  .topbar  { padding: 0.45rem 0.3rem; font-size: 0.65rem; }
}

/* ============================================================
   LANDING PAGE EXTRAS
   ============================================================ */
.hero-landing {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 1rem;
}
.hero-landing h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.hero-landing .glitch-text {
  position: relative;
  color: var(--neon);
  text-shadow: 0 0 30px var(--neon-glow);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 4rem 0;
}
.feature-card {
  background: var(--win-bg);
  border: 1px solid var(--win-border);
  padding: 2.5rem;
  border-radius: 12px;
  transition: all 0.4s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  transform: translateY(-8px);
  border-color: var(--neon);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 30px var(--neon-dim);
}
.feature-card h3 {
  font-size: 1.5rem;
  color: var(--neon);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--t2);
  line-height: 1.7;
}
.feature-card .icon {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  display: block;
}

.cta-wrap {
  margin-top: 3rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Section dividers */
.section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--t3);
  margin-bottom: 1rem;
  display: block;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(.2,1,.3,1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .hero-landing { padding: 2rem 1rem; }
  .feature-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ADVANCED LANDING PAGE SYSTEM
   ============================================================ */

/* Floating Terminal Effect */
.terminal-float {
  background: rgba(10, 12, 20, 0.95);
  border: 1px solid var(--win-border);
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.9);
  padding: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  position: relative;
  overflow: hidden;
}
.terminal-header {
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 0.8rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; background: #333; }
.terminal-dot.r { background: #ff5f57; }
.terminal-dot.y { background: #febc2e; }
.terminal-dot.g { background: #28c840; }

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 4rem;
}
.price-card {
  background: var(--win-bg);
  border: 1px solid var(--win-border);
  padding: 2rem;
  border-radius: 16px;
  position: relative;
  transition: all 0.5s cubic-bezier(.17,.67,.83,.67);
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border-color: var(--neon);
  transform: scale(1.05);
  z-index: 10;
  box-shadow: 0 0 40px var(--neon-dim);
}
.price-card h4 {
  font-size: 1.2rem;
  color: var(--neon);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.price-card .amount {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.price-card .amount span { font-size: 1rem; color: var(--t3); }
.price-card ul {
  list-style: none;
  padding: 0;
  margin-bottom: 2.5rem;
  flex: 1;
}
.price-card ul li {
  font-size: 0.85rem;
  color: var(--t2);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.price-card ul li::before {
  content: '→';
  color: var(--neon);
}

/* Testimonials */
.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.test-card {
  background: rgba(255,255,255,0.03);
  border-left: 3px solid var(--neon);
  padding: 2rem;
  font-style: italic;
}
.test-card .author {
  margin-top: 1.5rem;
  font-style: normal;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--neon);
  display: block;
}

/* Guarantee Section */
.guarantee {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(to bottom, transparent, var(--neon-dim), transparent);
  border-radius: 30px;
  margin: 6rem 0;
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 28px;
  left: 0;
  height: 2px;
  background: var(--neon);
  width: 0%;
  z-index: 300;
  box-shadow: 0 0 10px var(--neon);
}

/* Specific Zone Colors for Cards */
.card-principal { --neon: #00f0ff; --neon-dim: rgba(0,240,255,0.1); }
.card-intermedia { --neon: #ffcc00; --neon-dim: rgba(255,204,0,0.1); }
.card-avanzada { --neon: #bf00ff; --neon-dim: rgba(191,0,255,0.1); }
.card-master { --neon: #ff0033; --neon-dim: rgba(255,0,51,0.15); }

@media (max-width: 980px) {
  .price-card.featured { transform: none; }
}

/* ============================================================
   SPLIT-LAYOUT AUTH SYSTEM
   ============================================================ */

.auth-split {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

@media (min-width: 1024px) {
  .auth-split {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.auth-content {
  padding: 6rem 2rem 4rem;
  max-width: 800px;
  margin: 0 auto;
}

.auth-form-side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 10;
}

@media (max-width: 1023px) {
  .auth-form-side {
    position: relative;
    height: auto;
    padding: 4rem 1rem;
    background: transparent;
  }
}

/* Auth Story Sections */
.auth-story-section {
  min-height: 80vh;
  margin-bottom: 8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: fadeUp 1s ease both;
}

.auth-story-section h2 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--neon);
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
}

.auth-story-section p {
  font-size: 1.2rem;
  color: var(--t2);
  line-height: 1.8;
  max-width: 550px;
}

/* Testimonials on Auth */
.auth-test {
  background: rgba(255,255,255,0.03);
  border-left: 2px solid var(--neon);
  padding: 2rem;
  margin-top: 3rem;
  font-size: 1rem;
  font-style: italic;
  color: var(--t2);
  max-width: 550px;
}
.auth-test .author {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-weight: 700;
  color: var(--neon);
  font-size: 0.8rem;
}

/* Dynamic BG state transitions */
.bg-transition {
  transition: --neon 0.8s ease, --bg-gradient 0.8s ease;
}
