/* =========================================================
   MUSIC
   EXTENDS css/style.css (the SCREENS design system)
   Everything below is music-only: language sections,
   playlist cards, the playlist detail page, embeds.
========================================================= */

/* =========================================================
   1. CURRENTLY PLAYING STRIP (hero add-on)
========================================================= */

.now-playing-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding: 12px 16px 12px 12px;
    width: fit-content;
    max-width: 100%;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.now-playing-strip[hidden] {
    display: none;
}

.now-playing-art {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.now-playing-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.now-playing-bars {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    padding-bottom: 6px;
    background: rgba(0, 0, 0, 0.35);
}

.now-playing-bars span {
    width: 3px;
    border-radius: 2px;
    background: var(--accent-light);
    animation: eq-bounce 1.1s ease-in-out infinite;
}

.now-playing-bars span:nth-child(1) {
    height: 8px;
    animation-delay: 0s;
}

.now-playing-bars span:nth-child(2) {
    height: 16px;
    animation-delay: 0.2s;
}

.now-playing-bars span:nth-child(3) {
    height: 11px;
    animation-delay: 0.4s;
}

@keyframes eq-bounce {
    0%,
    100% {
        transform: scaleY(0.4);
    }

    50% {
        transform: scaleY(1);
    }

}

.now-playing-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.now-playing-label {
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.now-playing-title {
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

/* =========================================================
   2. LANGUAGE SECTION
   (parallel to .platform-section on Screens)
========================================================= */

.language-section {
    margin-bottom: 64px;
}

.language-section:last-child {
    margin-bottom: 0;
}

.language-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.language-identity {
    display: flex;
    align-items: center;
    gap: 14px;
}

.language-icon-wrapper {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.22);
    color: var(--accent-light);
    font-family: "Space Grotesk", sans-serif;
    font-size: 15px;
    font-weight: 700;
}

.language-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.language-eyebrow {
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.language-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.language-playlist-count {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* =========================================================
   3. PLAYLIST GRID + CARD
   (parallel to .platform-show-grid / .show-card)
========================================================= */

.playlist-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.playlist-card {
    position: relative;
    display: block;
    border-radius: var(--radius-medium);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition);
}

.playlist-card:hover {
    transform: translateY(-4px);
    border-color: rgba(168, 85, 247, 0.35);
}

.playlist-card-art {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.playlist-card-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.playlist-card:hover .playlist-card-art img {
    transform: scale(1.06);
}

.playlist-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 55%);
    opacity: 0;
    transition: opacity var(--transition);
}

.playlist-card:hover .playlist-card-overlay {
    opacity: 1;
}

.playlist-card-play {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--pink));
    color: white;
    font-size: 15px;
    box-shadow: 0 8px 22px rgba(168, 85, 247, 0.45);
    transform: translateY(6px);
    transition: transform var(--transition);
}

.playlist-card:hover .playlist-card-play {
    transform: translateY(0);
}

.playlist-card-info {
    padding: 16px 16px 18px;
}

.playlist-card-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.playlist-card-tag {
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.playlist-card-info h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-card-info p {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.playlist-card-songcount {
    display: block;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
}

/* =========================================================
   PLACEHOLDER / EMPTY SLOT CARD
========================================================= */

.playlist-card.is-placeholder {
    cursor: default;
}

.playlist-card.is-placeholder .playlist-card-art {
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient( 135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03) 10px, transparent 10px, transparent 20px ), var(--bg-card);
    border-bottom: 1px dashed var(--border);
}

.playlist-card.is-placeholder:hover {
    transform: none;
    border-color: var(--border);
}

.playlist-card.is-placeholder h3 {
    color: var(--text-secondary);
}

.playlist-card.is-placeholder p {
    color: var(--text-muted);
}

/* =========================================================
   4. FILTER CHIPS (language / genre)
========================================================= */

.music-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 34px;
}

.music-filter-chip {
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition);
}

.music-filter-chip:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.18);
}

.music-filter-chip.active {
    color: white;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    border-color: transparent;
}

/* =========================================================
   5. PLAYLIST DETAIL PAGE (playlist.html)
========================================================= */

.playlist-hero {
    position: relative;
    min-height: min(640px, 80vh);
    margin-top: var(--header-height);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.playlist-hero-background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(60px) saturate(1.3) brightness(0.55);
    transform: scale(1.15);
}

.playlist-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-main) 0%, rgba(7, 7, 11, 0.65) 45%, rgba(7, 7, 11, 0.35) 100%);
}

.playlist-hero-content {
    position: relative;
    z-index: 2;
    width: min(var(--container-width), calc(100% - 48px));
    margin: 0 auto 56px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 36px;
    align-items: end;
}

