/* RockRevster Radio — retro 80s synthwave jukebox theme
   Design tokens */
:root {
  --bg: #0a0118;
  --bg-alt: #150a2e;
  --bg-card: #1c0f3a;
  --bg-card-hover: #26134d;
  --neon-pink: #ff2d95;
  --neon-cyan: #05d9e8;
  --neon-purple: #9d4edd;
  --chrome-gold: #ffc93c;
  --text: #f5f0ea;
  --text-dim: #b6a6cf;
  --border: rgba(255, 45, 149, 0.28);
  --font-display: "Monoton", cursive;
  --font-heading: "Audiowide", sans-serif;
  --font-body: "Poppins", system-ui, -apple-system, sans-serif;
  --radius: 16px;
  --radius-sm: 9px;
  --player-h: 84px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  padding-bottom: var(--player-h);
}

img { max-width: 100%; display: block; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--neon-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 1, 24, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
}
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(5, 217, 232, 0.7);
}
.brand-sub {
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 4px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nav-greeting {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-right: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: #fff;
  box-shadow: 0 0 18px rgba(255, 45, 149, 0.45);
}
.btn-primary:hover { box-shadow: 0 0 26px rgba(255, 45, 149, 0.7); }

.btn-outline {
  background: transparent;
  color: var(--neon-cyan);
  border: 1.5px solid var(--neon-cyan);
}
.btn-outline:hover { box-shadow: 0 0 16px rgba(5, 217, 232, 0.5); }

.btn-gold {
  background: linear-gradient(135deg, var(--chrome-gold), #a86f0a);
  color: #1a0f00;
  box-shadow: 0 0 16px rgba(255, 201, 60, 0.4);
}
.btn-gold:hover { box-shadow: 0 0 24px rgba(255, 201, 60, 0.65); }

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

.btn-sm { padding: 7px 14px; font-size: 0.7rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ---------- Hero / jukebox ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(157, 78, 221, 0.35), transparent 60%),
    linear-gradient(180deg, #0a0118 0%, #170a33 55%, #2a0f42 100%);
  padding: 90px 20px 60px;
  text-align: center;
}

.hero-copy {
  position: relative;
  z-index: 3;
  margin-bottom: 18px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 7vw, 4.6rem);
  line-height: 1.15;
  margin: 0;
  color: #fff;
  text-shadow:
    0 0 6px #fff,
    0 0 18px var(--neon-pink),
    0 0 36px var(--neon-pink),
    0 0 64px var(--neon-purple);
  animation: neonFlicker 5s infinite ease-in-out;
}
.hero-sub {
  font-family: var(--font-heading);
  font-size: clamp(0.85rem, 2vw, 1.15rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chrome-gold);
  margin: 10px 0 0;
  text-shadow: 0 0 10px rgba(255, 201, 60, 0.6);
}
.hero-tagline {
  max-width: 46ch;
  margin: 18px auto 0;
  color: var(--text-dim);
  font-size: 1rem;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
  position: relative;
  z-index: 3;
}

.jukebox-wrap {
  width: min(360px, 78vw);
  margin: 26px auto 0;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 30px rgba(157, 78, 221, 0.35));
}
.jukebox-wrap svg { width: 100%; height: auto; display: block; }

.jk-dome, .jk-body, .jk-plinth {
  filter: drop-shadow(0 0 6px rgba(255, 201, 60, 0.55));
}
.jk-tube-pink { filter: drop-shadow(0 0 10px var(--neon-pink)); }
.jk-tube-cyan { filter: drop-shadow(0 0 10px var(--neon-cyan)); }
.jk-grille { filter: drop-shadow(0 0 8px rgba(5, 217, 232, 0.4)); }
.jk-sun { filter: drop-shadow(0 0 20px rgba(255, 110, 199, 0.55)); }

.eq-bar {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: eqBounce 1.15s ease-in-out infinite;
}
.eq-bar:nth-child(1) { animation-delay: 0s; }
.eq-bar:nth-child(2) { animation-delay: 0.12s; }
.eq-bar:nth-child(3) { animation-delay: 0.24s; }
.eq-bar:nth-child(4) { animation-delay: 0.06s; }
.eq-bar:nth-child(5) { animation-delay: 0.3s; }
.eq-bar:nth-child(6) { animation-delay: 0.18s; }
.eq-bar:nth-child(7) { animation-delay: 0.36s; }

.bubble {
  animation: bubbleRise 3.2s linear infinite;
}
.bubble:nth-child(2) { animation-delay: 0.6s; }
.bubble:nth-child(3) { animation-delay: 1.3s; }
.bubble:nth-child(4) { animation-delay: 2s; }
.bubble:nth-child(5) { animation-delay: 2.6s; }

@keyframes eqBounce {
  0%, 100% { transform: scaleY(0.22); }
  50% { transform: scaleY(1); }
}
@keyframes bubbleRise {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 0.8; }
  100% { transform: translateY(-230px); opacity: 0; }
}
@keyframes neonFlicker {
  0%, 92%, 100% { opacity: 1; }
  93% { opacity: 0.75; }
  94% { opacity: 1; }
  95% { opacity: 0.6; }
  96% { opacity: 1; }
}

