/* === RESET & GENERAL STYLES === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  background-color: #141414;
  color: #fff;
  line-height: 1.5;
}

/* === LOADING SPINNER (Shown on initial page load) === */
.loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Above all content */
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Hide spinner with smooth fade-out */
.loading-spinner.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: gold; /* Accent color */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* === HEADER (SITE NAVIGATION BAR) === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: #141414;
  height: 80px;
  transition: height 0.3s ease;
  display: flex;
  align-items: center;
  padding: 0 20px;
  overflow: visible;
}

/* Compact header when user scrolls down (desktop only) */
.header.scrolled {
  height: 55px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
}

/* Logo: shrinks smoothly on scroll */
.logo svg {
  height: 70px;
  width: auto;
  display: block;
  transition: height 0.3s ease;
  flex-shrink: 0;
  transform: translateY(4px); /* Optical alignment tweak */
}

.header.scrolled .logo svg {
  height: 40px;
  transform: translateY(0);
}

/* Hamburger menu button (mobile toggle) */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  border-radius: 4px;
  z-index: 1001;
  height: 70px; /* Matches header height */
}

.header.scrolled .menu-toggle {
  height: 40px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: white;
  margin: 2px 0;
  transition: 0.3s;
  /* Hamburger lines will animate in JS on open */
}

/* === MOBILE MENU (SLIDE-DOWN ON SMALL SCREENS) === */
.mobile-menu {
  position: fixed;
  top: 80px; /* Below header */
  left: 0;
  right: 0;
  background-color: #1e1e1e;
  border-bottom: 1px solid #333;
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.mobile-menu.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Three-column layout for menu items */
.menu-columns {
  display: flex;
  padding: 20px;
  gap: 40px;
  min-width: 700px;
  max-width: 1000px;
  margin: 0 auto;
}

.menu-column {
  flex: 1;
  min-width: 180px;
}

.menu-column h3 {
  color: white;
  font-family: 'Roboto Slab', serif;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 2px solid gold; /* Accent underline */
}

.menu-column ul {
  list-style: none;
}

.menu-column li {
  margin-bottom: 8px;
}

.menu-column a {
  color: #aaa;
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.2s;
}

.menu-column a:hover {
  color: white;
}

.menu-column a svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Footer of mobile menu: social media icons */
.menu-footer {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 15px 0;
  border-top: 1px solid #333;
}

.menu-footer .social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  transition: opacity 0.2s ease;
  color: #999;
  text-decoration: none;
}

.menu-footer .social-link:hover {
  opacity: 1;
}

.menu-footer .social-link svg {
  fill: #999;
  width: 24px;
  height: 24px;
  transition: fill 0.2s ease;
}

.menu-footer .social-link:hover svg {
  fill: #FFA500; /* Orange-gold hover color */
}

/* Overlay to dim main content when mobile menu is open */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  display: none;
  transition: opacity 0.3s ease;
}

.overlay.active {
  display: block;
  opacity: 1;
}

/* Right side of header: "Donate" and "Contact" buttons */
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.premium-link,
.login-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 4px;
  transition: color 0.2s ease;
  background: none;
}

.premium-link:hover,
.login-link:hover {
  color: gold;
}

.premium-link svg,
.login-link svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  width: 18px;
  height: 18px;
  transition: stroke 0.2s ease;
}

/* === RADIO PLAYER (FIXED AT BOTTOM) === */
main {
  padding-top: 100px; /* Prevent content from hiding under fixed header */
}

.player {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: #222;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  color: white;
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  border-top: 1px solid #333;
  box-sizing: border-box;
}

.play-btn-wrapper {
  display: flex;
  align-items: center;
}

/* Play/Pause button with ripple animation */
.play-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(45deg, gold, gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  outline: none;
  color: white;
  font-size: 20px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

/* Animated ripple effect behind button */
.play-btn::before {
  content: '';
  position: absolute;
  top: -15px;
  left: -15px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(45deg, gold, gold);
  animation: wave 2s infinite ease-out;
  opacity: 0.5;
  z-index: -1;
}

@keyframes wave {
  0% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.5); opacity: 0.2; }
  100% { transform: scale(1); opacity: 0.5; }
}

