/* ════════════════════════════════════════════════════════
   style.css — Azafrán Mediterráneo v2.5
   VARIABLES DE TEMA
   data-theme="dark"  → modo oscuro (por defecto)
   data-theme="light" → modo claro suave
════════════════════════════════════════════════════════ */

:root,
[data-theme="dark"] {
  --bg:              #070610;
  --bg-card:         rgba(16, 10, 35, 0.72);
  --bg-header:       rgba(6, 4, 16, 0.90);
  --acento:          #9d20bb;
  --acento-vivo:     #c040e8;
  --acento-alpha:    rgba(157, 32, 187, 0.18);
  --acento-alpha-md: rgba(157, 32, 187, 0.35);
  --borde:           rgba(157, 32, 187, 0.20);
  --borde-hover:     rgba(192, 64, 232, 0.60);
  --texto:           #f5e8e8;
  --texto-2:         rgba(210, 190, 230, 0.65);
  --texto-3:         rgba(255, 255, 255, 0.38);
  --sombra-card:     rgba(100, 10, 140, 0.35);
  --sombra-hover:    rgba(140, 20, 180, 0.55);
  --orb1:            rgba(110, 12, 160, 0.32);
  --orb2:            rgba(60, 5, 90, 0.24);
  --grid-color:      rgba(204, 0, 255, 0.045);
  --chip-bg:         rgba(157, 32, 187, 0.14);
  --tag-color:       rgba(157, 32, 187, 0.35);
  --pie-bg:          rgba(0, 0, 0, 0.18);
  --tabla-bg:        rgba(10, 5, 25, 0.85);
  --tabla-fila:      rgba(157, 32, 187, 0.07);
  --tabla-fila-hover:rgba(157, 32, 187, 0.16);
  --input-bg:        rgba(255,255,255,0.05);
  --input-border:    rgba(157, 32, 187, 0.35);
  --input-focus:     rgba(192, 64, 232, 0.70);
  --verde:           #00e676;
  --verde-glow:      rgba(0, 230, 118, 0.35);
  --oro:             #e8c96a;
  --oro-alpha:       rgba(232,201,106,0.09);
  --rojo:            #f50000;
  --footer-bg:       rgba(4, 2, 12, 0.95);
  --footer-borde:    rgba(157, 32, 187, 0.30);
  --hud-color:       rgba(192, 64, 232, 0.80);
  --scanline-op:     0.025;
  --top-sep-color:   rgba(157, 32, 187, 0.25);
  --top-sep-glow:    rgba(192, 64, 232, 0.50);
}

[data-theme="light"] {
  --bg:              #f8f4ff;
  --bg-card:         rgba(255, 255, 255, 0.82);
  --bg-header:       rgba(255, 255, 255, 0.94);
  --acento:          #7510a0;
  --acento-vivo:     #9820c8;
  --acento-alpha:    rgba(117, 16, 160, 0.10);
  --acento-alpha-md: rgba(117, 16, 160, 0.22);
  --borde:           rgba(117, 16, 160, 0.18);
  --borde-hover:     rgba(117, 16, 160, 0.50);
  --texto:           #9820c8;
  --texto-2:         rgb(66, 0, 133);
  --texto-3:         rgb(88, 0, 165);
  --sombra-card:     rgba(100, 20, 140, 0.10);
  --sombra-hover:    rgba(100, 20, 140, 0.22);
  --orb1:            rgba(170, 90, 210, 0.10);
  --orb2:            rgba(130, 60, 175, 0.07);
  --grid-color:      rgba(117, 16, 160, 0.033);
  --chip-bg:         rgba(117, 16, 160, 0.10);
  --tag-color:       rgba(117, 16, 160, 0.30);
  --pie-bg:          rgba(0, 0, 0, 0.04);
  --tabla-bg:        rgba(245, 235, 255, 0.90);
  --tabla-fila:      rgba(117, 16, 160, 0.05);
  --tabla-fila-hover:rgba(117, 16, 160, 0.12);
  --input-bg:        rgba(255,255,255,0.80);
  --input-border:    rgba(117, 16, 160, 0.30);
  --input-focus:     rgba(117, 16, 160, 0.70);
  --verde:           #1a8a4a;
  --verde-glow:      rgba(26, 138, 74, 0.25);
  --oro:             #d99b14;
  --oro-alpha:       rgba(146,102,10,0.08);
  --rojo:            #cc0000;
  --footer-bg:       rgba(235, 220, 255, 0.95);
  --footer-borde:    rgba(117, 16, 160, 0.25);
  --hud-color:       rgba(117, 16, 160, 0.70);
  --scanline-op:     0.008;
  --top-sep-color:   rgba(117, 16, 160, 0.22);
  --top-sep-glow:    rgba(117, 16, 160, 0.45);
}

