:root {
  /* ========================================= */
  /* PALETA DE COLORES TÁCTICA (BLUE/CYAN)     */
  /* ========================================= */
  --bg-color: #050505; /* Negro Profundo */
  --text-color: #ffffff; /* Blanco Puro para máximo contraste */
  --primary-color: #00f3ff; /* Cian Táctico */
  --secondary-color: #0099ff; /* Azul Intenso */
  --accent-color: #0a0a15; /* Paneles Oscuros Azulados */

  /* Fuentes (Tipografías) */
  --font-main: "Outfit", sans-serif;
  --font-heading: "Orbitron", sans-serif;

  /* Bordes de HUD */
  --glass-bg: rgba(10, 20, 30, 0.8);
  --glass-border: rgba(0, 243, 255, 0.3); /* Borde Cian sutil */
  --grid-color: rgba(0, 243, 255, 0.03); /* Color de la cuadrícula de fondo */
  
  --header-height: 80px; /* Dynamic height of main-header */
}

/* ========================================= */
/* PALETA MODO LUZ (ORANGE HUD MODE)         */
/* ========================================= */
html.light-mode {
  --bg-color: #ff5d00; /* Fondo naranja intenso holográfico */
  --text-color: #ffffff; /* Texto siempre blanco para brillar sobre naranja */
  --primary-color: #ffdf00; /* Dorado brillante holográfico (Yellow/Gold) */
  --secondary-color: #ffffff; /* Blanco brillante para bordes secundarios */
  --accent-color: rgba(255, 255, 255, 0.1); /* Paneles cristalinos */
  
  --glass-bg: rgba(255, 100, 0, 0.5); /* Vidrio esmerilado naranja intenso holográfico */
  --glass-border: rgba(255, 223, 0, 0.4); /* Borde dorado/amarillo brillante */
  --grid-color: rgba(255, 255, 255, 0.15); /* Cuadrícula blanca sutil holográfica */
}

/* ========================================= */
/* OVEERRIDES ESPECÍFICOS MODO LUZ/ORANGE    */
/* ========================================= */

html.light-mode body {
  background: linear-gradient(135deg, #ff7b00, #ff5500) !important;
  color: #fff !important;
}

html.light-mode .main-footer {
  background: rgba(255, 93, 0, 0.4) !important;
}

html.light-mode .main-footer::before {
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px) !important;
}

html.light-mode .filter-bar,
html.light-mode .category-select,
html.light-mode .search-input {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: var(--glass-border) !important;
  color: #fff !important;
}

/* ========================================= */
/* PALETA MODO ALERTA ROJA (RED HUD MODE)    */
/* ========================================= */
html.red-mode {
  --bg-color: #550000; /* Fondo base rojo oscuro */
  --text-color: #ffffff; /* Texto blanco puro */
  --primary-color: #ff3333; /* Rojo brillante holográfico */
  --secondary-color: #ff9999; /* Rojo claro/blanco para bordes secundarios */
  --accent-color: rgba(255, 255, 255, 0.15); /* Paneles cristalinos */
  
  --glass-bg: rgba(100, 0, 0, 0.6); /* Vidrio esmerilado rojo oscuro */
  --glass-border: rgba(255, 50, 50, 0.5); /* Borde rojo brillante */
  --grid-color: rgba(255, 50, 50, 0.2); /* Cuadrícula roja brillante */
}

/* ========================================= */
/* OVEERRIDES ESPECÍFICOS MODO ROJO          */
/* ========================================= */

html.red-mode body {
  background: linear-gradient(135deg, #880000, #330000) !important;
  color: #fff !important;
}

html.red-mode .main-footer {
  background: rgba(100, 0, 0, 0.5) !important;
}

html.red-mode .main-footer::before {
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px) !important;
}

html.red-mode .filter-bar,
html.red-mode .category-select,
html.red-mode .search-input {
  background: rgba(50, 0, 0, 0.4) !important;
  border-color: var(--glass-border) !important;
  color: #fff !important;
}

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

body {
  background-color: var(--bg-color);
  /* Tactical Grid Pattern */
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 50px 50px;
  color: var(--text-color);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-shadow: 0 0 1px rgba(0,0,0,0.5); /* Sutil sombra para legibilidad */
}

.main-content {
  padding-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* Typography */
h1,
h2,
h3,
.logo {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 2px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* Header & Nav */
.main-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 10, 18, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
  position: relative;
  animation: hologram 3s infinite;
}

@keyframes hologram {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
    text-shadow:
      2px 0 var(--secondary-color),
      -2px 0 var(--primary-color);
  }
  5% {
    opacity: 0.8;
    transform: scale(1.02) skewX(2deg);
    text-shadow:
      3px 0 var(--secondary-color),
      -3px 0 var(--primary-color);
  }
  10% {
    opacity: 1;
    transform: scale(1) skewX(0);
    text-shadow:
      2px 0 var(--secondary-color),
      -2px 0 var(--primary-color);
  }
  50% {
    transform: scale(1);
  }
  55% {
    transform: scale(0.98) skewX(-2deg);
    opacity: 0.9;
    text-shadow:
      -2px 0 var(--secondary-color),
      2px 0 var(--primary-color);
  }
  60% {
    transform: scale(1);
    opacity: 1;
  }
}

.nav-links {
  display: flex;
  gap: clamp(0.5rem, 2vw, 2rem);
  list-style: none;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Buttons */
/* Buttons - Tactical Clip Style */
.btn-primary {
  background: rgba(0, 243, 255, 0.1);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.5rem 1.5rem;
  text-transform: uppercase;
  font-weight: 600;
  position: relative;
  transition: all 0.3s ease;
  clip-path: polygon(
    10px 0,
    100% 0,
    100% calc(100% - 10px),
    calc(100% - 10px) 100%,
    0 100%,
    0 10px
  );
}

.btn-primary:hover {
  background: var(--primary-color);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.6);
  text-shadow: none;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--secondary-color);
  color: var(--secondary-color);
  padding: 0.5rem 1.5rem;
  text-transform: uppercase;
  font-weight: 600;
  transition: all 0.3s ease;
  clip-path: polygon(
    10px 0,
    100% 0,
    100% calc(100% - 10px),
    calc(100% - 10px) 100%,
    0 100%,
    0 10px
  );
}

.btn-secondary:hover {
  background: var(--secondary-color);
  color: #000;
  box-shadow: 0 0 15px rgba(0, 153, 255, 0.4);
}

.btn-secondary:hover {
  background: var(--secondary-color);
  color: #fff;
  box-shadow: 0 0 20px rgba(188, 19, 254, 0.4);
}

