:root {
  --primary-color: #00ff00;
  --background-color: #000000;
  --text-color: #ffffff;
  --cancion-color: #3498db;
  --accent-color: #ff00ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: hidden; /* Prevent horizontal scroll */
  width: 100%;
  max-width: 100%;
  font-family: 'Roboto', 'Segoe UI', 'Arial', sans-serif;
  background: var(--background-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#laser-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.title {
  font-size: clamp(1.5em, 5vw, 3em); /* Responsive font size between 1.5em and 3em */
  text-align: center;
  margin-top: 0;
  text-shadow: 0 0 10px var(--primary-color);
  animation: glow 2s ease-in-out infinite alternate;
  padding: 0 15px;
  width: 100%;
  word-wrap: break-word;
}

.subtitle {
  font-size: clamp(1em, 3vw, 1.5em); /* Responsive font size between 1em and 1.5em */
  text-align: center;
  margin: -2px 0 1em 0;
  color: #ffff00;
  padding: 0 3px;
  width: calc(100% -30px); /* Account for padding */
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  animation: slideText 20s linear infinite;
}

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

.stream-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: calc(100% - 30px);
  padding: 0 15px;
  margin-top: -27px; /* Changed from -30px to -27px to add 3px spacing */
  box-sizing: border-box;
}

.stream-info a.cc_streaminfo {
  display: block;
  font-size: clamp(1em, 2.5vw, 1.4em);
  text-align: center;
  color: var(--cancion-color);
  text-decoration: none;
  padding: 0 5px;
  width: 100%;
  max-width: 800px;
  margin: -5px auto; /* Changed from -7px to -5px to move down 2px */
  overflow-wrap: break-word;
  word-wrap: break-word;
  -ms-word-break: break-all;
  word-break: break-word;
  line-height: 1.4;
}

.stream-info a.cc_streaminfo:hover {
  color: var(--primary-color);
  transition: color 0.3s ease;
}
  
.cc_streaminfo[data-type="trackimageurl"] {
  max-width: 300px; /* Changed from 400px to 300px to make it smaller */
  width: 90%; /* Changed from 90% to 80% to make it proportionally smaller */
  height: auto;
  display: block;
  margin: -2px auto 0.5em auto; /* Changed from -5px to -2px to add 3px spacing */
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

/* Add responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .cc_streaminfo[data-type="trackimageurl"] {
    max-width: 250px;
    width: 70%;
  }
}

@media (max-width: 480px) {
  .cc_streaminfo[data-type="trackimageurl"] {
    max-width: 200px;
    width: 60%;
  }
}

.listeners-count {
  margin: 0;
  margin-left: 10px; /* Add 10px margin to the left to move it right */
  color: #00ff00;
  text-shadow: 0 0 10px #00ff00;
  font-weight: bold;
  padding: 0.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px; /* Add minimum width to ensure consistent spacing */
}

.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
  width: 90%;
  max-width: 500px; /* Increased max-width for larger screens */
  margin: 2em auto 1em auto;
  padding: 0 15px;
}

