:root {
  --bg-deep: #040914;
  --bg-surface: #0a1428;
  --bg-card: rgba(13, 25, 48, 0.72);
  --bg-card-strong: rgba(15, 30, 58, 0.92);
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-glow: rgba(56, 189, 248, 0.28);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-soft: #cbd5e1;
  --blue-primary: #2563eb;
  --blue-electric: #38bdf8;
  --blue-royal: #1d4ed8;
  --gold-accent: #f59e0b;
  --gold-light: #fbbf24;
  --emerald: #10b981;
  --crimson: #ef4444;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-display: "Outfit", system-ui, -apple-system, sans-serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  background-color: var(--bg-deep);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-main);
  background:
    radial-gradient(circle at 15% 10%, rgba(37, 99, 235, 0.22) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(56, 189, 248, 0.14) 0%, transparent 38%),
    radial-gradient(circle at 50% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #040914 0%, #071022 50%, #040914 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
}

/* AMBIENT TECH GLOWS & GRID */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: -2;
  opacity: 0.45;
}
.glow-primary {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -100px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.55), transparent 70%);
}
.glow-secondary {
  width: 380px;
  height: 380px;
  top: 320px;
  right: -120px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.4), transparent 70%);
}
.glow-gold {
  width: 340px;
  height: 340px;
  bottom: 10%;
  left: 10%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 70%);
}

.tech-grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 25%, rgba(0,0,0,0.85), transparent 85%);
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

/* ==================== NAVBAR BLANCA FIJA (SIEMPRE VISIBLE) ==================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  padding: 10px 0;
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 44, 89, 0.12);
  box-shadow: 0 4px 20px rgba(4, 9, 20, 0.18);
  transition: all 0.25s ease;
}

.site-header.scrolled {
  padding: 8px 0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 30px rgba(4, 9, 20, 0.28);
  border-bottom-color: rgba(37, 99, 235, 0.22);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 112px;
  height: 48px;
  flex: 0 0 112px;
  border-radius: 8px;
  background: #ffffff;
  padding: 2px 0;
  display: grid;
  place-items: center;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-left: 12px;
  border-left: 1.5px solid rgba(15, 44, 89, 0.12);
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #071936;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-copy small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-dot-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.header-mobile-controls {
  display: none;
  align-items: center;
  gap: 8px;
}

.mobile-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.menu-toggle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(15, 44, 89, 0.14);
  background: #f8fafc;
  color: #071936;
  display: grid;
  place-items: center;
  padding: 0;
  transition: 0.2s ease;
}

.menu-toggle:hover {
  background: #f1f5f9;
}

.hamburger-box {
  width: 18px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background: #071936;
  border-radius: 2px;
  transition: 0.25s ease;
}

.menu-toggle.is-active .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.menu-toggle.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 9px 15px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f2c59;
  transition: 0.2s ease;
}

.nav-link:hover {
  color: #2563eb;
  background: #eff6ff;
}

.nav-live-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fef2f2;
  color: #dc2626 !important;
  border: 1px solid #fecaca;
}

.nav-live-link:hover {
  background: #fee2e2;
}

.pulse-mini {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--crimson);
  display: inline-block;
  animation: pulseRed 1.5s infinite;
}

.nav-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  background: linear-gradient(135deg, #071936 0%, #1d4ed8 100%);
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(15, 44, 89, 0.22);
}

.nav-social svg {
  width: 16px;
  fill: currentColor;
}

/* ==================== HERO SECTION ==================== */
.hero {
  padding: 108px 0 68px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 44px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--blue-electric);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 10px var(--gold-light);
  animation: pulseGold 1.7s infinite;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 5.2vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 20px 0 18px;
  color: #ffffff;
}

.hero h1 span {
  display: inline-block;
  background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 55%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.slogan {
  font-family: var(--font-display);
  font-size: clamp(1.06rem, 2vw, 1.28rem);
  line-height: 1.55;
  color: #e2e8f0;
  font-weight: 600;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-left: 3.5px solid var(--gold-light);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.1) 0%, transparent 100%);
  border-radius: 0 12px 12px 0;
}

.hero-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 60ch;
}

/* BOTONES MODERN TECH */
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 26px;
  max-width: 480px;
}

.hero-secondary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.94rem;
  transition: all 0.22s ease;
  text-align: center;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

.button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 14px 32px rgba(2, 132, 199, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.button-primary:hover {
  box-shadow: 0 18px 38px rgba(2, 132, 199, 0.5);
}

.button-video {
  color: #040914;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-color: rgba(254, 243, 199, 0.5);
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.25);
  font-weight: 800;
}

.button-secondary {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
  backdrop-filter: blur(10px);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.25);
}