/* ════ RESET ════════════════════════════════════════════ */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
}
html {
  font-size: 18px;
  scroll-behavior: smooth;
}

/* ════ BODY ═════════════════════════════════════════════ */
body {
  font-family: 'Exo 2', sans-serif;
  background-color: var(--bg);
  color: var(--texto);
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: hidden;
  transition: background-color 0.45s ease, color 0.45s ease;
  position: relative;
}

/* ════ SEPARADOR SUPERIOR ════════════════════════════════ */
.top-separator {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 200;
  background: var(--top-sep-color);
  overflow: hidden;
  transition: background 0.45s ease;
}
.top-separator-inner {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--top-sep-glow), transparent);
  animation: top-sep-scan 5s ease-in-out infinite;
}
@keyframes top-sep-scan {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ════ FONDOS DECORATIVOS ════════════════════════════════ */

.grid-overlay {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  transition: background-image 0.4s ease;
}

.scanlines {
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 3px,
    rgba(0,0,0,var(--scanline-op)) 3px,
    rgba(0,0,0,var(--scanline-op)) 4px
  );
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.4s;
}

.noise {
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] .noise { opacity: 0.015; }

.orbs { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(90px);
  animation: flotar 18s ease-in-out infinite alternate;
  transition: background 0.45s ease;
}
.orb-1 {
  width: min(65vw,440px); height: min(65vw,440px);
  background: radial-gradient(circle, var(--orb1), transparent 70%);
  top: -15%; left: -12%; animation-duration: 20s;
}
.orb-2 {
  width: min(45vw,320px); height: min(45vw,320px);
  background: radial-gradient(circle, var(--orb2), transparent 70%);
  bottom: -8%; right: -8%; animation-duration: 15s; animation-delay: -7s;
}
.orb-3 {
  width: min(28vw,200px); height: min(28vw,200px);
  background: radial-gradient(circle, var(--orb1), transparent 70%);
  top: 48%; left: 62%; animation-duration: 22s; animation-delay: -12s; opacity: 0.5;
}
.orb-4 {
  width: min(20vw,150px); height: min(20vw,150px);
  background: radial-gradient(circle, var(--orb2), transparent 70%);
  top: 10%; right: 5%; animation-duration: 17s; animation-delay: -3s; opacity: 0.4;
}
@keyframes flotar {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(20px,-28px) scale(1.06); }
}

.particulas {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden;
}
.particula {
  position: absolute;
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--acento-vivo);
  opacity: 0;
  animation: particula-flotar 12s ease-in-out infinite;
}
.particula:nth-child(1)  { left:  8%; top: 20%; animation-delay:  0s;  animation-duration: 10s; }
.particula:nth-child(2)  { left: 18%; top: 70%; animation-delay:  2s;  animation-duration: 14s; }
.particula:nth-child(3)  { left: 30%; top: 40%; animation-delay:  4s;  animation-duration:  9s; }
.particula:nth-child(4)  { left: 45%; top: 85%; animation-delay:  1s;  animation-duration: 13s; }
.particula:nth-child(5)  { left: 60%; top: 15%; animation-delay:  3s;  animation-duration: 11s; }
.particula:nth-child(6)  { left: 75%; top: 55%; animation-delay:  5s;  animation-duration: 16s; }
.particula:nth-child(7)  { left: 88%; top: 35%; animation-delay:  1.5s;animation-duration: 12s; }
.particula:nth-child(8)  { left: 50%; top: 60%; animation-delay:  6s;  animation-duration:  8s; }
@keyframes particula-flotar {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  25%  { opacity: 0.6; }
  50%  { opacity: 0.3; transform: translateY(-40px) scale(1.2); }
  75%  { opacity: 0.5; }
  100% { opacity: 0; transform: translateY(-80px) scale(0.5); }
}

/* ════ HEADER ════════════════════════════════════════════ */
.header {
  position: fixed;
  top: 2px; left: 0; right: 0; z-index: 100;
  height: 62px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.2rem;
  background: var(--bg-header);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--borde);
  transition: background 0.45s ease, border-color 0.45s ease;
}
.logo { display: flex; align-items: center; gap: 0.55rem; }

.logo-imagen-header {
  height: 55px; width: auto; object-fit: contain;
  transition: opacity 0.45s ease;
  position: absolute;
}
.logo-dark  { opacity: 1; pointer-events: auto; }
.logo-light { opacity: 0; pointer-events: none; }
[data-theme="light"] .logo-dark  { opacity: 0; pointer-events: none; }
[data-theme="light"] .logo-light { opacity: 1; pointer-events: auto; }

.logo { position: relative; height: 42px; width: 160px; }

