/* ============================================================
   music.marvilousdjs.com — public stylesheet
   Aesthetic: editorial-poster meets dark club flyer
   Brand: Marvilous DJs (red #cc0000, near-black #0d0d0d)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter+Tight:wght@400;500;600;700;800&display=swap');

:root {
  --red:        #cc0000;
  --red-bright: #ff1a1a;
  --red-dim:    #8a0000;
  --black:      #0d0d0d;
  --surface:    #1a1a1a;
  --surface-2:  #232323;
  --line:       #2a2a2a;
  --text:       #ffffff;
  --text-dim:   #888888;
  --text-fade:  #555555;

  --display: 'Anton', 'Helvetica Neue Condensed', 'Impact', sans-serif;
  --body:    'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
}

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

html, body {
  background: var(--black);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(ellipse at top right, rgba(204,0,0,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(204,0,0,0.04) 0%, transparent 60%),
    var(--black);
  min-height: 100vh;
  /* Web Component player is ~80px tall; reserve space so content isn't covered */
  padding-bottom: 96px;
}

@media (max-width: 720px) {
  /* On mobile the player wraps to two rows; reserve more space */
  body { padding-bottom: 130px; }
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  border-bottom: 1px solid var(--line);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
}

.brand { display: flex; align-items: baseline; gap: 10px; }

.brand-mark {
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
}

.brand-mark .accent { color: var(--red); }

.brand-tag {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}

.header-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.header-links a {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  transition: color 0.15s;
}

.header-links a:hover { color: var(--red); }

.install-btn {
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 8px 14px;
  background: var(--red);
  color: var(--text);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.install-btn:hover { background: var(--red-bright); }

/* iOS install hint banner */
.ios-install-hint {
  position: fixed;
  bottom: 110px; /* sit above the player bar */
  left: 16px; right: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--red);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 90;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.ios-install-hint[hidden] { display: none; }

.ios-install-hint .hint-icon {
  width: 28px; height: 28px;
  background: var(--red);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 28px;
}
.ios-install-hint .hint-icon svg { width: 16px; height: 16px; }

.ios-install-hint .hint-text {
  flex: 1;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-dim);
}

.ios-install-hint .hint-text strong {
  display: block;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 2px;
}

.ios-install-hint .hint-text em {
  font-style: normal;
  color: var(--text);
  font-weight: 700;
}

.ios-share-icon {
  display: inline-flex;
  align-items: center;
  width: 14px;
  height: 14px;
  vertical-align: middle;
  color: var(--red);
}

.ios-share-icon svg { width: 14px; height: 14px; }

.ios-install-hint .hint-close {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  font-family: inherit;
  flex: 0 0 28px;
}

.ios-install-hint .hint-close:hover {
  color: var(--red);
  border-color: var(--red);
}

/* When running as installed PWA (standalone mode), hide the install button */
@media (display-mode: standalone) {
  .install-btn { display: none !important; }
}

/* iOS standalone (legacy) */
@supports (-webkit-touch-callout: none) {
  /* Safe-area padding on iOS notch devices */
  .site-header {
    padding-top: max(18px, env(safe-area-inset-top));
  }
  .ios-install-hint {
    bottom: max(110px, calc(110px + env(safe-area-inset-bottom)));
  }
}

/* ============================================================
   LIVE NOW banner — appears when a scheduled block is active
   ============================================================ */
.live-banner {
  position: relative;
  background: linear-gradient(90deg, rgba(204,0,0,0.18) 0%, rgba(204,0,0,0.05) 60%, transparent 100%), var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 22px 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  overflow: hidden;
}

.live-banner::after {
  /* Tilted red accent bar — echoes the hero treatment */
  content: '';
  position: absolute;
  top: 50%; right: -30px;
  width: 220px; height: 4px;
  background: var(--red);
  transform: translateY(-50%) rotate(-2deg);
  opacity: 0.5;
}

.live-pulse {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  flex: 0 0 48px;
}

.live-pulse .dot {
  width: 14px; height: 14px;
  background: var(--red);
  border-radius: 50%;
  position: relative;
  z-index: 2;
}

.live-pulse::before,
.live-pulse::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  background: var(--red);
  border-radius: 50%;
  opacity: 0.6;
  animation: live-ripple 2s ease-out infinite;
}
.live-pulse::after {
  animation-delay: 1s;
}

@keyframes live-ripple {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(3.2); opacity: 0; }
}

.live-info { min-width: 0; }

