body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background: #f9f9f9;
}

/* Contenedor principal con sidebar y contenido */
.main-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar fijo a la izquierda */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  box-sizing: border-box;
  padding: 20px;
  position: fixed;
  top: 70px;
  left: 10px;
  height: calc(100vh - 80px);
  color: #000;
  z-index: 900;
  border-radius: 15px;
  font-family: 'system-ui', sans-serif;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Contenido que ocupa el resto del espacio */
#main-content {
  flex: 1;
  padding: 20px;
  box-sizing: border-box;
  margin-left: 260px; /* Ajustado al nuevo ancho del sidebar */
}

/* GRID PRINCIPAL */
.grid-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* Tarjetas de radios */
.radio-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  padding: 15px;
  width: 250px;
  text-align: center;
}

.radio-card img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  margin-bottom: 10px;
}

.radio-card h3 {
  font-size: 16px;
  margin: 0 0 5px;
}

.radio-card p {
  font-size: 14px;
  color: #555;
  margin: 0 0 10px;
}

/* Logo dentro de la tarjeta */
.logo-container {
  position: relative;
  width: 100%;
  height: 120px;
  margin-bottom: 10px;
}

.logo-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

/* Icono de reproducir */
.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 38px;
  color: #07178d;
  opacity: 0.8;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.play-icon:hover {
  opacity: 1;
  color: #000d5e;
}

/* Detalle de radio */
.radio-detail {
  text-align: center;
  padding: 40px 20px;
}

.detail-logo {
  width: 200px;
  height: auto;
  object-fit: contain;
  margin-bottom: 20px;
}

/* Títulos */
.section-title {
  margin: 20px 0 10px;
  padding-left: 15px;
}

.section-title h2 {
  font-size: 22px;
  font-weight: bold;
  color: #07178d;
  border-left: 5px solid #07178d;
  padding-left: 10px;
}

/* Botón "ver más" */
.ver-mas-container {
  text-align: center;
  margin: 25px 0;
}

.ver-mas-btn {
  background-color: #07178d;
  color: #fff;
  padding: 10px 25px;
  text-decoration: none;
  border-radius: 25px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.ver-mas-btn:hover {
  background-color: #0a23b8;
}

/* Footer */
.footer {
  text-align: center;
  padding: 15px;
  background: #f1f1f1;
  font-size: 14px;
}








.departamento-selector {
  margin: 20px 0;
  text-align: center;
}

.departamento-selector label {
  font-weight: bold;
  margin-right: 10px;
  font-size: 16px;
}

#departamento-select {
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  background: #fff;
  cursor: pointer;
}

.region-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.region-block {
  flex: 1 1 30%;
  background: #fff;
  border: 1px solid #eee;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.region-block h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #07178d;
  display: flex;
  align-items: center;
  gap: 8px;
}

.departamento-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.departamento-list li {
  margin-bottom: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: color 0.2s ease;
}

.departamento-list li:hover {
  color: #ff6600;
}

.departamento-list i {
  margin-right: 8px;
  color: #07178d;
}



.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 15px 30px;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.brand-text {
    font-size: 24px;
    font-weight: bold;
    color: #0d47a1;
    text-shadow: none;
}

.logo {
  height: 40px;
}

.separator {
  font-size: 20px;
  color: #999;
}

.search-input {
  flex: 1;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 20px;
  outline: none;
  background-color: #f9f9f9;
  min-width: 250px;
}

.header-right {
  display: flex;
  gap: 10px;
}

.header-btn {
  padding: 10px 20px;
  background-color: #4caf50;
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-size: 14px;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: 1px solid #4caf50;
}

.header-btn:hover {
  background-color: #388e3c;
  color: #ffffff;
}

.header-btn.secondary {
  background-color: #0d47a1;
  color: #ffffff;
  border: 1px solid #0d47a1;
}

.header-btn.secondary:hover {
  background-color: #002171;
  color: #ffffff;
}





.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin-bottom: 10px;
}

.sidebar-nav a {
  text-decoration: none;
  color: #333;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  border-radius: 8px;
  transition: background 0.3s ease, color 0.3s ease;
}

.sidebar-nav a:hover {
  background: #07178d;
  color: #fff;
}

.sidebar-nav a i {
  font-size: 18px;
}

.sidebar-divider {
  margin: 25px 0 15px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.sidebar-apps p {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
}

.sidebar-apps a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
  color: #fff;
}

.sidebar-apps a[href*="play.google.com"] {
  background-color: #4caf50; /* Verde */
}

.sidebar-apps a[href*="play.google.com"]:hover {
  background-color: #388e3c;
}

.sidebar-apps a[href*="apps.apple.com"] {
  background-color: #000;
}

.sidebar-apps a[href*="apps.apple.com"]:hover {
  background-color: #333;
}



/* Contenedor del ranking horizontal */
.ranking-grid {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 10px 0;
  scroll-snap-type: x mandatory;
}

/* �7�3 Card compacta de cada emisora */
.ranking-card {
  flex: 0 0 auto;
  width: 160px; /* �7�3 M��s angosta */
  background: #fff;
  border-radius: 10px;
  text-align: center;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
  scroll-snap-align: start;
  transition: transform 0.2s ease;
}