.button-whatsapp {
  color: #ffffff;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border-color: rgba(110, 231, 183, 0.35);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.28);
  width: 100%;
}

.button-glass {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
}

.button-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.button-primary svg {
  fill: currentColor;
}

/* TELEMETRY BAR */
.signal-telemetry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.telemetry-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.telemetry-divider {
  opacity: 0.4;
}

.signal-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.signal-bars i,
.player-wave i,
.mini-wave b {
  display: inline-block;
  width: 3.5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue-electric), var(--gold-light));
  animation: equalize 1.1s ease-in-out infinite alternate;
}

.signal-bars i:nth-child(1) { height: 7px; }
.signal-bars i:nth-child(2) { height: 12px; animation-delay: 0.1s; }
.signal-bars i:nth-child(3) { height: 16px; animation-delay: 0.2s; }
.signal-bars i:nth-child(4) { height: 10px; animation-delay: 0.3s; }

/* HERO VISUAL: TARJETA DEL LOCUTOR */
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.broadcast-card {
  position: relative;
  margin: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55), 0 0 40px rgba(37, 99, 235, 0.18);
}

.broadcast-top-bar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.on-air-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(4, 9, 20, 0.78);
  border: 1px solid rgba(16, 185, 129, 0.45);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.on-air-badge i,
.player-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulseGreen 1.6s infinite;
}

.stream-quality-tag {
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(4, 9, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: var(--gold-light);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.broadcast-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 9, 20, 0.25) 0%, transparent 30%, rgba(4, 9, 20, 0.92) 100%);
  z-index: 1;
  pointer-events: none;
}

.presenter-img {
  width: 100%;
  aspect-ratio: 1.24;
  object-fit: cover;
  object-position: center top;
}

.broadcast-caption {
  position: absolute;
  bottom: 16px;
  left: 18px;
  right: 18px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.caption-info strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #ffffff;
}

.caption-info small {
  color: var(--text-soft);
  font-size: 0.85rem;
}

.mini-wave {
  display: inline-flex;
  align-items: flex-end;
  gap: 3.5px;
  height: 20px;
}

.mini-wave b:nth-child(1) { height: 9px; }
.mini-wave b:nth-child(2) { height: 16px; animation-delay: 0.1s; }
.mini-wave b:nth-child(3) { height: 12px; animation-delay: 0.2s; }
.mini-wave b:nth-child(4) { height: 19px; animation-delay: 0.3s; }
.mini-wave b:nth-child(5) { height: 13px; animation-delay: 0.4s; }
.mini-wave b:nth-child(6) { height: 16px; animation-delay: 0.5s; }
.mini-wave b:nth-child(7) { height: 8px; animation-delay: 0.6s; }

.tech-chips-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
}

.tech-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.tech-chip svg {
  width: 16px;
  height: 16px;
  color: var(--blue-electric);
  flex-shrink: 0;
}

/* ==================== SECCIÓN CÁMARA WEB EN VIVO ==================== */
.webcam-section {
  padding: 36px 0 72px;
}

.section-heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 32px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: var(--blue-electric);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.live-dot-inline {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--crimson);
  margin-right: 7px;
  animation: pulseRed 1.5s infinite;
}

.section-heading h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: -0.02em;
  color: #ffffff;
}

.section-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.webcam-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: stretch;
}

.video-stage-card {
  background: var(--bg-card-strong);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-glow);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.video-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(4, 9, 20, 0.6);
  border-bottom: 1px solid var(--border-subtle);
}

.video-stage-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: #ffffff;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulseGreen 1.7s infinite;
}

.status-indicator.is-live-cam {
  background: var(--crimson);
  box-shadow: 0 0 8px var(--crimson);
  animation: pulseRed 1.4s infinite;
}

.video-mode-tabs {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
}

.mode-tab {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: 0.2s ease;
}

.mode-tab:hover {
  color: #ffffff;
}

.mode-tab.is-active {
  background: var(--blue-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.video-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #02060d;
  overflow: hidden;
}

.viewport-pane {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
}

.viewport-pane.is-active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Vista 1: Standby Cabina */
.standby-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: brightness(0.28) saturate(1.15) blur(3px);
  transform: scale(1.04);
}

.standby-overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #ffffff;
  max-width: 520px;
  padding: 26px 28px;
  background: rgba(10, 20, 40, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 22px;
  backdrop-filter: blur(12px);
}

.standby-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.pulse-ring {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
}

.standby-overlay h3 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  margin: 0 0 8px;
}

.standby-overlay p {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 18px;
}

.standby-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* Vista 2: Webcam Directa */
#localWebcamVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
#localWebcamVideo.is-mirrored {
  transform: scaleX(-1);
}
#localWebcamVideo.is-streaming {
  display: block;
}