.playlist-hero-art {
    width: 240px;
    height: 240px;
    border-radius: var(--radius-medium);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.playlist-hero-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-hero-details {
    padding-bottom: 4px;
}

.playlist-hero-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--accent-light);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.playlist-hero-details h1 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(32px, 4.2vw, 52px);
    line-height: 1.02;
    letter-spacing: -0.03em;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 5px 30px rgba(0, 0, 0, 0.55);
}

.playlist-hero-description {
    max-width: 640px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.75;
    margin-bottom: 20px;
}

.playlist-hero-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.playlist-hero-tags .playlist-card-tag {
    font-size: 10px;
}

/* =========================================================
   INSIGHT CARDS ROW
========================================================= */

.playlist-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, auto));
    gap: 16px;
    margin-bottom: 26px;
}

.playlist-insights .stat-card {
    min-width: 110px;
}

/* =========================================================
   FEATURED ARTISTS
========================================================= */

.featured-artists-label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.artist-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.artist-pill {
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-size: 12px;
    font-weight: 600;
}

/* =========================================================
   LISTEN BUTTONS
========================================================= */

.playlist-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* =========================================================
   6. EMBED SECTION (body below hero)
========================================================= */

.playlist-body {
    width: min(var(--container-width), calc(100% - 48px));
    margin: 0 auto 100px;
    max-width: 900px;
}

.embed-block {
    margin-bottom: 42px;
}

.embed-block h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.embed-frame {
    border-radius: var(--radius-medium);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.embed-frame iframe {
    display: block;
    width: 100%;
    border: none;
}

/* =========================================================
   COMING SOON (placeholder detail page)
========================================================= */

.playlist-coming-soon {
    width: min(var(--container-width), calc(100% - 48px));
    margin: 0 auto;
    padding: 140px 0 120px;
    text-align: center;
}

.playlist-coming-soon h1 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 14px;
}

.playlist-coming-soon p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
}

/* =========================================================
   7. RESPONSIVE
========================================================= */

@media (max-width: 1200px) {
    .playlist-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}

@media (max-width: 950px) {
    .playlist-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .playlist-hero-content {
        grid-template-columns: 1fr;
    }

    .playlist-hero-art {
        width: 160px;
        height: 160px;
    }

}

@media (max-width: 650px) {
    .playlist-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .language-section-header {
        flex-wrap: wrap;
    }

    .now-playing-title {
        max-width: 160px;
    }

}

/* =========================================================
   8. PLAYLIST DETAILS MODAL (pop-up, replaces playlist.html)
   Reuses the .show-modal / .modal-content scaffolding from
   the shared design system (css/style.css) -- these rules
   only adjust the bits specific to a playlist (square cover
   art, and the embeds living inside the scrolling details
   column instead of beside the poster).
========================================================= */

.playlist-modal-poster {
    aspect-ratio: 1 / 1;
}

#playlist-modal-tags {
    margin-bottom: 18px;
}

#playlist-modal-stats {
    margin-bottom: 22px;
}

#playlist-modal-artists-wrap {
    margin-bottom: 24px;
}

#playlist-modal-artists-wrap[hidden] {
    display: none;
}

#playlist-modal-embeds .embed-block {
    margin-top: 30px;
    margin-bottom: 0;
}

#playlist-modal-embeds .embed-block + .embed-block {
    margin-top: 42px;
}

@media (max-width: 650px) {
    .playlist-modal-poster {
        aspect-ratio: 1 / 1;
    }

}

/* =========================================================
   9. DRAFT PLAYLISTS (curated, tracklist ready, no
   Spotify/Apple link yet -- see config.js entries with
   isDraft: true)
========================================================= */

.playlist-card-art-fallback,
.modal-poster-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

.playlist-card-art-fallback {
    aspect-ratio: 1 / 1;
}

.modal-poster-fallback {
    aspect-ratio: 1 / 1;
    border-radius: inherit;
}

.draft-badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px dashed rgba(255, 255, 255, 0.25);
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.playlist-card .draft-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    margin-bottom: 0;
    background: rgba(8, 8, 13, 0.72);
    backdrop-filter: blur(6px);
}

.suggested-tracklist {
    margin-top: 30px;
}

.suggested-tracklist h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.suggested-tracklist-note {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.tracklist {
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.tracklist-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 16px;
    background: var(--bg-card);
}

.tracklist-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.tracklist-index {
    width: 20px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.tracklist-song {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 600;
}

.tracklist-artist {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 6px;
}

/* =========================================================
   10. SCREEN <-> MUSIC CROSS-LINK BUTTON
   (used inside Screens's show/movie modal-actions)
========================================================= */

.button-playlist-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
