/* ─────────────────────────────────────────────────────────────────────────────
   radio.css — Radio homepage: now-playing hero, visualizer, queue panel
   zeni.gg · Rosé Tournament Theme
   ───────────────────────────────────────────────────────────────────────────── */

/* ─── Radio Page ─────────────────────────────────────────────────────────── */
.radio-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-5) var(--space-6);
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* ─── Now Playing Hero ───────────────────────────────────────────────────── */
.now-playing {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.now-playing__body {
  display: flex;
  gap: var(--space-5);
  padding: var(--space-5);
  align-items: flex-start;
}

/* Cover art with glow */
.now-playing__cover-wrap {
  position: relative;
  flex-shrink: 0;
}

.now-playing__cover {
  width: var(--cover-lg);
  height: var(--cover-lg);
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--color-surface-2);
  display: block;
  transition: box-shadow 0.4s ease;
}

.now-playing__cover.has-art {
  box-shadow: 0 0 40px var(--color-accent-glow), var(--shadow-card);
}

.now-playing__cover-fallback {
  width: var(--cover-lg);
  height: var(--cover-lg);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--color-text-dim);
}

/* Track info column */
.now-playing__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.now-playing__status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.now-playing__label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}

.now-playing__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--color-text);
  animation: track-enter 0.3s ease-out;
}

.now-playing__artist {
  font-size: 0.95rem;
  color: var(--color-accent);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
  width: fit-content;
}

.now-playing__artist:hover {
  color: var(--color-accent-soft);
  text-decoration: underline;
}

.now-playing__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8rem;
  color: var(--color-text-dim);
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-wrap: wrap;
}

.now-playing__meta-sep {
  color: var(--color-border);
}

.now-playing__actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

/* Track change animation */
@keyframes track-enter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Visualizer ─────────────────────────────────────────────────────────── */
.visualizer {
  width: 100%;
  height: 64px;
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
  display: block;
}

.visualizer--offline {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
}

.visualizer--offline span {
  font-size: 0.75rem;
  color: var(--color-text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* ─── Now Playing Offline State ──────────────────────────────────────────── */
.now-playing--offline .now-playing__body {
  opacity: 0.6;
}

.now-playing__offline-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
  font-size: 0.82rem;
  color: var(--color-text-dim);
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

.now-playing__offline-banner svg {
  color: var(--color-text-dim);
  flex-shrink: 0;
}

/* ─── Queue Panel ────────────────────────────────────────────────────────── */
.queue-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.queue-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.queue-panel__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
}

.queue-panel__count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-dim);
  background: var(--color-surface-2);
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  font-family: var(--font-mono);
}

.queue-panel__body {
  max-height: 360px;
  overflow-y: auto;
}

/* Queue item */
.queue-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.12s;
}

.queue-item:last-child { border-bottom: none; }

.queue-item:hover {
  background: var(--color-surface-2);
}

.queue-item__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-dim);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.queue-item__cover {
  width: var(--cover-sm);
  height: var(--cover-sm);
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--color-surface-2);
  flex-shrink: 0;
}

.queue-item__info {
  flex: 1;
  min-width: 0;
}

.queue-item__title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.queue-item__artist {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.queue-item__pushed {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--color-gold);
  flex-shrink: 0;
}

/* Offline / empty states for queue */
.queue-panel__empty {
  padding: var(--space-7) var(--space-5);
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .radio-page {
    padding: var(--space-3);
    gap: var(--space-3);
  }

  .now-playing__body {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-4);
  }

  .now-playing__cover,
  .now-playing__cover-fallback {
    width: 160px;
    height: 160px;
  }

  .now-playing__actions {
    justify-content: center;
  }

  .now-playing__meta {
    justify-content: center;
  }

  .now-playing__artist {
    margin: 0 auto;
  }
}

/* ─── Tap-to-Listen overlay ──────────────────────────────────────────────────
   Single gesture prompt shown once when browser blocks autoplay.
   Lives ON the now-playing card, not as a toast.
   ───────────────────────────────────────────────────────────────────────────── */

#play-overlay {
  cursor: pointer;
  user-select: none;
}

#play-overlay-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--color-surface-2);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-7);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: var(--shadow-glow);
}

#play-overlay-btn:hover,
#play-overlay-btn:focus-visible {
  background: var(--color-accent-glow);
  box-shadow: 0 0 40px rgba(232, 84, 122, 0.35);
  transform: scale(1.03);
}

#play-overlay-btn:active {
  transform: scale(0.97);
}

.play-overlay__icon {
  font-size: 2.4rem;
  line-height: 1;
  color: var(--color-accent);
  text-shadow: 0 0 20px var(--color-accent);
}

.play-overlay__label {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
}

.play-overlay__sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--color-text-dim);
  text-transform: uppercase;
}