.webcam-EmptyState {
  text-align: center;
  color: #ffffff;
  max-width: 440px;
  padding: 24px;
  z-index: 2;
}

.cam-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.35);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  color: var(--blue-electric);
}

.cam-icon-circle svg {
  width: 30px;
  height: 30px;
}

.webcam-EmptyState h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 8px;
}

.webcam-EmptyState p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 18px;
}

.webcam-controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.cam-select {
  padding: 0 14px;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  font-size: 0.88rem;
}

.webcam-live-toolbar {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(4, 9, 20, 0.85);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
  z-index: 5;
}

.live-pill-red {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.78rem;
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid rgba(239, 68, 68, 0.5);
  padding: 5px 12px;
  border-radius: 999px;
}

.live-pill-red i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--crimson);
  animation: pulseRed 1.4s infinite;
}

.toolbar-btns {
  display: flex;
  gap: 8px;
}

.btn-tool {
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.btn-tool:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn-tool.btn-danger {
  background: rgba(239, 68, 68, 0.85);
  border-color: transparent;
}

/* Vista 3: Señal Externa / Embed */
.embed-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.embed-placeholder {
  text-align: center;
  color: #ffffff;
  max-width: 480px;
  padding: 24px;
}

.embed-placeholder h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 8px;
}

.embed-placeholder p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0 0 16px;
}

.embed-input-group {
  display: flex;
  gap: 8px;
  width: 100%;
}

.embed-input-group input {
  flex: 1;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  font-size: 0.88rem;
}

.embed-player-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.embed-player-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.btn-change-stream {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(4, 9, 20, 0.88);
  color: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
}

/* Sidebar de Cámara */
.webcam-sidebar {
  display: flex;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}

.sidebar-brand {
  background: #ffffff;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 16px;
}

.sidebar-brand img {
  width: 100%;
  max-height: 68px;
  object-fit: contain;
}

.sidebar-card h3 {
  font-family: var(--font-display);
  font-size: 1.22rem;
  color: #ffffff;
  margin: 0 0 8px;
}

.sidebar-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 18px;
}

.sidebar-links {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.sidebar-status-box {
  background: rgba(4, 9, 20, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  font-size: 0.84rem;
}

.status-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.status-row strong {
  color: #ffffff;
}

.text-emerald {
  color: #34d399 !important;
}

/* ==================== SECCIÓN BIENVENIDA ==================== */
.welcome-section {
  padding: 20px 0 110px;
}

.welcome-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 26px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
}

.welcome-symbol {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(245, 158, 11, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.welcome-symbol svg {
  width: 38px;
  stroke: var(--gold-light);
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.welcome-content h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.3vw, 1.9rem);
  letter-spacing: -0.02em;
  color: #ffffff;
}

.welcome-content p {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.85;
}

.welcome-content blockquote {
  margin: 22px 0 0;
  padding: 18px 22px;
  border-radius: 18px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-left: 4px solid var(--gold-light);
  background: rgba(245, 158, 11, 0.08);
  display: grid;
  gap: 6px;
}

.welcome-content blockquote span {
  color: var(--text-soft);
  font-size: 0.94rem;
}

.welcome-content blockquote strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--gold-light);
}

/* ==================== FOOTER ==================== */
.site-footer {
  padding: 0 0 110px;
}

.footer-inner {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.footer-brand img {
  width: 92px;
  height: 44px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 10px;
  padding: 4px 8px;
}

.footer-brand strong {
  display: block;
  font-family: var(--font-display);
  color: #ffffff;
  text-align: left;
}

.footer-brand span {
  font-size: 0.84rem;
  display: block;
  text-align: left;
}

.footer-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.site-footer a {
  font-weight: 700;
  color: var(--blue-electric);
}

/* ==================== FLOATING PLAYER DOCK ==================== */
.floating-player {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(860px, calc(100% - 24px));
  bottom: 14px;
  z-index: 35;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(7, 16, 34, 0.92);
  color: #ffffff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 25px rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.3);
  backdrop-filter: saturate(1.8) blur(18px);
  -webkit-backdrop-filter: saturate(1.8) blur(18px);
}

.player-play {
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #040914;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
  flex-shrink: 0;
}

.player-play svg {
  width: 20px;
  fill: currentColor;
}

.player-play .icon-pause { display: none; }
.floating-player.is-playing .player-play .icon-play { display: none; }
.floating-player.is-playing .player-play .icon-pause { display: block; }
.floating-player.is-connecting .player-play { opacity: 0.72; }

.player-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-meta strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-status {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.player-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.player-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  color: #34d399;
}

.player-wave {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  height: 18px;
}

.player-wave i:nth-child(1) { height: 7px; }
.player-wave i:nth-child(2) { height: 15px; animation-delay: 0.08s; }
.player-wave i:nth-child(3) { height: 11px; animation-delay: 0.16s; }
.player-wave i:nth-child(4) { height: 17px; animation-delay: 0.24s; }
.player-wave i:nth-child(5) { height: 9px; animation-delay: 0.32s; }
.player-wave i:nth-child(6) { height: 14px; animation-delay: 0.4s; }

.volume-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 6px;
}

