/* Reset some default styles */
body, h1, h2, h3, p, figure, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}

button {
  width: 90px;
  height: 40px;
  color: white;
  background-color: #003366;
  font-size: 1em;
  border-radius: 5px;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: inherit;
  transition: all 0.3s ease; /* Added smooth transitions */
}

button:hover {
  background-color: #004d99;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Header styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 51, 102, 0.95); /* Semi-transparent background */
  backdrop-filter: blur(10px); /* Glass effect */
  color: white;
  padding: 5px 20px;
  padding-left: 1px;
  padding-right: 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border */
}

#worldmap {
  background-image: url("wordMap-white.png");
  background-repeat: no-repeat;
  background-size: 100%;
  opacity: 0.3; /* Slightly more visible */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

#logo img {
  width: 90px;
  margin-right: 10px;
  border-radius: 8px; /* Rounded corners */
  transition: transform 0.3s ease;
}

#logo img:hover {
  transform: scale(1.05); /* Subtle hover effect */
}

#logo {
  display: flex;
  align-items: center;
  z-index: 2;
}

#logo span {
  color: white;
  font-size: 1.1em;
  vertical-align: middle;
}

.appName {
  font-size: 1.2em;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* Text shadow for depth */
}

#language-selector {
  z-index: 3;
  position: relative;
  margin-left: auto;
  color: #30DD45;
  font-size: 1.0em;
}

#language-selector select {
  padding: 8px 12px; /* Increased padding */
  border-radius: 8px; /* More rounded */
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #000;
  font-size: 1.0em;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  cursor: pointer;
}

#language-selector select:hover {
  border-color: #30DD45;
  background: white;
  transform: translateY(-1px);
}

#language-selector select:focus {
  outline: none;
  border-color: #30DD45;
  box-shadow: 0 0 0 3px rgba(48, 221, 69, 0.2);
}

/* Search bar styles */
#search-bar {
  padding: 8px;
  background: rgba(0, 51, 102, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  margin: 0px 0;
  position: fixed;
  left: 0px;
  right: 0px;
  top: 100px;
  z-index: 5;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#search-bar input {
  padding: 12px 16px; /* Increased padding */
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px; /* More rounded */
  margin-right: 8px;
  width: 100%;
  max-width: 320px;
  font-size: 1.0em;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}

#search-bar input:focus {
  outline: none;
  border-color: #30DD45;
  background: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#search-bar input::placeholder {
  color: #666;
}

#search-bar button {
  padding: 12px 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.9);
  color: #003366;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#search-bar button:hover {
  background: white;
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#radio-container.loaded {
  opacity: 1;
}


.station-card {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px; /* More rounded */
  padding: 20px; /* Increased padding */
  background: rgba(255, 255, 255, 0.95); /* Semi-transparent white */
  backdrop-filter: blur(10px); /* Glass effect */
  width: 400px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); /* Enhanced shadow */
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth easing */
  position: relative;
  overflow: hidden;
}

/* Add a subtle top border that animates on hover */
.station-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4CAF50, #45a049);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.station-card:hover {
  transform: translateY(-8px); /* Increased lift effect */
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
  border-color: rgba(76, 175, 80, 0.3);
}

.station-card:hover::before {
  transform: scaleX(1);
}

/* Special styling for currently playing station */
.station-card.playing {
  background: rgba(76, 175, 80, 0.1);
  border-color: #4CAF50;
  box-shadow: 0 8px 32px rgba(76, 175, 80, 0.2);
}

.station-card.playing::before {
  transform: scaleX(1);
}