.logo-icono-wrap {
  width: 36px; height: 36px; border-radius: 9px;
  border: 1px solid var(--borde); background: var(--acento-alpha);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.4s ease;
}
.logo-icono-wrap .material-symbols-outlined { font-size: 1.2rem; color: var(--acento-vivo); }
.logo-textos { display: flex; flex-direction: column; line-height: 1.15; }
.logo-nombre {
  font-family: 'Orbitron', monospace; font-weight: 700;
  font-size: 0.88rem; letter-spacing: 0.12em;
  color: var(--texto); transition: color 0.4s ease;
}
.logo-sub {
  font-size: 0.56rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--texto-3); transition: color 0.4s ease;
}

.header-status { display: none !important; }

.btn-tema {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--borde); background: var(--acento-alpha);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  outline: none; transition: all 0.25s ease;
}
.btn-tema:hover {
  background: var(--acento-alpha-md); border-color: var(--borde-hover);
  box-shadow: 0 0 18px var(--acento-alpha-md);
}
.btn-tema:focus-visible { outline: 2px solid var(--acento-vivo); outline-offset: 3px; }
.btn-tema .material-symbols-outlined { font-size: 1.35rem; color: var(--acento-vivo); }

/* ════ SCROLL CONTAINER ══════════════════════════════════ */
.scroll-container {
  position: relative; z-index: 2;
  margin-top: 64px;
  height: calc(100dvh - 64px);
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.scroll-container::-webkit-scrollbar { display: none; }

/* ════ PÁGINAS ═══════════════════════════════════════════ */
.pagina {
  width: 100%;
  max-width: 100vw;
  height: calc(100dvh - 64px);
  display: flex; flex-direction: column; position: relative;
  overflow-x: hidden;
}
#paginaHome {
  height: auto;
  min-height: calc(100dvh - 64px);
}
.pagina-calc {
  height: auto;
  min-height: calc(100dvh - 64px);
}

/* ════ SECCIÓN HERO (HOME) ═══════════════════════════════ */
.seccion-hero {
  position: relative; z-index: 2;
  padding-top: 0;
  min-height: calc(100dvh - 10000px);
  display: flex; flex-direction: column; align-items: center;
  overflow-x: hidden;
  width: 100%;
}
.layout-hero {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
  height: 100%;
  width: 100%;
  max-width: 100%;
}

.zona-titulo {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 1.4rem 1.5rem 0;
  position: relative; width: 100%; text-align: center;
}

.glow-ring {
  position: absolute;
  width: min(70vw,300px); height: min(70vw,300px);
  border-radius: 50%;
  background: radial-gradient(circle, var(--acento-alpha) 0%, transparent 65%);
  filter: blur(30px); pointer-events: none;
  top: 0; left: 50%; transform: translateX(-50%);
  animation: pulsar 6s ease-in-out infinite alternate;
}
@keyframes pulsar {
  from { transform: translateX(-50%) scale(0.95); opacity: 0.7; }
  to   { transform: translateX(-50%) scale(1.15); opacity: 1; }
}

.chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.3rem 0.8rem; border-radius: 999px;
  border: 1px solid var(--borde); background: var(--chip-bg);
  font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--texto-2); margin-bottom: 0.7rem;
  animation: aparecer 0.9s ease both; transition: all 0.4s;
}
.chip-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--acento-vivo); box-shadow: 0 0 6px var(--acento-vivo);
  animation: parpadear 2s ease-in-out infinite;
}
@keyframes parpadear { 0%,100%{opacity:1} 50%{opacity:0.25} }

.logo-hero-wrap {
  width: min(1000px, 72vw); height: min(300px, 36vw);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.7rem;
  animation: aparecer 0.9s ease 0.05s both;
  position: relative;
  filter: drop-shadow(0 0 22px rgba(192,64,232,0.45));
}
.logo-hero-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  transition: opacity 0.45s ease;
  position: absolute;
}
.logo-hero-dark  { opacity: 1; pointer-events: auto; }
.logo-hero-light { opacity: 0; pointer-events: none; }
[data-theme="light"] .logo-hero-dark  { opacity: 0; pointer-events: none; }
[data-theme="light"] .logo-hero-light { opacity: 1; pointer-events: auto; }

.titulo-linea2 {
  font-family: 'Orbitron', monospace; font-weight: 400;
  font-size: clamp(0.9rem,4vw,1.7rem); letter-spacing: 0.35em;
  color: var(--acento-vivo);
  text-shadow: 0 0 18px rgba(192,64,232,0.65), 0 0 45px rgba(192,64,232,0.25);
  margin-bottom: 0.6rem;
  animation: aparecer 0.9s ease 0.1s both;
}

.linea-deco {
  width: 600px; height: 2px;
  background: var(--borde); border-radius: 2px; overflow: hidden;
  margin-bottom: 0.7rem;
  animation: aparecer 0.9s ease 0.2s both;
}