.live-eyebrow {
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 800;
  margin-bottom: 4px;
}

.live-divider { color: var(--text-fade); margin: 0 4px; }

.live-time { color: var(--text-dim); }

.live-name {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 4px;
}

.live-meta {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.live-countdown { color: var(--text); font-weight: 700; }

.live-actions {
  position: relative;
  z-index: 2;
}

.btn-tune-in {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 16px 26px;
  background: var(--red);
  color: var(--text);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-tune-in:hover {
  background: var(--red-bright);
  transform: translateY(-1px);
}

.btn-tune-in:active { transform: translateY(0); }

.btn-tune-in.tuned-in {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--red);
  padding: 14px 24px;
}

.btn-tune-in.tuned-in:hover {
  background: var(--red);
}

.tune-icon {
  width: 0; height: 0;
  border-style: solid;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent var(--text);
  display: inline-block;
}

.btn-tune-in.tuned-in .tune-icon {
  border-style: solid;
  border-width: 0;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  animation: live-ripple-small 1.5s ease-in-out infinite;
}

@keyframes live-ripple-small {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}

@media (max-width: 720px) {
  .live-banner {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    padding: 18px 16px;
    gap: 14px;
  }
  .live-actions {
    grid-column: 1 / -1;
  }
  .btn-tune-in {
    width: 100%;
    justify-content: center;
  }
  .live-name { font-size: 24px; }
}

/* ============================================================
   Hero / Marquee
   ============================================================ */
.hero {
  padding: 60px 32px 40px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 24px;
  right: -40px;
  width: 280px;
  height: 6px;
  background: var(--red);
  transform: rotate(-2deg);
}

.hero-eyebrow {
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(56px, 9vw, 128px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 400;
}

.hero h1 .red { color: var(--red); }
.hero h1 .stroke {
  -webkit-text-stroke: 1.5px var(--text);
  color: transparent;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-dim);
  max-width: 580px;
  letter-spacing: 0.01em;
}

/* ============================================================
   Filters
   ============================================================ */
.filters {
  padding: 28px 32px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-label {
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-fade);
  font-weight: 700;
  margin-right: 12px;
  min-width: 60px;
}

.chip {
  display: inline-block;
  padding: 7px 14px;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-dim);
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--body);
}

.chip:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.chip.active {
  background: var(--red);
  color: var(--text);
  border-color: var(--red);
}

/* ============================================================
   Track grid
   ============================================================ */
.grid-section { padding: 36px 32px; }

.grid-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  gap: 16px;
  flex-wrap: wrap;
}

.grid-count {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
}

.grid-count strong { color: var(--text); font-weight: 800; }

/* Right-side actions: Play All / Shuffle / Clear */
.grid-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.play-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 9px 16px;
  background: var(--red);
  color: var(--text);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.play-all:hover {
  background: var(--red-bright);
  transform: translateY(-1px);
}

.play-all:active { transform: translateY(0); }

.play-all.loading {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none;
}

.play-all-icon {
  width: 0; height: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent var(--text);
  display: inline-block;
}

.play-all-shuffle {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text-dim);
}

.play-all-shuffle:hover {
  background: var(--text);
  color: var(--black);
  border-color: var(--text);
  transform: translateY(-1px);
}

.play-all-shuffle:hover .shuffle-icon { color: var(--black); }

.shuffle-icon {
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
  line-height: 1;
}

.grid-clear {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  padding: 9px 12px;
}

.grid-clear:hover { color: var(--red-bright); }

.track-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 22px;
}

@media (max-width: 1100px) { .track-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 780px)  { .track-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; } }
@media (max-width: 460px)  { .track-grid { grid-template-columns: 1fr 1fr; gap: 18px 12px; } }

/* ============================================================
   Track card
   ============================================================ */
.card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
}

.card:hover { transform: translateY(-2px); }

/* Active card — currently playing in the player */
.card.now-playing .card-art {
  outline: 2px solid var(--red);
  outline-offset: -2px;
}

.card.now-playing::before {
  content: '● PLAYING';
  position: absolute;
  top: -10px;
  left: 8px;
  background: var(--red);
  color: var(--text);
  font-size: 9px;
  letter-spacing: 0.2em;
  font-weight: 800;
  padding: 3px 8px;
  z-index: 3;
  animation: nowPulse 2s ease-in-out infinite;
}

@keyframes nowPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

.card.now-playing .card-title { color: var(--red); }