/* Update the volume icon styles */
.volume-icon {
  width: 24px;
  height: 24px;
  fill: #3498db;
  filter: drop-shadow(0 0 3px #3498db);
  transition: all 0.3s ease;
  padding: 2px;
  border-radius: 50%;
  background: rgba(52, 152, 219, 0.1);
  box-shadow: 
    0 0 5px rgba(52, 152, 219, 0.2),
    inset 0 0 5px rgba(52, 152, 219, 0.1);
}

.volume-icon:hover {
  fill: #2980b9;
  cursor: pointer;
  transform: scale(1.1);
  filter: drop-shadow(0 0 5px #3498db);
  background: rgba(52, 152, 219, 0.2);
  box-shadow: 
    0 0 8px rgba(52, 152, 219, 0.3),
    inset 0 0 8px rgba(52, 152, 219, 0.2);
}

/* Add active state for when volume is at zero */
.volume-icon.muted {
  fill: #e74c3c;
  filter: drop-shadow(0 0 3px #e74c3c);
  background: rgba(231, 76, 60, 0.1);
  box-shadow: 
    0 0 5px rgba(231, 76, 60, 0.2),
    inset 0 0 5px rgba(231, 76, 60, 0.1);
}

.volume-icon.muted:hover {
  fill: #c0392b;
  filter: drop-shadow(0 0 5px #e74c3c);
  background: rgba(231, 76, 60, 0.2);
  box-shadow: 
    0 0 8px rgba(231, 76, 60, 0.3),
    inset 0 0 8px rgba(231, 76, 60, 0.2);
}

.volume-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5em, 1vw, 0.8em); /* Reduced from clamp(1em, 2vw, 1.5em) */
  width: 100%;
  padding: 0 clamp(10px, 2vw, 20px);
  margin: clamp(8px, 1.5vw, 12px) 0;
  margin-top: -15px;
  margin-left: 20px;
}

#volumeSlider {
  flex: 1;
  max-width: clamp(300px, 50vw, 400px);
  min-width: clamp(200px, 40vw, 300px);
  margin-left: 5px; /* Reduced from 10px */
  height: clamp(6px, 1vw, 8px); /* Reduced from clamp(10px, 1.5vw, 14px) */
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to bottom, 
    rgba(52, 152, 219, 0.8) 0%,
    #3498db 50%,
    rgba(41, 128, 185, 0.9) 100%
  );
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 2px 4px rgba(52, 152, 219, 0.3),
    0 4px 8px rgba(52, 152, 219, 0.2);
}

#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: clamp(16px, 2.5vw, 22px); /* Reduced from clamp(20px, 3vw, 28px) */
  height: clamp(16px, 2.5vw, 22px); /* Reduced from clamp(20px, 3vw, 28px) */
  border-radius: 50%;
  background: linear-gradient(145deg, 
    #3498db,
    #2980b9
  );
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 0 10px rgba(52, 152, 219, 0.6),
    0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

#volumeSlider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 
    0 0 15px rgba(52, 152, 219, 0.8),
    0 4px 8px rgba(0, 0, 0, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

#volumeSlider::-moz-range-thumb {
  width: clamp(16px, 2.5vw, 22px); /* Reduced from clamp(20px, 3vw, 28px) */
  height: clamp(16px, 2.5vw, 22px); /* Reduced from clamp(20px, 3vw, 28px) */
  border-radius: 50%;
  background: linear-gradient(145deg, 
    #3498db,
    #2980b9
  );
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 0 10px rgba(52, 152, 219, 0.6),
    0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

#volumeSlider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 
    0 0 15px rgba(52, 152, 219, 0.8),
    0 4px 8px rgba(0, 0, 0, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

#volumeSlider::-moz-range-track {
  height: clamp(6px, 1vw, 8px); /* Reduced from clamp(10px, 1.5vw, 14px) */
  background: linear-gradient(to bottom, 
    rgba(52, 152, 219, 0.8) 0%,
    #3498db 50%,
    rgba(41, 128, 185, 0.9) 100%
  );
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 2px 4px rgba(52, 152, 219, 0.3),
    0 4px 8px rgba(52, 152, 219, 0.2);
}

.play-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1em, 3vw, 2em); /* Responsive gap */
  width: 100%;
  margin-left: 0; /* Remove the previous -10px margin */
}

@keyframes pulseGlow {
  0% {
    transform: scale(1);
    box-shadow: 0 0 15px var(--primary-color);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--primary-color), 0 0 40px var(--primary-color);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 15px var(--primary-color);
  }
}

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

#playBtn {
  background: none;
  border: none;
  cursor: pointer;
  width: clamp(80px, 12vw, 100px);
  height: clamp(80px, 12vw, 100px);
  padding: clamp(12px, 2vw, 16px);
  border-width: clamp(4px, 0.6vw, 6px);
  border-radius: 50%;
  border: 4px solid transparent;
  transition: all 0.3s ease;
  position: relative;
}

#playBtn::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: linear-gradient(45deg, #00ff00, #00ffff, #ff00ff, #ffff00, #00ff00);
  border-radius: 50%;
  animation: spinGradient 4s linear infinite;
  z-index: -1;
}

#playBtn::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: var(--background-color);
  border-radius: 50%;
  z-index: -1;
}