.linea-separacion {
  width: 100%; height: 2px;
  background: var(--borde); border-radius: 2px; overflow: hidden;
  margin-bottom: 0.7rem;
  animation: aparecer 1s ease 0.2s both;
}

.linea-inner {
  height: 100%; width: 50%;
  background: linear-gradient(90deg,transparent,var(--acento-vivo),transparent);
  animation: viajar 2.5s ease-in-out infinite;
}
@keyframes viajar { 0%{transform:translateX(-100%)} 100%{transform:translateX(300%)} }

/* ════ ZONA DE BOTONES ═══════════════════════════════════ */
.zona-botones {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.9rem; width: 100%; padding: 0 1rem;
  max-width: 100%;
}

.seccion-label {
  font-family: 'Orbitron', monospace;
  font-size: 0.62rem;
  letter-spacing: clamp(0.08em, 2vw, 0.5em);
  text-transform: uppercase;
  color: var(--texto-3); transition: color 0.4s;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.botones-fila-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0 1rem;
}

.botones-fila {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  width: auto;
  max-width: 100%;
}

.boton-card {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 0.85rem;
  padding: 1.6rem 0.8rem 1.8rem;
  min-height: 175px;
  width: 200px;
  background: var(--bg-card); border: 1px solid var(--borde); border-radius: 20px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  cursor: pointer; position: relative; overflow: hidden; outline: none;
  box-shadow: 0 4px 22px var(--sombra-card), inset 0 1px 0 rgba(255,255,255,0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.45s ease;
}
.boton-card:hover {
  transform: translateY(-5px);
  border-color: var(--borde-hover);
  box-shadow: 0 12px 36px var(--sombra-hover), 0 0 0 1px var(--acento-alpha-md), inset 0 1px 0 rgba(255,255,255,0.06);
}
.boton-card:active { transform: translateY(-2px); }
.boton-card:focus-visible { outline: 2px solid var(--acento-vivo); outline-offset: 4px; }

.card-glow {
  position: absolute; width: 120%; height: 120%; top: -10%; left: -10%;
  background: radial-gradient(ellipse at 50% 0%, var(--acento-alpha) 0%, transparent 65%);
  pointer-events: none; opacity: 0; transition: opacity 0.3s;
}
.boton-card:hover .card-glow { opacity: 1; }

.card-corner {
  position: absolute; top: 0; right: 0;
  width: 32px; height: 32px;
  border-top: 2px solid var(--borde-hover);
  border-right: 2px solid var(--borde-hover);
  border-radius: 0 18px 0 0;
  opacity: 0.5; transition: opacity 0.3s;
}
.boton-card:hover .card-corner { opacity: 1; }

.card-tag {
  position: absolute; top: 0.65rem; right: 0.85rem;
  font-family: 'Orbitron', monospace; font-size: 0.56rem;
  font-weight: 700; letter-spacing: 0.15em; color: var(--tag-color);
}

.iconos-fila {
  display: flex; align-items: center; justify-content: center;
  gap: 0.5rem; width: 100%;
}

.icono-wrap {
  width: 50px; height: 50px; border-radius: 13px;
  border: 1px solid var(--borde); background: var(--acento-alpha);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.boton-card:hover .icono-wrap {
  border-color: var(--borde-hover); background: var(--acento-alpha-md);
  box-shadow: 0 0 14px var(--acento-alpha-md);
}
.icono-wrap .material-symbols-outlined {
  font-size: 1.6rem; color: var(--texto);
  transition: color 0.4s, transform 0.3s;
}
.boton-card:hover .icono-wrap .material-symbols-outlined {
  color: var(--acento-vivo); transform: scale(1.1);
}

.icono-flecha {
  font-size: 1rem !important; color: var(--acento) !important;
  opacity: 0.75; transition: transform 0.25s, opacity 0.25s !important;
}
.boton-card:hover .icono-flecha { transform: translateX(3px); opacity: 1; }

.boton-titulo {
  font-family: 'Orbitron', monospace; font-weight: 700;
  font-size: clamp(0.75rem,2.8vw,0.88rem); letter-spacing: 0.04em;
  color: var(--texto); text-align: center; transition: color 0.4s;
}

.boton-sub {
  font-size: clamp(0.65rem,2.4vw,0.72rem); font-weight: 300;
  color: var(--texto-2); text-align: center; line-height: 1.5; transition: color 0.4s;
}

.card-progress {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: rgba(157,32,187,0.15); border-radius: 0 0 18px 18px; overflow: hidden;
}
.card-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, transparent, var(--acento-vivo), transparent);
  transition: width 0.4s ease;
}
.boton-card:hover .card-progress-fill { width: 100%; }

