/* =================================================
   1. VARIABLES GLOBALES Y CONFIGURACIÓN BASE
   ================================================= */
:root {
  --bg: #050509;
  --bg-2: #090a12;
  --panel: rgba(9, 11, 18, .88);
  --cyan: #00ffd0;
  --pink: #ff168b;
  --text: #e9edf5;
  --muted: #747d90;
  --line: rgba(133, 148, 176, .18);
  --shadow: 0 0 40px rgba(0,255,208,.08);
  --mono: "Courier New", Courier, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 15% 10%, rgba(0,255,208,.09) 0, transparent 30%), 
              radial-gradient(circle at 85% 60%, rgba(255,22,139,.09) 0, transparent 32%), 
              linear-gradient(135deg, var(--bg), var(--bg-2) 55%, #07050c);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
}

body.booting {
  overflow: hidden !important;
  height: 100vh;
}

/* Efecto CRT / Líneas de escaneo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: .065;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.2) 4px);
  mix-blend-mode: screen;
}

.noise {
  position: fixed;
  inset: -50%;
  z-index: -1;
  opacity: .03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =================================================
   2. CONTENEDOR PRINCIPAL Y TOPBAR
   ================================================= */
.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto;
  border: 1px solid var(--line);
  background: rgba(3, 4, 9, .78);
  box-shadow: 0 0 0 1px rgba(255,255,255,.015), var(--shadow), 0 30px 100px rgba(0,0,0,.5);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.topbar {
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font: 11px var(--mono);
  color: var(--muted);
  letter-spacing: .08em;
  background: rgba(0,0,0,.3);
  text-transform: uppercase;
}

.lights {
  display: flex;
  gap: 7px;
}
.light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 0 10px currentColor;
}
.light:nth-child(1) { color: var(--pink); background: var(--pink); }
.light:nth-child(2) { color: #ffd166; background: #ffd166; }
.light:nth-child(3) { color: var(--cyan); background: var(--cyan); }

.status {
  display: flex;
  gap: 15px;
  align-items: center;
}
.status strong {
  color: var(--cyan);
}
.clock {
  color: #aeb5c4;
}

/* =================================================
   3. HERO Y NAVEGACIÓN
   ================================================= */
.hero {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 30px;
  align-items: center;
  padding: 50px 46px 40px;
  position: relative;
}

.avatar-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.avatar-wrap::before, 
.avatar-wrap::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid var(--cyan);
  opacity: .4;
  pointer-events: none;
}
.avatar-wrap::before {
  transform: rotate(45deg);
  border-color: var(--cyan);
  box-shadow: 0 0 15px rgba(0,255,208,.2);
}
.avatar-wrap::after {
  transform: rotate(15deg);
  border-color: var(--pink);
  box-shadow: 0 0 15px rgba(255,22,139,.2);
}

.avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 25px rgba(0,255,208,.3), 0 0 45px rgba(255,22,139,.15);
  position: relative;
  z-index: 2;
  background: #090a10;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  font: 11px var(--mono);
  color: var(--cyan);
  letter-spacing: .18em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.hero h1 {
  font: 900 clamp(1.8rem, 4.2vw, 3.8rem)/.95 var(--mono);
  letter-spacing: -.06em;
  text-transform: uppercase;
  color: #f4f7fb;
  text-shadow: 3px 0 rgba(255,22,139,.75), -3px 0 rgba(0,255,208,.55);
  position: relative;
  width: max-content;
  max-width: 100%;
  animation: flicker 7s infinite;
}

.hero h1::before,
.hero h1::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
}
.hero h1::before { color: var(--cyan); transform: translate(-2px, 0); }
.hero h1::after { color: var(--pink); transform: translate(2px, 0); }

@keyframes flicker {
  0%, 94%, 98%, 100% { opacity: 1; }
  95% { opacity: .7; }
  96% { opacity: 1; }
  97% { opacity: .82; }
}

