:root {
  --max-width: 1280px;
  --gutter: 32px;
  --black: #000;
  --white: #fff;
  --grey: #999;
  --dark-grey: #1a1a1a;
  --player-bg-image: url('../imagenes/background-texture.jpg');
  --player-bar-height: 280px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Elms Sans', Arial, Helvetica, sans-serif;
  min-height: 100vh;
}

.col-heading,
.sub-heading,
.footer-logo,
.marquee-track,
.artist-modal-name,
.artist-modal-album {
  font-family: 'Jim Nightshade', serif, cursive;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Masthead / logo */
.masthead {
  text-align: center;
  padding: 40px 0 10px;
}

.logo-image {
  max-width: 480px;
  width: 100%;
  height: auto;
}

/* Tagline bar */
.tagline-bar {
  background: var(--black);
  color: var(--white);
  text-align: center;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 8px 0;
  text-transform: uppercase;
  border-top: 1px solid #222;
  border-bottom: 1px solid #222;
}

/* Nav */
.main-nav {
  background: var(--black);
  border-bottom: 1px solid #222;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.main-nav > .wrap > ul:first-child li a {
  display: block;
  padding: 14px 16px;
  color: var(--white);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 1px;
}

.main-nav > .wrap > ul:first-child li a:hover,
.main-nav > .wrap > ul:first-child li a.active {
  background: var(--dark-grey);
  color: var(--white);
}

/* Hero */
.hero {
  margin-top: 2px;
}

.hero-art {
  height: 320px;
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.9) 100%),
    url('../imagenes/banner-img.jpg') center / cover no-repeat;
  border-top: 1px solid #222;
  border-bottom: 1px solid #222;
}

.hero-caption {
  background: var(--black);
  color: var(--white);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 0;
  text-align: center;
}

/* Two-column content */
.content {
  display: flex;
  gap: 40px;
  margin-top: 30px;
  margin-bottom: 40px;
}

.col-player {
  flex: 1 1 60%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.col-news {
  flex: 1 1 40%;
}

.col-heading {
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
  margin: 0 0 16px;
}

/* Player */
.visualizer-player {
  position: relative;
  display: flex;
  height: var(--player-bar-height);
  overflow: hidden;
  background: #0d0d0d var(--player-bg-image) center / cover no-repeat;
  border: 1px solid #222;
}

.player-art-panel {
  position: relative;
  flex: 0 0 300px;
  border-right: 1px solid #222;
}

.player-vinyl {
  position: absolute;
  top: 14px;
  left: 30%;
  height: calc(100% - 28px);
  aspect-ratio: 1 / 1;
  z-index: 0;
  background-image: url('../imagenes/vinilo.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  animation: spin 6s linear infinite;
  animation-play-state: paused;
}

.player-art-panel.is-playing .player-vinyl {
  animation-play-state: running;
}

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

.player-art {
  position: absolute;
  top: 14px;
  left: 14px;
  height: calc(100% - 28px);
  aspect-ratio: 1 / 1;
  z-index: 1;
  background-color: #0d0d0d;
  background-size: cover;
  background-position: center;
  border: 1px solid #000;
  transition: filter 0.4s ease-out;
}

.player-art.img-loading {
  background: radial-gradient(circle at 40% 30%, #333, #0d0d0d 75%);
  filter: blur(18px) brightness(0.5);
}

.cd-case {
  position: absolute;
  top: 14px;
  left: 14px;
  height: calc(100% - 28px);
  aspect-ratio: 1 / 1;
  z-index: 2;
  background-image: url('../imagenes/cd-case.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  transform: scale(1.05);
  transform-origin: center;
  pointer-events: none;
}

.player-info-panel {
  position: relative;
  flex: 1;
  min-width: 0;
}

.visualizer-canvas {
  position: absolute;
  top: 14px;
  left: 0;
  width: 100%;
  height: calc(100% - 28px);
  z-index: 1;
}

.player-info-top {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 2px 18px 24px;
  background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0) 100%);
}

.player-info-top .marquee-viewport {
  margin-bottom: 4px;
}

.player-info-top .marquee-viewport:last-child {
  margin-bottom: 0;
}

.visualizer-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 2;
  padding: 16px 56px 16px 18px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.75) 45%, rgba(0,0,0,0.9) 100%);
}

.volume-control.vertical {
  position: absolute;
  top: 56px;
  right: 12px;
  bottom: 74px;
  z-index: 3;
  flex-direction: column;
  min-width: 0;
}

.volume-control.vertical .volume-slider {
  flex: 1;
  writing-mode: vertical-lr;
  direction: rtl;
  width: 4px;
  min-width: 0;
}

.marquee-viewport {
  overflow: hidden;
  white-space: nowrap;
  margin-bottom: 14px;
}

.marquee-track {
  display: inline-block;
  font-size: 28px;
  color: var(--white);
}

.marquee-artist {
  display: inline-block;
  font-size: 18px;
  color: var(--grey);
}

