/* ================================================================
   PHONK NEON v7 — Bioma Cósmico
   Optimizado para: i5 1.4 GHz · 8 GB DDR3 · HDD · Big Sur 11.7
   ================================================================ */

:root {
  --neon-human: #ff9944;
  --neon-robot: #00ddff;
  --neon-alien:  #44ff88;
  --neon-boss:   #ff0055;
  --glass-bg:    rgba(12, 12, 22, 0.82);
  --glass-line:  rgba(206, 147, 216, 0.18);
  --txt-main:    #e8e0f0;
  --txt-dim:     #7a6f8a;
}

/* ── Contenedor principal: fondo único del universo ──────────── */
#main-container {
  position: absolute;   /* ← restaurar absolute del Core */
  inset: 0;             /* ← restaurar inset del Core */
  overflow: hidden;
  background: #030308 !important;
  box-shadow: inset 0 0 180px rgba(0,0,0,0.9);
}

/* ── Paneles base ─────────────────────────────────────────────── */
#panel-inventario,
#panel-venta {
  position: relative;
  /* Sin fondo propio: el canvas del #main-container se ve a través */
  background: transparent !important;
}

/* ── Canvas ───────────────────────────────────────────────────── */
.phonk-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  display: block;
  image-rendering: auto;
}

/* ── Overlay CRT + Scanlines (CSS puro, cero JS) ──────────────── */
#main-container::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.12) 50%),
    linear-gradient(90deg, rgba(255, 0, 85, 0.015), rgba(0, 221, 255, 0.015), rgba(255, 153, 68, 0.015));
  background-size: 100% 3px, 6px 100%;
  opacity: 0.45;
  mix-blend-mode: overlay;
  animation: scanDrift 12s linear infinite;
}

/* ── Aurora boreal (CSS, 1 capa) ──────────────────────────────── */
#main-container::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0) 0%,
    rgba(80,20,120,0.06) 40%,
    rgba(20,120,100,0.05) 60%,
    rgba(0,0,0,0) 100%
  );
  background-size: 100% 200%;
  animation: auroraMove 18s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}

@keyframes auroraMove {
  0%   { background-position: 0% 0%; }
  100% { background-position: 0% 100%; }
}
@keyframes scanDrift {
  0%   { transform: translateY(0); }
  100% { transform: translateY(6px); }
}

/* ── Tarjetas / Formularios (Glass sin backdrop-filter) ───────── */
.form-section,
.tarjeta-busqueda-tabla,
.panel-info,
.panel-subida {
  position: relative;
  z-index: 10;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  padding: 22px;
  /* Glow sutil simulado con sombras múltiples — más barato que backdrop-filter */
  box-shadow:
    0 4px 24px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 0 0 1px rgba(206,147,216,0.06);
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease;
}

/* Hover: glow de facción aleatorio se inyecta vía JS en data-faction */
.form-section[data-faction="human"],
.tarjeta-busqueda-tabla[data-faction="human"] {
  border-color: rgba(255,153,68,0.35);
  box-shadow: 0 4px 24px rgba(0,0,0,0.45), 0 0 18px rgba(255,153,68,0.08);
}
.form-section[data-faction="robot"],
.tarjeta-busqueda-tabla[data-faction="robot"] {
  border-color: rgba(0,221,255,0.35);
  box-shadow: 0 4px 24px rgba(0,0,0,0.45), 0 0 18px rgba(0,221,255,0.08);
}
.form-section[data-faction="alien"],
.tarjeta-busqueda-tabla[data-faction="alien"] {
  border-color: rgba(68,255,136,0.35);
  box-shadow: 0 4px 24px rgba(0,0,0,0.45), 0 0 18px rgba(68,255,136,0.08);
}

/* ── Tipografía Neón ──────────────────────────────────────────── */
.neon-title {
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f0e8ff;
  text-shadow:
    0 0 4px  rgba(206,147,216,0.4),
    0 0 10px rgba(206,147,216,0.25),
    0 0 22px rgba(206,147,216,0.12);
  animation: neonFlicker 6s infinite;
}

@keyframes neonFlicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.92; }
}

/* ── Botones / Chips con brillo de estado ─────────────────────── */
.neon-chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-family: monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.35);
  color: var(--txt-dim);
  transition: all 0.3s ease;
}
.neon-chip:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 0 10px rgba(206,147,216,0.15);
}

/* ── Ocultar canvas en móvil ──────────────────────────────────── */
@media (max-width: 768px) {
  .phonk-canvas { display: none !important; }
  #main-container::before,
  #main-container::after { display: none; }
}
