.radio-player {
  max-width: var(--max-width-sm);
  width: 100%;
  margin: var(--spacing-lg) auto;
  padding: var(--spacing-md);
  background: var(--color-white);
  border-radius: var(--border-radius-m);
  box-shadow: var(--drop-shadow-1);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-secondary);
}

#ppradio-logo {
  height: auto;
  max-width: 80px;
  max-height: none;
  display: block;
}

.album-line {
  width: 100%;
  overflow: hidden;
  display: block;
}

.album-line h3 {
  margin: 0;
  padding: 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-reg);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.album-line h3 a {
  display: inline-block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-row {
  display: flex;
  gap: var(--spacing-sm);
}

.cover {
  width: var(--album-cover);
  height: var(--album-cover);
  flex-shrink: 0;
  border: 1px solid var(--color-secondary);
  border-radius: var(--border-radius-sm);
  background-color: var(--color-white);
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: var(--spacing-xs);
}


.info-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.titles h2,
.titles h3,
.album-line h3,
.album-line h3 a,
#album-name {
  white-space: normal !important;
  overflow-wrap: break-word;
  word-break: break-word;
  overflow: visible;
  text-overflow: unset;
}


.titles h2 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: var(--border-radius-sm);
  background-color: var(--color-white);
  padding: var(--spacing-xxs);
}

.titles h3 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-reg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: var(--border-radius-sm);
  background-color: var(--color-white);
  padding: var(--spacing-xxs);
  border: 1px solid transparent;
}

.titles h3:hover {
  color: var(--color-white);
}

.titles h2,
.titles h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  margin: 0;
}

#artist-name,
#album-name {
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  color: var(--color-dark);
  text-decoration: none;
}

#artist-name:hover,
#album-name:hover {
  color: var(--color-third);
  text-decoration: none;
}

#album-name {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.platform-links {
  display: flex;
  gap: var(--spacing-xs);
  align-items: center;
  margin-top: var(--spacing-xs);

  /* reserve enough space for one row of icons: */
  min-height: 2.25rem;
}

/* Fix album name wrapping + ellipsis */
.titles {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.titles h3 {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.titles h3 a {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.platform-links img {
  width: var(--icon-size-reg);
  height: var(--icon-size-reg);
  object-fit: contain;
}

#volume-slider {
  width: 20rem; /* Or whatever fixed width you want */
  max-width: 100%;
  margin: 1rem auto; /* center it if needed */
  display: block;
}

.progress-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

#progress-bar {
  width: 100%;
  height: .25rem;
  border-radius: var(--border-radius-xs);
}

#time-display {
  font-family: var(--font-code);
  font-size: var(--font-size-xs);
  text-align: right;
  color: var(--color-dark);
  margin: .5rem;
}

.radio-controls-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.controls {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

.controls button {
  background: none;
  border: none;
  color: var(--color-dark);
  font-size: var(--font-size-xl);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.controls button:hover {
  transform: scale(1.2);
}

.radio-tags {
  display: flex;
  gap: var(--spacing-xs);
}

.tag-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-sm);
  font-family: var(--font-heading);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-rg);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-xl);
  border: 1px solid #ccc;
  background-color: var(--color-white);
  color: var(--color-secondary);
  cursor: pointer;
  transition: 0.3s;
}




.tag-button .material-icons {
  font-size: 18px;
  line-height: 1;
  vertical-align: middle;
}

.tag-button:hover {
  background-color: #e0e0e0;
}

.tag-button.active {
  text-transform: uppercase;
  font-weight: var(--font-weight-bold);
  background-color: var(--color-dark);
  color: white;
  border-color: var(--color-dark);
}


.content-about .material-icons {
  font-size: 20px;
  vertical-align: center;
  display: inline-block;
  position: relative;
  top: 2px;
}

/* -- Lyrics Style */

#lyrics-container {
  margin-top: var(--spacing-md);
  text-align: center;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

#toggle-lyrics {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-sm);
  font-family: var(--font-heading);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-rg);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius-xl);
  border: 1px solid #ccc;
  background-color: var(--color-white);
  color: var(--color-secondary);
  cursor: pointer;
  transition: background 0.3s ease;
  gap: 6px;
}

#toggle-lyrics:hover {
  background-color: #e0e0e0;
}