/* Hero Section */
.hero {
  min-height: 100vh; /* Changed from height: 100vh to allow growth */
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  margin-top: calc(var(--header-height) * -1); /* Pull up under header */
  padding-top: var(--header-height); /* Push content down */
  overflow: hidden; /* Keep decorative elements inside */
}
/* ... skipped lines ... */
.svg-text {
  font-family: "Orbitron", sans-serif;
  font-size: 150px;
  font-weight: 900;
  text-transform: uppercase;

  /* Relleno tenue para visibilidad constante (10%) */
  fill: rgba(0, 255, 255, 0.1);

  /* Entorno (pista) MUCHO MÁS VISIBLE */
  stroke: rgba(0, 255, 255, 0.3);
  stroke-width: 3px;
  stroke-linejoin: round;

  /* Configuración del dash para el fotón */
  stroke-dasharray: 0 600; /* Inicialmente vacío */
  stroke-dashoffset: 0;
  transition: all 0.3s ease;
}

.hero-content {
  position: relative; /* Fix for z-index layering */
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  padding: 2rem;
}

.hero-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
}

.hero-text-side {
  flex: 1;
  text-align: left; /* Align text to left now */
}

.hero-image-side {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
  /* FIX: Prevenir que el texto gigante aplaste el video */
  min-width: 400px;
  flex-shrink: 0;
}

/* Character Image logic replaced/shared with video */
.hero-video {
  width: 100%; /* Restaurado a tamaño seguro y estándar */
  max-width: none;
  margin: 0 auto; /* Centrado y sin márgenes negativos intrusivos */
  display: block;
  transform: translateY(10px);
}

.floating-anim {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

.hero h1 {
  font-size: clamp(2rem, 6vw + 1rem, 4rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin-bottom: 2rem;
  color: #aaa;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-start; /* Align start for left layout */
  margin-top: 2rem;
  flex-wrap: wrap; /* Prevent button cutoff on small screens */
}

/* Features */
.features {
  padding: 5rem 2rem;
  background: linear-gradient(to bottom, var(--bg-color), #11111f);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
  color: var(--text-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(1rem, 3vw, 2rem);
}

/* Feature Cards - HUD Style */
.feature-card {
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid var(--glass-border);
  padding: 2rem;
  position: relative; /* For Pseudo-elements */
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

/* HUD Corners for Feature Card */
.feature-card::before,
.feature-card::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--primary-color);
  transition: all 0.3s ease;
}
.feature-card::before {
  top: -1px;
  left: -1px;
  border-right: none;
  border-bottom: none;
}
.feature-card::after {
  bottom: -1px;
  right: -1px;
  border-left: none;
  border-top: none;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
}

.feature-card:hover::before,
.feature-card:hover::after {
  width: 20%;
  height: 20%;
}

.feature-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.card-image-wrapper {
  width: 100%;
  height: 150px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.feature-card:hover .card-img {
  transform: scale(1.1);
}

/* Footer */
/* Footer */
.main-footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--primary-color); /* Bright top border */
  color: #888;
  font-size: 0.9rem;
  background:
    linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)),
    linear-gradient(rgba(0, 243, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 243, 255, 0.1) 1px, transparent 1px);
  background-size:
    100% 100%,
    20px 20px,
    20px 20px;
}

/* Mobile */
@media (max-width: 900px) {
  /* Changed checkpoint for split layout */
  .hero-grid {
    flex-direction: column-reverse; /* Image on top or text on top? Let's keep text top for SEO/Access */
    text-align: center;
  }

  .hero-text-side {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  /* Nav now wraps and shrinks naturally, so no need to hide it */
  .nav-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  background: var(--glass-bg);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
}

.search-input,
.category-select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-family: var(--font-main);
  flex-grow: 1;
}

.search-input:focus,
.category-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* Floating Cart */
.floating-cart {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.cart-btn {
  background: var(--primary-color);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-btn:hover {
  transform: scale(1.1);
}

.cart-btn.pulse {
  animation: pulse 0.5s ease;
}

.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--secondary-color);
  color: white;
  font-size: 0.8rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-color);
}

/* Cart Modal */
.cart-modal {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: #0f0f1a; /* Solid dark specifically for cart opacity */
  z-index: 2000;
  transition: right 0.3s ease;
  border-left: 1px solid var(--glass-border);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.cart-modal.active {
  right: 0;
}

.cart-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cart-header {
  flex-shrink: 0;
  padding: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem;
  /* Custom Scrollbar for Webkit */
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.3);
}

.cart-items::-webkit-scrollbar {
  width: 6px;
}
.cart-items::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 3px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 8px;
}

.cart-item-controls button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 25px;
  height: 25px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-controls .btn-trash {
  background: rgba(255, 0, 0, 0.2);
  margin-left: 0.5rem;
  color: #ff5555;
}

