/* ─── RESET & TOKENS ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

:root {
  --bg:        #0c0c10;
  --bg2:       #111116;
  --bg3:       #18181f;
  --surface:   rgba(255,255,255,0.055);
  --surface-h: rgba(255,255,255,0.09);
  --border:    rgba(255,255,255,0.08);
  --white:     #ffffff;
  --muted:     rgba(255,255,255,0.45);
  --muted2:    rgba(255,255,255,0.22);
  --orange:    #ff6b2b;
  --orange2:   #ff8c42;
  --green:     #25D366;
  --mini-h:    72px;
  --nav-h:     0px;
  --r:         16px;
  --font:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--bg); color: var(--white);
  min-height: 100vh; overflow-x: hidden;
  padding-bottom: calc(var(--mini-h) + 20px);
}
body.modal-open { overflow: hidden; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* ─── ART GRADIENTS ─── */
.art-0 { background: linear-gradient(135deg,#ff6b2b,#c0392b); }
.art-1 { background: linear-gradient(135deg,#a855f7,#5b21b6); }
.art-2 { background: linear-gradient(135deg,#22d3ee,#0369a1); }
.art-3 { background: linear-gradient(135deg,#4ade80,#15803d); }
.art-4 { background: linear-gradient(135deg,#facc15,#b45309); }
.art-5 { background: linear-gradient(135deg,#f472b6,#9d174d); }

/* ─── HERO ─── */
.hero {
  position: relative;
  max-width: 1060px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 40px;
  padding: 48px 24px 32px;
}
.hero-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 100% at 30% 50%, rgba(255,107,43,.12) 0%, transparent 70%);
}
.hero-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: flex-start;
  text-align: left;
  flex: 1;
}
.hero-logo {
  width: min(320px, 45vw); height: auto;
  object-fit: contain;
  flex-shrink: 0;
  position: relative; z-index: 1;
  filter: drop-shadow(0 6px 28px rgba(255,107,43,.4))
          drop-shadow(0 2px 10px rgba(0,0,0,.5));
}
.hero-subtitle {
  font-size: 13px; color: var(--muted); margin-bottom: 22px; letter-spacing: .3px;
}
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .hero {
    flex-direction: column; align-items: center;
    padding: 32px 24px 24px; gap: 16px;
  }
  .hero-inner { align-items: center; text-align: center; }
  .hero-logo { width: min(240px, 72vw); }
  .hero-ctas { justify-content: center; }
}

/* ─── HERO ART GRID ─── */
.hero-art-grid {
  position: relative; z-index: 1;
  flex: 0 0 260px; height: 260px;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  gap: 8px; border-radius: 20px; overflow: hidden;
}
.hero-art-tile { border-radius: 6px; overflow: hidden; }
.hero-art-tile:first-child { grid-column: span 2; }
.hat-inner {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  opacity: .55;
}

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 9px;
  background: linear-gradient(135deg, var(--orange), var(--orange2));
  color: #fff; border: none; cursor: pointer;
  padding: 13px 26px; border-radius: 50px;
  font-size: 14px; font-weight: 600; font-family: var(--font);
  box-shadow: 0 6px 28px rgba(255,107,43,.35);
  transition: transform .15s, box-shadow .2s;
}
.btn-primary:hover { transform: scale(1.03); box-shadow: 0 8px 36px rgba(255,107,43,.5); }
.btn-primary:active { transform: scale(.98); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface);
  color: var(--white); border: 1px solid var(--border); cursor: pointer;
  padding: 12px 22px; border-radius: 50px;
  font-size: 14px; font-weight: 600; font-family: var(--font);
  backdrop-filter: blur(10px);
  transition: background .2s, border-color .2s, transform .15s;
}
.btn-ghost:hover { background: var(--surface-h); border-color: rgba(255,255,255,.2); }

.btn-wa, .btn-fb {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px; border-radius: 50px; text-decoration: none;
  font-size: 15px; font-weight: 600; color: #fff;
  transition: transform .15s, box-shadow .2s;
}
.btn-wa {
  background: var(--green);
  box-shadow: 0 6px 24px rgba(37,211,102,.28);
}
.btn-wa:hover { transform: scale(1.03); box-shadow: 0 8px 32px rgba(37,211,102,.42); }
.btn-share {
  background: var(--surface-h); border: 1px solid var(--border);
  box-shadow: none;
}
.btn-share:hover { transform: scale(1.03); background: rgba(255,255,255,.12); }

.share-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ─── STATS BAR ─── */
.stats-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 0; width: fit-content; max-width: calc(100% - 32px);
  margin: 0 auto 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 50px; padding: 11px 24px;
}
.stat-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--white);
  white-space: nowrap;
}
.stat-item svg { color: var(--orange); flex-shrink: 0; }
.stat-label { font-size: 12px; font-weight: 400; color: var(--muted); }
.stat-sep { width: 1px; height: 20px; background: var(--border); margin: 0 16px; flex-shrink: 0; }

/* ─── SONGS SECTION ─── */
.songs-section { max-width: 1060px; margin: 0 auto; padding: 56px 24px 32px; }
.songs-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.section-title { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.songs-count { font-size: 13px; color: var(--muted); }

/* ─── SONG ROW ─── */
.song-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; border-radius: 12px;
  cursor: pointer; transition: background .15s;
  position: relative;
}
.song-row:hover { background: var(--surface); }
.song-row.playing { background: rgba(255,107,43,.08); }

.sr-num {
  width: 28px; text-align: center; flex-shrink: 0;
  font-size: 14px; color: var(--muted); font-weight: 500;
  transition: opacity .15s;
}
.sr-play {
  width: 28px; display: none; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--white);
}
.song-row:hover .sr-num   { display: none; }
.song-row:hover .sr-play  { display: flex; }
.song-row.playing .sr-num  { display: none; }
.song-row.playing .sr-play { display: flex; color: var(--orange); }

.sr-art {
  flex: 0 0 46px; height: 46px; border-radius: 9px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.sr-meta { flex: 1; min-width: 0; }
.sr-title {
  font-size: 15px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
.song-row.playing .sr-title { color: var(--orange); }
.sr-sub { font-size: 12px; color: var(--muted); }

.sr-right {
  display: flex; flex-direction: column; align-items: flex-end;
  flex-shrink: 0; gap: 2px;
}
.sr-dur {
  font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums;
  text-align: right;
}
.sr-song-stats {
  display: flex; gap: 7px; justify-content: flex-end; min-height: 14px;
}
.sr-song-stats span {
  font-size: 11px; color: var(--muted); font-weight: 500;
}

/* Equalizer for playing row */
.eq { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.eq-b {
  width: 3px; background: var(--orange); border-radius: 2px;
  animation: eqanim .7s ease-in-out infinite alternate;
}
.eq-b:nth-child(2) { animation-delay: .18s; }
.eq-b:nth-child(3) { animation-delay: .36s; }
@keyframes eqanim { from { height: 4px; } to { height: 14px; } }
.eq.paused .eq-b { animation-play-state: paused; }

/* ─── PACK SECTION ─── */
.pack-section { max-width: 1060px; margin: 0 auto; padding: 16px 24px 32px; }
.pack-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 20px; padding: 36px;
  display: flex; gap: 28px; align-items: center;
  position: relative; overflow: hidden;
}
.pack-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,107,43,.4), transparent);
}
.pack-art {
  flex: 0 0 90px; height: 90px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 36px rgba(255,107,43,.28);
}
.pack-eyebrow {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--orange); margin-bottom: 6px;
}
.pack-title {
  font-size: clamp(18px, 2.6vw, 26px); font-weight: 700;
  letter-spacing: -.4px; line-height: 1.2; margin-bottom: 10px;
}
.pack-desc { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

/* ─── SHARE SECTION ─── */
.share-section { max-width: 1060px; margin: 0 auto; padding: 0 24px 56px; }
.share-card {
  background: linear-gradient(135deg, rgba(37,211,102,.07), rgba(37,211,102,.02));
  border: 1px solid rgba(37,211,102,.18);
  border-radius: 20px; padding: 40px; text-align: center;
}
.share-label {
  font-size: 17px; font-weight: 600; margin-bottom: 22px;
  color: rgba(255,255,255,.85);
}

/* ─── FOOTER ─── */
.footer {
  text-align: center; padding: 22px;
  font-size: 12px; color: var(--muted2);
  border-top: 1px solid var(--border);
}

/* ─── MINI BAR ─── */
.mini-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  height: var(--mini-h);
  background: rgba(20,20,28,.92);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px);
  border-top: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 20px; gap: 12px;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.34,1.3,.64,1);
}
.mini-bar.visible { transform: translateY(0); }