#toggle-lyrics .material-icons {
  font-size: 18px;
  vertical-align: middle;
  line-height: 1;
  position: relative;
  top: 1px;
}

#lyrics-box {
  overflow-y: auto;
  padding: var(--spacing-sm) var(--spacing-md);
  margin-top: var(--spacing-sm);
  background: var(--color-white);
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius-md);
  font-size: 0.9rem;
  color: #111;
  white-space: pre-wrap;
  text-align: left;
  display: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  width: 100%;
  box-sizing: border-box;
}

#lyrics-text {
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 600px) {
  #toggle-lyrics {
    font-size: 0.8rem;
    padding: var(--spacing-xs) var(--spacing-sm);
  }

  #lyrics-box {
    font-size: 0.85rem;
    padding: var(--spacing-xs) var(--spacing-sm);
  }

  #lyrics-text {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .tag-button {
    font-size: 0.75rem;
    padding: 4px 8px;
    gap: 4px;
    min-width: unset;
  }

  .tag-button .material-icons {
    font-size: 16px;
  }
}

body.dark-mode #toggle-lyrics {
  background-color: var(--color-black);
  color: var(--color-white);
  border-color: #444;
}

body.dark-mode #toggle-lyrics:hover {
  background-color: #222;
}

body.dark-mode #lyrics-box {
  background: #111;
  border-color: #333;
  color: #f0f0f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

body.dark-mode #lyrics-text {
  color: #f0f0f0;
}

/* === Radio Legend Styling === */
.radio-legend-container {
  max-width: var(--max-width-sm);
  width: 100%;
  margin: var(--spacing-lg) auto;
  padding: 0 var(--spacing-md);
}

.radio-legend {
  background: var(--color-white);
  border-radius: var(--border-radius-l);
  padding: var(--spacing-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.radio-legend h3 {
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-dark);
  margin: 0 0 var(--spacing-md) 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-sm);
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

/* Desktop: make legend much smaller */
@media (min-width: 769px) {
  .legend-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
  }
  
  .legend-item {
    padding: var(--spacing-xs);
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-xs);
  }
  
  .legend-icon {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .legend-icon .material-icons,
  .legend-icon .material-symbols-outlined {
    font-size: 0.875rem;
  }
  
  .legend-label {
    font-size: 0.75rem;
  }
  
  .legend-desc {
    font-size: 0.625rem;
    line-height: 1.2;
  }
  
  .radio-legend {
    padding: var(--spacing-sm);
  }
  
  .radio-legend h3 {
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-sm);
  }
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  border-radius: var(--border-radius-m);
  background: var(--color-off-white);
  transition: all 0.3s ease;
}

.legend-item:hover {
  background: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.legend-item.active {
  background: var(--color-dark);
  color: var(--color-white);
}

.legend-item.active .legend-label {
  color: var(--color-white);
}

.legend-item.active .legend-desc {
  color: var(--color-off-white);
}

.legend-item.active .legend-icon {
  background: var(--color-white);
  color: var(--color-dark);
}

.legend-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-dark);
  color: var(--color-white);
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-icon .material-icons,
.legend-icon .material-symbols-outlined {
  font-size: 1.25rem;
}

.legend-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.legend-label {
  font-family: var(--font-heading);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-dark);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-xs);
}

.legend-desc {
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  color: var(--color-secondary);
  line-height: 1.3;
}