.cart-item-controls .btn-trash:hover {
  background: rgba(255, 0, 0, 0.4);
}

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--glass-border);
  background: #0f0f1a; /* Solid background to cover scrolling items */
  flex-shrink: 0;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5); /* Shadow to separate from list */
  z-index: 10;
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid #ff5555;
  color: #ff5555;
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-danger-outline:hover {
  background: rgba(255, 85, 85, 0.1);
  box-shadow: 0 0 10px rgba(255, 85, 85, 0.3);
  opacity: 1;
  text-decoration: none;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.full-width {
  width: 100%;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Products Section */
.products-section,
.services-section,
.product-detail {
  padding: 100px 0;
  min-height: 80vh;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 2rem;
  background: rgba(10, 10, 18, 0.6);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
}

.search-group, .category-group {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  min-width: 250px;
}

.search-input, .category-select {
  flex: 1;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--primary-color);
  color: #fff;
  border-radius: 4px;
  width: 100%; /* Ensure it spans flex container */
}

.btn-icon, .btn-category {
  padding: 0.8rem 1.2rem;
  background: rgba(0, 243, 255, 0.1);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-icon:hover, .btn-category:hover, .btn-category.active {
  background: var(--primary-color);
  color: #000;
  box-shadow: 0 0 10px var(--primary-color);
}

/* Animations for Suggestion Box */
@keyframes slideInLeft {
  0% { transform: translateX(-100vw); opacity: 0; }
  80% { transform: translateX(20px); opacity: 1; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
  0% { transform: translateX(0); opacity: 1; }
  20% { transform: translateX(-20px); opacity: 1; }
  100% { transform: translateX(100vw); opacity: 0; }
}

.slide-in-left {
  animation: slideInLeft 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.slide-out-right {
  animation: slideOutRight 0.6s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: clamp(1rem, 4vw, 3rem);
  padding: 2rem 0;
}

/* Product Card - HUD Style */
.product-card {
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden; /* Keep image inside but allow border */
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* Add HUD corners using a wrapper logic or pseudo elements on a safe container. 
   Since product-card has overflow:hidden for the image, psuedo elements might be clipped.
   We will apply the border effect differently: Simple tech border + glow.
*/
.product-card:hover {
  box-shadow: 0 0 25px rgba(0, 243, 255, 0.3);
  border-color: var(--primary-color);
  transform: translateY(-5px);
}

.product-image {
  height: 200px;
  background: #1a1a2e;
  overflow: hidden;
}

.placeholder-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #1a1a2e 25%, #2a2a4e 50%, #1a1a2e 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

.product-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-info h2 {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  margin-bottom: 0.5rem;
  color: #fff;
}

.category {
  font-size: 0.8rem;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
}

/* Product Detail */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.placeholder-img-lg {
  width: 100%;
  aspect-ratio: 1;
  background: #1a1a2e;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
}

.product-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.product-price {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--secondary-color);
  font-family: var(--font-heading);
  margin: clamp(0.5rem, 2vw, 1.5rem) 0;
}

.badge {
  background: rgba(0, 243, 255, 0.1);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.9rem;
  border: 1px solid var(--primary-color);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: #25d366;
  color: #000;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 2rem;
  transition: all 0.3s ease;
  font-family: var(--font-heading);
}

.btn-whatsapp:hover {
  background: #128c7e;
  color: #fff;
  box-shadow: 0 0 30px rgba(37, 211, 102, 0.4);
  transform: scale(1.05);
}

/* Services List */
.services-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.service-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 2rem;
  border-radius: 12px;
  display: flex;
  gap: 2rem;
  align-items: start;
}

.service-icon {
  font-size: 2rem;
  color: var(--primary-color);
  background: rgba(0, 243, 255, 0.1);
  padding: 1rem;
  border-radius: 50%;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 768px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* 3D Hero Text */
.hero-3d-container {
  perspective: 1000px;
  display: inline-block;
  padding: 2rem;
  cursor: default;
}

/* ========================================= */
/* ESTILOS DEL TÍTULO "ESO" (TRANSFORMER)    */
/* ========================================= */
/* ========================================= */
/* ESTILOS DEL TÍTULO "ESO" (HUD CIRCUITOS)  */
/* ========================================= */
/* ========================================= */
/* ESTILOS DEL TÍTULO "ESO" (HOLOGRÁFICO)    */
/* ========================================= */
/* ========================================= */
/* ESTILOS DEL TÍTULO "ESO" (SVG FOTÓN)      */
/* ========================================= */

/* ========================================= */
/* ESTILOS DEL TÍTULO "ESO" (SVG SECUENCIAL) */
/* ========================================= */

/* ========================================= */
/* ESTILOS DEL TÍTULO "ESO" (SVG SECUENCIAL) */
/* ========================================= */

.hero-svg-text {
  width: 100%;
  /* Aumentado a 850px para ser GIGANTE pero responsive via width 100% */
  max-width: 850px;
  height: auto;
  filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.2));
}

.svg-text {
  font-family: "Orbitron", sans-serif;
  font-size: 175px; /* Aumentado 15% (de 150px) */
  font-weight: 900;
  text-transform: uppercase;

  /* Relleno tenue para visibilidad constante (10%) */
  fill: rgba(0, 255, 255, 0.1);

  /* Entorno (pista) MUCHO MÁS VISIBLE */
  stroke: rgba(0, 255, 255, 0.3);
  stroke-width: 3px;
  stroke-linejoin: round;

  /* Configuración del dash para el fotón */
  stroke-dasharray: 0 600; /* Inicialmente vacío */
  stroke-dashoffset: 0;
  transition: all 0.3s ease;
}

/* INTERACCION HOVER: SECUENCIA DE FOTONES */
.hero-3d-container:hover .svg-text {
  stroke-dasharray: 60 600; /* El "fotón" es un trazo de 60px */
  stroke: #00ffff; /* Color brillante */
  stroke-width: 5px; /* Más grueso cuando pasa la luz */
  filter: url(#glow);

  /* Animación base */
  animation: photon-run 3s linear infinite;
}

/* DELAYS SECUENCIALES (Ciclo de 3s) */
/* E: Corre de 0s a 1s aprox */
.hero-3d-container:hover .letter-e {
  animation-delay: 0s;
}

/* S: Corre de 1s a 2s aprox */
.hero-3d-container:hover .letter-s {
  animation-delay: 1s;
}

/* O: Corre de 2s a 3s aprox */
.hero-3d-container:hover .letter-o {
  animation-delay: 2s;
}

/* Keyframes optimizados para que el fotón "viaje" y luego desaparezca esperando su turno */
@keyframes photon-run {
  0% {
    stroke-dashoffset: 60; /* Empieza justo antes de ser visible */
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  30% {
    /* Recorre la letra en el 30% del tiempo total (aprox 1s) */
    stroke-dashoffset: -600;
    opacity: 1;
  }
  35% {
    opacity: 0; /* Se apaga al terminar su recorrido */
  }
  100% {
    stroke-dashoffset: -600;
    opacity: 0; /* Se mantiene apagado el resto del ciclo (mientras corren las otras letras) */
  }
}

/* HERO TEXT SIDE (Izquierda - 50%) */
.hero-text-side {
  flex: 1 1 50%;
  max-width: 50%; /* Limite estricto */
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 2rem; /* Espacio para respirar antes del video */
}

/* HERO IMAGE SIDE (Derecha - 50%) */
.hero-image-side {
  flex: 1 1 50%;
  max-width: 50%; /* Limite estricto */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 5;
}

/* Ajustes para el logo gigante dentro del 50% */
.hero-svg-text {
  width: 100%;
  max-width: none; /* Quitamos limite de pixel fijo para que llene el 50% */
  height: auto;
  filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.2));
}

/* Ajustes para el video dentro del 50% */
.hero-video {
  width: 80%; /* Reducido en 20% solicitado */
  height: auto;
  object-fit: contain; /* Asegura que se vea todo sin cortar */
  margin: 0 auto; /* Centrado */
  border-radius: 10px; /* Consistencia estética */
}

/* Estado del sistema debajo del video */
.hud-status-panel-below {
  margin-top: 1rem;
  width: 100%;
  text-align: center;
}

.hero-3d-container {
  display: block;
  width: 100%;
}

/* HUD Style Panels */
.hud-panel {
  border: 1px solid var(--glass-border);
  position: relative;
  background: rgba(10, 10, 10, 0.6);
}

.hud-panel::before,
.hud-panel::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--primary-color);
  transition: all 0.3s ease;
  pointer-events: none;
}

.hud-panel::before {
  top: -1px;
  left: -1px;
  border-right: none;
  border-bottom: none;
}

.hud-panel::after {
  bottom: -1px;
  right: -1px;
  border-left: none;
  border-top: none;
}

.hud-panel:hover::before,
.hud-panel:hover::after {
  width: 100%;
  height: 100%;
  opacity: 0.1;
}

/* Override existing card styles for HUD look */
.feature-card {
  background: var(--accent-color);
  border: 1px solid var(--glass-border);
}

/* 3D Carousel Styles */
.carousel-scene {
  width: 450px; /* Reduced from 600px to fit screen */
  height: 400px; /* Reduced from 520px */
  margin: 20px auto 10px; /* Pulled up closer to title and bottom controls */
  position: relative;
  perspective: 1000px;
  max-width: 90%;
}

.carousel {
  width: 100%;
  height: 100%;
  position: absolute;
  transform-style: preserve-3d;
  transition: transform 1s;
}