.mini-left {
  flex: 1; display: flex; align-items: center; gap: 12px;
  cursor: pointer; min-width: 0;
}
.mini-left:hover .mini-title { color: var(--orange); }

.mini-thumb {
  flex: 0 0 44px; height: 44px; border-radius: 9px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.mini-info { min-width: 0; }
.mini-title {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px;
  transition: color .2s;
}
.mini-sub { font-size: 11px; color: var(--muted); }

.mini-controls { display: flex; align-items: center; gap: 6px; }
.mini-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: none; border: none; cursor: pointer; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: color .2s, background .2s;
}
.mini-btn:hover { color: var(--white); background: var(--surface); }
.mini-play {
  width: 42px; height: 42px;
  background: var(--white); color: var(--bg);
  border-radius: 50%;
}
.mini-play:hover { background: rgba(255,255,255,.88); color: var(--bg); }

.mini-progress {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,.1);
}
.mini-fill { height: 100%; background: var(--orange); width: 0%; transition: width .1s linear; }

/* ─── FULL PLAYER PANEL ─── */
.fp-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
}
.fp-overlay.open { opacity: 1; pointer-events: all; }

.fp-panel {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 400;
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  border-top: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  padding: 12px 28px 40px;
  display: flex; flex-direction: column; align-items: center;
  gap: 0;
  transform: translateY(100%);
  transition: transform .45s cubic-bezier(.34,1.1,.64,1);
  max-height: 95vh;
  overflow-y: auto;

  /* desktop: max-width centered */
  max-width: 500px;
  margin: 0 auto;
}
.fp-panel.open { transform: translateY(0); }