#playBtn:not(.paused) {
  animation: pulseGlow 2s infinite ease-in-out;
}

#playBtn:not(.paused)::before {
  animation: spinGradient 4s linear infinite;
}

#playBtn.paused::before {
  animation: none;
}

#playBtn:hover {
  transform: scale(1.15);
}

#playBtn svg {
  width: 100%;
  height: 100%;
  fill: var(--primary-color);
  filter: drop-shadow(0 0 5px var(--primary-color));
  z-index: 1;
  position: relative;
}

#playBtn .play-icon {
  display: none;
}

#playBtn .pause-icon {
  display: block;
}

#playBtn.paused .play-icon {
  display: block;
}

#playBtn.paused .pause-icon {
  display: none;
}

.on-air-signal {
  padding: 0.4em 0.8em;
  border-radius: 16px;
  font-weight: bold;
  text-transform: uppercase;
  transition: all 0.3s ease;
  margin-left: 0;
  font-size: 0.9em;
  background-color: #ff0000; /* Red background */
  color: #ffffff; /* White text */
  text-shadow: 
    0 0 7px #fff,
    0 0 10px #fff,
    0 0 21px #fff,
    0 0 42px #ff0000,
    0 0 82px #ff0000,
    0 0 92px #ff0000,
    0 0 102px #ff0000,
    0 0 151px #ff0000;
  box-shadow: 
    0 0 10px #ff0000,
    inset 0 0 10px #ff0000,
    0 0 20px rgba(255, 0, 0, 0.5),
    inset 0 0 20px rgba(255, 0, 0, 0.5);
  animation: neonPulse 1.5s ease-in-out infinite;
  border: 2px solid rgba(255, 255, 255, 0.5);
  position: relative;
  background: linear-gradient(
    to bottom,
    #ff0000,
    #cc0000
  );
}

/* Add new keyframes animation for neon effect */
@keyframes neonPulse {
  0% {
    text-shadow: 
      0 0 7px #fff,
      0 0 10px #fff,
      0 0 21px #fff,
      0 0 42px #ff0000,
      0 0 82px #ff0000,
      0 0 92px #ff0000,
      0 0 102px #ff0000,
      0 0 151px #ff0000;
    box-shadow: 
      0 0 10px #ff0000,
      inset 0 0 10px #ff0000,
      0 0 20px rgba(255, 0, 0, 0.5),
      inset 0 0 20px rgba(255, 0, 0, 0.5);
  }
  50% {
    text-shadow: 
      0 0 4px #fff,
      0 0 7px #fff,
      0 0 15px #fff,
      0 0 30px #ff0000,
      0 0 60px #ff0000,
      0 0 70px #ff0000,
      0 0 80px #ff0000,
      0 0 100px #ff0000;
    box-shadow: 
      0 0 15px #ff0000,
      inset 0 0 15px #ff0000,
      0 0 30px rgba(255, 0, 0, 0.7),
      inset 0 0 30px rgba(255, 0, 0, 0.7);
  }
  100% {
    text-shadow: 
      0 0 7px #fff,
      0 0 10px #fff,
      0 0 21px #fff,
      0 0 42px #ff0000,
      0 0 82px #ff0000,
      0 0 92px #ff0000,
      0 0 102px #ff0000,
      0 0 151px #ff0000;
    box-shadow: 
      0 0 10px #ff0000,
      inset 0 0 10px #ff0000,
      0 0 20px rgba(255, 0, 0, 0.5),
      inset 0 0 20px rgba(255, 0, 0, 0.5);
  }
}

/* Update the inactive state */
.on-air-signal.inactive {
  background: linear-gradient(
    to bottom,
    #333333,
    #222222
  );
  animation: none;
  opacity: 0.7;
  box-shadow: none;
  text-shadow: none;
  color: #666666;
  border-color: #444444;
}

.recent-tracks-title {
  width: 90%;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  height: 35px; /* Increased from 25px to fit larger text */
  margin-bottom: 1em;
  margin-top: 10px; /* Changed from 15px to 10px to move up 5px */
}