.carousel-cell {
  position: absolute;
  width: 430px; /* Calculate margin (450-20) */
  height: 380px; /* Calculate margin (400-20) */
  left: 10px;
  top: 10px;
  background: rgba(10, 20, 30, 0.9); /* Opaque for readability */
  border: 1px solid var(--primary-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  overflow-y: auto;
  backface-visibility: hidden;
}

.carousel-cell:hover {
  background: rgba(0, 243, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}

.carousel-cell button {
  position: relative;
  z-index: 2000 !important; /* Force on top */
  pointer-events: auto !important; /* Force clickable */
  cursor: pointer;
  margin-top: 1rem;
  background: var(--primary-color);
  color: #000;
  border: none;
  padding: 10px 20px;
  font-weight: bold;
  text-transform: uppercase;
  box-shadow: 0 0 10px var(--primary-color);
  display: inline-block; /* Ensure it takes space */
}

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .carousel-scene {
    width: 300px;
    height: 500px; /* Taller for mobile */
  }
  .carousel-cell {
    width: 280px;
    height: 480px;
  }
  .prev-button, .next-button {
    display: none !important; /* Touch swipe used instead */
  }
}

/* Force Form Interactivity */
#inline-service-form input,
#inline-service-form textarea,
#no-products-msg input,
#no-products-msg textarea {
  position: relative;
  z-index: 5000;
  pointer-events: auto !important;
  user-select: text !important;
  background: rgba(0, 20, 40, 0.9);
  color: #fff;
}

#inline-submit-btn,
#suggestion-submit-btn {
  position: relative;
  z-index: 5000;
  pointer-events: auto !important;
  transition: all 0.3s ease;
}

#inline-submit-btn:disabled,
#suggestion-submit-btn:disabled {
  background: #333 !important;
  color: #555 !important;
  border-color: #444 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* WhatsApp Green Glow when enabled - Fluorescent/Neon */
#inline-submit-btn:not(:disabled),
#suggestion-submit-btn:not(:disabled) {
  background: rgba(57, 255, 20, 0.15) !important; /* Neon Green Tint */
  color: #fff !important;
  border-color: #39ff14 !important; /* Bright Neon Green */
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.6) !important;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
  animation: pulse-neon-green 1.5s infinite;
}

#inline-submit-btn:not(:disabled):hover,
#suggestion-submit-btn:not(:disabled):hover {
  background: rgba(57, 255, 20, 0.3) !important;
  box-shadow: 0 0 35px rgba(57, 255, 20, 0.9) !important;
}

@keyframes pulse-neon-green {
  0% { box-shadow: 0 0 15px rgba(57, 255, 20, 0.5); }
  50% { box-shadow: 0 0 30px rgba(57, 255, 20, 0.9); border-color: #7fff00 !important; }
  100% { box-shadow: 0 0 15px rgba(57, 255, 20, 0.5); }
}

/* Specific override for the Request Button to make it "glow" instead of solid fill */
#external-request-btn:hover {
  background: rgba(0, 243, 255, 0.3) !important;
  box-shadow:
    0 0 30px var(--primary-color),
    inset 0 0 20px rgba(0, 243, 255, 0.5) !important;
  color: #fff !important;
  border-color: #fff !important;
  text-shadow: 0 0 8px #fff;
}

/* HUD Inputs - Mejor Visibilidad */
.hud-input {
  width: 100%;
  background: rgba(
    255,
    255,
    255,
    0.1
  ); /* Fondo más claro (antes era muy oscuro) */
  border: 1px solid var(--glass-border);
  color: #fff;
  padding: 1rem;
  border-radius: 4px;
  font-family: var(--font-main);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.hud-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.hud-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* ========================================= */
/* NUEVO FOOTER FUTURISTA                    */
/* ========================================= */

.main-footer {
  padding: 4rem 2rem 2rem;
  background: #050505;
  border-top: 1px solid var(--primary-color);
  position: relative;
  overflow: hidden;
}

/* Fondo técnico de cuadrícula */
.main-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
}

.footer-col h3 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  border-bottom: 1px solid rgba(0, 243, 255, 0.3);
  padding-bottom: 0.5rem;
  display: inline-block;
}

/* Columna de Marca (Brand) */
.logo-footer {
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.tagline {
  color: #888;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 255, 0, 0.1);
  border: 1px solid #00ff00;
  color: #00ff00;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  border-radius: 4px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #00ff00;
  border-radius: 50%;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* Listas de Navegación */
.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.8rem;
}

.footer-col ul li a {
  color: #aaa;
  transition: all 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--primary-color);
  padding-left: 5px; /* Efecto de deslizamiento */
}

/* Iconos de Contacto */
.contact-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #aaa;
}

.contact-list i {
  color: var(--secondary-color);
  width: 20px;
}

/* Iconos Sociales */
.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-icons a {
  width: 40px;
  height: 40px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
}

.social-icons a:hover {
  background: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--glass-border);
  padding-top: 2rem;
  color: #555;
  font-size: 0.8rem;
}

/* ========================================= */
/* FIXES DE RESPONSIVIDAD MÓVIL (MOBILE FIRST A LA INVERSA) */
/* ========================================= */
@media (max-width: 768px) {
  /* Header Nav Fixes */
  .main-header {
    position: relative !important;
    background: #0a0a12 !important; /* Fondo sólido en móvil ya que no solapa */
    padding: 1rem 0 !important;
  }
  .main-content {
    padding-top: 0 !important;
  }
  .nav-container {
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
  }
  .nav-links {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap; /* Permitir salto de línea para evitar desbordamiento */
    padding: 0;
  }
  .nav-links li {
    flex: unset; /* Quitar distribución uniforme forzada */
  }
  .nav-links .theme-toggle-wrapper {
    margin-left: 0 !important; /* Centrado perfecto en móvil */
  }
  .nav-links .btn-primary, .nav-links .btn-secondary {
    display: inline-block;
    width: auto;
    text-align: center;
    padding: 0.5rem 0.8rem;
    font-size: clamp(0.75rem, 2.8vw, 0.9rem);
    white-space: nowrap; /* Mantener texto en una línea por botón */
  }

  /* Hero Section: Evitar desbordamiento horizontal */
  .hero-image-side {
    min-width: unset !important;
    width: 100%;
  }

  /* Reducir tamaño de fuente gigante en hero */
  .hero h1 {
    font-size: 2.2rem !important;
  }
  .svg-text {
    font-size: 100px !important; /* Reducir de 175px a 100px */
  }

  /* Grid de Productos: Forzar 2 columnas en móviles (Estilo eBay/AliExpress) */
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
    padding: 1rem 0 !important;
  }

  /* Ajustar tamaño de las tarjetas para que quepan 2 */
  .product-info {
    padding: 0.8rem !important;
  }
  .product-image {
    height: 120px !important;
  }
  .product-info h2 {
    font-size: 0.9rem !important;
    margin-bottom: 0.3rem !important;
  }
  .category {
    font-size: 0.7rem !important;
    margin-bottom: 0.5rem !important;
  }
  .price {
    font-size: 1.1rem !important;
    margin-bottom: 0.8rem !important;
  }
  /* Botones más pequeños en las tarjetas */
  .card-actions {
    flex-direction: column; /* Apilar botones para ahorrar espacio horizontal */
    gap: 0.3rem;
  }
  .card-actions .btn-primary, .card-actions .btn-secondary {
    width: 100%;
    text-align: center;
    padding: 0.4rem;
    font-size: 0.75rem;
  }

  /* Ajustar padding general de secciones sin necesidad de compensar menú fijo */
  .hero {
    margin-top: 0 !important;
    padding-top: 3rem !important;
    min-height: auto !important;
  }
  .productos-hero {
    padding: 3rem 1rem !important;
  }
  .features, .products-section, .services-section, .product-detail, .marketplace-section, .admin-section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  /* Footer en una sola columna con alineación centrada */
  .footer-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 2rem;
  }
  .contact-list li {
    justify-content: center;
  }
  .social-icons {
    justify-content: center;
  }
}

