/* ============================================================
   ESPACIAL-BASE.CSS — Sistema de diseño AngulismoTV
   Tema: espacio oscuro sobrio, sin efectos pesados
   (sin blur pesado, sin animaciones costosas, todo con
   gradientes y transforms baratos para el navegador)
   ============================================================ */

:root {
  /* Fondo */
  --bg-void: #04050c;
  --bg-deep: #090c1a;
  --bg-panel: rgba(255, 255, 255, 0.035);
  --bg-panel-hover: rgba(255, 255, 255, 0.065);
  --bg-panel-strong: rgba(10, 13, 26, 0.75);

  /* Bordes */
  --border-soft: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(63, 226, 255, 0.45);

  /* Texto */
  --text-primary: #eef2fb;
  --text-secondary: #93a8c9;
  --text-dim: #5d6c88;

  /* Acentos (más vivos: cian, violeta y magenta para la nebulosa) */
  --accent: #3fe2ff;
  --accent-rgb: 63, 226, 255;
  --accent-soft: rgba(63, 226, 255, 0.18);
  --accent-2: #9d5bff;
  --accent-2-rgb: 157, 91, 255;
  --accent-2-soft: rgba(157, 91, 255, 0.18);
  --accent-3: #ff4fd8;
  --accent-3-rgb: 255, 79, 216;
  --accent-3-soft: rgba(255, 79, 216, 0.16);
  --live: #ff4568;
  --warn: #ffc857;

  /* Legado: usado por index.css / agenda.css para no romper nada */
  --card-primary: var(--accent);
  --card-secondary: var(--accent-2);
  --card-accent: #5be3a6;
  --text-secondary-legacy: var(--text-secondary);

  /* Forma y movimiento (radios más chicos: menos "pastilla", más definición) */
  --radius-sm: 6px;
  --radius-md: 9px;
  --radius-lg: 12px;
  --radius-pill: 999px; /* queda por compatibilidad, ya no se usa en botones/nav */
  --transition: 0.18s ease;
  --animation-speed: 0.18s ease; /* alias legado para search-channels.css */

  /* Bisel: un borde más claro arriba, más oscuro abajo — da "personalidad"
     sin blur ni sombras extra. Barato: son solo border-color por lado. */
  --bevel-top: rgba(255, 255, 255, 0.14);
  --bevel-bottom: rgba(0, 0, 0, 0.4);

  /* Degradados de 2 stops (una sola pasada de render, sin filter) */
  --panel-grad: linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.015) 100%);
  --panel-grad-hover: linear-gradient(180deg, rgba(var(--accent-2-rgb), 0.16) 0%, rgba(var(--accent-3-rgb), 0.08) 100%);
  --accent-grad: linear-gradient(180deg, #6fe9ff 0%, #1fb8dd 100%);
  --accent-2-grad: linear-gradient(180deg, #b58aff 0%, #7c3fe6 100%);
  --accent-3-grad: linear-gradient(180deg, #ff86e8 0%, #e01fb0 100%);

  /* Una sola sombra estática por elemento (nunca se anima) */
  --shadow-depth: 0 3px 10px rgba(0, 0, 0, 0.4);
  --shadow-depth-sm: 0 2px 5px rgba(0, 0, 0, 0.35);

  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.35);
  --header-height: 68px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ==================== RESET ==================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

@media (hover: none) and (pointer: coarse) {
  html { scroll-behavior: auto; }
}

body {
  min-height: 100vh;
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font);
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

@supports (-webkit-touch-callout: none) {
  body { min-height: -webkit-fill-available; }
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* ==================== FONDO ESPACIAL (liviano) ==================== */
/* Sin filter:blur, sin animaciones costosas: todo con gradientes
   suaves ya "difuminados" en su propia definición + transforms simples. */

#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    /* estrellas finas, patrón repetido barato */
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.6) 0, transparent 60%),
    radial-gradient(1px 1px at 70% 65%, rgba(255,255,255,0.5) 0, transparent 60%),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.45) 0, transparent 60%),
    radial-gradient(1.5px 1.5px at 85% 15%, rgba(255,255,255,0.55) 0, transparent 60%),
    radial-gradient(1px 1px at 10% 90%, rgba(255,255,255,0.4) 0, transparent 60%),
    linear-gradient(180deg, var(--bg-void) 0%, var(--bg-deep) 55%, var(--bg-void) 100%);
  background-size: 200px 200px, 240px 240px, 260px 260px, 300px 300px, 220px 220px, 100% 100%;
}

/* Nebulosa principal: violeta al centro fundiéndose a magenta en el borde,
   todo con stops de color (sin filter:blur) para que siga siendo barato. */
.spiral-galaxy {
  position: absolute;
  top: -25%;
  right: -20%;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  opacity: 0.9;
  background: radial-gradient(circle at 45% 45%,
    rgba(var(--accent-2-rgb), 0.38) 0%,
    rgba(var(--accent-2-rgb), 0.20) 22%,
    rgba(var(--accent-3-rgb), 0.18) 42%,
    rgba(var(--accent-3-rgb), 0.06) 60%,
    transparent 75%);
  animation: driftRotate 140s linear infinite;
  will-change: transform;
}

.aurora {
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  opacity: 0.7;
}

/* Nube cian, con un núcleo más intenso */
.aurora-1 {
  bottom: -22%;
  left: -12%;
  background: radial-gradient(circle at 50% 50%,
    rgba(var(--accent-rgb), 0.28) 0%,
    rgba(var(--accent-rgb), 0.12) 35%,
    transparent 72%);
  animation: driftFloat 46s ease-in-out infinite;
}

/* Nube violeta-magenta, para que la nebulosa se sienta multicolor */
.aurora-2 {
  top: 28%;
  left: 38%;
  background:
    radial-gradient(circle at 35% 40%, rgba(var(--accent-2-rgb), 0.22) 0%, transparent 55%),
    radial-gradient(circle at 65% 60%, rgba(var(--accent-3-rgb), 0.18) 0%, transparent 55%);
  animation: driftFloat 60s ease-in-out infinite reverse;
}

@keyframes driftRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes driftFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(3%, -3%); }
}

@media (prefers-reduced-motion: reduce) {
  .spiral-galaxy, .aurora-1, .aurora-2 { animation: none; }
}

/* En pantallas chicas, aligerar aún más (menos capas visibles) */
@media (max-width: 600px) {
  .spiral-galaxy { opacity: 0.45; }
  .aurora { opacity: 0.35; }
}

/* ==================== FOOTER ==================== */
footer.site-footer {
  display: block;
  background: rgba(6, 8, 18, 0.9);
  text-align: center;
  border-top: 1px solid var(--border-soft);
  position: relative;
  z-index: 1;
}

footer.site-footer small {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

footer.site-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

footer.site-footer a:hover { color: var(--accent-2); }

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-rgb), 0.45);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(var(--accent-rgb), 0.7); }

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.45) var(--bg-deep);
}

/* ==================== FIX ADCASH (scroll fantasma) ==================== */
/* Cualquier contenedor huérfano que Adcash inyecta con position:absolute
   y top gigante — lo sacamos del flujo del documento para que no
   infle el scrollHeight de la página. */
div[zniid],
div[bis_skin_checked][style*="z-index: 2147483647"] {
  position: fixed !important;
  top: -9999px !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  pointer-events: none !important;
  visibility: hidden !important;
}