/*
Theme Name:  Rolyang Music
Theme URI:   https://rolyang.com
Description: A dark, JioSaavn-inspired music streaming theme for Rolyang.
Version:     1.3.0
Author:      Rolyang
Author URI:  https://rolyang.com
License:     GPL-2.0-or-later
Text Domain: rolyang
*/

/* ════════════════════════════════════════════════════════════
   BASE
════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0d0d0d;
  --surface:     #181818;
  --surface2:    #222;
  --surface3:    #2d2d2d;
  --border:      #2a2a2a;
  --accent:      #e63946;
  --accent2:     #c1121f;
  --text:        #f2f2f2;
  --text-mute:   #9a9a9a;
  --text-faint:  #555;
  --radius:      10px;
  --nav-h:       60px;
  --sidebar-w:   220px;
  --player-h:    80px;   /* matches plugin --rmp-bar-h */
  --rmp-bar-h:   80px;   /* alias so plugin's body.rmp-has-player calc works */
  --font-display: 'Sora', sans-serif;
  --font-body:    'Noto Sans', sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
h1,h2,h3,h4,h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }


/* ════════════════════════════════════════════════════════════
   FRONT PAGE HERO  — no wasted space, content fills it
════════════════════════════════════════════════════════════ */
.fp-hero {
  position: relative;
  /* shrink to content when song has no art; cap so it doesn't become tiny */
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.fp-hero--empty {
  min-height: 200px;
  background: var(--surface);
  align-items: center;
  justify-content: center;
}

.fp-hero-bg {
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  filter: blur(60px) brightness(.3) saturate(1.6);
  transform: scale(1.15);
}

.fp-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,  rgba(13,13,13,.95) 0%, rgba(13,13,13,.55) 60%, transparent 100%),
    linear-gradient(to top,    rgba(13,13,13,.9)  0%, transparent 55%);
}

.fp-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 28px;
  /* uniform padding — top matches bottom so it feels balanced */
  padding: 28px 32px 32px;
  width: 100%;
}

.fp-hero-inner--centered { align-items: center; justify-content: center; }

.fp-welcome { text-align: center; color: var(--text-mute); }
.fp-welcome svg { margin: 0 auto 16px; }
.fp-welcome h1 { font-size: 1.6rem; color: var(--text); margin-bottom: 8px; }
.fp-welcome p { margin-bottom: 20px; }

.fp-hero-art { flex-shrink: 0; }
.fp-hero-art img {
  width: 170px;
  height: 170px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0,0,0,.7);
}
.fp-hero-art-placeholder {
  width: 170px;
  height: 170px;
  border-radius: 10px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
}

.fp-hero-info { flex: 1; min-width: 0; }

.fp-hero-eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
}

.fp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.fp-badge--featured { background: rgba(230,57,70,.2); color: var(--accent); border: 1px solid rgba(230,57,70,.3); }
.fp-badge--trending { background: rgba(0,180,216,.15); color: #00b4d8; border: 1px solid rgba(0,180,216,.25); }

.fp-genre-tag {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-mute);
}
.fp-genre-tag:hover { background: rgba(255,255,255,.17); color: var(--text); }

.fp-hero-title {
  font-size: clamp(1.4rem, 3vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -.4px;
  line-height: 1.05;
  margin-bottom: 12px;
  color: #fff;
}
.fp-hero-title a { color: inherit; }
.fp-hero-title a:hover { color: var(--accent); }

.fp-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-mute);
}
.fp-hero-artist { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.fp-hero-artist img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.fp-hero-artist:hover { color: var(--accent); }
.fp-hero-sep { color: var(--text-faint); }
.fp-hero-plays { display: inline-flex; align-items: center; gap: 4px; }

.fp-hero-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.fp-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: 50px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .15s;
  box-shadow: 0 4px 16px rgba(230,57,70,.35);
}
.fp-play-btn:hover { background: var(--accent2); transform: scale(1.03); color: #fff; }
.fp-play-btn svg { width: 16px; height: 16px; fill: currentColor; }

.fp-info-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 50px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
}
.fp-info-btn:hover { background: rgba(255,255,255,.17); color: var(--text); }