@media (max-width: 480px) {
    /* Ajuste extra pequeño para celulares finos (iPhone se, etc) */
    .products-grid {
        gap: 0.5rem !important;
    }
    .product-info {
        padding: 0.5rem !important;
    }
    .price {
        font-size: 1rem !important;
    }
}

/* =================================================
   MARKETPLACE LAYOUT
   ================================================= */

.marketplace-section {
    padding: 100px 0 4rem;
    min-height: 100vh;
}

.marketplace-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    align-items: start;
}

/* Sidebar */
.marketplace-sidebar {
    position: sticky;
    top: 90px;
}

.sidebar-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.sidebar-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.sidebar-group {
    margin-bottom: 1.5rem;
}

.sidebar-group label {
    display: block;
    font-size: 0.78rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.6rem;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.chip {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-main);
}

.chip:hover, .chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #000;
    font-weight: 700;
}

.price-slider {
    width: 100%;
    accent-color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.price-label {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

/* Marketplace Main */
.marketplace-main {
    min-width: 0;
}

.marketplace-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mp-title {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--primary-color);
}

.mp-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.mp-count {
    font-size: 0.85rem;
    color: #888;
}

.btn-sell {
    background: linear-gradient(135deg, #28a745, #20c45a);
    border: none;
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(40,167,69,0.3);
}

.btn-sell:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(40,167,69,0.5);
}

/* Product Grid */
.mp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
}

/* Skeleton */
.mp-skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s infinite;
    border-radius: 12px;
    height: 280px;
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Marketplace Card */
.mp-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.mp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.15);
    border-color: var(--primary-color);
}

.mp-card-img-wrap {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
}

.mp-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.mp-card:hover .mp-card-img-wrap img {
    transform: scale(1.05);
}

.mp-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.75);
    color: var(--primary-color);
    font-size: 0.68rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    border: 1px solid var(--primary-color);
    font-family: var(--font-heading);
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
}

.mp-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mp-card-title {
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mp-card-price {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.4rem;
}

.mp-card-price span {
    font-size: 0.65em;
    opacity: 0.7;
}

.mp-card-desc {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.4;
    margin-bottom: 0.8rem;
    flex: 1;
}

.mp-contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #075e54, #128c7e);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: auto;
}