.fp-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.18); margin-bottom: 16px;
}
.fp-close {
  align-self: flex-end; background: var(--surface); border: none;
  color: var(--muted); width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; margin-bottom: 20px; transition: color .2s, background .2s;
}
.fp-close:hover { color: var(--white); background: var(--surface-h); }

.fp-art-wrap { width: 100%; display: flex; justify-content: center; margin-bottom: 28px; }
.fp-art {
  width: min(280px, 70vw);
  height: min(280px, 70vw);
  border-radius: 20px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  transition: transform .3s ease;
}
.fp-panel.open .fp-art { transform: scale(1); }
.fp-art-inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }

.fp-meta { width: 100%; text-align: center; margin-bottom: 24px; }
.fp-title { font-size: 22px; font-weight: 700; letter-spacing: -.5px; margin-bottom: 4px; }
.fp-artist { font-size: 14px; color: var(--muted); }

/* Progress */
.fp-progress-wrap { width: 100%; margin-bottom: 28px; }
.fp-progress {
  width: 100%; height: 5px; background: rgba(255,255,255,.12);
  border-radius: 3px; position: relative; cursor: pointer; margin-bottom: 8px;
}
.fp-progress:hover .fp-dot { opacity: 1; }
.fp-fill { height: 100%; background: var(--white); border-radius: 3px; width: 0%; pointer-events: none; }
.fp-dot {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; border-radius: 50%; background: var(--white);
  left: 0%; margin-left: -7px; opacity: 0; transition: opacity .2s;
  pointer-events: none;
}
.fp-times {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
}

/* Controls */
.fp-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; margin-bottom: 32px; width: 100%;
}
.fp-ctrl {
  background: none; border: none; cursor: pointer; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: color .2s, transform .15s;
}
.fp-ctrl:hover { color: var(--white); transform: scale(1.1); }
.fp-play {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--white); color: var(--bg);
  box-shadow: 0 8px 28px rgba(255,255,255,.2);
  transition: transform .15s, box-shadow .2s, background .2s;
}
.fp-play:hover { background: rgba(255,255,255,.9); transform: scale(1.06); box-shadow: 0 10px 36px rgba(255,255,255,.3); }
.fp-play:active { transform: scale(.96); }