/* ════ PANEL DE PRECIOS DE REFERENCIA ════════════════════ */
.precio-ref-panel {
  width: 100%; max-width: min(96vw, 580px);
  background: var(--bg-card); border: 1px solid var(--borde); border-radius: 16px;
  overflow: hidden; backdrop-filter: blur(14px);
  animation: aparecer 0.9s ease 0.4s both;
  flex-shrink: 0;
  margin-bottom: 0.5rem;
}
.precio-ref-header {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1rem;
  background: var(--acento-alpha);
  border-bottom: 1px solid var(--borde);
  font-family: 'Orbitron', monospace; font-size: 0.54rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--acento-vivo);
}
.precio-ref-header .material-symbols-outlined { font-size: 0.9rem; color: var(--acento-vivo); }
.precio-ref-filas { padding: 0.6rem 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.precio-ref-item {
  display: grid; grid-template-columns: 90px 1fr 70px; align-items: center; gap: 0.6rem;
}
.pref-nombre {
  font-family: 'Orbitron', monospace; font-size: 0.56rem; font-weight: 700;
  text-transform: uppercase; color: var(--texto-2);
}
.pref-barra-wrap {
  height: 4px; background: rgba(157,32,187,0.12); border-radius: 2px; overflow: hidden;
}
.pref-barra {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--acento), var(--acento-vivo));
  box-shadow: 0 0 6px var(--acento-alpha-md);
  animation: barra-aparecer 1.2s ease both;
}
@keyframes barra-aparecer {
  from { width: 0% !important; }
}
.pref-val {
  font-family: 'Orbitron', monospace; font-size: 0.58rem; font-weight: 700;
  color: var(--oro); text-align: right;
}

/* ════ FOOTER GLOBAL ════════════════════════════════════ */
.footer-global {
  width: 100%;
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-borde);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  transition: background 0.45s ease, border-color 0.45s ease;
}

.footer-top-line {
  width: 100%; height: 2px; overflow: hidden;
  background: var(--footer-borde);
  position: relative;
}
.footer-line-glow {
  position: absolute; height: 100%; width: 30%;
  background: linear-gradient(90deg, transparent, var(--acento-vivo), transparent);
  animation: footer-scan 4s ease-in-out infinite;
}
@keyframes footer-scan {
  0%   { left: -30%; }
  100% { left: 130%; }
}

.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.8rem;
  padding: 0.8rem 1.4rem;
  max-width: 100%;
}

.footer-creditos {
  display: flex; flex-direction: column; gap: 0.55rem;
}
.footer-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: 'Orbitron', monospace; font-size: 0.62rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--texto-3);
}
.footer-chip-icon { font-size: 1rem !important; color: var(--acento-vivo); }
.footer-devs {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
}
.footer-dev {
  display: flex; align-items: center; gap: 1rem;
  text-decoration: none; transition: opacity 0.2s;
}
.footer-dev:hover { opacity: 0.8; }
.footer-dev-icon { font-size: 2rem !important; color: var(--acento-vivo); }
.footer-dev-alias {
  font-family: 'Orbitron', monospace; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.5rem; color: var(--acento-vivo);
}
.footer-dev-mail {
  font-size: 0.8rem; color: var(--texto-3); font-weight: 300;
}
.footer-dev-sep { color: var(--texto-3); font-size: 0.7rem; }

.footer-meta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem;
}
.footer-version {
  font-family: 'Orbitron', monospace; font-size: 0.54rem;
  letter-spacing: 0.25em; color: var(--texto-3); text-transform: uppercase;
}
.footer-brand {
  font-family: 'Orbitron', monospace; font-size: 0.62rem; font-weight: 900;
  letter-spacing: 0.18em; color: var(--acento-vivo);
  text-transform: uppercase;
}
.footer-sub {
  font-size: 0.5rem; letter-spacing: 0.22em; color: var(--texto-3);
  text-transform: uppercase;
}

.footer-bottom-bar {
  height: 3px; width: 100%;
  background: linear-gradient(90deg,
    transparent 0%, var(--acento) 20%,
    var(--acento-vivo) 50%, var(--acento) 80%, transparent 100%);
  opacity: 0.5;
}

/* ════ CONTROLES COMPARTIDOS ═════════════════════════════ */
.sec-controles {
  display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap;
  animation: aparecer 0.5s ease 0.2s both;
}

.btn-sec-volver {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.65rem 1.4rem; border-radius: 999px;
  border: 1.5px solid var(--borde-hover);
  background: var(--acento-alpha-md);
  color: var(--texto); font-family: 'Orbitron', monospace;
  font-weight: 700; font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; cursor: pointer; outline: none;
  transition: all 0.25s ease;
}
.btn-sec-volver:hover {
  background: var(--acento); border-color: var(--acento-vivo);
  box-shadow: 0 6px 24px var(--sombra-hover);
  transform: translateY(-2px);
}
.btn-sec-volver .material-symbols-outlined { font-size: 1rem; color: var(--acento-vivo); }