/* ════════════════════════════════════════════════════════════
   FRONT PAGE SECTIONS  — consistent even spacing
════════════════════════════════════════════════════════════ */
.fp-section {
  padding: 28px 32px 0;
}
.fp-section + .fp-section { padding-top: 32px; }
.fp-section:last-of-type { padding-bottom: 40px; }

.fp-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.fp-section-header h2 { font-size: 1.05rem; font-weight: 700; }
.fp-see-all { font-size: 12px; font-weight: 600; color: var(--text-mute); }
.fp-see-all:hover { color: var(--accent); }

/* Genre chips */
.fp-genre-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fp-genre-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 50px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  transition: border-color .2s, transform .15s;
}
.fp-genre-chip:hover { border-color: var(--chip-color, var(--accent)); color: var(--text); transform: translateY(-1px); }
.fp-genre-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--chip-color, var(--accent)); flex-shrink: 0; }
.fp-genre-chip-count { font-size: 11px; color: var(--text-mute); }

/* Scroll track */
.fp-scroll-track { display: flex; gap: 13px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; cursor: grab; }
.fp-scroll-track::-webkit-scrollbar { display: none; }
.fp-scroll-track:active { cursor: grabbing; }

/* Song cards */
.fp-song-card { flex: 0 0 150px; display: flex; flex-direction: column; gap: 8px; }
.fp-song-card-img { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--surface2); }
.fp-song-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.fp-song-card:hover .fp-song-card-img img { transform: scale(1.06); }
.fp-song-card-placeholder { width: 100%; height: 100%; background: var(--surface3); display: flex; align-items: center; justify-content: center; color: var(--text-faint); }
.fp-type-badge { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.7); color: var(--text-mute); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 2px 6px; border-radius: 4px; }
.fp-song-card-play {
  position: absolute;
  bottom: 7px; right: 7px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-decoration: none;
  opacity: 0; transform: translateY(5px);
  transition: opacity .2s, transform .2s;
}
.fp-song-card-play svg { width: 13px; height: 13px; fill: currentColor; }
.fp-song-card:hover .fp-song-card-play { opacity: 1; transform: translateY(0); }
.fp-song-card-play:hover { background: var(--accent2); color: #fff; }
.fp-song-card-info { padding: 0 2px; }
.fp-song-card-title { display: block; font-weight: 600; font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.fp-song-card-title:hover { color: var(--accent); }
.fp-song-card-artist { display: block; font-size: 11px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-song-card-artist:hover { color: var(--text); }

/* Artist cards */
.fp-artist-card { flex: 0 0 120px; }
.fp-artist-card-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; text-align: center;
  padding: 10px 6px; border-radius: 10px;
  transition: background .2s;
}
.fp-artist-card-inner:hover { background: var(--surface2); }
.fp-artist-avatar { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--surface2); }
.fp-artist-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fp-artist-avatar-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-faint); }
.fp-artist-name { display: block; font-weight: 600; font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.fp-artist-genre { display: block; font-size: 11px; color: var(--text-mute); }

/* Trending grid */
.fp-trending-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.fp-trending-row {
  display: grid;
  grid-template-columns: 26px 46px 1fr auto 50px;
  align-items: center;
  gap: 9px;
  padding: 6px 7px;
  border-radius: 7px;
  transition: background .15s;
}
.fp-trending-row:hover { background: var(--surface2); }
.fp-trending-num { font-size: 13px; font-weight: 700; color: var(--text-faint); text-align: center; }
.fp-trending-art { position: relative; width: 46px; height: 46px; }
.fp-trending-art img, .fp-trending-art-placeholder { width: 46px; height: 46px; border-radius: 6px; object-fit: cover; }
.fp-trending-art-placeholder { background: var(--surface3); display: block; }
.fp-trending-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.65); border-radius: 6px; border: none; cursor: pointer; color: #fff; opacity: 0; transition: opacity .15s; }
.fp-trending-row:hover .fp-trending-play { opacity: 1; }
.fp-trending-play svg { width: 13px; height: 13px; fill: currentColor; }
.fp-trending-title { display: block; font-weight: 600; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-trending-title:hover { color: var(--accent); }
.fp-trending-artist { display: block; font-size: 11px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.fp-trending-plays { font-size: 11px; color: var(--text-faint); white-space: nowrap; }
.fp-trending-dur { font-size: 12px; color: var(--text-mute); text-align: right; }

/* ════════════════════════════════════════════════════════════
   ARTIST PROFILE  — balanced spacing
════════════════════════════════════════════════════════════ */
.rap-page { padding: 0 0 var(--player-h); }

.rap-hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.rap-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center top; filter: blur(60px) brightness(.4) saturate(1.4); transform: scale(1.1); }
.rap-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(13,13,13,.1) 0%, rgba(13,13,13,.5) 50%, rgba(13,13,13,.95) 100%); }

