/* ═══════════════════════════════════════════
   ROCKOLA — Purple accent · Underwater base
   ═══════════════════════════════════════════ */

:root {
  --purple: #c084fc;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
}

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

/* ── header ── */
.header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1.5rem;
  border-bottom: 1px solid rgba(0,212,255,.15);
  background: rgba(8,6,13,.85);
}

.back-btn {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(0,212,255,.2);
  border-radius: 50%;
  background: rgba(0,212,255,.05);
  transition: background .2s, border-color .2s, transform .15s;
}
.back-btn:hover {
  background: rgba(0,212,255,.12);
  border-color: var(--pink);
}
.back-btn:active { transform: scale(.92); }

.logo {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--gold);
  letter-spacing: .1em;
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.5rem, 4vh, 3rem) 1.25rem clamp(.5rem, 1.5vh, 1rem);
}

.hero__title {
  font-family: 'Righteous', cursive;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 400;
  color: var(--purple);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 0 0 .3rem;
}

.hero__sub {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--dim);
  margin-top: 0;
}

/* ═══════════════════════════════════════════
   CONTROLS
   ═══════════════════════════════════════════ */
.controls {
  padding: 0 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
  background: rgba(192,132,252,.05);
  border: 1px solid rgba(192,132,252,.12);
  border-radius: 16px;
  padding: .4rem .9rem;
  cursor: pointer;
  transition: all .25s;
}
.filter-btn:hover {
  border-color: var(--purple);
  color: var(--text);
  background: rgba(192,132,252,.08);
}
.filter-btn.active {
  background: var(--purple);
  color: var(--bg);
  border-color: var(--purple);
  box-shadow: 0 0 12px -2px rgba(192,132,252,.3);
}

/* ═══════════════════════════════════════════
   SHELVES
   ═══════════════════════════════════════════ */
.shelves {
  padding: 0 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.shelf-group {
  margin-bottom: 2rem;
}

.shelf-group__title {
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--purple);
  margin: 0 0 .5rem;
  letter-spacing: .04em;
}

.shelf {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: .8rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(192,132,252,.3) transparent;
}
.shelf::-webkit-scrollbar { height: 6px; }
.shelf::-webkit-scrollbar-thumb { background: rgba(192,132,252,.3); border-radius: 3px; }
.shelf::-webkit-scrollbar-track { background: transparent; }

.shelf-card {
  flex: 0 0 auto;
  width: 170px;
  background: rgba(0,212,255,.03);
  border: 1px solid rgba(0,212,255,.08);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.shelf-card:hover {
  transform: translateY(-3px);
  border-color: rgba(192,132,252,.3);
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.6);
}
.shelf-card:active {
  transform: scale(.97);
}

.shelf-card__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  filter: brightness(.85);
  transition: filter .3s, transform .4s;
}
.shelf-card:hover .shelf-card__img {
  filter: brightness(1);
  transform: scale(1.03);
}

.shelf-card__info {
  padding: .6rem .7rem;
}

.shelf-card__name {
  font-family: 'Caveat', cursive;
  font-size: .95rem;
  font-weight: 700;
  color: var(--purple);
  margin: 0 0 .1rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shelf-card__dur {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 700;
  color: var(--dim);
  letter-spacing: .08em;
}

/* ═══════════════════════════════════════════
   LIST VIEW
   ═══════════════════════════════════════════ */
.list-view {
  max-width: 700px;
  margin: 1rem auto;
  padding: 0 1.25rem;
}

.list-table {
  width: 100%;
  border-collapse: collapse;
}

.list-table th {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: left;
  padding: .5rem .4rem;
  border-bottom: 1px solid rgba(192,132,252,.15);
}

.list-table td {
  padding: .45rem .4rem;
  font-size: .8rem;
  color: var(--text);
  vertical-align: middle;
}

.list-row {
  cursor: pointer;
  transition: background .15s;
}
.list-row:hover {
  background: rgba(192,132,252,.06);
}

.list-row__img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
}

.list-row__name {
  font-family: 'Caveat', cursive;
  font-size: .95rem;
  font-weight: 700;
  color: var(--purple);
}

.list-row__dur {
  font-family: var(--font-mono);
  font-size: .65rem;
  font-weight: 700;
  color: var(--dim);
}

/* ═══════════════════════════════════════════
   PLAYER — Full-screen overlay
   ═══════════════════════════════════════════ */
body.noscroll { overflow: hidden !important; }

.player {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
  padding: 2rem 1rem;
  overflow-y: auto;
}
.player.show {
  opacity: 1;
  pointer-events: auto;
}

.player__bg {
  position: absolute;
  inset: 0;
  background: #04060a;
  z-index: -1;
}