.tagline {
  margin-top: 14px;
  color: #b7bdc9;
  font: italic 14px var(--mono);
}
.tagline span {
  color: var(--pink);
}

.dev {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 6px 10px;
  border: 1px solid rgba(255,22,139,.3);
  background: rgba(255,22,139,.06);
  color: #ff8bc1;
  font: 11px var(--mono);
}
.dev-dot {
  width: 6px;
  height: 6px;
  background: var(--pink);
  box-shadow: 0 0 10px var(--pink);
  animation: blink 1.2s steps(2) infinite;
}
@keyframes blink { 50% { opacity: .2; } }

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-block: 1px solid var(--line);
  background: rgba(5,7,12,.92);
  backdrop-filter: blur(14px);
}

.nav a {
  padding: 8px 14px;
  color: #aeb5c4;
  text-decoration: none;
  border: 1px solid transparent;
  font: 11px var(--mono);
  transition: .2s;
}
.nav a::before {
  content: "./";
  color: var(--cyan);
}
.nav a:hover, 
.nav a.active {
  color: var(--cyan);
  border-color: rgba(0,255,208,.3);
  background: rgba(0,255,208,.05);
  box-shadow: inset 0 -2px 0 var(--cyan);
}

/* =================================================
   4. TICKER Y PANELES
   ================================================= */
.ticker {
  border-bottom: 1px solid var(--line);
  padding: 9px 15px;
  overflow: hidden;
  white-space: nowrap;
  font: 10px var(--mono);
  color: #697286;
  background: rgba(0,0,0,.2);
}

.ticker span {
  display: inline-block;
  animation: marquee 22s linear infinite;
}

.ticker b {
  color: var(--pink);
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

main {
  padding: 20px;
}

.panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #0d1019cc, #05070ddd);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px rgba(255,255,255,.02);
}

.panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  z-index: 2;
}

.head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font: 11px var(--mono);
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .08em;
  background: rgba(0,255,208,.02);
}

.body {
  padding: 20px;
}

/* =================================================
   5. COMPONENTES, REDES Y CORRECCIÓN DE EMBEDS (TWITCH / RADIO)
   ================================================= */
.micro {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.micro a {
  position: relative;
  min-height: 104px;
  padding: 15px;
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.015);
  overflow: hidden;
  transition: .2s;
}

.micro a::before {
  content: "";
  position: absolute;
  inset: auto -20px -30px;
  height: 70px;
  background: var(--accent, var(--cyan));
  filter: blur(30px);
  opacity: 0;
  transition: .2s;
}

.micro a:hover {
  border-color: var(--accent, var(--cyan));
  box-shadow: 0 12px 30px rgba(0,0,0,.4), 0 0 20px rgba(0,255,208,.15);
  transform: translateY(-2px);
}

.micro a:hover::before {
  opacity: .25;
}

.ico {
  font-size: 22px;
  display: block;
  position: relative;
}

.name {
  display: block;
  margin-top: 10px;
  color: #e8ecf4;
  font: 700 11px var(--mono);
  position: relative;
}

.sub {
  display: block;
  color: #586174;
  font: 9px var(--mono);
  margin-top: 4px;
  position: relative;
}