.marquee-track.scrolling,
.marquee-artist.scrolling {
  padding-left: 100%;
  animation: marquee 14s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.play-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
}

.play-btn:active {
  transform: scale(0.94);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 100px;
}

.mute-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--white);
  opacity: 0.8;
  cursor: pointer;
  flex-shrink: 0;
  padding: 4px;
  transition: opacity 0.15s ease;
}

.mute-btn:hover {
  opacity: 1;
}

.volume-slider {
  flex: 1;
  min-width: 80px;
  accent-color: var(--white);
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--white);
  background: #ff3b3b;
  border-radius: 20px;
  padding: 4px 10px;
  flex-shrink: 0;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ecc71;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.listeners {
  font-size: 12px;
  color: var(--grey);
  white-space: nowrap;
}

.sub-heading {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--grey);
  margin: 20px 0 0;
}

/* Tracklist */
.tracklist {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  border-top: 1px solid #222;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  scrollbar-color: #444 #0d0d0d;
  scrollbar-width: thin;
}

.tracklist::-webkit-scrollbar {
  width: 8px;
}

.tracklist::-webkit-scrollbar-track {
  background: #0d0d0d;
}

.tracklist::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}

.tracklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  font-size: 13px;
  border-bottom: 1px solid #222;
}

.tracklist li.is-clickable {
  cursor: pointer;
}

.tracklist li.is-clickable:hover {
  background: rgba(255, 255, 255, 0.06);
}

.tracklist li em {
  color: var(--grey);
  font-style: normal;
}

.track-thumb {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  object-fit: cover;
  background: #111;
  border: 1px solid #222;
  filter: blur(0);
  transition: filter 0.4s ease-out;
}

.track-thumb.thumb-loading {
  filter: blur(8px);
}

.track-thumb-placeholder {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: radial-gradient(circle at 40% 40%, #333, #111 75%);
  border: 1px solid #222;
}

/* Chatbox */
.chatbox {
  margin-top: 14px;
  padding: 10px;
  background: #0d0d0d;
  border: 1px solid #222;
}

/* Visitor globe widget */
.globe-widget {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  padding: 10px;
  background: #0d0d0d;
  border: 1px solid #222;
}

.globe-widget iframe {
  display: block;
  max-width: 100%;
}

.chat-messages {
  height: var(--player-bar-height);
  overflow-y: auto;
  padding: 8px;
  background: #000;
  border: 1px solid #222;
}

.chat-msg {
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.4;
}

.chat-msg .author {
  color: #ff3b3b;
  font-weight: 600;
  margin-right: 6px;
}

.chat-msg .author-contact {
  color: var(--grey);
  text-decoration: none;
  margin-right: 6px;
  font-size: 11px;
}

.chat-msg .author-contact:hover {
  color: var(--white);
}

.chat-msg .time {
  float: right;
  font-size: 10px;
  color: var(--grey);
}

.chat-msg .text {
  color: #ddd;
  word-wrap: break-word;
}

.chat-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.chat-form input[type="text"] {
  background: #0d0d0d;
  border: 1px solid #333;
  color: var(--white);
  padding: 8px;
  font-size: 13px;
}

.chat-captcha-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-captcha-img {
  display: block;
  border: 1px solid #333;
  background: #0d0d0d;
}

.chat-captcha-refresh {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid #333;
  color: var(--white);
  font-size: 15px;
  cursor: pointer;
}

.chat-captcha-input {
  width: 64px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.chat-message-row {
  display: flex;
  gap: 6px;
}

/* Honeypot — off-screen for humans, still present in the DOM for bots
   that fill every input they find without checking visibility. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.chat-message-row input {
  flex: 1;
  min-width: 0;
}

.chat-message-row button {
  flex-shrink: 0;
  background: var(--white);
  color: var(--black);
  border: none;
  padding: 8px 14px;
  font-size: 12px;
  text-transform: uppercase;
  cursor: pointer;
}

.chat-status {
  font-size: 11px;
  color: var(--grey);
  text-align: center;
  padding: 8px 0;
}

.chat-status.error {
  color: #ff5555;
}

/* Contact */
.contact-section {
  margin: 10px auto 50px;
}

.contact-email {
  font-size: 14px;
  color: #ccc;
  margin: 0 0 20px;
}

.contact-email a {
  color: var(--white);
  text-decoration: underline;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
}

.contact-form input,
.contact-form textarea {
  background: #0d0d0d;
  border: 1px solid #333;
  color: var(--white);
  padding: 10px;
  font-size: 14px;
  font-family: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  align-self: flex-start;
  background: var(--white);
  color: var(--black);
  border: none;
  padding: 10px 20px;
  font-size: 13px;
  text-transform: uppercase;
  cursor: pointer;
}

.contact-status {
  font-size: 13px;
  margin: 0;
  min-height: 1em;
}

.contact-status.success {
  color: #7cfc7c;
}

.contact-status.error {
  color: #ff5555;
}

/* Footer */
.site-footer {
  text-align: center;
  margin-top: 30px;
  padding: 24px 0;
  border-top: 1px solid #222;
}

.footer-logo {
  font-size: 22px;
  margin: 0;
}

.footer-tagline,
.footer-copy {
  font-size: 11px;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 4px 0;
}

/* Sticky player bar (non-home pages) */
.sticky-player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: #000;
  border-top: 1px solid #222;
}

.sticky-player-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px var(--gutter);
}