.recent-tracks-title span strong {
  font-size: 1.2em; /* Increase font size */
  color: #00ff00; /* Bright green color */
  text-shadow: 0 0 10px #00ff00; /* Add glow effect */
}

.recent-tracks-container {
  margin-top: -7px; /* Changed from -2px to -7px to move up 5px */
  width: 90%;
  max-width: 500px; 
  margin-left: auto;
  margin-right: auto;
  position: relative;
  overflow: hidden;
}

/* Update the media queries to maintain consistent spacing */
@media (max-width: 768px) {
  .recent-tracks-container {
    width: 95%;
    height: 200px;
    margin-top: -7px; /* Changed from -2px to -7px */
  }
}

@media (max-width: 480px) {
  .recent-tracks-container {
    width: 98%;
    height: 150px;
    margin-top: -7px; /* Changed from -2px to -7px */
  }
}

.recent-tracks-container .recent-tracks-marquee {
  width: 100%;
  display: block;
  margin: 0 auto;
}

.recent-tracks-container .cc_recenttracks_list {
  padding: 0.5em;
  text-align: Left;
  width: 100%;
}

.cc_recenttracks_list {
  color: var(--text-color);
  font-size: 0.9em;
  line-height: 1.5;
  padding: 0.5em;
}

/* Media queries for responsive design */
@media (max-width: 768px) {
  footer {
    padding: 1.25em;
  }
}

@media (max-width: 480px) {
  footer {
    padding: 1em;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
  }
}

@media (max-width: 320px) {
  .controls {
    padding: 0 5px;
    gap: 0.6em;
  }
  
  #volumeSlider {
    min-width: 100px;
  }
  
  .volume-percent {
    font-size: 0.8em;
  }
  
  #playBtn {
    width: 60px; /* Increased from 50px */
    height: 60px; /* Increased from 50px */
    padding: 8px; /* Increased from 6px */
  }
}

.volume-percent {
  color: #3498db;
  text-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

footer {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 2em;
  margin-bottom: 1em;
  padding: 1.5em 15px;
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  font-family: 'Roboto', 'Segoe UI', 'Arial', sans-serif;
  position: relative;
  left: 0;
  right: 0;
}

footer p {
  color: #ffff00;
  font-size: clamp(0.75rem, 2vw, 1rem);
  margin: 0 auto;
  max-width: 90%;
  line-height: 1.5;
  text-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
}

/* Add responsive styles for footer */
@media (max-width: 768px) {
  footer {
    padding: 1.25em;
  }
}

@media (max-width: 480px) {
  footer {
    padding: 1em;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
  }
}

.timer-container {
  display: flex;
  align-items: center;
  margin-left: 1em;
}

.moon-icon {
  width: 32px; /* Increased from 24px */
  height: 32px; /* Increased from 24px */
  fill: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.moon-icon:hover {
  fill: #ffff00;
  filter: drop-shadow(0 0 7px #ffff00); /* Increased shadow to match larger size */
}

.timer-status {
  display: none;
  color: #ffff00;
  font-size: 0.9em;
  margin-left: 10px;
}

.timer-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid #00ff00;
  border-radius: 10px;
  padding: 20px;
  z-index: 1000;
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
  max-width: 90%;
  width: 300px;
}

.timer-modal.active {
  display: block;
}

.timer-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin: 15px 0;
}

.timer-option {
  background: none;
  border: 2px solid #00ff00;
  color: #00ff00;
  padding: 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.timer-option:hover {
  background: #00ff00;
  color: #000000;
}

.timer-modal h3 {
  color: #00ff00;
  text-align: center;
  margin-bottom: 15px;
}

/* Update the close modal button styles */
.close-modal {
  position: absolute;
  right: 2px;
  top: 2px;
  background: none;
  border: none;
  color: #3498db; /* Match volume control blue */
  font-size: 24px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.close-modal:hover {
  color: #2980b9;
  transform: scale(1.1);
  text-shadow: 0 0 10px rgba(52, 152, 219, 0.8);
}

@media (max-width: 480px) {
  .timer-modal {
    width: 90%;
  }
  
  .timer-options {
    grid-template-columns: repeat(2, 1fr);
  }
}