/* Dark mode legend styling */
body.dark-mode .radio-legend {
  background: var(--color-dark-mode);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

body.dark-mode .radio-legend h3 {
  color: var(--color-white);
}

body.dark-mode .legend-item {
  background: var(--color-dark);
}

body.dark-mode .legend-item:hover {
  background: var(--color-dark-mode);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

body.dark-mode .legend-item.active {
  background: var(--color-white);
  color: var(--color-dark);
}

body.dark-mode .legend-item.active .legend-label {
  color: var(--color-dark);
}

body.dark-mode .legend-item.active .legend-desc {
  color: var(--color-secondary);
}

body.dark-mode .legend-item.active .legend-icon {
  background: var(--color-dark);
  color: var(--color-white);
}

body.dark-mode .legend-icon {
  background: var(--color-white);
  color: var(--color-dark);
}

/* Fix for verified_user icon in dark mode */
body.dark-mode .legend-icon .material-symbols-outlined {
  color: var(--color-dark) !important;
}

/* Specifically target the verified_user icon */
body.dark-mode .legend-item[data-tag="hits-clean"] .legend-icon {
  color: var(--color-dark) !important;
}

body.dark-mode .legend-item[data-tag="hits-clean"] .legend-icon .material-symbols-outlined {
  color: var(--color-dark) !important;
}

/* Clean Hits when active: white icon on dark circle (same as others) */
body.dark-mode .legend-item[data-tag="hits-clean"].active .legend-icon .material-symbols-outlined {
  color: var(--color-white) !important;
}

body.dark-mode .legend-label {
  color: var(--color-white);
}

body.dark-mode .legend-desc {
  color: var(--color-off-white);
}

/* Responsive legend */
@media (max-width: 640px) {
  .legend-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }
  
  .legend-item {
    padding: var(--spacing-xs);
  }
  
  .legend-icon {
    width: 2rem;
    height: 2rem;
  }
  
  .legend-icon .material-icons,
  .legend-icon .material-symbols-outlined {
    font-size: 1rem;
  }
  
  .legend-label {
    font-size: var(--font-size-xs);
  }
  
  .legend-desc {
    font-size: 0.75rem;
  }
}


/* === Dark‐mode overrides for the radio player === */
body.dark-mode .radio-player {
  background: var(--color-dark-mode);
  border: 1px solid var(--color-off-white);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.05);
}


body.dark-mode .radio-player .cover {
  background-color: var(--color-dark-mode);
  border: 1px solid var(--color-off-white);
}

/* Headings & text */
body.dark-mode .radio-player .titles h2,
body.dark-mode .radio-player .titles h3,
body.dark-mode .radio-player #artist-name,
body.dark-mode .radio-player #album-name,
body.dark-mode .radio-player #time-display {
  color: var(--color-white);
}

body.dark-mode .radio-player .titles h2,
body.dark-mode .radio-player .titles h3 {
  background: transparent;      /* remove the white pill */
  border-radius: 0;
}

body.dark-mode .radio-player .titles h3 {
font-weight: var(--font-weight-rg);
}

/* Platform icons */
body.dark-mode .radio-player .platform-links img {
  filter: invert(1);
}

body.dark-mode .radio-player #artist-name:hover,
body.dark-mode .radio-player #album-name:hover {
  color: var(--color-primary);
}


/* Playback controls */
body.dark-mode .radio-player .controls button {
  color: var(--color-off-white);
}
body.dark-mode .radio-player .controls button:hover {
  color: var(--color-primary);
}

/* Tag buttons */
body.dark-mode .radio-player .tag-button {
  background: transparent;
  color: var(--color-off-white);
  border: 1px solid var(--color-off-white);
}
body.dark-mode .radio-player .tag-button:hover {
  background: var(--color-secondary);
  color: var(--color-white);
}
body.dark-mode .radio-player .tag-button.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* === Close the gap between title / artist / album lines === */
body.dark-mode .radio-player .titles h2,
body.dark-mode .radio-player .titles h3 {
  margin: 0; 
  padding: var(--spacing-xxs);        
}

@media (max-width: 640px) {
  .radio-player {
    padding: 1rem;
    gap: 1rem;
    margin: 2rem;
    width: 80%;
  }
  
  .radio-legend-container {
    padding: 1rem;
    margin: 2rem;
    width: 80%;
  }

  #ppradio-logo {
    margin: 10px;
    max-width: 5rem;
  }
  

  .top-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    display: flex;
    gap: 1.5rem;
    min-width: 0; 
  }


  .cover {
    width: auto;
    height: 100%;
  }

  .info-controls {
    align-items: center;
    min-width: 0;
  }
  

  .titles {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow: hidden;
  }

  .titles h2,
  .titles h3 {
    word-break: break-word;
    overflow-wrap: break-word;
  }
  
  .radio-controls-bar {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
  }

  .controls {
    justify-content: center;
  }

  .radio-tags {
    justify-content: center;
  }

    /* Fix album name wrapping + ellipsis */
  .titles {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .titles h3 {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .titles h3 a {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #volume-slider {
    width: 10rem; /* Or whatever fixed width you want */
    max-width: 100%;
  }
}