.sticky-marquee {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.sticky-art {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 4px;
  background-color: #0d0d0d;
  background-size: cover;
  background-position: center;
  border: 1px solid #222;
  transition: filter 0.4s ease-out;
}

.sticky-art.img-loading {
  background: radial-gradient(circle at 40% 30%, #333, #0d0d0d 75%);
  filter: blur(6px) brightness(0.6);
}

body.has-sticky-player {
  padding-bottom: 72px;
}

/* Artist info modal */
.track-info.is-clickable {
  cursor: pointer;
}

.track-info.is-clickable:hover .marquee-track {
  text-decoration: underline;
}

.artist-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.artist-modal[hidden] {
  display: none;
}

.artist-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.artist-modal-panel {
  position: relative;
  z-index: 1;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  background: #0d0d0d;
  border: 1px solid #333;
  padding: 24px;
}

.artist-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}

.artist-modal-close:hover {
  opacity: 1;
}

.artist-modal-status {
  color: var(--grey);
  text-align: center;
  padding: 20px 0;
}

.artist-modal-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border: 1px solid #222;
  margin-bottom: 14px;
}

.artist-modal-name {
  font-size: 20px;
  margin: 0 0 10px;
}

.artist-modal-name a {
  color: var(--white);
  text-decoration: none;
}

.artist-modal-name a:hover {
  text-decoration: underline;
}

.artist-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.artist-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ff3b3b;
  border: 1px solid #ff3b3b;
  border-radius: 20px;
  padding: 3px 10px;
}

.artist-modal-bio {
  font-size: 14px;
  line-height: 1.6;
  color: #ccc;
  margin: 0 0 16px;
}

.artist-modal-album {
  font-size: 14px;
  margin: 0 0 10px;
  color: var(--grey);
}

.artist-modal-album a {
  color: var(--white);
}

.artist-modal-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--grey);
  margin: 0 0 6px;
}

.artist-similar {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: #ddd;
}

.artist-similar li {
  padding: 4px 0;
  border-bottom: 1px solid #222;
}

/* ===== Responsive ===== */

/* Tablet and below: stack the two content columns */
@media (max-width: 860px) {
  .content {
    flex-direction: column;
  }

  .col-player,
  .col-news {
    flex: 1 1 auto;
    width: 100%;
  }

  .tracklist {
    flex: 0 0 auto;
    max-height: 280px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  :root {
    --gutter: 16px;
  }

  .logo {
    font-size: 42px;
  }

  .logo span {
    font-size: 18px;
    letter-spacing: 4px;
  }

  .nav-wrap {
    justify-content: center;
    text-align: center;
  }

  .main-nav > .wrap > ul:first-child {
    justify-content: center;
    flex-wrap: wrap;
  }

  .main-nav > .wrap > ul:first-child li a {
    padding: 10px 10px;
    font-size: 12px;
  }

  .hero-art {
    height: 160px;
  }

  /* Stack the art panel above the info panel instead of squeezing both
     into a row — that row is what caused the disc/volume slider to run
     off the right edge on narrow screens. `flex: none` matters: the base
     rules use flex-basis values that collapse the panels once the
     container height goes auto. */
  .visualizer-player {
    flex-direction: column;
    height: auto;
  }

  .player-art-panel {
    flex: none;
    width: 200px;
    height: 170px;
    margin: 0 auto;
    border-right: none;
  }

  .player-info-panel {
    flex: none;
    width: 100%;
    height: 200px;
    border-top: 1px solid #222;
  }

  .player-info-top {
    padding: 6px 14px 18px;
  }

  .marquee-track {
    font-size: 19px;
  }

  .marquee-artist {
    font-size: 13px;
  }

  /* Volume becomes a thin horizontal bar above the controls instead of
     the vertical strip, which has no room on a narrow screen. */
  .volume-control.vertical {
    top: auto;
    bottom: 66px;
    left: 14px;
    right: 14px;
    flex-direction: row;
  }

  .volume-control.vertical .volume-slider {
    writing-mode: horizontal-tb;
    direction: ltr;
    width: 100%;
    height: auto;
  }

  .visualizer-overlay {
    padding: 12px 14px;
  }

  .controls-row {
    justify-content: center;
    gap: 12px;
  }

  .sticky-player-inner {
    gap: 10px;
  }

  .sticky-player-inner .listeners {
    display: none;
  }
}