.play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
  background: linear-gradient(45deg, gold, gold);
}

/* Play/Pause icons (only one visible at a time) */
.play-btn .play-icon,
.play-btn .pause-icon {
  position: absolute;
  pointer-events: none;
  width: 30px;
  height: 30px;
}

.play-btn .pause-icon {
  display: none;
}

/* Volume control icons (mute/unmute) */
.volume-icon {
  width: 24px;
  height: 24px;
  cursor: pointer;
  fill: #7a7a7a;
  transition: fill 0.2s ease;
}

.volume-icon:hover {
  fill: #999;
}

.volume-icon svg {
  width: 100%;
  height: 100%;
}

/* Main "Now Playing" info section */
.playing-now {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
  justify-content: center;
  min-width: 0; /* Enables text truncation */
}

.left-side {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

/* Station logo (hidden on mobile) */
.radio-logo {
  width: 50px;
  height: 50px;
  border-radius: 4px;
  object-fit: contain;
  background: #222;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.1);
  margin-left: -5px;
}

/* Station name link */
.radio-name {
  font-family: 'Roboto Slab', serif;
  font-weight: 700;
  font-size: 16px;
  color: white;
  text-decoration: none;
  transition: color 0.2s ease;
}

.radio-name:hover {
  color: gold;
}

/* Heart icon for favorites */
.heart {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
}

.heart svg {
  fill: #aaa;
  transition: fill 0.3s ease;
  pointer-events: none;
}

.heart:hover svg {
  fill: gold;
  transform: scale(1.1);
}

.heart.active svg {
  fill: gold;
}

/* Decorative next-arrow (hidden on mobile) */
.next-arrow {
  width: 21px;
  height: 50px;
  margin-left: 8px;
  cursor: default;
  flex-shrink: 0;
  opacity: 0.6;
}

/* Right side: track info */
.right-side {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.track-container {
  display: flex;
  align-items: center;
  min-width: 0;
}

.track-info {
  display: grid;
  grid-template-columns: 70px 1fr; /* Cover + text */
  gap: 10px;
  align-items: center;
  min-width: 0;
  width: 600px;
}

/* Track artwork (with fallback if image missing) */
.track-cover {
  width: 70px;
  height: 70px;
  border-radius: 4px;
  object-fit: cover;
  background: #333 url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='70' viewBox='0 0 70 70'%3E%3Crect width='70' height='70' fill='%23333'/%3E%3Ctext x='50%25' y='50%25' fill='%23555' font-size='10' text-anchor='middle' dominant-baseline='middle'%3ENO ART%3C/text%3E%3C/svg%3E") no-repeat center center;
  transition: transform 0.3s ease;
}

.track-cover:hover {
  transform: scale(1.05);
}

.track-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.track-display {
  text-align: left;
  line-height: 1.2;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  display: block;
  overflow: hidden;
}

.track-title,
.track-artist {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  width: 100%;
}

.track-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: white;
}

.track-artist {
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: #ccc;
}

.track-display:hover .track-title,
.track-display:hover .track-artist {
  color: gold;
}

/* Placeholder text when no track is loaded (e.g., "JUST DANCE") */
.track-placeholder {
  font-family: 'Roboto Slab', serif;
  font-weight: 700;
  font-size: 16px;
  color: white;
  animation: dance 1.8s infinite ease-in-out;
  white-space: nowrap;
}

@keyframes dance {
  0%, 100% { transform: translateY(0); }
  25%  { transform: translateY(-4px) rotate(-2deg); }
  50%  { transform: translateY(0); }
  75%  { transform: translateY(-4px) rotate(2deg); }
}

/* Custom volume slider */
.volume-control {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.volume-slider-custom {
  position: relative;
  width: 90px;
  height: 4px;
  cursor: pointer;
}

.volume-track {
  width: 100%;
  height: 100%;
  background: #555;
  border-radius: 2px;
  overflow: hidden;
}

.volume-fill {
  height: 100%;
  background: gold;
  width: 10%;
}

.volume-thumb {
  position: absolute;
  top: 50%;
  left: 10%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 2px rgba(0,0,0,0.3);
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 2;
}

/* Scrolling marquee with contact info (hidden on mobile) */
.info-marquee {
  height: 16px;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
  font-family: 'Roboto', sans-serif;
  font-weight: 200;
  font-size: 12px;
  color: #fff;
  padding-left: 8px;
  opacity: 1;
  flex-shrink: 1;
  min-width: 0;
}

.info-marquee-content {
  display: inline-block;
  padding-left: 100%;
  animation: scroll 12s linear infinite;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* === MOBILE RESPONSIVE ADJUSTMENTS === */
@media (max-width: 768px) {
  /* Hide desktop-only elements */
  .mobile-hide {
    display: none !important;
  }

  /* Adjust header for smaller screens */
  .header {
    height: 55px;
    padding: 0 16px;
  }
  .header.scrolled {
    height: 55px;
  }
  .header-right {
    display: none;
  }
  .logo svg {
    height: 26px;
    transform: translateY(0);
  }
  .header.scrolled .logo svg {
    height: 26px;
  }
  .menu-toggle {
    height: 26px;
  }

  /* Position mobile menu below compact header */
  .mobile-menu {
    top: 55px;
  }

  /* Stack menu columns vertically on mobile */
  .menu-columns {
    flex-direction: column;
    padding: 16px;
    gap: 20px;
    min-width: auto;
    max-width: none;
    width: 100%;
  }
  .menu-column h3 {
    font-size: 18px;
    margin-bottom: 12px;
  }
  .menu-column a {
    font-size: 15px;
    gap: 8px;
  }

  /* Adjust player height and padding */
  .player {
    height: 65px;
    padding: 0 8px;
    display: flex;
    align-items: center;
  }

  .play-btn-wrapper {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
  }

  /* Center placeholder text when not playing */
  .player:not(.playing-mobile) .playing-now {
    position: absolute;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
  }

  .player:not(.playing-mobile) .track-placeholder {
    text-align: center;
    animation: dance 1.8s infinite ease-in-out;
    font-size: 16px;
    display: block;
  }

  /* Show real track info when playing on mobile */
  .player.playing-mobile .playing-now {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  .player.playing-mobile .left-side {
    display: none !important;
  }

  .player.playing-mobile .right-side {
    display: block !important;
    margin: 0 !important;
    padding: 0 0 0 8px !important;
    width: auto !important;
    min-width: 0 !important;
    flex: 1 !important;
    text-align: left !important;
  }

  .player.playing-mobile .track-container {
    display: block !important;
    opacity: 1 !important;
    width: 100% !important;
  }

  .player.playing-mobile .track-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100% !important;
    gap: 2px !important;
  }

  .player.playing-mobile .track-title,
  .player.playing-mobile .track-artist {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .player.playing-mobile .track-placeholder {
    display: none !important;
  }

  .track-cover {
    display: none !important;
  }

  /* Disable play button animations during playback on mobile */
  .player.playing-mobile .play-btn:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .player.playing-mobile .play-btn {
    width: 60px;
    height: 60px;
    border-radius: 8px;
  }

  .player.playing-mobile .play-btn::after {
    display: block;
    border-radius: 8px;
  }

  .player.playing-mobile .play-btn::before {
    display: none;
  }

  /* Extra-small screens: reduce font size */
  @media (max-width: 400px) {
    .player.playing-mobile .right-side {
      padding-left: 6px !important;
    }
    .player.playing-mobile .track-title,
    .player.playing-mobile .track-artist {
      font-size: 12px;
    }
  }
}

/* === GLOBAL NOTIFICATION BANNER === */
.notification {
  position: fixed;
  top: 80px;
  right: 20px;
  background-color: #222;
  color: white;
  padding: 15px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  max-width: 300px;
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.notification-content {
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.4;
}

.notification-content strong {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  color: gold;
}

.notification-close {
  position: absolute;
  top: 5px;
  right: 5px;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #aaa;
  transition: color 0.2s;
}

.notification-close:hover {
  color: white;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === CUSTOM SCROLLBAR STYLING (FOR WEBKIT & FIREFOX) === */
* {
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #555 #141414; /* thumb | track */
}

/* WebKit browsers (Chrome, Safari) */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: #141414;
}

*::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 4px;
  border: 2px solid #141414;
}