.rap-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  /* uniform 28px all sides — tight but breathable */
  gap: 28px;
  padding: 28px 32px 32px;
  width: 100%;
}

.rap-artist-photo-wrap { position: relative; flex-shrink: 0; }
.rap-artist-photo {
  width: 160px; height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.12);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 14px 40px rgba(0,0,0,.7);
}
.rap-artist-photo--placeholder { display: flex; align-items: center; justify-content: center; background: var(--surface2); color: var(--text-mute); }
.rap-photo-verified { position: absolute; bottom: 4px; right: 4px; background: var(--bg); border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }

.rap-hero-info { flex: 1; min-width: 0; }
.rap-eyebrow { display: block; font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.rap-artist-name { font-size: clamp(1.7rem, 3.5vw, 2.8rem); font-weight: 900; letter-spacing: -.4px; line-height: 1.05; margin-bottom: 12px; color: #fff; }
.rap-meta-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.rap-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); font-size: 11px; font-weight: 500; color: var(--text); }
.rap-chip--mute { color: var(--text-mute); background: rgba(255,255,255,.06); }
.rap-stats { display: flex; gap: 22px; margin-bottom: 16px; }
.rap-stat { display: flex; flex-direction: column; gap: 1px; }
.rap-stat-val { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: #fff; }
.rap-stat-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-mute); }
.rap-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rap-btn-play { display: inline-flex; align-items: center; gap: 7px; padding: 10px 22px; border-radius: 50px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; border: none; cursor: pointer; transition: background .2s, transform .15s; }
.rap-btn-play:hover { background: var(--accent2); transform: scale(1.03); }
.rap-btn-ghost { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 50px; background: rgba(255,255,255,.08); color: var(--text); font-size: 12px; font-weight: 600; border: 1px solid rgba(255,255,255,.14); cursor: pointer; text-decoration: none; transition: background .2s; }
.rap-btn-ghost:hover { background: rgba(255,255,255,.14); color: var(--text); }
.rap-social-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: var(--text-mute); transition: color .2s, background .2s; }
.rap-social-btn:hover { color: var(--accent); }

/* Tabs — flush, no gap before first tab */
.rap-tabs-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  position: sticky;
  top: var(--nav-h);
  z-index: 100;
  background: rgba(13,13,13,.96);
  backdrop-filter: blur(12px);
  /* zero margin above — hero goes right into tabs */
  margin-top: 0;
}
.rap-tab { position: relative; padding: 13px 16px; font-size: 13px; font-weight: 600; color: var(--text-mute); background: none; border: none; cursor: pointer; white-space: nowrap; transition: color .2s; }
.rap-tab::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; opacity: 0; transition: opacity .2s; }
.rap-tab.active { color: var(--text); }
.rap-tab.active::after { opacity: 1; }
.rap-tab-panel { display: none; padding: 12px 32px 0; }
.rap-tab-panel.active { display: block; }