/* Action buttons */
.fp-actions { display: flex; gap: 12px; width: 100%; }
.fp-action-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 20px; border-radius: 14px;
  font-size: 14px; font-weight: 600; font-family: var(--font);
  text-decoration: none; cursor: pointer; border: none;
  transition: transform .15s, box-shadow .2s, opacity .2s;
}
.fp-action-btn:hover { transform: scale(1.02); }
.fp-action-btn:active { transform: scale(.98); opacity: .9; }
.fp-download {
  background: var(--surface-h); color: var(--white);
  border: 1px solid var(--border);
}
.fp-download:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.2); }
.fp-wa {
  background: var(--green); color: var(--white);
  box-shadow: 0 6px 22px rgba(37,211,102,.3);
}
.fp-wa:hover { box-shadow: 0 8px 28px rgba(37,211,102,.45); }
.fp-share {
  background: var(--surface-h); color: var(--white);
  border: 1px solid var(--border);
}
.fp-share:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.2); }

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: calc(var(--mini-h) + 14px); left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(255,255,255,.1); color: var(--white);
  backdrop-filter: blur(20px); border: 1px solid var(--border);
  padding: 9px 20px; border-radius: 50px;
  font-size: 13px; font-weight: 500;
  opacity: 0; transition: opacity .3s, transform .3s;
  pointer-events: none; z-index: 500; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── SONG ENTER ANIMATION ─── */
@keyframes fadeInRow {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.row-enter { animation: fadeInRow .35s ease both; }

/* ─── RESPONSIVE: player panel desktop ─── */
@media (min-width: 600px) {
  .fp-panel {
    left: 50%; right: auto;
    transform: translateX(-50%) translateY(100%);
    border-radius: 24px 24px 0 0;
  }
  .fp-panel.open { transform: translateX(-50%) translateY(0); }
}

/* ─── RESPONSIVE: tablets y móviles (≤768px) ─── */
@media (max-width: 768px) {
  .songs-section,
  .pack-section,
  .share-section { padding-left: 16px; padding-right: 16px; }

  .pack-card { flex-direction: column; text-align: center; padding: 24px 20px; }
  .pack-art   { margin: 0 auto; }

  .fp-actions { flex-wrap: wrap; }
  .fp-action-btn { flex: 1 1 120px; font-size: 13px; padding: 12px 14px; gap: 7px; }
}

/* ─── RESPONSIVE: móviles (≤480px) ─── */
@media (max-width: 480px) {
  /* Hero */
  .hero { flex-direction: column; align-items: center; padding: 28px 16px 20px; gap: 14px; }
  .hero-inner { align-items: center; text-align: center; }
  .hero-logo { width: min(200px, 68vw); }
  .hero-ctas { justify-content: center; flex-wrap: nowrap; gap: 8px; }
  .btn-primary, .btn-ghost { padding: 13px 18px; font-size: 14px; white-space: nowrap; }
  .hero-subtitle { font-size: 12px; }

  /* Stats — oculta labels, solo iconos + números */
  .stats-bar { padding: 10px 18px; }
  .stat-label { display: none; }
  .stat-item { gap: 5px; font-size: 13px; }
  .stat-item svg { width: 14px; height: 14px; }
  .stat-sep { margin: 0 14px; }

  /* Songs */
  .section-title { font-size: 21px; }
  .song-row { padding: 9px 10px; gap: 10px; }
  .sr-art { flex: 0 0 40px; height: 40px; }
  .sr-title { font-size: 14px; }
  .sr-song-stats { gap: 5px; }
  .sr-song-stats span { font-size: 10px; }

  /* Pack */
  .pack-title { font-size: 19px; }

  /* Share */
  .share-card { padding: 28px 16px; }
  .share-label { font-size: 15px; }
  .share-btns { flex-direction: column; align-items: center; }
  .btn-wa, .btn-share { width: 100%; max-width: 280px; justify-content: center; }

  /* Mini bar */
  .mini-title { max-width: 110px; }
  .mini-bar { padding: 0 12px; }

  /* Full player */
  .fp-panel { padding: 10px 18px 32px; }
  .fp-title { font-size: 19px; }
  .fp-actions { gap: 8px; }
  .fp-action-btn { padding: 12px 10px; font-size: 12px; gap: 6px; }
  .fp-action-btn svg { width: 16px; height: 16px; }
}