.layout {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 20px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.card {
  padding: 16px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  min-height: 120px;
  transition: .2s;
  background: rgba(255,255,255,.01);
}

.card:hover {
  border-color: rgba(0,255,208,.4);
  background: rgba(0,255,208,.04);
  transform: translateY(-2px);
}

.card h3 {
  font: 700 12px var(--mono);
  color: var(--cyan);
  margin-bottom: 8px;
}

.card p {
  font: 11px/1.6 var(--mono);
  color: var(--muted);
}

.about {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.about div {
  padding: 16px;
  border-left: 2px solid var(--pink);
  background: rgba(255,22,139,.04);
}

.about b {
  display: block;
  font: 11px var(--mono);
  margin-bottom: 6px;
  color: #e9edf5;
}

.about span {
  font: 11px/1.5 var(--mono);
  color: var(--muted);
  display: block;
}

/* CORRECCIÓN CRÍTICA: Asegurar que los iframes y embebidos de Twitch / Radio ocupen todo el ancho y alto completo */
iframe, embed, object, video {
  width: 100% !important;
  height: 100% !important;
  min-height: 450px;
  border: none !important;
  display: block;
}

/* Contenedores específicos de streams y radio para que no se compriman */
.stream-container, .radio-container, .panel iframe {
  width: 100% !important;
  height: 550px !important;
  max-width: 100% !important;
}

footer {
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #555d70;
  font: 10px var(--mono);
  background: rgba(0,0,0,.2);
}

/* =================================================
   6. PANTALLA DE BOOT (ARTE ASCII LIBRE Y SIN SCROLL)
   ================================================= */
#boot-screen {
  position: fixed;
  inset: 0;
  background: #020305;
  z-index: 10000;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  color: var(--cyan);
  transition: opacity 0.6s ease, visibility 0.6s ease;
  overflow: hidden;
}

#boot-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-content {
  width: min(720px, 94vw);
  text-align: center;
  border: 1px solid rgba(0,255,208,.35);
  background: rgba(4,6,11,.96);
  padding: 25px 20px;
  box-shadow: 0 0 40px rgba(0,255,208,.18), inset 0 0 20px rgba(0,255,208,.05);
  position: relative;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.boot-ascii {
  font-size: 5.5px;
  line-height: 1;
  color: var(--pink);
  text-shadow: 0 0 8px rgba(255,22,139,.6);
  margin-bottom: 12px;
  white-space: pre;
  overflow: visible !important;
  max-height: none !important;
  width: 100%;
}

.boot-sub-animation {
  font-size: 11px;
  margin-bottom: 10px;
  color: var(--cyan);
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.emoji-node {
  display: inline-block;
  animation: bounceEmoji 0.8s ease-in-out infinite alternate;
}

@keyframes bounceEmoji {
  0% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 2px var(--cyan)); }
  100% { transform: translateY(-4px) scale(1.15); filter: drop-shadow(0 0 8px var(--pink)); }
}

.boot-logo {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: .12em;
  margin-bottom: 8px;
  color: var(--text);
}

.boot-log {
  font-size: 10px;
  color: #aeb5c4;
  height: 18px;
  margin-bottom: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.boot-bar-wrap {
  width: 100%;
  height: 8px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.6);
  margin-bottom: 10px;
  padding: 1px;
}

.boot-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  box-shadow: 0 0 12px var(--cyan);
  transition: width 0.08s linear;
}

.boot-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
  width: 100%;
}

#boot-pct {
  color: var(--cyan);
  font-weight: bold;
}

.boot-skip {
  background: transparent;
  border: 1px solid rgba(255,255,255,.2);
  color: var(--muted);
  font: 10px var(--mono);
  padding: 4px 8px;
  cursor: pointer;
  letter-spacing: .08em;
  transition: .2s;
}

.boot-skip:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0,255,208,.08);
}

/* =================================================
   7. RESPONSIVO GENERAL
   ================================================= */
@media(max-width: 850px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 35px 20px;
  }
  .avatar-wrap {
    margin-bottom: 10px;
  }
  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .micro {
    grid-template-columns: repeat(3, 1fr);
  }
  .layout {
    grid-template-columns: 1fr;
  }
}

@media(max-width: 520px) {
  .shell {
    width: calc(100% - 10px);
    margin: 5px;
  }
  .topbar {
    padding: 0 10px;
    font-size: 9px;
  }
  .clock {
    display: none;
  }
  .nav {
    justify-content: stretch;
  }
  .nav a {
    flex: 1;
    text-align: center;
  }
  .micro {
    grid-template-columns: repeat(2, 1fr);
  }
  .cards, 
  .about {
    grid-template-columns: 1fr;
  }
  main {
    padding: 10px;
  }
  footer {
    flex-direction: column;
    gap: 7px;
    text-align: center;
  }
}