.mp-contact-btn:hover {
    background: linear-gradient(135deg, #128c7e, #25d366);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    color: #fff;
}

.mp-empty {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: #888;
    grid-column: 1 / -1;
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =================================================
   SELL MODAL
   ================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    padding: 1rem;
    overflow-y: auto;
}

.sell-modal-box {
    background: #0a0a15;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 680px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--text-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background 0.2s;
}

.modal-close-btn:hover {
    background: rgba(255,70,70,0.3);
    color: #ff4444;
}

.modal-title {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group.full-col {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.8rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.label-hint {
    color: #666;
    font-size: 0.75rem;
    text-transform: none;
    letter-spacing: 0;
}

.hud-input {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 0.7rem 1rem;
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.hud-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,243,255,0.1);
}

.input-prefix-group {
    display: flex;
    gap: 0;
}

.input-prefix {
    background: rgba(37,211,102,0.15);
    border: 1px solid rgba(37,211,102,0.4);
    border-right: none;
    color: #25d366;
    padding: 0.7rem 0.8rem;
    border-radius: 6px 0 0 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.input-prefix-group .hud-input {
    border-radius: 0 6px 6px 0;
}

/* =================================================
   ADMIN DASHBOARD STYLES
   ================================================= */

.admin-section {
    padding: 100px 0 4rem;
    min-height: 100vh;
}

.admin-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.admin-title {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 3vw, 2rem);
    color: var(--primary-color);
}

.admin-subtitle {
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

/* Stats Grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0,243,255,0.1);
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary-color);
    width: 50px;
    text-align: center;
    flex-shrink: 0;
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-color);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.2rem;
}

/* Tabs */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-tab {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: #888;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    letter-spacing: 1px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-tab:hover, .admin-tab.active {
    background: rgba(0,243,255,0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Tab content */
.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.admin-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-section-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-color);
}

/* Table */
.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.admin-table thead {
    background: rgba(0,243,255,0.05);
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    color: var(--primary-color);
    letter-spacing: 1px;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

.admin-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: rgba(0,243,255,0.03);
}

/* Decap Panel */
.decap-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2.5rem;
}

.decap-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.decap-list {
    border-left: 1px solid var(--glass-border);
    padding-left: 2rem;
}

.decap-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    line-height: 1.5;
}

/* =================================================
   MARKETPLACE RESPONSIVE
   ================================================= */

@media (max-width: 900px) {
    .marketplace-layout {
        grid-template-columns: 1fr;
    }
    .marketplace-sidebar {
        position: static;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .decap-panel {
        grid-template-columns: 1fr;
    }
    .decap-list {
        border-left: none;
        border-top: 1px solid var(--glass-border);
        padding-left: 0;
        padding-top: 1.5rem;
    }
}

@media (max-width: 600px) {
    .mp-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    .mp-card-img-wrap { height: 140px; }
    .admin-stats-grid { grid-template-columns: 1fr 1fr; }
}

/* =================================================
   STANDALONE ADMIN DASHBOARD
   ================================================= */

.dash-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
    padding-top: 70px;
}

/* Sidebar */
.dash-sidebar {
    background: #07070f;
    border-right: 1px solid rgba(0,243,255,0.15);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.dash-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--primary-color);
    letter-spacing: 3px;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.dash-brand-dot {
    width: 10px; height: 10px;
    background: #00f3ff;
    border-radius: 50%;
    animation: pulse-anim 1.5s infinite;
    flex-shrink: 0;
}

.dash-nav { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }

.dash-nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 0.88rem;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.dash-nav-item:hover { background: rgba(0,243,255,0.06); color: #ccc; }
.dash-nav-item.active { background: rgba(0,243,255,0.12); color: #00f3ff; font-weight: 700; }
.dash-nav-item i { width: 16px; text-align: center; }

.dash-sidebar-footer { padding: 1rem 0.5rem 0; border-top: 1px solid rgba(255,255,255,0.06); margin-top: 1rem; }

.dash-logout-btn {
    width: 100%;
    padding: 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(255,70,70,0.3);
    background: transparent;
    color: #ff6666;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.dash-logout-btn:hover { background: rgba(255,70,70,0.1); border-color: #ff4444; }

/* Main */
.dash-main { padding: 1.5rem 2rem; min-width: 0; }

.dash-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dash-page-title { font-family: var(--font-heading); font-size: 1.3rem; color: var(--primary-color); }
.dash-page-sub { font-size: 0.8rem; color: #555; margin-top: 0.2rem; }

.dash-topbar-right { display: flex; align-items: center; gap: 0.8rem; }

.dash-live-badge {
    font-size: 0.75rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-heading);
}

.dash-refresh-btn {
    background: rgba(0,243,255,0.08);
    border: 1px solid rgba(0,243,255,0.2);
    color: #00f3ff;
    width: 34px; height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.dash-refresh-btn:hover { background: rgba(0,243,255,0.2); }

/* Sections */
.dash-section { display: none; }
.dash-section.active { display: block; }

/* Stats Row */
.dash-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dash-stat-card {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.2s;
}
.dash-stat-card:hover { border-color: rgba(0,243,255,0.3); }

.dash-stat-icon {
    width: 46px; height: 46px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.dash-stat-num { font-family: var(--font-heading); font-size: 1.6rem; color: var(--text-color); }
.dash-stat-lbl { font-size: 0.72rem; color: #555; margin-top: 0.1rem; }

/* Charts */
.dash-charts-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dash-chart-card {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 1.2rem;
}

.dash-chart-title {
    font-size: 0.82rem;
    color: #888;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Generic Card */
.dash-card {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1rem;
}
.dash-card-title {
    font-size: 0.82rem;
    color: #888;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    margin-bottom: 1rem;
    display: flex; align-items: center; gap: 0.5rem;
}

/* Top sellers */
.top-seller-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.85rem;
    flex-wrap: wrap;
}
.top-seller-row:last-child { border-bottom: none; }
.top-rank { color: var(--primary-color); font-family: var(--font-heading); font-size: 0.8rem; width: 24px; }
.top-email { flex: 1; color: #ccc; min-width: 150px; }
.top-count { color: #888; font-size: 0.8rem; }
.top-value { color: var(--primary-color); font-weight: 700; font-size: 0.85rem; margin-left: auto; }

/* Toolbar */
.dash-toolbar {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.dash-search, .dash-select {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-color);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 0.88rem;
    transition: border-color 0.2s;
}
.dash-search { flex: 1; min-width: 200px; }
.dash-search:focus, .dash-select:focus { outline: none; border-color: var(--primary-color); }

/* Table */
.dash-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid rgba(255,255,255,0.07); }

.dash-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.dash-table thead { background: rgba(0,243,255,0.04); }
.dash-table th {
    padding: 0.9rem 1rem;
    text-align: left;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    color: var(--primary-color);
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    white-space: nowrap;
}
.dash-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    vertical-align: middle;
}
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: rgba(0,243,255,0.02); }

.dash-loading { text-align: center; color: #444; padding: 2rem !important; }

.dash-badge {
    background: rgba(0,243,255,0.1);
    color: var(--primary-color);
    border: 1px solid rgba(0,243,255,0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.dash-role-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--font-heading);
}
.role-admin { background: rgba(255,193,7,0.15); color: #ffc107; }
.role-user  { background: rgba(0,243,255,0.1);  color: var(--primary-color); }

.dash-del-btn {
    background: rgba(255,70,70,0.1);
    border: 1px solid rgba(255,70,70,0.3);
    color: #ff6666;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}
.dash-del-btn:hover { background: rgba(255,70,70,0.25); }

.dash-promote-btn {
    background: rgba(255,193,7,0.1);
    border: 1px solid rgba(255,193,7,0.3);
    color: #ffc107;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.78rem;
    transition: all 0.2s;
}
.dash-promote-btn:hover { background: rgba(255,193,7,0.2); }

.dash-demote-btn {
    background: rgba(220,53,69,0.1);
    border: 1px solid rgba(220,53,69,0.3);
    color: #dc3545;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.78rem;
    transition: all 0.2s;
}

.dash-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(37,211,102,0.1);
    border: 1px solid rgba(37,211,102,0.3);
    color: #25d366;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.78rem;
    text-decoration: none;
    transition: all 0.2s;
}
.dash-wa-btn:hover { background: rgba(37,211,102,0.2); color: #25d366; }

/* Responsive Dashboard */
@media (max-width: 900px) {
    .dash-layout { grid-template-columns: 1fr; }
    .dash-sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 1rem; gap: 0.5rem; }
    .dash-brand { margin-bottom: 0; }
    .dash-nav { flex-direction: row; flex-wrap: wrap; flex: 1; }
    .dash-nav-item { padding: 0.5rem 0.8rem; font-size: 0.8rem; }
    .dash-sidebar-footer { width: 100%; padding: 0.5rem 0 0; border-top: none; border-left: 1px solid rgba(255,255,255,0.06); padding-left: 1rem; margin-top: 0; }
    .dash-charts-row { grid-template-columns: 1fr; }
    .dash-main { padding: 1rem; }
}

/* ==========================================================================
   FUTURISTIC HUD WIDGET STYLES
   ========================================================================== */

.hero-hud-widget-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 1.5rem auto 2.5rem 0; /* Align left to match left layout */
  display: grid;
  grid-template-columns: 130px 1fr 130px;
  align-items: center;
  gap: 1.5rem;
  z-index: 10;
}

@media (max-width: 900px) {
  .hero-hud-widget-container {
    margin: 1.5rem auto 2rem auto; /* Centered in mobile */
    grid-template-columns: 1fr;
    max-width: 600px;
  }
  .hero-text-side {
    max-width: 100% !important;
    width: 100% !important;
    padding-right: 0 !important;
  }
}

/* Background HUD SVG */
.hud-widget-svg {
  position: absolute;
  top: -20px;
  left: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 768px) {
  /* Hide background SVGs on small viewports to maintain perfect legibility */
  .hud-widget-svg {
    display: none;
  }
}

/* Monospace Code Columns */
.hud-code-column {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.65rem;
  color: var(--primary-color);
  opacity: 0.5;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 2;
  user-select: none;
}

.hud-code-column.hud-left {
  text-align: left;
}

.hud-code-column.hud-right {
  text-align: right;
}

.code-stream {
  white-space: nowrap;
  animation: code-breathing 4s ease-in-out infinite;
}

/* Delay code columns entries */
.hud-code-column div:nth-child(1) { animation-delay: 0s; }
.hud-code-column div:nth-child(2) { animation-delay: 0.5s; }
.hud-code-column div:nth-child(3) { animation-delay: 1s; }
.hud-code-column div:nth-child(4) { animation-delay: 1.5s; }
.hud-code-column div:nth-child(5) { animation-delay: 2s; }

@media (max-width: 900px) {
  .hud-code-column {
    display: none; /* Hide floating code columns on tablet and mobile to save screen estate */
  }
}

/* Central Text Wrapper */
.hero-hud-text-wrapper {
  grid-column: 2;
  position: relative;
  z-index: 3;
  padding: 2.5rem 2rem;
  background: rgba(10, 10, 20, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 243, 255, 0.18);
  border-radius: 8px;
  box-shadow: 
    inset 0 0 20px rgba(0, 243, 255, 0.05),
    0 8px 32px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.hero-hud-text-wrapper:hover {
  border-color: rgba(0, 243, 255, 0.35);
  box-shadow: 
    inset 0 0 30px rgba(0, 243, 255, 0.1),
    0 12px 40px rgba(0, 243, 255, 0.1);
}

@media (max-width: 900px) {
  .hero-hud-text-wrapper {
    grid-column: 1;
    padding: 1.8rem 1.2rem;
    background: rgba(10, 10, 20, 0.65); /* Slightly darker in mobile for high contrast */
  }
}

/* Futuristic Glowing Text Lines */
.hud-text-line {
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  width: 100%;
}

.hud-text-line.line-1 {
  font-size: clamp(0.9rem, 2vw, 1.25rem);
  font-weight: 500;
  color: var(--secondary-color);
  text-shadow: 0 0 8px rgba(188, 19, 254, 0.4);
  opacity: 0.9;
}

.hud-text-line.line-2 {
  font-size: clamp(1.2rem, 3.2vw, 2.1rem);
  font-weight: 900;
  color: #fff;
  background: linear-gradient(to right, #00ffff, #0072ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
  margin-bottom: 0.5rem;
}

.hud-text-line.line-3 {
  font-size: clamp(0.85rem, 1.8vw, 1.15rem);
  font-weight: 400;
  color: #e2e8f0;
  opacity: 0.85;
}

.hud-text-line.line-4 {
  font-size: clamp(0.85rem, 1.8vw, 1.15rem);
  font-weight: 500;
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

/* Animations for SVG HUD elements */
.hud-rot-clockwise {
  transform-origin: center;
  animation: hud-spin-clockwise 18s linear infinite;
}

.hud-rot-counter {
  transform-origin: center;
  animation: hud-spin-counter 12s linear infinite;
}

.hud-pulse-slow {
  transform-origin: center;
  animation: hud-pulse 3s ease-in-out infinite;
}

.hud-pulse-mid {
  transform-origin: center;
  animation: hud-pulse 2s ease-in-out infinite;
  animation-delay: 0.5s;
}

.hud-pulse-fast {
  transform-origin: center;
  animation: hud-pulse 1.2s ease-in-out infinite;
  animation-delay: 0.2s;
}

.hud-dot-pulse {
  animation: hud-dot-flash 1.5s ease-in-out infinite alternate;
}

.hud-line-glow {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: hud-dash-flow 4s linear infinite;
}

/* Equalizer Bars jumping heights */
.hud-eq-bar {
  transform-origin: bottom;
  transform: scaleY(0.3);
}

.hud-eq-bar.bar-1 { animation: hud-eq-jump-1 1.2s ease-in-out infinite alternate; }
.hud-eq-bar.bar-2 { animation: hud-eq-jump-2 0.8s ease-in-out infinite alternate; }
.hud-eq-bar.bar-3 { animation: hud-eq-jump-3 1.5s ease-in-out infinite alternate; }
.hud-eq-bar.bar-4 { animation: hud-eq-jump-4 0.9s ease-in-out infinite alternate; }
.hud-eq-bar.bar-5 { animation: hud-eq-jump-5 1.3s ease-in-out infinite alternate; }

/* Keyframes definitions */
@keyframes hud-spin-clockwise {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes hud-spin-counter {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes hud-pulse {
  0% { opacity: 0.3; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.03); }
  100% { opacity: 0.3; transform: scale(0.95); }
}

@keyframes hud-dot-flash {
  0% { opacity: 0.3; filter: drop-shadow(0 0 1px var(--primary-color)); }
  100% { opacity: 1; filter: drop-shadow(0 0 6px var(--primary-color)); }
}

@keyframes hud-dash-flow {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes code-breathing {
  0% { opacity: 0.25; transform: translateX(0px); }
  50% { opacity: 0.65; transform: translateX(3px); }
  100% { opacity: 0.25; transform: translateX(0px); }
}

@keyframes hud-eq-jump-1 {
  0% { transform: scaleY(0.2); }
  100% { transform: scaleY(0.85); }
}
@keyframes hud-eq-jump-2 {
  0% { transform: scaleY(0.9); }
  100% { transform: scaleY(0.15); }
}
@keyframes hud-eq-jump-3 {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1.0); }
}
@keyframes hud-eq-jump-4 {
  0% { transform: scaleY(0.1); }
  100% { transform: scaleY(0.7); }
}
@keyframes hud-eq-jump-5 {
  0% { transform: scaleY(0.65); }
  100% { transform: scaleY(0.3); }
}




/* Filtro Oscuro Mgico para el Mapa */
.map-tiles-dark-filter {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}


/* Theme Toggle para Mapa */
.map-dark-theme .leaflet-tile-pane {
    filter: invert(90%) hue-rotate(180deg) brightness(120%) contrast(110%);
}
.map-dark-theme .leaflet-control-zoom-in,
.map-dark-theme .leaflet-control-zoom-out,
.map-dark-theme .leaflet-control-attribution {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}


/* ==========================================================================
   ESO WEB CORE - SCI-FI HUD STYLES
   ========================================================================== */

/* Floating Widget Profile */
.eso-floating-widget {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    width: 80px;
    height: 80px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Angled corners mask for the whole widget (Sci-Fi chamfered box) */
    -webkit-clip-path: polygon(15px 0, calc(100% - 15px) 0, 100% 15px, 100% calc(100% - 15px), calc(100% - 15px) 100%, 15px 100%, 0 calc(100% - 15px), 0 15px);
    clip-path: polygon(15px 0, calc(100% - 15px) 0, 100% 15px, 100% calc(100% - 15px), calc(100% - 15px) 100%, 15px 100%, 0 calc(100% - 15px), 0 15px);
}

/* Background animated gradient (the "sequential lights") */
.eso-floating-widget::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0%,
        rgba(0, 243, 255, 0.1) 50%,
        #00f3ff 80%,
        #ff5722 100%
    );
    animation: rotateBorderLights 3s linear infinite;
    z-index: -2;
}

/* Dark inner background (leaves a border of 3px) */
.eso-floating-widget::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: #04070f;
    -webkit-clip-path: polygon(13px 0, calc(100% - 13px) 0, 100% 13px, 100% calc(100% - 13px), calc(100% - 13px) 100%, 13px 100%, 0 calc(100% - 13px), 0 13px);
    clip-path: polygon(13px 0, calc(100% - 13px) 0, 100% 13px, 100% calc(100% - 13px), calc(100% - 13px) 100%, 13px 100%, 0 calc(100% - 13px), 0 13px);
    z-index: -1;
}

/* Image */
.eso-floating-widget img {
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    object-fit: cover;
    z-index: 1;
    -webkit-clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
    clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
    opacity: 0.85;
    transition: 0.3s;
}

.eso-floating-widget:hover img {
    opacity: 1;
}

.eso-floating-widget:hover::before {
    animation-duration: 1s; /* Lights spin faster on hover */
}

@keyframes rotateBorderLights {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* HUD Modal Overlay */
.eso-hud-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(4, 7, 15, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.eso-hud-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Main HUD Container */
.eso-hud-container {
    width: 100%;
    max-width: 1200px;
    height: 85vh;
    background: rgba(10, 15, 25, 0.7);
    border: 2px solid #00f3ff;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.3), inset 0 0 30px rgba(0, 243, 255, 0.1);
    display: flex;
    flex-direction: column;
    /* Angled corners via clip-path */
    -webkit-clip-path: polygon(30px 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%, 0 30px);
    clip-path: polygon(30px 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%, 0 30px);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: var(--font-heading), sans-serif;
    color: #00f3ff;
}
.eso-hud-overlay.active .eso-hud-container {
    transform: scale(1);
}

/* Cybernetic corner accents */
.eso-hud-container::before, .eso-hud-container::after {
    content: '';
    position: absolute;
    width: 50px; height: 50px;
    border: 3px solid #ff5722;
    z-index: 10;
    pointer-events: none;
}
.eso-hud-container::before {
    top: 0; left: 0;
    border-right: none; border-bottom: none;
}
.eso-hud-container::after {
    bottom: 0; right: 0;
    border-left: none; border-top: none;
}

/* Header */
.eso-hud-header {
    height: 60px;
    border-bottom: 2px solid rgba(0, 243, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: linear-gradient(90deg, rgba(0,243,255,0.1) 0%, transparent 100%);
    position: relative;
}
.eso-hud-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.eso-hud-close {
    background: transparent;
    border: 1px solid #ff5722;
    color: #ff5722;
    width: 35px; height: 35px;
    border-radius: 4px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: 0.3s;
}
.eso-hud-close:hover {
    background: #ff5722;
    color: #fff;
    box-shadow: 0 0 15px #ff5722;
}

/* Body Grid */
.eso-hud-body {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 20px;
    padding: 20px;
    height: calc(100% - 60px);
    overflow: hidden;
}

@media (max-width: 900px) {
    .eso-hud-container {
        height: 95vh;
        max-height: 95vh;
        /* Smaller clip-path for mobile so it doesn't look rectangular */
        -webkit-clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
        clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
    }
    .eso-hud-container::before, .eso-hud-container::after {
        width: 30px; height: 30px;
    }
    .eso-hud-body {
        grid-template-columns: 1fr;
        overflow-y: auto;
        padding-right: 10px; /* space for scrollbar */
    }
    /* Hide scrollbar visually but keep functionality */
    .eso-hud-body::-webkit-scrollbar {
        width: 5px;
    }
    .eso-hud-body::-webkit-scrollbar-track {
        background: rgba(0, 243, 255, 0.05); 
    }
    .eso-hud-body::-webkit-scrollbar-thumb {
        background: #00f3ff; 
        border-radius: 10px;
    }
}

/* Sections */
.hud-section {
    background: rgba(0, 243, 255, 0.03);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 4px;
    padding: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
}
.hud-section-title {
    font-size: 0.8rem;
    color: #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
    border-bottom: 1px dashed rgba(0, 243, 255, 0.3);
    padding-bottom: 5px;
}

/* Left: Avatar & Identity */
.hud-avatar-box {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid #00f3ff;
    -webkit-clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
    clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
    position: relative;
    background: #000;
    margin-bottom: 15px;
    display: flex; align-items: center; justify-content: center;
}
.hud-avatar-box img {
    width: 95%; height: 95%; object-fit: cover;
    clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
}
.hud-status {
    color: #28a745;
    font-size: 0.85rem;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 0 5px #28a745;
    margin-bottom: 20px;
}

/* Progress Bars */
.hud-stat-row {
    margin-bottom: 15px;
}
.hud-stat-header {
    display: flex; justify-content: space-between; font-size: 0.8rem; color: #aaa; margin-bottom: 5px;
}
.hud-stat-bar-bg {
    width: 100%; height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden;
}
.hud-stat-bar-fill {
    height: 100%;
    background: #ff5722;
    box-shadow: 0 0 10px #ff5722;
    width: 0%; /* JS will animate */
    transition: width 1s ease-out;
}
.cyan-bar .hud-stat-bar-fill {
    background: #00f3ff; box-shadow: 0 0 10px #00f3ff;
}

/* Center: Hologram Area */
.hud-hologram-area {
    flex: 1;
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: radial-gradient(circle at center, rgba(0,243,255,0.1) 0%, transparent 70%);
}
.hologram-model {
    width: 150px; height: 250px;
    background: url('https://cdn-icons-png.flaticon.com/512/10432/10432028.png') no-repeat center center;
    background-size: contain;
    filter: invert(70%) sepia(100%) saturate(1000%) hue-rotate(130deg) brightness(1.5) drop-shadow(0 0 15px #00f3ff);
    animation: hologramHover 4s infinite ease-in-out;
    opacity: 0.8;
}
.hologram-base {
    width: 200px; height: 30px;
    border: 2px solid rgba(0, 243, 255, 0.8);
    border-radius: 50%;
    transform: perspective(200px) rotateX(75deg);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.8), inset 0 0 20px rgba(0, 243, 255, 0.5);
    margin-top: -15px;
    animation: pulseBase 2s infinite alternate;
}
@keyframes hologramHover {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
@keyframes pulseBase {
    0% { box-shadow: 0 0 10px rgba(0,243,255,0.4), inset 0 0 10px rgba(0,243,255,0.2); }
    100% { box-shadow: 0 0 30px rgba(0,243,255,1), inset 0 0 30px rgba(0,243,255,0.8); }
}

/* Right: Actions */
.hud-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.hud-btn {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.4);
    color: #00f3ff;
    padding: 15px 10px;
    text-align: center;
    font-size: 0.8rem;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: 0.3s;
    border-radius: 4px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hud-btn i { font-size: 1.5rem; }
.hud-btn:hover {
    background: #00f3ff;
    color: #000;
    box-shadow: 0 0 15px #00f3ff;
}
.hud-btn.orange {
    border-color: #ff5722; color: #ff5722; background: rgba(255,87,34,0.1);
}
.hud-btn.orange:hover {
    background: #ff5722; color: #fff; box-shadow: 0 0 15px #ff5722;
}

/* Badges */
.hud-badge {
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}
.hud-badge i { font-size: 1.8rem; color: #ffc107; margin-bottom: 5px; text-shadow: 0 0 10px #ffc107; }
