body {
  margin: 0;
  font-family: 'Roboto', Arial, sans-serif;
  background: #1a0101a6;
  color: #fff;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 320px;
  height: 100vh;
  background: #0407c4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 2;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* scroll suave en iOS/Android */
}

.logo-container {
  width: 100%;
  padding: 40px 0 20px 0;
  display: flex;
  justify-content: center;
}

.logo {
  width: 200px;
  height: auto;
}

.categories {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 40px;
  padding-left: 40px;
  padding-bottom: 40px;
  /* espacio al final para el último item */
  flex-shrink: 0;
  /* evita que se comprima */
}

.category {
  font-size: 2rem;
  color: #fff;
  opacity: 0.8;
  cursor: pointer;
  transition: opacity 0.2s;
}

.category.active,
.category:hover {
  opacity: 1;
  font-weight: bold;
}

.main-content {
  margin-left: 320px;
  width: calc(100% - 320px);
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  position: relative;
  padding: 0 32px;
  box-sizing: border-box;
  overflow-y: auto;
}

.banner-rotativo {
  width: 100%;
  max-width: 590px;
  height: 270px;
  margin: 40px auto 30px auto;
  background: #ffe600;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
}

.channels {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  max-width: 1400px;
  min-height: 350px;
  padding-bottom: 40px;
}

.channel {
  width: 120px;
  height: 120px;
  background: #111;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px #0008;
}

.channel img {
  max-width: 90px;
  max-height: 90px;
  object-fit: contain;
}

.channel:hover {
  box-shadow: 0 4px 16px #c62828cc;
  transform: scale(1.05);
}

.actions {
  position: absolute;
  bottom: 40px;
  right: 60px;
  display: flex;
  gap: 40px;
}

.actions button {
  background: #c62828;
  color: #fff;
  font-size: 1.5rem;
  border: none;
  border-radius: 4px;
  padding: 18px 40px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

.actions button:hover {
  background: #b71c1c;
}

.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  flex-direction: column;
}

.video-modal.hidden {
  display: none;
}

#video-player {
  width: 80vw;
  height: 70vh;
  background: #000;
  border-radius: 8px;
}

#close-video {
  position: absolute;
  top: 40px;
  right: 60px;
  background: #c62828;
  color: #fff;
  border: none;
  font-size: 2rem;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  z-index: 11;
}

/* ============================
   PWA INSTALL MODAL
   ============================ */

/* Overlay oscuro */
.pwa-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(6px);
  animation: pwaFadeIn 0.3s ease;
}

.pwa-modal.hidden {
  display: none;
}

@keyframes pwaFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Tarjeta del modal */
.pwa-modal-card {
  position: relative;
  background: #2a2a2a;
  border-radius: 16px;
  padding: 42px 44px 36px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  animation: pwaSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pwaSlideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Botón cerrar */
.pwa-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #3d3d3d;
  border: none;
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.pwa-modal-close:hover {
  background: #555;
}

/* Título */
.pwa-modal-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 14px;
  letter-spacing: 0.01em;
}

/* Descripción */
.pwa-modal-desc {
  font-size: 0.95rem;
  color: #bbb;
  line-height: 1.6;
  margin: 0 0 28px;
}

/* Botón instalar */
.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  color: #111;
  border: none;
  border-radius: 40px;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
}

.pwa-install-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.25);
  background: #f0f0f0;
}

.pwa-install-btn:active {
  transform: scale(0.98);
}

.pwa-btn-icon {
  font-size: 1.2rem;
  line-height: 1;
}

/* Instrucciones iOS */
.ios-instructions {
  margin-top: 18px;
  padding: 14px 18px;
  background: #1a1a1a;
  border-radius: 10px;
  font-size: 0.85rem;
  color: #ccc;
  line-height: 1.5;
}

.ios-instructions.hidden {
  display: none;
}

/* Botón flotante (FAB) para reabrir el modal */
.pwa-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0407c4;
  color: #fff;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(4, 7, 196, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: pwaFabIn 0.4s ease 1s both;
}

@keyframes pwaFabIn {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.pwa-fab:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 28px rgba(4, 7, 196, 0.7);
}

.pwa-fab.hidden {
  display: none;
}