/* Reset - box-sizing sab jagah consistent rahe */
.mpp-list, .mpp-item, .mpp-single-wrap, .mpp-single-box, #mpp-sticky-player {
    box-sizing: border-box;
}

/* ---------- List page (rows) ---------- */
.mpp-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}
.mpp-list.mpp-list-rows {
    display: flex;
    flex-direction: column;
}
.mpp-item {
    display: flex !important;
    align-items: center;
    gap: 15px;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 15px;
}
.mpp-item-cover {
    flex: 0 0 auto;
    display: block;
}
.mpp-item-cover img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    display: block;
}
.mpp-item-cover-placeholder {
    width: 70px;
    height: 70px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}
.mpp-item-cover-placeholder .mpp-icon { width: 26px; height: 26px; }
.mpp-item-info {
    flex: 1;
    min-width: 0;
}
.mpp-item-title {
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
    color: #222;
    display: block;
}
.mpp-item-artist {
    color: #666;
    font-size: 14px;
}
.mpp-item-meta {
    color: #999;
    font-size: 12px;
    margin-top: 3px;
}

/* ---------- Grid layout (cards) ---------- */
.mpp-list.mpp-grid {
    display: grid !important;
    grid-template-columns: repeat(var(--mpp-columns, 3), 1fr);
    gap: 20px;
    max-width: 100%;
}
.mpp-list.mpp-grid .mpp-item {
    flex-direction: column !important;
    align-items: flex-start;
    border: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.mpp-list.mpp-grid .mpp-item-cover,
.mpp-list.mpp-grid .mpp-item-cover img,
.mpp-list.mpp-grid .mpp-item-cover-placeholder {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1/1;
}
.mpp-list.mpp-grid .mpp-item-play {
    align-self: flex-start;
    margin-top: 8px;
}
@media (max-width: 782px) {
    .mpp-list.mpp-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
    .mpp-list.mpp-grid { grid-template-columns: 1fr !important; }
}

/* ---------- Play Button (shared: list + single) ---------- */
.mpp-play-btn {
    background: #222;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mpp-play-btn:hover { background: #4caf50; }

/* ---------- Single track page ---------- */
.mpp-single-wrap {
    display: flex !important;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 20px;
    margin-bottom: 20px;
    max-width: 800px;
}
.mpp-single-wrap.mpp-pos-right {
    flex-direction: row-reverse;
}
.mpp-single-wrap.mpp-pos-top {
    flex-direction: column;
}
.mpp-single-wrap.mpp-pos-top .mpp-single-cover {
    width: 100% !important;
    height: auto !important;
    flex-basis: auto !important;
    aspect-ratio: 1/1;
    max-width: 320px;
}

.mpp-single-cover {
    flex: 0 0 200px;
    width: 200px;
    height: 200px;
    max-width: 100%;
}
.mpp-single-cover img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover;
    display: block;
}
.mpp-single-cover-placeholder {
    width: 100%;
    height: 100%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 13px;
}
.mpp-single-box {
    flex: 1;
    min-width: 0;
    background: #fdf6e3;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}
.mpp-single-artist {
    font-size: 16px;
    color: #444;
}
.mpp-single-play-row {
    display: flex;
    align-items: center;
    gap: 15px;
}
.mpp-single-links a {
    margin-right: 12px;
    color: #06c;
    text-decoration: underline;
    font-size: 14px;
}
.mpp-single-meta {
    font-size: 13px;
    color: #888;
}
.mpp-single-description {
    max-width: 800px;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

@media (max-width: 600px) {
    .mpp-single-wrap:not(.mpp-pos-top) { flex-direction: column !important; }
    .mpp-single-wrap:not(.mpp-pos-top) .mpp-single-cover {
        width: 100% !important;
        height: auto !important;
        flex-basis: auto !important;
        aspect-ratio: 1/1;
    }
}

/* ---------- Sticky Bottom Player (boxed, matches upper sections) ---------- */
#mpp-sticky-player {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    padding: 0 15px 15px;
    pointer-events: none; /* sirf inner box clickable, baaki page content free rahe */
    transition: transform 0.3s ease;
}
#mpp-sticky-player.mpp-hidden {
    transform: translateY(120%);
}
.mpp-sp-inner {
    pointer-events: auto;
    width: 100%;
    max-width: 1100px;
    background: #111;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 10px 18px;
    gap: 12px;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
    box-sizing: border-box;
}
@media (max-width: 600px) {
    #mpp-sticky-player { padding: 0 8px 8px; }
    .mpp-sp-inner { border-radius: 12px; padding: 8px 12px; }
}
#mpp-sp-cover {
    width: 46px;
    height: 46px;
    object-fit: cover;
}
.mpp-sp-info {
    min-width: 150px;
    max-width: 220px;
}
#mpp-sp-title {
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#mpp-sp-artist {
    font-size: 12px;
    color: #aaa;
}
#mpp-sp-playpause {
    background: #4caf50;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    line-height: 0;
}
#mpp-sp-playpause .mpp-icon,
#mpp-sp-playpause svg {
    width: 46%;
    height: 46%;
    display: block;
}
.mpp-sp-progress-wrap {
    flex: 1;
}
#mpp-sp-progress {
    width: 100%;
}
#mpp-sp-time {
    font-size: 12px;
    color: #ccc;
    white-space: nowrap;
}
.mpp-sp-volume {
    display: flex;
    align-items: center;
    gap: 6px;
}
#mpp-sp-mute {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
}
#mpp-sp-mute .mpp-icon { width: 18px; height: 18px; }
#mpp-sp-volume-slider {
    width: 80px;
}