.btn-sec-borrar {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.65rem 1.2rem; border-radius: 999px;
  border: 1.5px solid rgba(245,0,0,0.45);
  background: rgba(245,0,0,0.09);
  color: var(--rojo); font-family: 'Orbitron', monospace;
  font-weight: 700; font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; cursor: pointer; outline: none;
  transition: all 0.22s ease;
}
.btn-sec-borrar:hover {
  background: rgba(245,0,0,0.2);
  border-color: rgba(245,0,0,0.75);
  box-shadow: 0 0 14px rgba(245,0,0,0.3);
}
.btn-sec-borrar .material-symbols-outlined { font-size: 1rem; }

/* ════ HUD CORNERS ════════════════════════════════════════ */
.hud-corner {
  position: absolute; width: 18px; height: 18px;
  pointer-events: none; z-index: 5;
  transition: border-color 0.4s;
}
.hud-tl { top: 10px; left: 10px;
  border-top: 2px solid var(--hud-color); border-left: 2px solid var(--hud-color); }
.hud-tr { top: 10px; right: 10px;
  border-top: 2px solid var(--hud-color); border-right: 2px solid var(--hud-color); }
.hud-bl { bottom: 10px; left: 10px;
  border-bottom: 2px solid var(--hud-color); border-left: 2px solid var(--hud-color); }
.hud-br { bottom: 10px; right: 10px;
  border-bottom: 2px solid var(--hud-color); border-right: 2px solid var(--hud-color); }

/* ════ SECCIÓN: DINERO → BULBOS ══════════════════════════ */
.db-layout {
  width: 100%; max-width: min(96vw, 720px);
  margin: 0 auto;
  padding: 3.5rem 1.2rem 3rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.4rem;
}

.db-titulo-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  animation: aparecer 0.5s ease both; text-align: center;
  position: relative; width: 100%;
  background: var(--bg-card); border: 1px solid var(--borde);
  border-radius: 16px; padding: 1.2rem 2rem;
}
.db-titulo-h2 {
  font-family: 'Orbitron', monospace; font-weight: 900;
  font-size: clamp(1.3rem,5vw,2rem);
  color: var(--texto);
  display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; justify-content: center;
}
.db-titulo-icono { font-size: 1em !important; color: var(--acento-vivo); vertical-align: middle; }
.db-subtitulo-sub {
  font-family: 'Orbitron', monospace;
  font-size: 0.75rem; letter-spacing: 0.1em;
  color: var(--acento-vivo);
}
.db-subtitulo-sub em { font-style: normal; color: var(--acento-vivo); }
.db-subtitulo { font-size: 0.72rem; color: var(--texto-3); font-weight: 300; }

.db-input-wrap {
  width: 100%;
  display: flex; flex-direction: column; gap: 0.4rem;
  animation: aparecer 0.5s ease 0.07s both;
}
.db-field {
  display: flex; align-items: center;
  background: var(--bg-card);
  border: 1.5px solid var(--input-border);
  border-radius: 14px; overflow: hidden;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.db-field:focus-within {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px var(--acento-alpha-md), 0 0 20px var(--acento-alpha);
}

.db-signo {
  padding: 0 0.9rem;
  font-family: 'Orbitron', monospace; font-size: 1.1rem; font-weight: 700;
  color: var(--oro); border-right: 1px solid var(--borde);
  line-height: 3.4rem; background: var(--oro-alpha); flex-shrink: 0;
}

.db-monto-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--texto); font-family: 'Orbitron', monospace;
  font-size: 1.2rem; font-weight: 700;
  padding: 0.8rem 0.9rem; width: 100%;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: none;
}
.db-monto-input::-webkit-outer-spin-button,
.db-monto-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.db-monto-input::placeholder { color: var(--texto-3); font-size: 0.85rem; font-weight: 300; }

.db-char-hint {
  font-family: 'Orbitron', monospace; font-size: 0.5rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--texto-3); text-align: right; padding-right: 0.4rem;
  transition: color 0.2s;
}
.db-char-hint.limite { color: var(--rojo); }

.db-vacio {
  width: 100%; background: var(--bg-card);
  border: 1px dashed var(--borde); border-radius: 20px;
  padding: 2.5rem 1rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
  color: var(--texto-3); font-size: 0.78rem; text-align: center;
  animation: aparecer 0.5s ease 0.13s both;
}
.db-vacio .material-symbols-outlined { font-size: 2.4rem; opacity: 0.3; }

