/* ===================================
   MODAL SYSTEM
   =================================== */

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal-container {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 20px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 40px;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.modal-title {
  font-family: 'Comic Sans MS', cursive;
  font-size: 1.75em;
  color: #fff;
  text-align: center;
  margin-bottom: 10px;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* ===================================
   RADIO STATIONS MODAL
   =================================== */

.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.station-card {
  background: linear-gradient(135deg, #ff6b9d 0%, #9d7fd5 100%);
  border-radius: 12px;
  padding: 5px 9px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  display:inline-flex;
}

.station-card div {
    margin: 0 5px;
    display: flex;
    align-items: center;
}

.station-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(157, 127, 213, 0.5);
}

.station-freq {
  font-size: 1.8em;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.station-call {
  font-size: 1.3em;
  font-weight: bold;
  color: #ffd700;
}

.station-format {
  font-size: 1em;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.station-desc {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
    font-weight: bold;
    padding: 0px 10px;
    background: #6d0450;
    border: #600948 2px solid;
    align-self: center;
    margin-left: auto !important;
}
/* Scrollbar styling for modal */
.modal-container::-webkit-scrollbar {
  width: 10px;
}

.modal-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.modal-container::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ff6b9d 0%, #9d7fd5 100%);
  border-radius: 10px;
}

.modal-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #ff8cb5 0%, #b599ed 100%);
}

@media (max-width: 768px) {
  .stations-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .station-card {
    padding: 8px;
    font-size: 0.85em;
  }
  
  .station-card div {
    margin: 0 3px;
  }
  
  .station-freq {
    font-size: 1.3em;
  }
  
  .station-call {
    font-size: 1em;
  }
  
  .station-format {
    font-size: 0.8em;
  }
  
  .station-desc {
    font-size: 0.75em;
    padding: 4px 6px;
  }
}