.floor-grid {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 42%;
  z-index: 1;
  background-image:
    linear-gradient(rgba(5, 217, 232, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 45, 149, 0.14) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
          mask-image: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  transform: perspective(280px) rotateX(55deg);
  transform-origin: bottom;
}

/* ---------- Section headings ---------- */
.section {
  padding: 64px 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(5, 217, 232, 0.45);
  margin: 0;
}
.section-note {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0;
}

/* ---------- Catalog ---------- */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}
.track-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.track-card:hover {
  transform: translateY(-4px);
  border-color: var(--neon-pink);
  box-shadow: 0 10px 30px rgba(255, 45, 149, 0.18);
}
.track-cover {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--bg-alt), var(--bg-card));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.track-cover img { width: 100%; height: 100%; object-fit: cover; }
.track-cover .placeholder-art { opacity: 0.6; }
.track-type-badge {
  position: absolute;
  top: 10px; left: 10px;
  font-family: var(--font-heading);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(10, 1, 24, 0.75);
  color: var(--chrome-gold);
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 201, 60, 0.4);
}
.track-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.track-title {
  font-weight: 600;
  font-size: 0.98rem;
  margin: 0;
}
.track-desc {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.track-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
.track-price {
  margin-left: auto;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--chrome-gold);
}

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 50px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ---------- Sticky audio player ---------- */
.player-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--player-h);
  background: rgba(15, 6, 32, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  z-index: 50;
}
.player-bar.active { display: flex; }
.player-cover {
  width: 48px; height: 48px;
  border-radius: 8px;
  background: var(--bg-card);
  flex-shrink: 0;
  object-fit: cover;
}
.player-info { min-width: 0; max-width: 200px; flex-shrink: 0; }
.player-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-audio { flex: 1; min-width: 0; height: 36px; }
.player-close {
  background: none; border: none; color: var(--text-dim);
  font-size: 1.3rem; cursor: pointer; flex-shrink: 0; line-height: 1;
  padding: 6px;
}
.player-close:hover { color: var(--neon-pink); }

/* ---------- Video modal ---------- */
.video-modal {
  position: fixed; inset: 0;
  background: rgba(5, 1, 12, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 24px;
}
.video-modal.active { display: flex; }
.video-modal-inner {
  width: min(880px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(157, 78, 221, 0.35);
}
.video-modal video { width: 100%; display: block; background: #000; }
.video-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
}
.video-modal-title { font-weight: 600; font-size: 0.95rem; }
.video-modal-close {
  background: none; border: none; color: var(--text-dim);
  font-size: 1.4rem; cursor: pointer; line-height: 1;
}
.video-modal-close:hover { color: var(--neon-pink); }

/* ---------- Auth forms ---------- */
.auth-shell {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(157, 78, 221, 0.25), transparent 55%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 30px;
}
.auth-title {
  font-family: var(--font-heading);
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(5, 217, 232, 0.45);
  font-size: 1.3rem;
  margin: 0 0 6px;
  text-align: center;
}
.auth-note {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0 0 24px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--neon-cyan);
}
.form-error {
  background: rgba(255, 45, 149, 0.12);
  border: 1px solid rgba(255, 45, 149, 0.4);
  color: #ffb3d9;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}
.form-error.active { display: block; }
.form-success {
  background: rgba(5, 217, 232, 0.12);
  border: 1px solid rgba(5, 217, 232, 0.4);
  color: #b6f2fa;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}
.form-success.active { display: block; }
.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.auth-switch a { color: var(--neon-cyan); text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ---------- Library page ---------- */
.purchase-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.purchase-title { font-weight: 600; flex: 1; min-width: 160px; }
.purchase-meta { color: var(--text-dim); font-size: 0.8rem; }
.status-pill {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.status-paid { background: rgba(5, 217, 232, 0.15); color: var(--neon-cyan); border: 1px solid rgba(5,217,232,0.4); }
.status-pending { background: rgba(255, 201, 60, 0.15); color: var(--chrome-gold); border: 1px solid rgba(255,201,60,0.4); }

/* ---------- Admin ---------- */
.admin-lock {
  max-width: 380px;
  margin: 90px auto;
  text-align: center;
  padding: 0 20px;
}
.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}
@media (min-width: 860px) {
  .admin-grid { grid-template-columns: 380px 1fr; align-items: start; }
}
.admin-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.admin-panel h2 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--chrome-gold);
  margin-top: 0;
}
.upload-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-alt);
  overflow: hidden;
  margin-top: 10px;
  display: none;
}
.upload-progress.active { display: block; }
.upload-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
  transition: width 0.2s ease;
}
.admin-track-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.admin-track-row .t-title { flex: 1; font-weight: 600; font-size: 0.9rem; }
.admin-track-row .t-meta { color: var(--text-dim); font-size: 0.78rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 calc(28px + var(--player-h));
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* ---------- Motion & small screens ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-title, .eq-bar, .bubble, html { animation: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 640px) {
  .nav-greeting { display: none; }
  .player-info { max-width: 110px; }
  .section { padding: 44px 0; }
}