/* Track list */
.rap-track-list { padding-top: 4px; }
.rap-tl-header, .rap-tl-row { display: grid; grid-template-columns: 34px 46px 1fr 170px 50px 30px 30px; align-items: center; gap: 8px; padding: 0 6px; }
.rap-tl-header { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 2px; }
.rap-tl-row { border-radius: 7px; padding-top: 5px; padding-bottom: 5px; transition: background .15s; }
.rap-tl-row:hover { background: var(--surface2); }
.rap-tl-num { position: relative; display: flex; align-items: center; justify-content: center; width: 28px; }
.rap-tl-index { color: var(--text-mute); font-size: 13px; }
.rap-tl-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; color: var(--text); opacity: 0; transition: opacity .15s; }
.rap-tl-play svg { width: 13px; height: 13px; fill: currentColor; }
.rap-tl-row:hover .rap-tl-index { opacity: 0; }
.rap-tl-row:hover .rap-tl-play { opacity: 1; }
.rap-tl-art img, .rap-tl-art-placeholder { width: 40px; height: 40px; border-radius: 5px; object-fit: cover; }
.rap-tl-art-placeholder { background: var(--surface3); display: block; }
.rap-tl-song-name { display: block; font-weight: 500; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rap-tl-song-name:hover { color: var(--accent); }
.rap-tl-album a { font-size: 12px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.rap-tl-album a:hover { color: var(--text); }
.rap-tl-dur { font-size: 12px; color: var(--text-mute); }
.rap-fav-btn { background: none; border: none; cursor: pointer; color: var(--text-faint); opacity: 0; transition: color .15s, opacity .15s; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; }
.rap-tl-row:hover .rap-fav-btn { opacity: 1; }
.rap-fav-btn--active { color: var(--accent) !important; opacity: 1 !important; }
.rap-show-more-wrap { padding: 12px 0; text-align: center; }
.rap-show-more { display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px; border-radius: 50px; background: var(--surface2); border: 1px solid var(--border); color: var(--text-mute); font-size: 12px; font-weight: 600; cursor: pointer; }
.rap-show-more:hover { background: var(--surface3); color: var(--text); }

/* Albums shelf */
.rap-albums-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 14px; padding: 16px 0; }
.rap-album-card-inner { display: flex; flex-direction: column; gap: 8px; cursor: pointer; border-radius: 8px; padding: 8px; transition: background .2s; }
.rap-album-card-inner:hover { background: var(--surface2); }
.rap-album-card-img { position: relative; border-radius: 7px; overflow: hidden; aspect-ratio: 1; background: var(--surface2); }
.rap-album-card-img img { width: 100%; height: 100%; object-fit: cover; }
.rap-album-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-faint); }
.rap-album-card-hover { position: absolute; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: flex-end; padding: 8px; opacity: 0; transition: opacity .2s; }
.rap-album-card-inner:hover .rap-album-card-hover { opacity: 1; }
.rap-album-play { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; transform: translateY(8px); transition: transform .2s; }
.rap-album-card-inner:hover .rap-album-play { transform: translateY(0); }
.rap-album-play svg { width: 15px; height: 15px; fill: currentColor; }
.rap-album-card-name { display: block; font-weight: 600; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rap-album-card-meta { display: block; font-size: 11px; color: var(--text-mute); }

/* Bio */
.rap-bio-layout { display: grid; grid-template-columns: 1fr 220px; gap: 36px; padding: 24px 0; }
.rap-bio-text h2 { font-size: 1.3rem; margin-bottom: 16px; }
.rap-bio-content { color: var(--text-mute); line-height: 1.8; font-size: 14px; }
.rap-bio-content p { margin-bottom: 12px; }
.rap-bio-photo img { width: 100%; border-radius: 10px; object-fit: cover; }
.rap-empty { text-align: center; padding: 48px 24px; color: var(--text-mute); }
.rap-empty svg { margin: 0 auto 12px; opacity: .35; }

/* ════════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 32px calc(var(--player-h) + 16px);
}
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
.footer-brand-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; margin-bottom: 6px; }
.footer-brand-name span { color: var(--accent); }
.footer-brand-desc { font-size: 13px; color: var(--text-mute); line-height: 1.6; }
.footer-col-title { font-family: var(--font-display); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); margin-bottom: 10px; }
.footer-links { display: flex; flex-direction: column; gap: 7px; }
.footer-links a { font-size: 13px; color: var(--text-mute); transition: color .15s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-faint); }

/* ════════════════════════════════════════════════════════════
   PLAYER BAR — theme colour bridge only
   All layout/sizing is owned by the plugin's player.css.
   style.css is enqueued inside wp_head so it loads BEFORE the
   plugin's player.css in practice — these rules are intentionally
   lower-specificity so the plugin can override them freely.
════════════════════════════════════════════════════════════ */
.rmp-player-bar { background: rgba(13,13,13,.98); border-top-color: var(--border); }
.rmp-btn-icon.rmp-active,
.rmp-btn-fav.rmp-fav-active { color: var(--accent); }
.rmp-btn-play  { background: var(--accent); }
.rmp-btn-play:hover { background: var(--accent2); }
.rmp-seek-fill { background: var(--accent); }
.rmp-queue-drawer { background: var(--surface); }
.rmp-queue-item.rmp-queue-active { border-left-color: var(--accent); }

/* ════════════════════════════════════════════════════════════
   SHARED UTILITIES
════════════════════════════════════════════════════════════ */
.rmp-empty { text-align: center; padding: 56px 24px; color: var(--text-mute); }
.rmp-empty svg { margin: 0 auto 14px; opacity: .35; }
.rmp-pagination { display: flex; gap: 5px; justify-content: center; padding: 32px 0 0; flex-wrap: wrap; }
.rmp-pagination .page-numbers { display: flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 9px; border-radius: 7px; background: var(--surface2); border: 1px solid var(--border); color: var(--text-mute); font-size: 13px; font-weight: 600; text-decoration: none; transition: all .15s; }
.rmp-pagination .page-numbers:hover { background: var(--surface3); color: var(--text); }
.rmp-pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.rmp-pagination .page-numbers.dots { background: none; border: none; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */
/* ── GREETING ─────────────────────────────────────────────── */
.fp-greeting-section { padding-bottom: 0; }
.fp-greeting { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fp-greeting h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  color: var(--text);
  margin: 0;
}
.fp-greeting-name {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 900px) {
  .fp-trending-grid { grid-template-columns: 1fr; }
  .rap-tl-header, .rap-tl-row { grid-template-columns: 30px 42px 1fr 46px 26px; }
  .rap-tl-album { display: none; }
}

@media (max-width: 768px) {
  /* ── TIDAL-STYLE MOBILE TRACK ROWS ── */
  .pl-track-header { display: none; }
  .pl-track-row { padding: 8px 12px !important; grid-template-columns: 36px 44px 1fr auto !important; }
  .pl-track-album, .pl-track-dur { display: none !important; }
  /* ── TIDAL-STYLE MOBILE ── */
  .pl-track-header { display: none; }
  .pl-track-row { padding: 8px 12px !important; grid-template-columns: 36px 44px 1fr auto !important; }
  .pl-track-album, .pl-track-dur { display: none !important; }
  .rmp-song-grid { grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 16px; }
  /* ── TIDAL-STYLE MOBILE TRACK ROWS ── */
  /* Album track rows */
  .rmp-track-header, .rmp-track-row { padding-left: 12px; padding-right: 12px; }
  /* Playlist track rows */
  .pl-track-header { display: none; }
  .pl-track-row { padding: 8px 12px; grid-template-columns: 36px 44px 1fr auto; }
  .pl-track-album, .pl-track-dur { display: none; }
  /* Hero */
  .fp-hero { min-height: 240px; }
  .fp-hero-inner { flex-direction: column; align-items: flex-start; padding: 20px 18px 24px; gap: 14px; }
  .fp-hero-art { display: none; }
  .fp-hero-title { font-size: 1.4rem; }
  .fp-hero-actions { gap: 8px; }
  .fp-play-btn { padding: 9px 18px; font-size: 12px; }
  .fp-info-btn { padding: 8px 15px; font-size: 12px; }

  /* Sections */
  .fp-section { padding: 22px 16px 0; }
  .fp-section:last-of-type { padding-bottom: 28px; }
  .fp-song-card { flex: 0 0 130px; }
  .fp-artist-card { flex: 0 0 108px; }
  .fp-artist-avatar { width: 84px; height: 84px; }
  .fp-trending-row { grid-template-columns: 24px 42px 1fr 42px; }
  .fp-trending-plays { display: none; }

  /* Artist profile */
  .rap-hero { min-height: 260px; }
  .rap-hero-inner { flex-direction: column; align-items: center; text-align: center; padding: 20px 18px 24px; gap: 14px; }
  .rap-artist-photo { width: 120px; height: 120px; }
  .rap-artist-name { font-size: 1.6rem; }
  .rap-meta-chips, .rap-stats, .rap-actions { justify-content: center; }
  .rap-tabs-bar { padding: 0 10px; overflow-x: auto; }
  .rap-tab { padding: 11px 12px; font-size: 12px; }
  .rap-tab-panel { padding: 10px 16px 0; }
  .rap-tl-header, .rap-tl-row { grid-template-columns: 26px 44px 1fr 42px 28px !important; }
  .rap-tl-fav { display: none; }
  .rap-tl-atp { display: none; }
  .rap-albums-shelf { grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); }
  .rap-bio-layout { grid-template-columns: 1fr; }
  .rap-bio-photo { display: none; }

  /* Footer — on mobile extra space for player + bottom nav */
  .site-footer { padding: 24px 16px calc(var(--player-h) + 56px + 12px); }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  /* Song/artist grids */
  .rmp-song-grid { grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 16px; }
  /* Cards */
  .sox-grid { grid-template-columns: repeat(auto-fill, minmax(130px,1fr)) !important; }
  /* Song/album pages */
  .rmp-album-hero-inner { flex-direction: column; align-items: flex-start; padding: 20px 16px 24px; gap: 16px; }
  .rmp-album-cover { width: 120px; height: 120px; }
  .rmp-album-cover { width: 130px; height: 130px; }
  .rmp-album-tracks { padding: 0 12px; }
  .song-hero-inner { flex-direction: column; align-items: flex-start; padding: 20px 16px 24px; }
  .song-cover { width: 130px; height: 130px; }
  .song-stats { padding: 14px 16px; gap: 16px; flex-wrap: wrap; }
  .song-lyrics-section, .song-related-section { padding: 20px 16px; }
  /* Auth pages */
  .auth-card { padding: 24px 20px; }
}

@media (max-width: 480px) {
  .fp-section { padding: 18px 12px 0; }
  .fp-song-card { flex: 0 0 115px; }
  .fp-genre-chip { padding: 6px 12px; font-size: 11px; }
  .fp-trending-row { grid-template-columns: 20px 38px 1fr 36px; gap: 6px; }
  .rap-tl-header, .rap-tl-row { grid-template-columns: 26px 44px 1fr 36px !important; gap: 8px; }
  .rap-tl-dur { display: none; }
  .rap-tl-fav { display: none; }
  .rap-tl-atp { display: none; }
  /* Song/album/artist grids go 2-col on tiny screens */
  .rmp-song-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  /* Section headers full-width on mobile */
  .fp-section-header { flex-wrap: wrap; }
}

/* ── MOBILE APP-LIKE TOUCH IMPROVEMENTS ─────────────────── */
@media (max-width: 768px) {
  /* Smooth momentum scrolling everywhere */
  .rmp-album-tracks, .pl-tracks, .rap-tl-wrapper,
  .rmp-song-grid, .profile-section, .charts-list {
    -webkit-overflow-scrolling: touch;
  }

  /* Remove blue tap highlight */
  a, button, [role="button"] {
    -webkit-tap-highlight-color: transparent;
  }

  /* Active states feel snappy */
  .rmp-track-row:active,
  .pl-track-row:active,
  .rap-tl-row:active {
    background: rgba(255,255,255,.07) !important;
    transition: none !important;
  }

  /* Buttons have visible press state */
  .rmp-btn-play-all:active,
  .rmp-btn-shuffle:active,
  .pl-btn-primary:active,
  .pl-btn-ghost:active {
    transform: scale(0.96) !important;
    transition: transform 0.05s !important;
  }

  /* Hero sections don't clip content */
  .rmp-album-hero, .pl-hero, .rap-artist-hero {
    overflow: visible !important;
  }

  /* Track play button — bigger tap target on mobile */
  .rmp-track-num, .pl-track-num, .rap-tl-num {
    min-width: 36px;
    min-height: 44px;
  }
}

/* ── SAFARI / iOS FIXES ─────────────────────────────────── */
/* Safe area padding for iPhone notch / home indicator */
body.rmp-has-player {
  padding-bottom: calc(var(--player-h, 80px) + env(safe-area-inset-bottom, 0px));
}
@supports not (padding-bottom: env(safe-area-inset-bottom)) {
  body.rmp-has-player {
    padding-bottom: calc(var(--player-h, 80px) + 20px);
  }
}

/* Fix position:fixed issues in Safari */
.site-wrapper {
  -webkit-overflow-scrolling: touch;
}

/* Prevent elastic scroll behind now-playing panel */
.rmp-nowplaying.open ~ * {
  pointer-events: none;
}

/* ════════════════════════════════════════════════════════════
   iOS APP-LIKE EXPERIENCE
════════════════════════════════════════════════════════════ */
html, body {
  /* Prevent overscroll bounce/rubber-band on iOS Safari */
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
}

/* Prevent double-tap-to-zoom on interactive elements (feels more native) */
a, button, .home-card, .rmp-track-row, .pl-track-row, .rap-tl-row,
.rmp-bottom-nav-item, .rmp-play-btn, input, select, textarea {
  touch-action: manipulation;
}

/* Disable iOS callout/selection on UI chrome */
.rmp-bottom-nav, #rmp-player-bar, .site-header {
  -webkit-touch-callout: none;
}