.db-resultado-panel {
  width: 100%; background: var(--tabla-bg);
  border: 1px solid var(--borde); border-radius: 20px; overflow: hidden;
  box-shadow: 0 8px 40px var(--sombra-card);
  display: none;
  position: relative;
}
.db-resultado-panel.visible { display: block; }

.db-resultado-header {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--borde);
  background: var(--acento-alpha);
}
.db-resultado-header-txt {
  font-family: 'Orbitron', monospace; font-size: 0.58rem;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--acento-vivo);
}
.db-resultado-header .material-symbols-outlined { font-size: 0.9rem; color: var(--acento-vivo); }

.db-mix-fila {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid rgba(157,32,187,0.08);
  background: var(--tabla-fila); transition: background 0.2s;
}
.db-mix-fila:last-child { border-bottom: none; }
.db-mix-fila:hover { background: var(--tabla-fila-hover); }

.db-mix-nombre {
  font-family: 'Orbitron', monospace; font-size: 0.7rem; font-weight: 700;
  color: var(--texto); display: flex; align-items: center; gap: 0.35rem;
}
.db-mix-nombre::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--acento-vivo); box-shadow: 0 0 5px var(--acento-vivo);
}

.db-mix-qty {
  font-family: 'Orbitron', monospace; font-weight: 900; font-size: 1.1rem;
  color: var(--verde); text-shadow: 0 0 12px var(--verde-glow);
}

.db-mix-subtotal {
  font-family: 'Exo 2', sans-serif; font-size: 0.8rem; color: var(--texto-2);
}

.db-resultado-total {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.1rem;
  background: var(--acento-alpha-md);
  border-top: 1px solid var(--borde-hover);
}
.db-total-izq { display: flex; flex-direction: column; gap: 0.15rem; }
.db-total-label {
  font-family: 'Orbitron', monospace; font-size: 0.58rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--texto-3);
}
.db-total-num {
  font-family: 'Orbitron', monospace; font-weight: 900;
  font-size: clamp(1rem,4vw,1.3rem);
  color: var(--verde); text-shadow: 0 0 18px var(--verde-glow);
}
.db-vuelto-wrap { text-align: right; }
.db-vuelto-label {
  font-family: 'Orbitron', monospace; font-size: 0.55rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--texto-3);
}
.db-vuelto-val {
  font-family: 'Orbitron', monospace; font-weight: 700;
  font-size: 0.95rem; color: var(--oro);
}

.db-insuficiente { padding: 1.5rem 1.1rem; text-align: center; }
.db-insuficiente p {
  font-family: 'Orbitron', monospace; font-size: 0.82rem;
  color: #f87171; line-height: 1.6;
}

/* ════ DINERO → MIX ══════════════════════════════════════ */
.dm-formula-chip {
  padding: 0.55rem 1.1rem;
  background: var(--oro-alpha);
  border-bottom: 1px solid rgba(232,201,106,0.15);
  font-family: 'Orbitron', monospace; font-size: 0.52rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--oro);
  display: none;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.db-resultado-panel.visible .dm-formula-chip { display: flex; }

.dm-formula-chip .dm-sep {
  color: var(--texto-3);
  font-size: 0.7rem;
}

/* ════ SECCIÓN: BULBOS → DINERO ══════════════════════════ */
.bd-layout {
  width: 100%; max-width: min(96vw, 720px);
  margin: 0 auto;
  padding: 1.8rem 1.2rem 3rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.4rem;
}

.bd-titulo-seccion {
  font-family: 'Orbitron', monospace; font-weight: 900;
  font-size: clamp(1.3rem,5vw,2rem); color: var(--texto);
  text-align: center;
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; justify-content: center;
}
.bd-titulo-icono { font-size: 1em !important; color: var(--acento-vivo); }
.bd-flecha { color: var(--acento); }
.bd-subtitulo-seccion {
  font-size: 0.75rem; color: var(--texto-3); text-align: center;
  font-weight: 300; letter-spacing: 0.05em;
}

.bd-tabla-wrap {
  width: 100%;
  background: var(--tabla-bg);
  border: 1px solid var(--borde); border-radius: 20px; overflow: hidden;
  box-shadow: 0 8px 40px var(--sombra-card), inset 0 1px 0 rgba(255,255,255,0.04);
  animation: aparecer 0.5s ease 0.1s both;
  position: relative;
}

.bd-header-fila {
  display: grid; grid-template-columns: 1.4fr 1fr 1.1fr 1.2fr;
  padding: 0.7rem 1.2rem;
  border-bottom: 1px solid var(--borde);
  background: var(--acento-alpha);
}
.bd-header-fila span {
  font-family: 'Orbitron', monospace; font-size: 0.52rem;
  font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--acento-vivo);
}
.bd-col-right { text-align: right; }