.player__close {
  position: absolute;
  top: 1rem; right: 1.5rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--pink);
  cursor: pointer;
  z-index: 2;
  transition: color .2s, transform .2s;
  line-height: 1;
}
.player__close:hover {
  color: var(--gold);
  transform: scale(1.1);
}

.player__disc-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.player__nav {
  font-size: 1.8rem;
  background: none;
  border: none;
  color: var(--purple);
  cursor: pointer;
  transition: color .2s, transform .2s;
  line-height: 1;
}
.player__nav:hover {
  color: var(--gold);
  transform: scale(1.15);
}

.player__disc {
  width: min(220px, 45vw);
  height: min(220px, 45vw);
  border-radius: 50%;
  object-fit: cover;
  background: rgba(0,212,255,.06);
  box-shadow: 0 2px 24px rgba(192,132,252,.35);
}
@keyframes discoIn {
  0% { transform: scale(.5) rotate(-180deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.player.show .player__disc {
  animation: discoIn .4s cubic-bezier(.77,0,.18,1) forwards;
}

@keyframes discoSpin {
  to { transform: rotate(360deg); }
}
.player__disc.spinning {
  animation: discoSpin 3s linear infinite;
}

.player__info {
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.player__name {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.3rem, 4vw, 1.6rem);
  font-weight: 700;
  color: var(--purple);
  margin: 0 0 .2rem;
}

.player__dur {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
  color: var(--dim);
  letter-spacing: .1em;
}

.player audio {
  width: min(320px, 85vw);
  margin-top: .5rem;
  border-radius: 8px;
}

.player__section {
  background: rgba(8,6,13,.88);
  border: 1px solid rgba(192,132,252,.12);
  border-radius: 10px;
  margin: .8rem auto 0;
  max-width: 420px;
  width: 100%;
  padding: .8rem 1rem;
}

.player__section-title {
  font-family: 'Caveat', cursive;
  font-size: 1rem;
  font-weight: 700;
  color: var(--purple);
  margin: 0 0 .4rem;
}

.player__section-content {
  font-size: .8rem;
  color: var(--text);
  opacity: .85;
  white-space: pre-line;
  max-height: 120px;
  overflow-y: auto;
  padding-right: .4em;
  scrollbar-width: thin;
  scrollbar-color: rgba(192,132,252,.3) transparent;
}
.player__section-content::-webkit-scrollbar { width: 5px; }
.player__section-content::-webkit-scrollbar-thumb { background: rgba(192,132,252,.3); border-radius: 3px; }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: .6rem 1rem;
}
.footer__divider {
  width: 60px; height: 2px; margin: 0 auto .5rem;
  background: linear-gradient(90deg, var(--pink), var(--gold));
  border-radius: 1px;
  opacity: .5;
}
.footer__text {
  font-family: var(--font-display);
  font-size: .8rem;
  color: var(--gold);
  letter-spacing: .1em;
  min-height: 1.2em;
}
.footer__credit {
  font-family: var(--font-mono);
  font-size: .65rem;
  font-weight: 700;
  color: var(--dim);
  letter-spacing: .15em;
  margin-top: .3rem;
  opacity: .8;
}

/* ═══════════════════════════════════════════
   TABBAR
   ═══════════════════════════════════════════ */
.tabbar {
  position: fixed; bottom: 0; left: 0; width: 100%;
  display: none;
  justify-content: space-around;
  background: rgba(4,14,26,.95);
  border-top: 1px solid rgba(0,212,255,.2);
  box-shadow: 0 -6px 24px -16px rgba(0,0,0,.8);
  z-index: 1000;
  padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
}
.tabbar__indicator {
  position: absolute; bottom: 0; left: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--pink), var(--gold));
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 10px var(--glow-pink);
  transition: transform .4s cubic-bezier(.22,.8,.25,1), width .3s;
  pointer-events: none;
}
.tabbar__item {
  flex: 1; text-align: center;
  padding: .5rem .3rem .4rem;
  border-radius: 10px;
  transition: background .3s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.tabbar__item:active { transform: translateY(1px); }
.tabbar__ico { font-size: 1.15rem; display: block; }
.tabbar__label {
  font-family: var(--font-display);
  font-size: .6rem; letter-spacing: .08em;
  color: var(--dim);
  display: block; margin-top: 2px;
  transition: color .3s;
}
.tabbar__item.active {
  background: rgba(0,212,255,.1);
}
.tabbar__item.active .tabbar__label { color: var(--gold); }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 600px) {
  .tabbar { display: flex; }
  body { padding-bottom: 0; }
  .header { padding: .6rem 1rem; }
  .hero { padding: 1.2rem 1rem .5rem; }
  .shelf-card { width: 150px; }
}
@media (min-width: 601px) and (max-width: 900px) {
  .shelf-card { width: 180px; }
}
@media (min-width: 901px) {
  .tabbar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