/* When running as installed PWA (standalone), hide elements meant for browser only */
@media all and (display-mode: standalone) {
  .rmp-pwa-install-hint { display: none !important; }
}

/* ── INSTALL APP BANNER ──────────────────────────────────
   Full-width banner near the top, works for both Android
   (native install prompt) and iOS (instructions modal). */
.rmp-install-banner {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0; right: 0;
  z-index: 999985;
  background: linear-gradient(135deg, #1a0a0f, #0d0d0f);
  border-bottom: 1px solid rgba(230,57,70,.25);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform .35s cubic-bezier(.32,.72,0,1), opacity .35s;
  pointer-events: none;
}
@media (min-width: 769px) {
  .rmp-install-banner, .rmp-ios-install-modal { display: none !important; }
}
.rmp-install-banner.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Push sticky header down so it doesn't overlap the install banner.
   .site-header already adds its own safe-area padding-top, so the
   sticky offset here only needs the banner's own height. */
body.rmp-install-banner-visible .site-header {
  top: 58px;
}
.rmp-install-banner-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
}
.rmp-install-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg,#e63946,#c62e3c);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(230,57,70,.35);
}
.rmp-install-text { flex: 1; min-width: 0; }
.rmp-install-title { font-size: 13px; font-weight: 800; color: #fff; line-height: 1.3; }
.rmp-install-sub { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 1px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rmp-install-btn {
  background: var(--accent, #e63946); border: none; border-radius: 20px;
  color: #fff; font-size: 13px; font-weight: 700;
  padding: 8px 18px; cursor: pointer; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.rmp-install-btn:active { transform: scale(.96); }
.rmp-install-close {
  background: rgba(255,255,255,.08); border: none; border-radius: 50%;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5); flex-shrink: 0; cursor: pointer; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.rmp-install-close svg { pointer-events: none; }

/* ── iOS INSTALL INSTRUCTIONS MODAL ─────────────────────── */
.rmp-ios-install-modal {
  position: fixed; inset: 0; z-index: 999998;
  background: rgba(0,0,0,.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.rmp-ios-install-modal.show { opacity: 1; pointer-events: auto; }
.rmp-ios-install-card {
  background: #161618;
  border-radius: 20px 20px 0 0;
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom, 0px));
  width: 100%; max-width: 480px;
  position: relative;
  transform: translateY(40px);
  transition: transform .3s cubic-bezier(.32,.72,0,1);
  box-shadow: 0 -8px 40px rgba(0,0,0,.5);
}
.rmp-ios-install-modal.show .rmp-ios-install-card { transform: translateY(0); }
.rmp-ios-install-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,.08); border: none; border-radius: 50%;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5); cursor: pointer;
}
.rmp-ios-install-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg,#e63946,#c62e3c);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 20px rgba(230,57,70,.4);
}
.rmp-ios-install-card h3 { font-size: 1.2rem; font-weight: 800; color: #fff; margin: 0 0 8px; }
.rmp-ios-install-card p { font-size: 13px; color: rgba(255,255,255,.55); line-height: 1.6; margin: 0 0 22px; }
.rmp-ios-step {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-top: 1px solid rgba(255,255,255,.06);
  font-size: 14px; color: rgba(255,255,255,.85);
}
.rmp-ios-step:first-of-type { border-top: none; }
.rmp-ios-step-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(230,57,70,.15); color: var(--accent,#e63946);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.rmp-ios-step svg { vertical-align: middle; margin: 0 2px; opacity: .7; }

/* ════════════════════════════════════════════════════════════
   BOTTOM TAB BAR — App-like mobile navigation
════════════════════════════════════════════════════════════ */
.rmp-bottom-nav {
  display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
  /* Show bottom nav on mobile */
  .rmp-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 56px;
    background: rgba(13, 13, 15, 0.95);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255,255,255,.08);
    z-index: 9990; /* below player bar (9999) */
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-bottom: constant(safe-area-inset-bottom, 0px);
    -webkit-tap-highlight-color: transparent;
  }

  .rmp-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: rgba(255,255,255,.45);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .3px;
    transition: color .15s;
    padding: 6px 0;
    -webkit-tap-highlight-color: transparent;
  }

  .rmp-bottom-nav-item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: transform .15s;
  }

  .rmp-bottom-nav-item.active {
    color: var(--accent, #e63946);
  }

  .rmp-bottom-nav-item:active svg {
    transform: scale(0.88);
  }

  /* Push page content above bottom nav + player bar */
  .site-wrapper {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  /* When player is active, add extra space */
  body.rmp-has-player .site-wrapper {
    padding-bottom: calc(56px + 64px + env(safe-area-inset-bottom, 0px));
  }

  /* Move player bar above bottom nav */
  #rmp-player-bar {
    bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Hide desktop footer on mobile */
  .site-footer { display: none; }

  /* ── GENERAL APP FEEL ─────────────────────────────────── */
  
  /* Smooth scroll everywhere */
  html { scroll-behavior: smooth; }
  
  /* Remove text selection on interactive elements */
  .home-card, .rmp-track-row, .pl-track-row, .rap-tl-row,
  .rmp-bottom-nav-item, button, a {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  /* Card tap feedback */
  .home-card:active .home-card-art {
    opacity: 0.85;
    transform: scale(0.97);
    transition: transform 0.1s, opacity 0.1s;
  }

  /* Track row tap feedback */
  .rmp-track-row:active,
  .pl-track-row:active,
  .rap-tl-row:active {
    background: rgba(255,255,255,.08) !important;
    transition: none !important;
  }

  /* Button press feedback */
  .rmp-btn-play-all:active,
  .rmp-btn-shuffle:active,
  .pl-btn-primary:active {
    transform: scale(0.95) !important;
    transition: transform 0.08s !important;
  }

  /* Home scroll — momentum + snap */
  .home-scroll {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-left: 16px;
    padding-right: 16px;
  }
  .home-scroll .home-card {
    scroll-snap-align: start;
  }

  /* Section padding tighter on mobile */
  .home-section { padding: 20px 0 0 !important; }
  .home-section-header { padding: 0 16px; margin-bottom: 14px; }
  .home-section-title { font-size: 1rem; }

  /* Genre tiles bigger tap targets */
  .home-genre-tile {
    min-height: 52px;
    font-size: 13px;
  }
}

/* iPhone notch safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 768px) {
    .rmp-bottom-nav {
      height: calc(56px + env(safe-area-inset-bottom));
      padding-bottom: env(safe-area-inset-bottom);
    }
    #rmp-player-bar {
      bottom: calc(56px + env(safe-area-inset-bottom)) !important;
    }
    body.rmp-has-player .site-wrapper {
      padding-bottom: calc(56px + 64px + env(safe-area-inset-bottom));
    }
  }
}