.station-card img {
  width: 100px;
  height: auto;
  border-radius: 12px; /* More rounded */
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.station-card:hover img {
  transform: scale(1.05); /* Subtle zoom on hover */
}

.station-info-wrapper {
  display: flex;
  align-items: center;
  flex-grow: 1;
}

.station-image {
  border-radius: 16px; /* Less circular, more modern */
  width: 80px; /* Slightly larger */
  height: 80px;
  margin-right: 16px; /* Increased spacing */
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Added shadow */
  transition: all 0.3s ease;
}

.station-card:hover .station-image {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.station-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left; /* Left-align text for better readability */
}

.station-info h3 {
  margin: 0 0 4px 0; /* Added bottom margin */
  font-size: 1.1em; /* Slightly larger */
  font-weight: 600;
  color: #2c3e50;
}

.station-info p {
  margin: 0;
  font-size: 0.9em;
  color: #7f8c8d; /* Softer gray */
  line-height: 1.4;
}

.play-button {
  padding: 12px 20px; /* Increased padding */
  border: none;
  border-radius: 25px; /* More rounded */
  background: linear-gradient(135deg, #4CAF50, #45a049); /* Gradient background */
  color: white;
  cursor: pointer;
  margin-left: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-weight: 600;
  font-size: 0.95em;
  min-width: 80px; /* Consistent width */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.play-button:hover {
  background: linear-gradient(135deg, #45a049, #3d8b40);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.play-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* Special styling for pause button */
.play-button:contains("Pause") {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* Modal overlay styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal station card */
.station-card.modal-active {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  width: 450px;
  max-width: 80vw;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border: 2px solid #4CAF50;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 2rem;
}

.station-card.modal-active::before {
  transform: scaleX(1);
  background: linear-gradient(90deg, #4CAF50, #2E7D32);
  height: 6px;
}

/* Enhanced modal content */
.station-card.modal-active .station-info-wrapper {
  flex-direction: column;
  text-align: center;
  margin-bottom: 2rem;
}

.station-card.modal-active .station-image {
  width: 200px;
  height: 200px;
  margin: 0 auto 1.5rem auto;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  display: block;
}

.station-card.modal-active .station-info {
  text-align: center;
}

.station-card.modal-active .station-info h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  text-align: center;
  color: #2c3e50;
  font-weight: 700;
}

.station-card.modal-active .station-info p {
  font-size: 1.1rem;
  text-align: center;
  color: #7f8c8d;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.station-card.modal-active .play-button {
  margin: 2rem auto 1rem auto;
  padding: 15px 30px;
  font-size: 1.1rem;
  min-width: 120px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.station-card.modal-active .play-button:hover {
  background: linear-gradient(135deg, #ee5a52, #e04848);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 107, 107, 0.5);
}

/* Now playing text in modal */
.modal-now-playing {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(76, 175, 80, 0.95);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Removed song info CSS - keeping it simple */

/* Modal animations */
@keyframes modalSlideIn {
  from {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

/* Close button for modal */
.modal-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #ddd;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #666;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  font-weight: bold;
}

.modal-close:hover {
  background: white;
  color: #333;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Remove bottom player container since we don't need it anymore */
#player-container {
  display: none;
}

/* Adjust body padding since no bottom player */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #003366 0%, #004d99 100%);

  margin: 0;
  padding: 0;
  font-size: 1em;
  padding-top: 180px;
  min-height: 100vh;
  padding-bottom: 20px; /* Just small padding at bottom instead of 80px for player */
}

/* Update radio container margin */
#radio-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  padding: 20px 20px 0 20px;
  margin-bottom: 40px; /* Reduced since no bottom player */
  /* margin-top: 20px; */
}

#audio-player {
  float: right;
  padding: 5px;
  width: 100%;
  max-width: 400px;
  margin: auto;
}

#now-playing {
  max-width: 250px; /* Increased width */
  color: #e8f4fd;
  font-weight: 500; /* Medium weight */
  font-size: 1em;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Bottom play/pause button styling */
#bottom-play-pause {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  border-radius: 25px;
  padding: 8px 16px;
  min-width: 70px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

#bottom-play-pause:hover {
  background: linear-gradient(135deg, #45a049, #3d8b40);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .station-card {
    width: calc(50% - 20px);
    width: 100%;
  }
  
  #search-bar input {
    max-width: 250px;
  }
}

@media (max-width: 480px) {
  .station-card {
    width: 100%;
    padding: 16px;
  }
  
  .station-info-wrapper {
    flex-direction: column;
    text-align: center;
  }
  
  .station-image {
    margin-right: 0;
    margin-bottom: 12px;
  }
  
  .play-button {
    margin-left: 0;
    margin-top: 12px;
  }
  
  #now-playing {
    max-width: 180px;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.buffering-spinner {
  display: flex;
  border: 4px solid rgba(255, 255, 255, .80);
  border-top: 4px solid #184906;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 2s linear infinite;
  justify-content: center;
  top: 50%;
  left: 50%;
}

/* Enhanced audio control styling */
audio::-webkit-media-controls-panel {
  background-color: rgba(44, 62, 80, 0.7) !important;
  color: white !important;
  border-radius: 8px !important;
}

audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display,
audio::-webkit-media-controls-timeline,
audio::-webkit-media-controls-volume-slider {
  filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%);
}

audio::-webkit-media-controls-enclosure {
  background-color: transparent !important;
}

audio::-webkit-media-controls {
  background-color: transparent !important;
}

audio::-webkit-media-controls-mute-button,
audio::-webkit-media-controls-volume-slider-container {
  filter: invert(1);
}

audio::-webkit-media-controls-panel {
  filter: brightness(0) invert(1);
}

audio::-webkit-media-controls-panel {
  filter: hue-rotate(180deg);
}

/* Add a subtle loading animation for when stations are being loaded */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.station-card {
  animation: fadeInUp 0.6s ease-out;
}

/* Stagger the animation for multiple cards */
/*
.station-card:nth-child(1) { animation-delay: 0.1s; }
.station-card:nth-child(2) { animation-delay: 0.2s; }
.station-card:nth-child(3) { animation-delay: 0.3s; }
.station-card:nth-child(4) { animation-delay: 0.4s; }
.station-card:nth-child(5) { animation-delay: 0.5s; }
.station-card:nth-child(6) { animation-delay: 0.6s; }
*/

/* Modal Chat Button Styles */
.modal-chat-button {
  position: absolute;
bottom: 20px;
right: 20px;
transform: none;
  background: #007bff;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
  transition: all 0.3s ease;
  z-index: 1002;
  backdrop-filter: blur(10px);
}

.modal-chat-button:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 123, 255, 0.5);
  color: white;
  text-decoration: none;
}

.modal-chat-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

.modal-chat-button i {
  font-size: 22px;
}