.ranking-card:hover {
  transform: scale(1.03);
}

/* �7�3 Logo redondo m��s ajustado */
.ranking-logo img {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 6px;
}

/* �7�3 �0�1cono de play */
.ranking-play {
  display: inline-block;
  margin-top: 4px;
  font-size: 18px;
  color: #ff5722;
}

/* �7�3 T��tulo compacto */
.ranking-card h3 {
  font-size: 13px;
  margin: 6px 0 3px;
  color: #222;
  line-height: 1.2;
}

/* �7�3 Ubicaci��n corta */
.ranking-card p {
  font-size: 11px;
  color: #666;
  margin: 0;
}

/* �7�3 Contador peque�0�9o */
.ranking-count {
  font-size: 11px;
  color: #888;
  margin-top: 5px;
  display: block;
}





.global-player {
  position: fixed;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  z-index: 1100;
  font-family: 'system-ui', sans-serif;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.player-logo-container {
  position: relative;
  width: 48px;
  height: 48px;
  background-color: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.loading-spinner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 3px solid #4caf50; /* Verde */
  border-top-color: #07178d; /* Azul */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.player-info img {
  height: 40px;
  width: 40px;
  object-fit: contain;
  border-radius: 4px;
}

.player-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#player-name,
#player-location {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.separator {
  color: #ccc;
  font-weight: bold;
}

.player-social {
  display: flex;
  gap: 8px;
}

.player-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #4caf50; /* Verde */
  border-radius: 50%;
  width: 28px;
  height: 28px;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.player-social a:hover {
  transform: scale(1.1);
  box-shadow: 0 0 10px #4caf50;
}

#audio-player {
  display: none;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-controls button {
  background: #07178d; /* Azul */
  color: #fff;
  border: none;
  font-size: 16px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.player-controls button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px #07178d;
}

#volume-slider {
  width: 100px;
  cursor: pointer;
  background: transparent;
  accent-color: #4caf50; /* Verde */
}


.share-modal {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  padding: 15px;
  width: 260px;
  border-radius: 8px;
  z-index: 9999;
  font-family: sans-serif;
}

.share-modal-content h4 {
  margin-top: 0;
  font-size: 16px;
}

#share-url, #share-embed {
  width: 100%;
  margin: 5px 0;
  font-size: 12px;
}

#share-embed {
  height: 60px;
}

.share-buttons {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.share-buttons a {
  background: #432f8e;
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.close-share {
  position: absolute;
  top: 5px;
  right: 10px;
  cursor: pointer;
  font-size: 16px;
}

.spinner-container {
  text-align: center;
  padding: 20px;
  color: #07178d;
  font-weight: bold;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid #ccc;
  border-top: 4px solid #07178d;
  border-radius: 50%;
  margin: 0 auto 10px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.no-more {
  text-align: center;
  padding: 20px;
  color: #333;
  font-size: 16px;
  font-weight: bold;
}


.btn-ubicacion {
  display: inline-block;
  background: linear-gradient(135deg, #07178d, #00c2ff);
  color: white;
  padding: 12px 25px;
  font-size: 16px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-ubicacion:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1024px) {
  .radio-card {
    width: calc(50% - 10px); /* 2 por fila */
  }

  .ranking-card {
    width: 160px;
  }

  .sidebar {
    display: none;
  }

  .main-container {
    flex-direction: column;
  }

  #main-content {
    padding: 15px;
    margin-left: 0;
  }

  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .header-left,
  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .search-input {
    width: 100%;
    min-width: unset;
  }

  .player-info {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .player-meta {
    justify-content: center;
  }

  .player-controls {
    justify-content: center;
    flex-wrap: wrap;
  }

  .ranking-grid {
    gap: 10px;
    padding: 10px 0;
  }

  .ranking-logo img {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 640px) {
  .radio-card {
    width: 100%; /* 1 por fila */
  }

  .ranking-card {
    width: 140px;
  }

  .ranking-card h3 {
    font-size: 13px;
  }

  .ranking-card p,
  .ranking-count {
    font-size: 11px;
  }

  .header-btn {
    font-size: 13px;
    padding: 6px 12px;
  }

  .btn-ubicacion {
    font-size: 14px;
    padding: 10px 20px;
  }

  .player-controls button {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  #volume-slider {
    width: 80px;
  }
}

/* Estilos para el loader inicial */
#initial-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Estilos para las tarjetas de países */
.country-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.country-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.country-card:hover, .country-card.active {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.country-card img {
    width: 60px;
    height: auto;
    margin-bottom: 5px;
}

.country-card p {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
}

/* Nuevos estilos para las tarjetas de radio */
.radio-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    width: 250px;
}

.radio-card:hover {
    transform: translateY(-10px);
}

.card-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    filter: blur(10px) brightness(0.7);
    transform: scale(1.2);
}

.card-content {
    position: relative;
    z-index: 2;
    padding: 15px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.radio-card .logo-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
}

.radio-card .logo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.radio-card .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s;
}

.radio-card:hover .play-icon {
    opacity: 1;
}

.radio-info {
    text-align: center;
}

.radio-info h3 a {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
}

.radio-info p {
    margin: 5px 0 0;
    font-size: 14px;
    color: #eee;
}

.radio-info p i {
    margin-right: 5px;
}