.volume-control svg {
  width: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  color: var(--text-muted);
}

input[type="range"] {
  width: 92px;
  accent-color: var(--gold-light);
}

.stream-fallback {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 34;
  max-width: min(400px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(10, 20, 40, 0.96);
  border: 1px solid var(--border-glow);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  display: none;
  gap: 12px;
  align-items: center;
}

.stream-fallback.is-visible {
  display: grid;
  grid-template-columns: 1fr auto;
}

.stream-fallback strong {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-display);
  font-size: 0.92rem;
}

.stream-fallback span {
  display: block;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.stream-fallback a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--blue-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
}

/* ==================== MODAL DE BIENVENIDA ==================== */
.welcome-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.welcome-modal.is-visible {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 14, 0.78);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 420px);
  margin: auto;
  padding: 28px 24px 22px;
  border-radius: 26px;
  background: var(--bg-surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  text-align: center;
  border: 1px solid var(--border-glow);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 1.4rem;
  line-height: 1;
}

.modal-logo {
  width: 170px;
  margin: 0 auto 16px;
}

.modal-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  background: #ffffff;
  padding: 8px 12px;
}

.modal-kicker {
  color: var(--blue-electric);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
}

.modal-card h2 {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: 1.65rem;
  color: #ffffff;
}

.modal-card p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.modal-play {
  width: 100%;
}

.modal-later {
  margin-top: 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
}

.modal-feedback {
  min-height: 20px;
  margin-top: 10px !important;
  color: var(--gold-light) !important;
  font-size: 0.86rem;
}

/* ANIMATIONS */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulseGold {
  0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.65); }
  70% { box-shadow: 0 0 0 10px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.65); }
  70% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulseRed {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.65); }
  70% { box-shadow: 0 0 0 9px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes equalize {
  from { transform: scaleY(0.45); opacity: 0.7; }
  to { transform: scaleY(1.05); opacity: 1; }
}

/* ==================== RESPONSIVE DESIGN (TABLET & MOBILE) ==================== */
@media (max-width: 980px) {
  .hero-grid,
  .webcam-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .hero-actions {
    max-width: 100%;
  }
}

@media (max-width: 820px) {
  .header-mobile-controls {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(15, 44, 89, 0.14);
    border-radius: 20px;
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    box-shadow: 0 24px 48px rgba(4, 9, 20, 0.35);
    display: none;
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-link,
  .nav-social {
    justify-content: center;
    padding: 12px 16px;
    border-radius: 12px;
    text-align: center;
  }

  .hero {
    padding: 90px 0 48px;
  }

  .welcome-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 22px 18px;
  }

  .video-stage-header {
    flex-direction: column;
    align-items: stretch;
  }

  .video-mode-tabs {
    width: 100%;
  }

  .mode-tab {
    flex: 1;
    text-align: center;
    padding: 8px 6px;
  }

  .video-viewport {
    aspect-ratio: auto;
    min-height: 360px;
  }

  .standby-overlay {
    margin: 14px;
    padding: 20px 16px;
  }

  .embed-input-group {
    flex-direction: column;
  }

  .floating-player {
    grid-template-columns: auto 1fr auto;
    padding: 8px 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .volume-control {
    display: none;
  }
}

@media (max-width: 540px) {
  .container {
    width: calc(100% - 24px);
  }

  .brand-mark {
    width: 78px;
    height: 38px;
    flex: 0 0 78px;
    border-radius: 10px;
  }

  .brand-copy strong {
    font-size: 0.94rem;
  }

  .brand-copy small {
    font-size: 0.72rem;
  }

  .eyebrow {
    font-size: 0.7rem;
    padding: 6px 11px;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 9vw, 2.6rem);
    margin: 14px 0 12px;
  }

  .slogan {
    font-size: 0.95rem;
    padding: 10px 14px;
  }

  .hero-text {
    font-size: 0.92rem;
  }

  .tech-chips-row {
    grid-template-columns: 1fr;
  }

  .broadcast-caption {
    bottom: 12px;
    left: 14px;
    right: 14px;
  }

  .caption-info strong {
    font-size: 1.05rem;
  }

  .caption-info small {
    font-size: 0.78rem;
  }

  .floating-player {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }

  .player-play {
    width: 42px;
    height: 42px;
  }

  .player-meta strong {
    font-size: 0.88rem;
  }

  .player-status {
    font-size: 0.74rem;
  }
}