.bd-fila {
  display: grid; grid-template-columns: 1.4fr 1fr 1.1fr 1.2fr;
  align-items: center;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid rgba(157,32,187,0.08);
  background: var(--tabla-fila); transition: background 0.25s ease; gap: 0.5rem;
}
.bd-fila:hover { background: var(--tabla-fila-hover); }
.bd-fila:focus-within { background: var(--tabla-fila-hover); }

.bd-nombre {
  font-family: 'Orbitron', monospace; font-size: clamp(0.58rem,2.2vw,0.72rem);
  font-weight: 700; text-transform: uppercase; color: var(--texto);
  display: flex; align-items: center; gap: 0.35rem;
}
.bd-nombre::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--acento-vivo); box-shadow: 0 0 5px var(--acento-vivo);
  flex-shrink: 0;
}

.bd-input {
  width: 100%; max-width: 80px; height: 44px;
  border-radius: 10px; border: 1.5px solid var(--input-border);
  background: var(--input-bg); color: var(--acento-vivo);
  font-family: 'Orbitron', monospace; font-weight: 700;
  font-size: clamp(0.82rem,3vw,1rem); text-align: center; outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: textfield;
}
.bd-input::-webkit-inner-spin-button,
.bd-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.bd-input:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px var(--acento-alpha-md);
}
.bd-fila:focus-within .bd-input {
  border-color: #f59a00;
  box-shadow: 0 0 0 2px rgba(245,154,0,0.25);
}

.bd-precio {
  font-family: 'Exo 2', sans-serif; font-weight: 600;
  font-size: clamp(0.7rem,2.6vw,0.84rem); color: var(--texto); text-align: center;
}

.bd-importe {
  font-family: 'Orbitron', monospace; font-weight: 700;
  font-size: clamp(0.7rem,2.6vw,0.84rem); color: var(--verde);
  text-align: right; text-shadow: 0 0 10px var(--verde-glow);
  transition: color 0.4s ease;
}
.bd-importe.flash { animation: flashVerde 0.3s ease; }
@keyframes flashVerde {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); text-shadow: 0 0 20px var(--verde); }
  100% { transform: scale(1); }
}

.bd-total-fila {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.2rem;
  background: var(--acento-alpha-md);
  border-top: 1px solid var(--borde-hover);
}
.bd-total-label {
  font-family: 'Orbitron', monospace; font-weight: 700;
  font-size: clamp(0.75rem,3vw,0.92rem); letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--texto);
  display: flex; align-items: center; gap: 0.4rem;
}
.bd-total-icono { font-size: 1rem !important; color: var(--acento-vivo); }
.bd-total-valor {
  font-family: 'Orbitron', monospace; font-weight: 900;
  font-size: clamp(1rem,4vw,1.3rem); color: var(--verde);
  text-shadow: 0 0 18px var(--verde-glow), 0 0 40px var(--verde-glow);
}

/* ════ ANIMACIONES ═══════════════════════════════════════ */
@keyframes aparecer {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

/* ════ RESPONSIVE ════════════════════════════════════════ */
@media (max-width: 700px) {
  .botones-fila {
    flex-direction: column;
    align-items: center;
  }
  .boton-card {
    width: min(340px, 90vw);
  }
}

@media (max-width: 480px) {
  .bd-header-fila, .bd-fila {
    grid-template-columns: 1.2fr 0.85fr 0.95fr 1fr;
    padding: 0.75rem 0.85rem; gap: 0.25rem;
  }
  .bd-nombre { font-size: 0.56rem; }
  .bd-precio, .bd-importe { font-size: 0.66rem; }
  .bd-input { max-width: 60px; height: 40px; font-size: 0.8rem; }
  .precio-ref-item {
    grid-template-columns: 75px 1fr 62px;
  }
  .footer-inner { flex-direction: column; gap: 0.6rem; }
  .footer-meta { align-items: flex-start; }
  .footer-devs { flex-direction: column; gap: 0.3rem; }
  .footer-dev-sep { display: none; }
  .header-status { display: none; }
}

@media (max-width: 360px) {
  .boton-card { width: 90vw; }
  .bd-header-fila, .bd-fila {
    grid-template-columns: 1.1fr 0.8fr 0.85fr 0.9fr;
    padding: 0.65rem 0.6rem;
  }
}

@media (min-width: 480px) {
  .icono-wrap { width: 56px; height: 56px; }
  .icono-wrap .material-symbols-outlined { font-size: 1.85rem; }
}

@media (min-width: 600px) {
  .bd-header-fila, .bd-fila {
    padding: 0.9rem 1.4rem;
  }
  .bd-input { max-width: 90px; }
}

@media (min-height: 800px) {
  .zona-titulo { padding-top: 2rem; }
}