/* MB Streams product update — landing, genres, player and mobile safety */
:root {
    --mb-surface: #111217;
    --mb-surface-soft: rgba(255,255,255,.055);
    --mb-border: rgba(255,255,255,.1);
    --mb-radius: 18px;
    --mb-app-player-width: 100vw;
    --mb-app-player-left: 0px;
    --mb-app-player-bottom: 0px;
}

.mb-welcome-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    align-items: center;
    gap: 36px;
    overflow: hidden;
    margin: 4px 0 48px;
    padding: clamp(28px, 5vw, 64px);
    border: 1px solid var(--mb-border);
    border-radius: 26px;
    background:
        radial-gradient(circle at 85% 20%, rgba(255,90,0,.3), transparent 34%),
        radial-gradient(circle at 12% 100%, rgba(114,61,255,.42), transparent 42%),
        linear-gradient(135deg, #13141b, #08090c);
    color: #fff;
}
.mb-welcome-hero h1 { max-width: 700px; margin: 7px 0 12px; font-size: clamp(2.15rem, 5vw, 4.6rem); line-height: .98; letter-spacing: -.05em; color: #fff; }
.mb-welcome-hero p { max-width: 650px; margin: 0 0 24px; color: rgba(255,255,255,.72); font-size: 1.05rem; line-height: 1.65; }
.mb-eyebrow { display: inline-block; color: var(--main-color); font-size: .72rem; font-weight: 800; letter-spacing: .18em; }
.mb-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.mb-hero-disc { position: relative; width: 190px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: repeating-radial-gradient(circle, #252630 0 5px, #0a0b0e 6px 11px); box-shadow: 0 28px 60px rgba(0,0,0,.48); animation: mb-spin 18s linear infinite; }
.mb-hero-disc:after { content: ''; position: absolute; inset: 37%; border-radius: 50%; background: var(--main-color); box-shadow: 0 0 0 9px rgba(255,255,255,.1); }
.mb-hero-disc span { position: relative; z-index: 1; font-size: .68rem; font-weight: 900; }
@keyframes mb-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mb-hero-disc { animation: none; } }

.mb-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.mb-section-heading h2 { margin-bottom: 0; }
.mb-section-heading > a { font-weight: 700; color: var(--main-color); }
.mb-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.mb-chart-grid > li { min-width: 0; }

.mb-dj-mix-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.mb-dj-mix-card { min-width: 0; padding: 10px; border: 1px solid var(--mb-border); border-radius: var(--mb-radius); background: var(--mb-surface-soft); cursor: pointer; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.mb-dj-mix-card:hover, .mb-dj-mix-card:focus-visible { transform: translateY(-4px); border-color: var(--main-color); background: rgba(255,255,255,.09); outline: none; }
.mb-dj-mix-cover { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 13px; background: #202128; }
.mb-dj-mix-cover img { width: 100%; height: 100%; object-fit: cover; }
.mb-mix-play { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 42px; height: 42px; padding-left: 3px; border-radius: 50%; background: var(--main-color); color: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.35); }
.mb-dj-mix-copy { padding: 13px 4px 5px; }
.mb-dj-mix-copy h3 { margin: 0 0 5px; overflow: hidden; font-size: .98rem; text-overflow: ellipsis; white-space: nowrap; }
.mb-dj-mix-copy p, .mb-dj-mix-copy span { margin: 0; color: #92949d; font-size: .78rem; }
.mb-empty-mixes { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; padding: 26px; border: 1px dashed var(--mb-border); border-radius: var(--mb-radius); color: #8d909a; }
.mb-empty-mixes strong { color: inherit; font-size: 1rem; }

/* More genres per screen without sacrificing artwork. */
.genre_lst:not(.mus_cus_side_filtrs) { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px !important; }
.genre_lst:not(.mus_cus_side_filtrs) .gnr_list_item { width: auto !important; min-width: 0; margin: 0 !important; }
.genre_lst:not(.mus_cus_side_filtrs) .gnr_list_item .img_cnt { min-height: 118px !important; height: 118px !important; border-radius: 14px; overflow: hidden; }
.genre_lst:not(.mus_cus_side_filtrs) .gnr_list_item .name { font-size: .9rem !important; }
.mb-back-link { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 22px; padding: 9px 14px; border: 1px solid var(--mb-border); border-radius: 999px; font-weight: 700; color: inherit; }
.mb-back-link:hover { border-color: var(--main-color); color: var(--main-color); }

.mb-dance-guide { margin: 8px 0 40px; padding: clamp(22px, 4vw, 38px); border: 1px solid var(--mb-border); border-radius: 22px; background: linear-gradient(135deg, rgba(112,65,255,.12), var(--mb-surface-soft)); }
.mb-dance-guide-head { display: flex; justify-content: space-between; gap: 30px; align-items: start; }
.mb-dance-guide h2 { margin: 6px 0 9px; font-size: clamp(1.5rem, 3vw, 2.25rem); }
.mb-dance-guide-head p { max-width: 760px; line-height: 1.65; color: #8d909a; }
.mb-origin { flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: .75rem; font-weight: 700; }
.mb-dance-lessons { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 22px; }
.mb-dance-lesson { display: flex; gap: 13px; padding: 17px; border-radius: 14px; background: rgba(0,0,0,.16); }
.mb-dance-lesson > span { display: grid; flex: 0 0 29px; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: var(--main-color); color: #fff; font-weight: 800; }
.mb-dance-lesson h4 { margin: 2px 0 6px; font-size: .92rem; }
.mb-dance-lesson p, .mb-safety-note { margin: 0; color: #8d909a; font-size: .8rem; line-height: 1.55; }
.mb-safety-note { margin-top: 17px; }

/* Clear content labels. */
.mb-explicit-badge, .mb-clean-badge { display: inline-grid; vertical-align: middle; place-items: center; height: 17px; margin-left: 5px; padding: 0 5px; border-radius: 3px; font: 800 9px/1 Montserrat, sans-serif; letter-spacing: .02em; }
.mb-explicit-badge { min-width: 17px; background: #22242a; color: #fff; border: 1px solid #666a75; }
.mb-clean-badge { background: rgba(70,170,100,.12); color: #59a870; border: 1px solid rgba(70,170,100,.35); }
#player-explicit-badge { display: none; }
#player-explicit-badge.visible { display: inline-grid; }

/* Fixed player: lead with artwork and keep selected titles compact. */
.ma_player .song_details { min-width: 270px; }
.ma_player .song_details_inner { align-items: center; }
.ma_player .song_art, .ma_player .song_art img { width: 62px !important; height: 62px !important; border-radius: 10px !important; object-fit: cover; }
.ma_player .song_title h3.song_name { display: inline-block; max-width: 190px; font-size: 13px !important; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.mb-smart-shuffle { position: relative; display: grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .55; cursor: pointer; }
.mb-smart-shuffle:hover, .mb-smart-shuffle.active { color: var(--main-color); opacity: 1; background: rgba(255,255,255,.07); }
.mb-smart-shuffle.loading { animation: mb-pulse .7s ease-in-out infinite alternate; }
.mb-auto-fade { position: relative; display: grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .55; cursor: pointer; }
.mb-auto-fade:hover, .mb-auto-fade.active, .mb-auto-fade[aria-expanded="true"] { color: var(--main-color); opacity: 1; background: rgba(255,255,255,.07); }
.ma_player .song_progress .song_controls { position: relative; }
.mb-fade-panel {
    position: absolute;
    z-index: 30;
    bottom: 58px;
    left: 50%;
    width: min(280px, calc(100vw - 24px));
    padding: 16px;
    border: 1px solid var(--mb-border);
    border-radius: 14px;
    background: #17181d;
    box-shadow: 0 16px 45px rgba(0,0,0,.45);
    color: #fff;
    transform: translateX(-50%);
}
.mb-fade-panel[hidden] { display: none !important; }
.mb-fade-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mb-fade-panel label { display: flex; align-items: center; justify-content: space-between; margin: 0 0 7px; color: #b7b9c0; font-size: .78rem; }
.mb-fade-panel output { color: var(--main-color); font-weight: 800; }
.mb-fade-panel > input[type="range"] { width: 100%; accent-color: var(--main-color); }
.mb-fade-panel small { display: block; margin-top: 9px; color: #7f828c; font-size: .68rem; line-height: 1.45; }
.mb-fade-toggle { position: relative; width: 38px; height: 22px; margin: 0 !important; }
.mb-fade-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.mb-fade-toggle span { position: absolute; inset: 0; border-radius: 999px; background: #3a3c44; cursor: pointer; transition: .2s; }
.mb-fade-toggle span:after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; }
.mb-fade-toggle input:checked + span { background: var(--main-color); }
.mb-fade-toggle input:checked + span:after { transform: translateX(16px); }
@keyframes mb-pulse { to { opacity: .25; transform: scale(.88); } }

/* Wave graphics removed from listening views; the accessible slider remains. */
#waveform, #light-wave, #dark-wave, #light-waves, #dark-waves, #dark-wavez,
.waveform-small, .small-waves { display: none !important; }

/* Header/avatar polish plus iPhone safe areas and Dynamic Island breathing room. */
#my-profile-picture { width: 42px !important; height: 42px !important; border-radius: 50% !important; object-fit: cover !important; object-position: center; border: 2px solid rgba(255,255,255,.7); box-shadow: 0 3px 14px rgba(0,0,0,.22); }
header { padding-top: max(0px, env(safe-area-inset-top)); }
header .head_search { align-self: center; }
header .head_search .head_search_cont { max-width: min(100%, 620px); }

@media (max-width: 1100px) {
    .mb-dj-mix-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .genre_lst:not(.mus_cus_side_filtrs) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .mb-welcome-hero { grid-template-columns: 1fr; padding: 28px 22px; }
    .mb-hero-disc { display: none; }
    .mb-chart-grid { grid-template-columns: 1fr; }
    .mb-dj-mix-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mb-dance-guide-head { display: block; }
    .mb-origin { display: inline-block; margin-top: 8px; }
    .mb-dance-lessons { grid-template-columns: 1fr; }
    .genre_lst:not(.mus_cus_side_filtrs) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .genre_lst:not(.mus_cus_side_filtrs) .gnr_list_item .img_cnt { min-height: 98px !important; height: 98px !important; }
    .ma_player .song_art, .ma_player .song_art img { width: 54px !important; height: 54px !important; }
    header { padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
}

/* Mobile player: two deliberate rows keep every playback control visible. The
   open player's bottom offset is left untouched so it can sit above either the
   website navigation or a native-app navigation bar. */
@media (max-width: 700px) {
    .ma_player {
        width: 100% !important;
        height: 128px !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        border-radius: 14px 14px 0 0 !important;
        transition: transform .18s ease, bottom .18s ease !important;
    }
    .ma_player.closed { transform: translateY(calc(100% + 24px)); }
    .ma_player > .player {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 44px;
        grid-template-rows: 66px 61px;
        width: 100% !important;
        height: 128px !important;
        padding: 0 12px !important;
        overflow: visible;
        border-radius: 14px 14px 0 0 !important;
    }
    .ma_player .song_details {
        grid-column: 1 / 3;
        grid-row: 1;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        padding-right: 48px;
    }
    .ma_player .song_details .song_details_inner { height: 66px !important; }
    .ma_player .song_art,
    .ma_player .song_art img,
    .player .song_details .song_details_inner .song_art,
    .player .song_details .song_details_inner .song_art img {
        display: block !important;
        width: 52px !important;
        min-width: 52px !important;
        height: 52px !important;
        margin-right: 11px !important;
        border-radius: 9px !important;
    }
    .ma_player .song_title { max-width: calc(100% - 63px) !important; }
    .ma_player .song_title > a { display: block; min-width: 0; }
    .ma_player .song_title h3.song_name {
        display: block;
        max-width: min(48vw, 220px) !important;
        font-size: 14px !important;
        line-height: 18px;
    }
    .ma_player .song_progress {
        position: static !important;
        grid-column: 1 / 3;
        grid-row: 2;
        display: flex !important;
        width: 100% !important;
        padding: 0 4px !important;
        margin: 0 !important;
        justify-content: center !important;
    }
    .ma_player .song_progress .song_time {
        position: absolute !important;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 20px;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        pointer-events: none;
    }
    .ma_player .song_progress .song_time .song_prog_mobi,
    .ma_player .song_progress .song_time .progress_container { width: 100%; }
    .ma_player .song_progress .song_time .progress_container {
        top: -1px !important;
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
        pointer-events: auto;
    }
    .ma_player .song_progress .song_time .current_time,
    .ma_player .song_progress .song_time .duration_seperate,
    .ma_player .song_progress .song_time .duration_time { display: none !important; }
    .ma_player .song_progress .song_controls {
        display: flex !important;
        width: 100%;
        align-items: center;
        justify-content: center;
        gap: clamp(8px, 3.1vw, 17px);
    }
    .ma_player .song_progress .song_controls .amplitude-shuffle,
    .ma_player .song_progress .song_controls .amplitude-prev,
    .ma_player .song_progress .song_controls .amplitude-next,
    .ma_player .song_progress .song_controls .amplitude-repeat,
    .ma_player .song_progress .song_controls .mb-smart-shuffle,
    .ma_player .song_progress .song_controls .mb-auto-fade {
        display: grid !important;
        place-items: center;
        margin: 0 !important;
        flex: 0 0 auto;
    }
    .ma_player .song_progress .song_controls .amplitude-play-pause {
        width: 48px !important;
        height: 48px !important;
        margin: 0 !important;
        flex: 0 0 48px;
    }
    .ma_player .mb-fade-panel { bottom: 60px; }
    .ma_player .song_progress_right {
        position: absolute !important;
        top: 13px;
        right: 9px;
        z-index: 8;
        display: flex !important;
        width: 40px !important;
        min-width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        align-items: center;
        justify-content: center;
    }
    .ma_player .song_progress_right .song_volume,
    .ma_player .song_progress_right .song_rs_controls,
    .ma_player .song_progress_right .song_queue:not(.song_queued) { display: none !important; }
    .ma_player .song_progress_right .song_queue.song_queued {
        display: grid !important;
        place-items: center;
        width: 40px;
        height: 40px;
        margin: 0 !important;
    }
    .ma_player_playlist { bottom: 128px; }
    body:not(.no-player) .ma_pc_inner { padding-bottom: 150px; }
}

/* Converted mobile apps use a WebView whose visible viewport can be smaller
   than the CSS layout viewport. Keep the complete player inside that frame. */
@media (max-width: 700px) {
    html.mb-visual-viewport .ma_player {
        left: var(--mb-app-player-left) !important;
        right: auto !important;
        bottom: max(var(--mb-app-player-bottom), env(safe-area-inset-bottom)) !important;
        width: var(--mb-app-player-width) !important;
        max-width: var(--mb-app-player-width) !important;
    }
    html.mb-app-webview .ma_player {
        height: 116px !important;
    }
    html.mb-app-webview .ma_player > .player {
        grid-template-rows: 61px 54px;
        width: 100% !important;
        height: 116px !important;
        padding-right: max(8px, env(safe-area-inset-right)) !important;
        padding-left: max(8px, env(safe-area-inset-left)) !important;
    }
    html.mb-app-webview .ma_player .song_details .song_details_inner { height: 61px !important; }
    html.mb-app-webview .ma_player .song_art,
    html.mb-app-webview .ma_player .song_art img,
    html.mb-app-webview .player .song_details .song_details_inner .song_art,
    html.mb-app-webview .player .song_details .song_details_inner .song_art img {
        width: 46px !important;
        min-width: 46px !important;
        height: 46px !important;
    }
    html.mb-app-webview .ma_player .song_title { max-width: calc(100% - 57px) !important; }
    html.mb-app-webview .ma_player .song_progress .song_controls { gap: clamp(5px, 2.4vw, 11px); }
    html.mb-app-webview .ma_player .song_progress .song_controls .amplitude-play-pause {
        width: 44px !important;
        height: 44px !important;
        flex-basis: 44px;
    }
    html.mb-app-webview .ma_player_playlist {
        bottom: calc(116px + var(--mb-app-player-bottom));
        max-height: calc(100dvh - 116px - var(--mb-app-player-bottom));
    }
    html.mb-app-webview body:not(.no-player) .ma_pc_inner {
        padding-bottom: calc(138px + var(--mb-app-player-bottom));
    }
}

@media (max-width: 365px) {
    .ma_player > .player { padding: 0 8px !important; }
    .ma_player .song_progress .song_controls { gap: 7px; }
    .ma_player .song_art,
    .ma_player .song_art img,
    .player .song_details .song_details_inner .song_art,
    .player .song_details .song_details_inner .song_art img {
        width: 48px !important;
        min-width: 48px !important;
        height: 48px !important;
    }
    .ma_player .song_title { max-width: calc(100% - 58px) !important; }
    .ma_player .song_title h3.song_name { max-width: 42vw !important; font-size: 13px !important; }
}

@media (max-width: 700px) and (orientation: landscape) and (max-height: 500px) {
    .ma_player, .ma_player > .player { height: 104px !important; }
    .ma_player > .player { grid-template-rows: 54px 49px; }
    .ma_player .song_details .song_details_inner { height: 54px !important; }
    .ma_player .song_art,
    .ma_player .song_art img,
    .player .song_details .song_details_inner .song_art,
    .player .song_details .song_details_inner .song_art img { width: 44px !important; min-width: 44px !important; height: 44px !important; }
    .ma_player .song_progress .song_controls .amplitude-play-pause { width: 42px !important; height: 42px !important; flex-basis: 42px; }
    .ma_player_playlist { bottom: 104px; }
}
@media (max-width: 430px) {
    .genre_lst:not(.mus_cus_side_filtrs) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mb-dj-mix-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    header .head_search { max-width: calc(100vw - 116px); margin-top: 4px; }
    header .head_search input { height: 38px; font-size: 16px; }
    #my-profile-picture { width: 36px !important; height: 36px !important; }
}