.card-art {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 12px;
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.2s ease;
}

.card:hover .card-art img {
  transform: scale(1.04);
  filter: brightness(0.7);
}

.card-art-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  background: linear-gradient(135deg, var(--red-dim) 0%, var(--black) 70%);
}

.card-art-fallback .fb-type {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  align-self: flex-start;
}

.card-art-fallback .fb-mark {
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red-bright);
  font-weight: 700;
  align-self: flex-end;
}

.card-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.card:hover .card-art::after { opacity: 1; }

.card-play-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  background: var(--red);
  color: var(--text);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 50%;
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 2;
}

.card-play-btn::before {
  content: '';
  border-style: solid;
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent var(--text);
  margin-left: 3px;
}

.card:hover .card-play-btn,
.card:focus-within .card-play-btn {
  transform: translateY(0);
  opacity: 1;
}

.card-play-btn:hover { background: var(--red-bright); }

/* "Add to queue" button — left side of art */
.card-queue-btn {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  background: rgba(13, 13, 13, 0.9);
  color: var(--text);
  border: 1px solid var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--body);
  border-radius: 50%;
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 2;
  padding: 0;
  line-height: 1;
}

.card:hover .card-queue-btn,
.card:focus-within .card-queue-btn {
  transform: translateY(0);
  opacity: 1;
}

.card-queue-btn:hover {
  background: var(--text);
  color: var(--black);
  border-color: var(--text);
}

.card-queue-btn.queued {
  background: var(--red);
  color: var(--text);
  border-color: var(--red);
  animation: queuePulse 0.6s ease;
}

@keyframes queuePulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

@media (hover: none) {
  .card-play-btn,
  .card-queue-btn { opacity: 1; transform: translateY(0); }
  .card-art::after { opacity: 1; }
}

.card-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(13,13,13,0.85);
  color: var(--text);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 8px;
  z-index: 2;
}

.card-dl {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--red);
  color: var(--text);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 4px 8px;
  z-index: 2;
}

.card-title {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.card-dj { font-weight: 500; letter-spacing: 0.01em; }

.card-dur {
  font-variant-numeric: tabular-nums;
  color: var(--text-fade);
  font-size: 11px;
}

/* ============================================================
   Empty state
   ============================================================ */
.empty {
  padding: 80px 32px;
  text-align: center;
  color: var(--text-dim);
}

.empty h2 {
  font-family: var(--display);
  font-size: 48px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 12px;
}

.empty p {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 420px;
  margin: 0 auto;
}

/* ============================================================
   Track detail page
   ============================================================ */
.detail {
  padding: 48px 32px;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 48px;
}

@media (max-width: 760px) {
  .detail { grid-template-columns: 1fr; gap: 28px; padding: 32px 20px; }
}

.detail-art {
  aspect-ratio: 1 / 1;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.detail-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info .eyebrow {
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 12px;
}

.detail-info h1 {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.detail-info .by {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 28px;
}

.detail-info .by strong { color: var(--text); font-weight: 700; }

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.tag {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text);
  padding: 5px 10px;
  border: 1px solid var(--line);
}

.tag.tag-red {
  background: var(--red);
  border-color: var(--red);
}

.detail-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 14px 26px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-play { background: var(--red); color: var(--text); }
.btn-play:hover { background: var(--red-bright); }

.btn-play::before {
  content: '';
  border-style: solid;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent var(--text);
}

.btn-download {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text-dim);
}

.btn-download:hover {
  border-color: var(--red);
  color: var(--red);
}

.detail-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-dim);
  border-top: 1px solid var(--line);
  padding-top: 24px;
  white-space: pre-wrap;
}

.detail-back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
}

.detail-back:hover { color: var(--red); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  margin-top: 60px;
  padding: 32px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-mark {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.footer-mark .accent { color: var(--red); }

.footer-meta {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-fade);
}

/* ============================================================
   Smaller screens — header / hero
   ============================================================ */
@media (max-width: 640px) {
  .site-header { padding: 14px 16px; }
  .brand-mark { font-size: 20px; }
  .brand-tag { display: none; }
  .header-links { gap: 14px; }
  .header-links a { font-size: 10px; letter-spacing: 0.15em; }

  .hero { padding: 36px 16px 24px; }
  .filters { padding: 20px 16px 0; }
  .grid-section { padding: 24px 16px; }

  .filter-label { width: 100%; min-width: 0; margin-bottom: 4px; }
}
