/* ═══════════════════════════════════════════
   PENTATONIC — Music Hub
   ═══════════════════════════════════════════ */

:root {
  --purple: #c084fc;
  --purple-dim: rgba(192,132,252,.5);
}

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);
  position: relative;
}

/* ── equalizer ── */
.equalizer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 28px;
  margin-bottom: .6rem;
  opacity: .45;
}

.eq-bar {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--purple);
  animation: eqPulse 1.2s ease-in-out infinite alternate;
}

.eq-bar:nth-child(1)  { height: 8px;  animation-delay: 0s; }
.eq-bar:nth-child(2)  { height: 16px; animation-delay: .1s; }
.eq-bar:nth-child(3)  { height: 10px; animation-delay: .2s; }
.eq-bar:nth-child(4)  { height: 22px; animation-delay: .05s; }
.eq-bar:nth-child(5)  { height: 12px; animation-delay: .15s; }
.eq-bar:nth-child(6)  { height: 26px; animation-delay: .25s; }
.eq-bar:nth-child(7)  { height: 14px; animation-delay: .08s; }
.eq-bar:nth-child(8)  { height: 20px; animation-delay: .18s; }
.eq-bar:nth-child(9)  { height: 9px;  animation-delay: .12s; }
.eq-bar:nth-child(10) { height: 18px; animation-delay: .22s; }
.eq-bar:nth-child(11) { height: 11px; animation-delay: .03s; }
.eq-bar:nth-child(12) { height: 15px; animation-delay: .16s; }

@keyframes eqPulse {
  0%   { transform: scaleY(.3); }
  100% { transform: scaleY(1); }
}

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

.hero__sub {
  font-family: var(--font-mono);
  font-size: clamp(.65rem, 1.5vw, .8rem);
  color: var(--dim);
  letter-spacing: .15em;
  margin-top: 0;
}

/* ═══════════════════════════════════════════
   MUSIC GRID
   ═══════════════════════════════════════════ */
.music-menu {
  padding: 0 1.25rem;
  position: relative;
}

/* ── subwoofer pulse ── */
.subwoofer-pulse {
  position: absolute;
  top: 50%; left: 50%;
  width: 300px; height: 300px;
  margin: -150px 0 0 -150px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.subwoofer-pulse::before,
.subwoofer-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(192,132,252,.1);
  animation: subPulse 3s ease-out infinite;
}

.subwoofer-pulse::after {
  animation-delay: 1.5s;
}

@keyframes subPulse {
  0%   { transform: scale(.4); opacity: .5; }
  100% { transform: scale(1.8); opacity: 0; }
}

.music-grid {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2rem);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.music-card {
  flex: 1;
  max-width: 260px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  background: rgba(0,212,255,.03);
  border: 1px solid rgba(0,212,255,.12);
  border-radius: 14px;
  padding: clamp(1.5rem, 3vh, 2.5rem) 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  position: relative;
  overflow: hidden;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}

.music-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0,212,255,.3);
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.6);
}

.music-card__disc {
  width: clamp(50px, 10vw, 70px);
  height: clamp(50px, 10vw, 70px);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(192,132,252,.15) 20%, transparent 21%),
    repeating-conic-gradient(
      rgba(192,132,252,.06) 0deg 10deg,
      transparent 10deg 20deg
    );
  border: 2px solid rgba(192,132,252,.2);
  position: relative;
  animation: vinylSpin 8s linear infinite;
}

.music-card:hover .music-card__disc {
  animation-duration: 2s;
}

@keyframes vinylSpin {
  to { transform: rotate(360deg); }
}

.music-card__disc::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 8px; height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--purple);
  opacity: .5;
}

.music-card__name {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--purple);
  text-shadow: 0 0 20px rgba(192,132,252,.12);
}

.music-card__desc {
  font-family: var(--font-mono);
  font-size: .65rem;
  font-weight: 700;
  color: var(--dim);
  letter-spacing: .1em;
  margin: 0;
}

/* ═══════════════════════════════════════════
   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; }
  .music-grid {
    flex-direction: column;
    align-items: center;
  }
  .music-card {
    max-width: 280px;
    width: 100%;
  }
}
@media (min-width: 601px) {
  .tabbar { display: none; }
}

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