@media (max-width: 600px) {
    .mpp-sp-info { display: none; }
    .mpp-sp-volume #mpp-sp-volume-slider { display: none; } /* tight mobile bar par sirf mute icon */
}

/* ---------- Music Block wrapper (listing + optional search + pagination) ---------- */
.mpp-music-block {
    max-width: 800px;
    margin: 0 auto;
}
.mpp-music-block .mpp-list {
    margin: 0 auto;
}
.mpp-music-block .mpp-list.mpp-grid {
    max-width: 100%;
}

/* ---------- Built-in search bar (inside a listing) ---------- */
.mpp-block-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 15px;
}
.mpp-block-search .mpp-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    min-width: 0;
}
.mpp-genre-select {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 13px;
    background: #fff;
}
.mpp-search-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #222;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

/* ---------- Standalone Search Box widget ---------- */
.mpp-search-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 14px;
    max-width: 500px;
}
.mpp-search-widget .mpp-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    min-width: 0;
}
.mpp-search-widget .mpp-search-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #222;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mpp-no-results {
    text-align: center;
    color: #888;
    padding: 20px 0;
}

/* ---------- Genre Filter widget (tabs/pills) ---------- */
.mpp-genre-filter-widget {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.mpp-genre-tab {
    border: none;
    background: #f2f2f2;
    color: #444;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}
.mpp-genre-tab:hover { opacity: 0.85; }
.mpp-genre-tab.mpp-genre-active {
    background: #4caf50;
    color: #fff;
}

/* ---------- Pagination / Load More ---------- */
.mpp-pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
.mpp-load-more-btn {
    background: #222;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 14px;
    cursor: pointer;
}
.mpp-load-more-btn:hover { opacity: 0.85; }
.mpp-load-more-btn:disabled { opacity: 0.6; cursor: default; }

/* ---------- Icons (centralized SVG system) ---------- */
.mpp-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
}

/* ---------- Item actions row (Heart -> Play -> Video) ---------- */
.mpp-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ---------- Heart / Like button ---------- */
.mpp-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 13px;
    padding: 4px;
    line-height: 1;
}
.mpp-like-btn:disabled { opacity: 0.6; cursor: default; }
.mpp-like-icon-wrap {
    position: relative;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.mpp-like-icon-wrap .mpp-icon { position: absolute; top: 0; left: 0; width: 20px; height: 20px; }
.mpp-like-icon-wrap .mpp-icon-filled { opacity: 0; transform: scale(0.7); transition: opacity 0.15s ease, transform 0.15s ease; color: #e0245e; }
.mpp-like-icon-wrap .mpp-icon-outline { transition: opacity 0.15s ease; }
.mpp-like-btn:hover .mpp-icon-outline { color: #e0245e; }
.mpp-like-btn.mpp-liked .mpp-icon-outline { opacity: 0; }
.mpp-like-btn.mpp-liked .mpp-icon-filled { opacity: 1; transform: scale(1); }
.mpp-like-btn.mpp-liked { color: #e0245e; }
.mpp-like-count { min-width: 12px; }

/* ---------- Video button ---------- */
.mpp-video-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #999;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.mpp-video-btn:hover { background: #f2f2f2; color: #222; }
.mpp-video-btn .mpp-icon { width: 18px; height: 18px; }

/* ---------- Floating YouTube video popup (bottom-right, lazy-built) ---------- */
#mpp-video-popup {
    position: fixed;
    right: 20px;
    bottom: 100px; /* sticky player ke upar taake overlap na ho */
    width: 340px;
    max-width: calc(100vw - 40px);
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    z-index: 10000;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
#mpp-video-popup.mpp-hidden {
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
}
.mpp-video-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    background: #000;
}
.mpp-video-popup-title {
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mpp-video-popup-close {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mpp-video-popup-close .mpp-icon { width: 14px; height: 14px; }
.mpp-video-popup-body {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}
.mpp-video-popup-body iframe,
.mpp-video-popup-body video {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
    object-fit: contain;
}

/* ---------- Sticky bar: "video currently playing" state ---------- */
#mpp-sticky-player.mpp-video-mode .mpp-sp-progress-wrap input:disabled {
    opacity: 0.5;
}
@media (max-width: 600px) {
    #mpp-video-popup {
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        bottom: 90px;
    }
}

/* ---------- Artists widget (grid) ---------- */
.mpp-artists-grid {
    display: grid;
    grid-template-columns: repeat(var(--mpp-artist-columns, 4), 1fr);
    gap: 24px;
}
@media (max-width: 782px) {
    .mpp-artists-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .mpp-artists-grid { grid-template-columns: repeat(2, 1fr); }
}
.mpp-artist-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
}
.mpp-artist-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.mpp-artist-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mpp-artist-avatar-fallback {
    width: 40%;
    height: 40%;
    color: #aaa;
}
.mpp-artist-avatar-fallback .mpp-icon { width: 100%; height: 100%; }
.mpp-artist-name {
    font-weight: bold;
    font-size: 15px;
    color: #222;
}
.mpp-artist-count {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

/* ---------- Automatic Artist Single Page ---------- */
.mpp-artist-page {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 15px;
}
.mpp-artist-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 30px;
}
.mpp-artist-header-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    background: #eee;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mpp-artist-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mpp-artist-header-avatar .mpp-artist-avatar-fallback { width: 45%; height: 45%; }
.mpp-artist-header-name {
    margin: 0 0 6px;
    font-size: 28px;
}
.mpp-artist-header-count {
    color: #888;
    font-size: 14px;
    margin-bottom: 10px;
}
.mpp-artist-header-bio {
    color: #444;
    font-size: 14px;
    line-height: 1.6;
    max-width: 600px;
}
@media (max-width: 600px) {
    .mpp-artist-header { flex-direction: column; text-align: center; }
}

.mpp-pagination-numbered {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.mpp-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 4px;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    background: #f2f2f2;
}
.mpp-page-link.mpp-page-active {
    background: #222;
    color: #fff;
}
