/* =====================================================================
   Landing page (index.html) - self-contained stylesheet.
   Includes: transparent slim header, info carousel, community stream
   player (ported from viewStream.css, adapted for a scrolling page),
   sequencer promo wireframe, top-artists grid, platform stats, and the login modal.
   ===================================================================== */

/* ---------- Base ---------- */
html {
    background: #050710;
    box-sizing: border-box;
    min-height: 100%;
    min-height: -webkit-fill-available;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    background: #050710;
    color: #e5e7eb;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    -webkit-touch-callout: none;
}

/* Keep rare horizontal overflow off the page without clipping module shadows
   inside .landing-wrap (overflow-x:hidden there cut shadows to a hard edge). */
body.landing-page {
    overflow-x: hidden;
}

#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.landing-wrap {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px 60px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Landing: let module shadows fade past the content column; page-level overflow
   containment lives on body.landing-page instead. */
body.landing-page .landing-wrap {
    overflow-x: visible;
    padding: 0 40px 60px;
}

/* ---------- Transparent slim header ---------- */
.landing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0 14px;
    /* Intentionally no background/blur/shadow: the page background shows through. */
    background: transparent;
}

.landing-logo {
    display: flex;
    align-items: center;
}

.landing-logo img {
    /* Match the logo sizing used elsewhere in the app (width-based, ~18:1 strip). */
    width: 280px;
    max-width: 60vw;
    height: auto;
    display: block;
}

.landing-account {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-account-name {
    color: #cbd5f5;
    font-size: 13px;
    font-weight: 600;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.55);
    color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    transition: background-color 0.2s, transform 0.2s, border-color 0.2s;
}

.user-icon-btn:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(243, 138, 184, 0.6);
    transform: scale(1.05);
}

.user-icon-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* Account popup (logged-in) */
.user-popup {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: rgba(62, 76, 102, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    padding: 16px;
    display: none;
    z-index: 50;
}

.user-popup.is-open {
    display: block;
}

.user-popup-name {
    color: #e5e7eb;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
    word-break: break-word;
}

.user-popup-sub {
    color: #cbd5f5;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

.user-popup .launch-button,
.user-popup .pink-outline-button {
    width: 100%;
    margin-top: 8px;
}

/* ---------- Shared module card ---------- */
.module {
    background: rgba(62, 76, 102, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: none;
    border-radius: 16px;
    padding: 20px;
    /* Layered softer shadows fade out cleanly against the shader background. */
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.22),
        0 22px 56px rgba(0, 0, 0, 0.38);
    margin-bottom: 24px;
}

.module > h2 {
    color: #e5e7eb;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 14px;
    letter-spacing: 0.5px;
}

.module-subtitle {
    color: #cbd5f5;
    font-size: 13px;
    margin: -6px 0 14px;
}

/* ---------- Wireframe helper ---------- */
.wireframe-box {
    border: 2px dashed rgba(148, 163, 184, 0.5);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.35);
    color: rgba(203, 213, 245, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 20px;
}

/* =====================================================================
   Module 1: Info carousel (manual navigation, short height, SEO text)
   ===================================================================== */
.info-carousel-module {
    padding: 0;
    overflow: hidden;
}

.info-carousel {
    position: relative;
    width: 100%;
    height: clamp(160px, 24vh, 250px);
    overflow: hidden;
    border-radius: 16px;
}

.info-carousel-track {
    display: flex;
    width: 400%;
    height: 100%;
    animation: none;
    will-change: transform;
}

.info-carousel.is-js-controlled .info-carousel-track {
    animation: none;
    transition: transform 0.45s ease;
}

.info-carousel:hover .info-carousel-track {
    animation-play-state: paused;
}

.info-carousel.is-js-controlled:hover .info-carousel-track {
    animation-play-state: running;
}

.info-panel {
    position: relative;
    flex: 0 0 25%;
    width: 25%;
    height: 100%;
    overflow: hidden;
}

.info-panel-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.info-panel:nth-child(1) .info-panel-bg {
    background-image:
        linear-gradient(135deg, rgba(52, 69, 155, 0.75), rgba(188, 193, 222, 0.75)),
        url('../img/slide-1-bg.jpg');
}

.info-panel:nth-child(2) .info-panel-bg {
    background-image:
        linear-gradient(135deg, rgba(140, 211, 218, 0.75), rgba(217, 241, 243, 0.75)),
        url('../img/slide-2-bg.jpg');
}

.info-panel:nth-child(3) .info-panel-bg {
    background-image:
        linear-gradient(135deg, rgba(243, 138, 184, 0.75), rgba(251, 216, 232, 0.75)),
        url('../img/slide-3-bg.jpg');
}

.info-panel:nth-child(4) .info-panel-bg {
    background-image:
        linear-gradient(135deg, rgba(52, 69, 155, 0.75), rgba(140, 211, 218, 0.75)),
        url('../img/slide-4-bg.jpg');
}

.info-panel-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 28px;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0) 30%, rgba(2, 6, 23, 0.78) 100%);
}

.info-carousel-module .info-panel-content {
    justify-content: flex-start;
    background: linear-gradient(
        180deg,
        rgba(2, 6, 23, 0.78) 0%,
        rgba(2, 6, 23, 0.55) 45%,
        rgba(2, 6, 23, 0) 100%
    );
}

.info-panel-header {
    flex-shrink: 0;
}

.info-carousel-module .info-panel-header {
    max-width: 640px;
}

.info-panel-content h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.info-carousel-module .info-panel-header h2 {
    margin-bottom: 10px;
}

.info-panel-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #e5e7eb;
    max-width: 640px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.info-panel-tag {
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(243, 138, 184, 0.85);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@keyframes infoCarouselScroll {
    0%, 20%   { transform: translateX(0); }
    25%, 45%  { transform: translateX(-25%); }
    50%, 70%  { transform: translateX(-50%); }
    75%, 95%  { transform: translateX(-75%); }
    100%      { transform: translateX(0); }
}

.info-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    z-index: 2;
}

.info-carousel-nav {
    position: absolute;
    bottom: 10px;
    z-index: 3;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(2, 6, 23, 0.12);
    color: rgba(226, 232, 240, 0.55);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.25;
    transition: opacity 0.2s, background-color 0.2s, color 0.2s;
    padding: 0;
}

.info-carousel:hover .info-carousel-nav,
.info-carousel:focus-within .info-carousel-nav {
    opacity: 0.4;
}

.info-carousel-nav:hover {
    background: rgba(2, 6, 23, 0.25);
    color: rgba(255, 255, 255, 0.75);
    opacity: 0.55;
}

.info-carousel-nav:focus-visible {
    opacity: 0.55;
    outline: 2px solid rgba(243, 138, 184, 0.85);
    outline-offset: 2px;
}

.info-carousel-prev { left: 10px; }
.info-carousel-next { right: 10px; }

.info-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(226, 232, 240, 0.55);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.info-carousel-dot.is-active {
    background: rgba(243, 138, 184, 0.95);
    transform: scale(1.15);
}

.info-carousel-dot:focus-visible {
    outline: 2px solid rgba(243, 138, 184, 0.85);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .info-carousel-track { animation: none; }
    .info-carousel.is-js-controlled .info-carousel-track { transition: none; }
}

/* =====================================================================
   Module 2: Community stream player (ported from viewStream.css)
   ===================================================================== */
.playlist-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.playlist-title-row h2 {
    color: #e5e7eb;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
}

.playlist-title-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.stream-mode-trigger.is-active {
    border-color: rgba(243, 138, 184, 0.75);
    background: rgba(243, 138, 184, 0.18);
    color: #f38ab8;
}

.stream-mode-trigger.is-active:hover {
    background: rgba(243, 138, 184, 0.28);
}

.stream-filter-trigger {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.65);
    color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.stream-filter-trigger:hover {
    background: rgba(30, 41, 59, 0.9);
    transform: scale(1.06);
}

.stream-filter-trigger-icon {
    width: 17px;
    height: 17px;
}

.playlist-controls-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0 0 12px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(210, 214, 220, 0.2);
}

.playlist-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.playlist-main-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.playlist-main-btn {
    background: #f38ab8;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background-color 0.2s, transform 0.2s;
    padding: 0;
}

.playlist-main-btn#playlistPrevBtn,
.playlist-main-btn#playlistNextBtn {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.playlist-main-btn .play-pause-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.playlist-main-btn:hover {
    background: #e06a9a;
    transform: scale(1.08);
}

.playlist-main-btn:disabled {
    background: rgba(2, 6, 23, 0.5);
    cursor: not-allowed;
    transform: none;
}

.playlist-now-playing {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.playlist-now-playing-text {
    flex: 1;
    min-width: 0;
}

.playlist-now-playing-title-row {
    display: flex;
    align-items: center;
    gap: 0.35em;
    min-width: 0;
    margin: 0 0 4px 0;
}

.playlist-now-playing-title-row .playlist-now-playing-title {
    margin: 0;
    flex: 0 1 auto;
    min-width: 0;
}

.playlist-now-playing-likes-slot {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.playlist-now-playing-title {
    color: #e5e7eb;
    font-weight: 600;
    font-size: 14px;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-now-playing-artist {
    color: #cbd5f5;
    font-size: 12px;
    margin: 0;
}

.playlist-now-playing-media {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-right: 2px;
}

.playlist-now-playing-pack-art {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    object-fit: cover;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.35);
    cursor: pointer;
}

.playlist-now-playing-artist-photo,
.playlist-now-playing-artist-fallback {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.45);
    overflow: hidden;
    cursor: pointer;
}

.playlist-now-playing-artist-fallback svg {
    width: 16px;
    height: 16px;
    color: #cbd5f5;
}

.playlist-volume-control {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.playlist-volume-btn {
    background: #d2d6dc;
    color: #334155;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.playlist-volume-btn .playlist-volume-icon {
    width: 13px;
    height: 13px;
    display: block;
}

.playlist-volume-btn:hover {
    background: #b8c0c8;
    transform: scale(1.05);
}

.playlist-volume-slider-wrapper {
    flex: 1;
    min-width: 0;
    max-width: 400px;
}

@media (min-width: 769px) {
    .playlist-volume-slider-wrapper {
        flex: 0 1 auto;
        opacity: 0;
        visibility: hidden;
        max-width: 0;
        overflow: hidden;
        transition: opacity 0.2s ease, max-width 0.25s ease, visibility 0.2s;
        pointer-events: none;
    }

    .playlist-volume-control:hover .playlist-volume-slider-wrapper,
    .playlist-volume-slider-wrapper:has(.playlist-volume-slider:focus) {
        flex: 1;
        opacity: 1;
        visibility: visible;
        max-width: 400px;
        pointer-events: auto;
    }
}

.playlist-volume-slider {
    width: 100%;
    max-width: 400px;
    height: 4px;
    border-radius: 2px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.playlist-volume-slider::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(
        to right,
        #8CD3DA 0%,
        #8CD3DA var(--volume-fill, 100%),
        #34459B var(--volume-fill, 100%),
        #34459B 100%
    );
}

.playlist-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d2d6dc;
    cursor: pointer;
    margin-top: -5px;
}

.playlist-volume-slider::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: #34459B;
    border: none;
}

.playlist-volume-slider::-moz-range-progress {
    height: 4px;
    border-radius: 2px;
    background: #8CD3DA;
}

.playlist-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d2d6dc;
    cursor: pointer;
    border: none;
}

.playlist-progress-container {
    margin: 10px 0 0;
    padding: 0;
    width: 100%;
}

.playlist-progress-bar {
    width: 100%;
    height: 4px;
    background: #d2d6dc;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
    cursor: pointer;
}

.playlist-progress-fill {
    height: 100%;
    background: #f38ab8;
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 2px;
}

.playlist-time {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #cbd5f5;
}

/* Landing-only player expand/collapse (body.landing-page on index.html). */
body.landing-page .playlist-expand-toggle .playlist-collapse-icon {
    display: none;
}

body.landing-page .landing-wrap.player-expanded .playlist-expand-toggle .playlist-expand-icon {
    display: none;
}

body.landing-page .landing-wrap.player-expanded .playlist-expand-toggle .playlist-collapse-icon {
    display: block;
}

body.landing-page .landing-wrap.player-expanded .playlist-expand-toggle {
    border-color: rgba(140, 211, 218, 0.7);
    background: rgba(140, 211, 218, 0.18);
    color: #8CD3DA;
}

body.landing-page .landing-wrap > .module:not(.playlist-module) {
    transition:
        opacity 0.35s ease,
        transform 0.35s ease,
        margin-bottom 0.4s ease,
        padding 0.4s ease,
        max-height 0.45s ease,
        box-shadow 0.3s ease;
    max-height: 2400px;
    transform: translateY(0);
    opacity: 1;
}

body.landing-page .landing-wrap.player-expanded > .module:not(.playlist-module) {
    opacity: 0;
    transform: translateY(-10px);
    flex: 0 0 0;
    min-height: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    pointer-events: none;
    box-shadow: none;
    border: none;
}

body.landing-page .playlist-module {
    transition: margin-bottom 0.4s ease, min-height 0.4s ease;
}

body.landing-page .playlist-container {
    transition: max-height 0.4s ease;
}

body.landing-page .landing-wrap.player-expanded {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    /* Extra top breathing room for the logo; side padding leaves room for shadow fade. */
    padding: 14px 40px 6px;
    box-sizing: border-box;
    overflow: hidden;
}

body.landing-page .landing-wrap.player-expanded .landing-header {
    flex-shrink: 0;
    padding: 4px 0 12px;
}

body.landing-page .landing-wrap.player-expanded .playlist-module {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 0;
}

body.landing-page .landing-wrap.player-expanded .playlist-title-row,
body.landing-page .landing-wrap.player-expanded .playlist-controls-wrapper {
    flex-shrink: 0;
}

body.landing-page .landing-wrap.player-expanded .playlist-container {
    flex: 1 1 0;
    max-height: none;
    min-height: 0;
}

body.landing-page .landing-wrap.player-expanded .footer {
    flex-shrink: 0;
    padding: 4px 0 0;
    margin: 0;
    font-size: 12px;
    line-height: 1.3;
}

body.landing-page .landing-wrap.player-expanded .footer p {
    margin: 0;
}

body.landing-page.landing-player-expanded {
    overflow: hidden;
    height: 100dvh;
}

body.landing-page.landing-player-expanded .landing-wrap {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

@media (max-width: 768px) {
    body.landing-page .landing-wrap.player-expanded {
        padding: 12px 20px 6px;
    }
}

.playlist-container {
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    /* ~3 cells tall before scrolling. */
    max-height: 282px;
    padding-right: 6px;
}

.playlist-container::-webkit-scrollbar { width: 6px; }
.playlist-container::-webkit-scrollbar-track { background: rgba(210, 214, 220, 0.2); border-radius: 3px; }
.playlist-container::-webkit-scrollbar-thumb { background: #d2d6dc; border-radius: 3px; }

.playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    /* Midpoint between module slate (62,76,102) and selected navy (2,6,23). */
    background: rgba(32, 41, 63, 0.78);
    border-radius: 8px;
    border: 1px solid rgba(75, 85, 99, 0.55);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.playlist-item:hover,
.playlist-item.playing {
    background: rgba(2, 6, 23, 0.85);
    border-color: rgba(148, 163, 184, 0.7);
}

.playlist-item-art {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
    transition: filter 0.15s ease, opacity 0.15s ease;
}

.playlist-item-avatar-wrap {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    cursor: pointer;
    transition: filter 0.15s ease, opacity 0.15s ease;
}

.playlist-item-art:hover,
.playlist-item-avatar-wrap:hover {
    filter: brightness(1.08);
    opacity: 0.92;
}

.playlist-item-avatar,
.playlist-item-avatar-fallback {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.45);
}

.playlist-item-avatar { object-fit: cover; }

.playlist-item-avatar-icon {
    width: 20px;
    height: 20px;
    color: #cbd5f5;
}

.playlist-item-info {
    flex: 1;
    min-width: 0;
}

.playlist-item-title-row {
    display: flex;
    align-items: center;
    gap: 0.35em;
    min-width: 0;
    margin: 0 0 4px 0;
}

.playlist-item-title-row .playlist-item-title {
    margin: 0;
    flex: 0 1 auto;
    min-width: 0;
}

.playlist-item-likes-slot {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.playlist-item-title {
    color: #e5e7eb;
    font-weight: 600;
    font-size: 14px;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item-artist {
    color: #cbd5f5;
    font-size: 12px;
    margin: 0;
    font-weight: 400;
}

.playlist-item-artist-name,
.playlist-item-pack-name {
    font-weight: 700;
    color: #e5e7eb;
}

a.playlist-item-artist-name {
    text-decoration: none;
}

a.playlist-item-artist-name:hover {
    color: #fff;
    text-decoration: underline;
}

.playlist-item-artist-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    min-width: 0;
}

.playlist-item-artist-row .playlist-item-artist {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item-avatar-inline {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.45);
    cursor: pointer;
}

.playlist-item-avatar-inline img,
.playlist-item-avatar-inline canvas,
.playlist-item-avatar-inline > div {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-item-avatar-inline svg {
    width: 10px;
    height: 10px;
    color: #cbd5f5;
}

.playlist-item-social {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.playlist-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(100, 116, 139, 0.25);
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: #cbd5f5;
    border-radius: 8px;
    padding: 7px;
    min-width: 30px;
    min-height: 30px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.playlist-social-btn:hover {
    background: rgba(100, 116, 139, 0.42);
    border-color: rgba(148, 163, 184, 0.7);
}

.playlist-social-btn.active {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(96, 165, 250, 0.85);
    color: #e5edff;
}

.playlist-social-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.playlist-likes-count-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0;
    min-width: 0;
    min-height: 0;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    cursor: default;
    border-radius: 0;
}

.playlist-likes-count-btn:hover {
    background: transparent;
    border: none;
    color: #94a3b8;
}

.playlist-likes-count-btn .playlist-social-icon {
    width: 13px;
    height: 13px;
}

.playlist-social-count {
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    min-width: 0.75em;
    text-align: center;
}

.playlist-item-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.playlist-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 6px;
}

.playlist-meta-field {
    color: #cbd5f5;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(100, 116, 139, 0.45);
    border-radius: 6px;
    padding: 6px 8px;
    white-space: nowrap;
}

.playlist-item-actions { margin-right: 4px; }

.playlist-remix-cell-btn {
    cursor: pointer;
    background: rgba(140, 211, 218, 0.22);
    border: 1px solid rgba(140, 211, 218, 0.55);
    color: #8CD3DA;
}

.playlist-remix-cell-btn:hover {
    background: rgba(140, 211, 218, 0.38);
    border-color: rgba(140, 211, 218, 0.85);
    color: #d9f1f3;
}

.playlist-remix-cell-btn:disabled {
    background: rgba(140, 211, 218, 0.12);
    border-color: rgba(140, 211, 218, 0.3);
    color: rgba(140, 211, 218, 0.55);
    cursor: not-allowed;
}

.playlist-remix-cell-btn:disabled:hover {
    background: rgba(140, 211, 218, 0.12);
    border-color: rgba(140, 211, 218, 0.3);
    color: rgba(140, 211, 218, 0.55);
}

.playlist-item-extras {
    display: flex;
    align-items: center;
    gap: 8px;
}

.playlist-play-btn {
    background: #f38ab8;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.2s, transform 0.2s;
}

.playlist-play-btn .playlist-item-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.playlist-play-btn:hover {
    background: #e06a9a;
    transform: scale(1.08);
}

.playlist-play-btn.playing { background: #34459b; }

.playlist-video-btn {
    background: rgba(52, 69, 155, 0.9);
    color: #fff;
    border: 1px solid rgba(148, 163, 184, 0.35);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: background-color 0.2s, transform 0.2s;
}

.playlist-video-btn .playlist-item-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.playlist-video-btn:hover {
    background: rgba(67, 88, 190, 0.98);
    transform: scale(1.08);
}

.playlist-empty {
    text-align: center;
    padding: 40px 20px;
    color: #cbd5f5;
}

/* ---------- Stream modals ---------- */
.media-preview-modal,
.stream-filter-modal,
.stream-login-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.media-preview-modal { z-index: 11000; }
.stream-filter-modal { z-index: 11100; background: rgba(2, 6, 23, 0.72); backdrop-filter: blur(5px); }
.stream-login-modal { z-index: 11200; }

.media-preview-modal.is-open,
.stream-filter-modal.is-open,
.stream-login-modal.is-open {
    display: flex;
}

.track-video-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 11300;
}

.track-video-modal.is-open {
    display: flex;
}

.track-video-dialog {
    position: relative;
    width: min(720px, 96vw);
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    padding: 16px;
}

.track-video-stage {
    position: relative;
    width: min(100%, 70vh);
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.track-video-dialog video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    display: block;
}

.track-video-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.track-video-poster[hidden] {
    display: none;
}

.track-video-poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-video-poster-play {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.track-video-poster-play svg {
    width: 38px;
    height: 38px;
    margin-left: 4px;
}

.track-video-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    color: #e5e7eb;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
}

.track-video-title {
    margin-top: 10px;
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.stream-login-dialog {
    position: relative;
    width: min(360px, 92vw);
    background: rgba(62, 76, 102, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    padding: 28px 24px;
    text-align: center;
    color: #e5e7eb;
}

.stream-login-dialog h3 { margin: 0 0 10px; font-size: 18px; font-weight: 700; }
.stream-login-dialog p { margin: 0; color: #cbd5f5; font-size: 14px; line-height: 1.4; }

.stream-login-close,
.stream-filter-close,
.media-preview-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    color: #e5e7eb;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.stream-filter-dialog {
    width: min(420px, 94vw);
    background: rgba(62, 76, 102, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    padding: 16px;
}

.stream-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.stream-filter-header h3 { margin: 0; color: #e5e7eb; font-size: 18px; font-weight: 700; }
.stream-filter-close { position: static; }

.stream-filter-body { display: flex; flex-direction: column; gap: 12px; }
.stream-filter-field { display: flex; flex-direction: column; gap: 6px; }

.stream-filter-field label {
    color: #cbd5f5;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.stream-filter-field select,
.stream-filter-field input {
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(2, 6, 23, 0.85);
    color: #e5e7eb;
    padding: 10px 12px;
    font-size: 14px;
    box-sizing: border-box;
}

.stream-filter-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.stream-filter-toggle-label {
    color: #cbd5f5;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.stream-filter-toggle-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #f38ab8;
}

.media-preview-dialog {
    width: min(690px, 96vw);
    max-height: 94vh;
    overflow-y: auto;
    background: rgba(62, 76, 102, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    padding: 24px;
    box-sizing: border-box;
    position: relative;
}

.media-preview-close { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; font-size: 22px; }

.media-preview-layout {
    --media-preview-image-size: min(280px, 32vw);
    display: grid;
    grid-template-columns: var(--media-preview-image-size) minmax(0, 1fr);
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 8px;
}

.media-preview-image {
    display: block;
    width: var(--media-preview-image-size);
    height: var(--media-preview-image-size);
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.7);
    box-sizing: border-box;
}

.media-preview-details {
    height: var(--media-preview-image-size);
    min-width: 0;
    overflow-y: auto;
    padding: 18px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.media-preview-title {
    margin: 0 34px 8px 0;
    color: #f8fafc;
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.05;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.media-preview-artist-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.media-preview-artist-avatar,
.media-preview-artist-photo,
.media-preview-artist-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.media-preview-artist-avatar {
    flex: 0 0 32px;
    overflow: hidden;
}

.media-preview-artist-photo {
    display: block;
    object-fit: cover;
}

.media-preview-artist-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.52);
    color: #cbd5f5;
}

.media-preview-artist-fallback svg {
    width: 18px;
    height: 18px;
}

.media-preview-artist {
    min-width: 0;
    color: #dbe4ff;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.media-preview-artist-username-link {
    color: inherit;
    text-decoration: none;
}

.media-preview-artist-username-link:hover { text-decoration: underline; }

.media-preview-metadata {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: auto 0 0;
}

.media-preview-metadata-item {
    min-width: 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.34);
}

.media-preview-metadata-item-wide { grid-column: 1 / -1; }

.media-preview-metadata dt {
    margin: 0 0 2px;
    color: #94a3b8;
    font-size: 9px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.media-preview-metadata dd {
    min-width: 0;
    margin: 0;
    color: #f8fafc;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* =====================================================================
   Module 3: Sequencer promo
   ===================================================================== */
.promo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: stretch;
}

.promo-visual-trigger {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: none;
    background: rgba(15, 23, 42, 0.35);
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.promo-visual-trigger:hover,
.promo-visual-trigger:focus-visible {
    box-shadow: 0 0 0 2px rgba(243, 138, 184, 0.55);
    transform: translateY(-1px);
    outline: none;
}

.promo-visual-prompt {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 20px 10px;
    text-align: center;
    font-size: clamp(13px, 1.3vw, 15px);
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: #e5e7eb;
}

.promo-visual {
    min-height: 0;
}

.promo-hero-img {
    display: block;
    width: 100%;
    height: auto;
    flex: 0 0 auto;
    max-height: none;
    border: none;
    border-radius: 0;
    object-fit: contain;
    object-position: bottom center;
    box-shadow: none;
}

.promo-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.promo-panel-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.promo-panel-heading {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #cbd5f5;
}

.promo-panel-subcopy {
    margin: -2px 0 0;
    font-size: 12px;
    line-height: 1.35;
    color: #94a3b8;
    font-weight: 400;
}

.promo-card-grid {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.promo-demos-grid {
    grid-template-columns: 1fr 1fr;
}

.promo-tutorials-grid {
    grid-template-columns: 1fr 1fr;
}

.promo-card {
    position: relative;
    display: block;
    min-height: 108px;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: filter 0.2s, transform 0.2s;
}

.promo-card:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.promo-card:focus-visible {
    outline: 2px solid rgba(243, 138, 184, 0.85);
    outline-offset: 2px;
}

.promo-card-bg {
    position: absolute;
    inset: 0;
}

.promo-card-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    min-height: inherit;
    padding: 12px 14px;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0) 20%, rgba(2, 6, 23, 0.82) 100%);
}

.promo-card-title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.promo-card .info-panel-tag {
    margin-bottom: 6px;
    font-size: 10px;
    padding: 3px 8px;
}

.promo-card-body p {
    margin: 0;
    font-size: 11px;
    line-height: 1.35;
    color: #e5e7eb;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.promo-demo-card {
    min-height: 118px;
    min-width: 0;
    max-width: 100%;
}

.promo-demo-card .promo-card-body.promo-demo-content {
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    padding: 0;
    background: none;
    overflow: hidden;
    min-width: 0;
    width: 100%;
}

.promo-demo-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 12px;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.52) 100%);
    overflow: hidden;
}

.promo-demo-art {
    position: relative;
    flex: 0 0 clamp(4.5rem, 34%, 8.25rem);
    flex-shrink: 0;
    align-self: stretch;
    box-sizing: border-box;
    width: clamp(4.5rem, 34%, 8.25rem);
    min-width: 4.5rem;
    max-width: 42%;
    overflow: hidden;
    border-left: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0 12px 12px 0;
}

.promo-demo-art-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.promo-demo-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.promo-demo-detail {
    margin: 0;
    font-size: 11px;
    line-height: 1.3;
}

.promo-demo-label {
    color: #94a3b8;
    font-weight: 600;
}

.promo-demo-value {
    font-weight: 700;
}

.promo-demo-producer {
    color: #f38ab8;
}

.promo-demo-pack {
    color: #8cd3da;
}

.promo-demos-grid .promo-demo-card:nth-child(1) .promo-card-bg,
.promo-demo-popup-carousel .promo-demo-card:nth-child(1) .promo-card-bg {
    background: linear-gradient(135deg, #34459B, #F38AB8);
}

.promo-demos-grid .promo-demo-card:nth-child(2) .promo-card-bg,
.promo-demo-popup-carousel .promo-demo-card:nth-child(2) .promo-card-bg {
    background: linear-gradient(135deg, #F38AB8, #8CD3DA);
}

.promo-demos-grid .promo-demo-card:nth-child(3) .promo-card-bg,
.promo-demo-popup-carousel .promo-demo-card:nth-child(3) .promo-card-bg {
    background: linear-gradient(135deg, #34459B, #8CD3DA);
}

.promo-demos-grid .promo-demo-card:nth-child(4) .promo-card-bg,
.promo-demo-popup-carousel .promo-demo-card:nth-child(4) .promo-card-bg {
    background: linear-gradient(135deg, #8CD3DA, #34459B);
}

.promo-tutorials-grid .promo-tutorial-card:nth-child(1) .promo-card-bg {
    background: linear-gradient(135deg, #34459B, #F38AB8);
}

.promo-tutorials-grid .promo-tutorial-card:nth-child(2) .promo-card-bg {
    background: linear-gradient(135deg, #34459B, #8CD3DA);
}

/* Near-fullscreen demo popup (opened from promo image) */
.promo-demo-popup {
    position: fixed;
    inset: 0;
    z-index: 12000;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
    display: none;
    align-items: stretch;
    justify-content: center;
    padding: 8px;
    box-sizing: border-box;
    overflow: hidden;
}

.promo-demo-popup.is-open {
    display: flex;
}

.promo-demo-popup-dialog {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: none;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    padding: 10px 12px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    box-sizing: border-box;
}

.promo-demo-popup-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    padding: 0;
}

.promo-demo-popup-header-text {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    padding-top: 4px;
}

.promo-demo-popup-header h2 {
    margin: 0 0 2px;
    font-size: clamp(15px, 1.6vw, 18px);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.15px;
}

.promo-demo-popup-header p {
    margin: 0;
    font-size: clamp(11px, 1.15vw, 13px);
    line-height: 1.35;
    color: #cbd5e1;
}

.promo-demo-popup-close {
    position: static;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.9);
    color: #e5e7eb;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s;
    z-index: 2;
}

.promo-demo-popup-close:hover {
    background: rgba(51, 65, 85, 0.98);
}

.promo-demo-popup-body {
    min-height: 0;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: stretch;
}

.promo-demo-popup-stage {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    height: 100%;
    max-width: 100%;
    width: 100%;
}

.promo-demo-popup-media {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.promo-demo-popup-img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.promo-demo-popup-carousel.info-carousel {
    height: clamp(148px, 18vh, 180px);
    border-radius: 12px;
    min-width: 0;
    width: 100%;
    flex: 0 0 auto;
}

.promo-demo-popup-carousel .info-carousel-track {
    animation: none;
}

.promo-demo-popup-carousel .promo-demo-card {
    min-height: 0;
    height: 100%;
    border-radius: 12px;
}

.promo-demo-popup-carousel .promo-card-title {
    font-size: 16px;
}

.promo-demo-popup-carousel .promo-demo-detail {
    font-size: 12px;
}

.promo-demo-popup-carousel .promo-demo-copy {
    padding: 14px 16px;
}

.promo-demo-popup-carousel .info-carousel-nav {
    opacity: 0.45;
}

.promo-demo-popup-carousel:hover .info-carousel-nav,
.promo-demo-popup-carousel:focus-within .info-carousel-nav {
    opacity: 0.65;
}

.promo-carousel.is-single-slide .info-carousel-nav,
.promo-carousel.is-single-slide .info-carousel-dots {
    display: none;
}

@media (max-width: 640px) {
    .promo-demo-popup {
        padding: 4px;
    }

    .promo-demo-popup-dialog {
        padding: 8px;
        gap: 8px;
        border-radius: 10px;
    }

    .promo-demo-popup-carousel.info-carousel {
        height: clamp(132px, 20vh, 160px);
    }

    .promo-demo-popup-carousel .promo-card-title {
        font-size: 14px;
    }

    .promo-demo-popup-carousel .promo-demo-detail {
        font-size: 11px;
    }
}

/* =====================================================================
   Module 4: Community members
   ===================================================================== */
.community-members-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    grid-template-rows: auto auto;
    column-gap: 18px;
    row-gap: 12px;
    align-items: start;
}

.community-members-subheading-featured {
    grid-column: 1;
    grid-row: 1;
}

.community-members-subheading-prolific {
    grid-column: 2;
    grid-row: 1;
}

.community-members-layout .featured-artist-card {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
}

.community-members-layout .artist-grid-prolific {
    grid-column: 2;
    grid-row: 2;
}

.community-members-subheading {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #f38ab8;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.featured-artist-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.55);
    border: 1px solid rgba(75, 85, 99, 0.5);
    box-sizing: border-box;
}

.featured-artist-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.featured-artist-identity {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-artist-status-wrap {
    width: 100%;
    margin-top: -4px;
}

.featured-artist-status {
    margin: 0;
    color: #e2e8f0;
    font-size: 13px;
    font-style: italic;
    line-height: 1.45;
    padding: 8px 10px;
    background: rgba(2, 6, 23, 0.25);
    border-left: 3px solid rgba(148, 163, 184, 0.5);
    border-radius: 0 8px 8px 0;
    word-break: break-word;
}

.featured-artist-head:hover .featured-artist-name {
    color: #f38ab8;
}

.featured-artist-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.45);
}

.featured-artist-avatar img,
.featured-artist-avatar > div,
.featured-artist-avatar svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-artist-name {
    font-size: 20px;
    font-weight: 800;
    color: #e5e7eb;
    line-height: 1.2;
    transition: color 0.2s;
}

.featured-artist-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
}

.featured-artist-stat-btn {
    border: 1px solid rgba(75, 85, 99, 0.45);
    background: rgba(15, 23, 42, 0.45);
    border-radius: 8px;
    padding: 6px 8px;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.featured-artist-stat-btn:hover {
    background: rgba(2, 6, 23, 0.75);
    border-color: rgba(243, 138, 184, 0.55);
    transform: translateY(-1px);
}

.featured-artist-stat-btn:focus-visible {
    outline: 2px solid rgba(243, 138, 184, 0.65);
    outline-offset: 2px;
}

.featured-artist-song {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px solid rgba(75, 85, 99, 0.45);
}

.featured-artist-song-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.featured-artist-song-title {
    font-size: 15px;
    font-weight: 700;
    color: #e5e7eb;
    line-height: 1.35;
}

.featured-artist-song-meta {
    font-size: 12px;
    color: #94a3b8;
}

.featured-artist-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.featured-artist-media-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.artist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.artist-grid-prolific {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: start;
}

@media (min-width: 769px) {
    .artist-grid-prolific .artist-mini-card {
        height: 100%;
    }
}

.artist-mini-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.55);
    border: 1px solid rgba(75, 85, 99, 0.5);
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
    min-height: 100%;
}

.artist-mini-profile-link {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.artist-mini-profile-link:hover {
    color: inherit;
}

.artist-mini-profile-link:hover .artist-mini-name {
    color: #f38ab8;
}

.artist-mini-card:hover {
    background: rgba(2, 6, 23, 0.75);
    border-color: rgba(243, 138, 184, 0.55);
    transform: translateY(-2px);
}

.artist-mini-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
}

.artist-mini-stat-fan {
    display: flex;
    align-items: center;
    justify-content: stretch;
}

.artist-mini-stat-fan .artist-mini-fan-btn {
    width: 100%;
    min-height: 100%;
    padding: 4px 6px;
    font-size: 10px;
    gap: 3px;
}

.artist-mini-stat-fan .playlist-social-icon {
    width: 12px;
    height: 12px;
}

.artist-mini-stat-fan .artist-mini-fan-btn span {
    font-size: 10px;
}

.artist-mini-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.artist-mini-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.45);
}

.artist-mini-avatar img,
.artist-mini-avatar > div,
.artist-mini-avatar svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-mini-name {
    font-size: 14px;
    font-weight: 700;
    color: #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.artist-mini-rank {
    font-size: 11px;
    color: #f38ab8;
    font-weight: 700;
}

.artist-mini-stat {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.artist-mini-stat-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.artist-mini-stat-value {
    font-size: 13px;
    font-weight: 700;
    color: #e5e7eb;
}

.artist-grid-empty,
.artist-grid-loading {
    color: #cbd5f5;
    padding: 24px;
    text-align: center;
    grid-column: 1 / -1;
}

/* Fan cards modal (featured artist fans) */
.fan-cards-modal .fan-cards-dialog {
    width: min(860px, calc(100vw - 32px));
    max-height: min(82vh, 760px);
    display: flex;
    flex-direction: column;
}

.fan-cards-modal-body {
    overflow-y: auto;
    padding: 4px 2px 8px;
    flex: 1;
    min-height: 0;
}

.fan-cards-notice {
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(243, 138, 184, 0.14);
    border: 1px solid rgba(243, 138, 184, 0.45);
    color: #fce7f3;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.fan-cards-notice[hidden] {
    display: none;
}

button.artist-mini-card-btn {
    width: 100%;
    border: 1px solid rgba(75, 85, 99, 0.5);
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
}

button.artist-mini-card-btn:focus-visible {
    outline: 2px solid rgba(243, 138, 184, 0.65);
    outline-offset: 2px;
}

.fan-cards-modal .artist-grid {
    --fan-card-gap: 14px;
    --fan-card-max-cols: 6;
    --fan-card-min: 120px;
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(
            min(
                100%,
                max(
                    var(--fan-card-min),
                    calc((100% - (var(--fan-card-max-cols) - 1) * var(--fan-card-gap)) / var(--fan-card-max-cols))
                )
            ),
            1fr
        )
    );
    gap: var(--fan-card-gap);
    padding: 4px 2px;
}

.fan-cards-modal .artist-grid-loading,
.fan-cards-modal .artist-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
    padding: 24px 12px;
}

/* =====================================================================
   Module 5: Platform stats (live counters)
   ===================================================================== */
.platform-stats-module {
    padding: 28px 20px 56px;
}

.platform-stats-intro {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 28px;
}

.platform-stats-intro h2 {
    color: #e5e7eb;
    font-size: clamp(1.5rem, 4vw, 1.875rem);
    font-weight: 600;
    margin: 0 0 12px;
    letter-spacing: 0.3px;
}

.platform-stats-intro p {
    color: #cbd5f5;
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    line-height: 1.6;
    margin: 0;
}

.platform-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    text-align: center;
    padding-bottom: 40px;
}

.platform-stat {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.platform-stat-value {
    font-size: clamp(2rem, 6vw, 3.25rem);
    font-weight: 800;
    line-height: 1;
    color: #fff;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.platform-stat-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #f38ab8;
}

@media (max-width: 640px) {
    .platform-stats-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* =====================================================================
   Login modal + shared buttons (ported from style.css)
   ===================================================================== */
.launch-button {
    background-color: #2d3a52;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 100px;
}

.launch-button:hover {
    background-color: #1f2838;
    transform: scale(1.02);
}

.pink-outline-button {
    background-color: transparent;
    color: #f38ab8;
    border: 2px solid #f38ab8;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.2s, color 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.pink-outline-button:hover {
    background-color: #f38ab8;
    color: white;
    transform: scale(1.02);
}

.btn-secondary {
    background-color: #d9d9d9;
    color: #333;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.error-text {
    color: #f38ab8;
    margin: 8px 0 0 0;
    font-size: 14px;
}

/* Login modal (opened by account button or a gated stream action) */
.login-modal,
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 12000;
    padding: 20px;
    box-sizing: border-box;
}

.login-modal.is-open { display: flex; }
.modal-overlay { z-index: 12100; }

.login-dialog,
.modal-content {
    position: relative;
    width: min(440px, 94vw);
    background: rgba(62, 76, 102, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    padding: 26px 24px;
    box-sizing: border-box;
}

.login-dialog h3,
.modal-content h3 {
    margin: 0 0 6px;
    color: #e5e7eb;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}

.login-dialog .login-sub {
    margin: 0 0 18px;
    color: #cbd5f5;
    font-size: 13px;
    text-align: center;
}

.login-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    color: #e5e7eb;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.button-row-inline {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.button-row-inline .launch-button { flex: 1; }

.login-options { display: none; }
.login-options.active { display: block; }
.login-provider-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-provider-list .launch-button {
    display: block;
    width: 100%;
    min-height: 44px;
}

.login-privacy-note {
    margin: 14px 4px 0;
    color: #cbd5f5;
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
}

.login-privacy-note a {
    color: #f38ab8;
}

.initial-buttons { display: block; }
.initial-buttons.hidden { display: none; }

.modal-field { margin-bottom: 12px; }

.modal-field label {
    display: block;
    margin-bottom: 6px;
    color: #cbd5f5;
    font-weight: 600;
}

.modal-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #4b5563;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.9);
    color: #e5e7eb;
    font-size: 16px;
    box-sizing: border-box;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.modal-actions .launch-button,
.modal-actions .btn-secondary { flex: 1; }

/* ---------- Footer & shader selector ---------- */
.footer {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
    font-size: 14px;
}

.footer a { color: inherit; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 768px) {
    .landing-wrap { padding: 0 14px 50px; }
    body.landing-page .landing-wrap { padding: 0 20px 50px; }

    .module {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(62, 76, 102, 0.94);
    }

    .landing-logo img { width: 200px; }

    .module { padding: 16px; }

    .promo-grid { grid-template-columns: 1fr; }

    .promo-visual-trigger { min-height: 280px; }

    .promo-hero-img { max-height: min(240px, 36vh); }

    .promo-visual-prompt {
        padding: 14px 16px 8px;
        font-size: 13px;
    }

    .promo-demos-grid,
    .promo-tutorials-grid {
        grid-template-columns: 1fr;
    }

    .promo-demo-copy { padding: 10px 12px; }

    .promo-card-title { font-size: 14px; }

    /* Keep demo art visible: absolute imgs report no intrinsic width, so
       aspect-ratio + flex can collapse the panel to a 1px border on mobile. */
    .promo-demo-art {
        flex: 0 0 5.5rem;
        width: 5.5rem;
        min-width: 5.5rem;
        max-width: 38%;
    }

    .promo-demo-popup-carousel .promo-demo-art {
        flex: 0 0 5rem;
        width: 5rem;
        min-width: 5rem;
        max-width: 36%;
    }

    .info-carousel { height: clamp(140px, 22vh, 210px); }

    .info-panel-content h2 { font-size: 18px; }
    .info-panel-content p { font-size: 13px; }

    .info-carousel-module .info-panel:nth-child(3) .info-panel-header h2,
    .info-carousel-module .info-panel:nth-child(4) .info-panel-header h2 {
        font-size: 17px;
    }

    .info-carousel-module .info-panel:nth-child(3) .info-panel-content p,
    .info-carousel-module .info-panel:nth-child(4) .info-panel-content p {
        font-size: 12px;
        line-height: 1.38;
    }

    .community-members-layout {
        grid-template-columns: 1fr;
    }

    .community-members-subheading-featured,
    .community-members-subheading-prolific,
    .community-members-layout .featured-artist-card,
    .community-members-layout .artist-grid-prolific {
        grid-column: 1;
    }

    .community-members-subheading-featured { grid-row: 1; }
    .community-members-layout .featured-artist-card { grid-row: 2; }
    .community-members-subheading-prolific { grid-row: 3; }
    .community-members-layout .artist-grid-prolific { grid-row: 4; }

    .artist-grid-prolific {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .featured-artist-avatar {
        width: 60px;
        height: 60px;
    }

    .featured-artist-name {
        font-size: 18px;
    }

    .playlist-controls {
        align-items: flex-start;
        flex-direction: column;
    }

    .playlist-main-controls,
    .playlist-now-playing { width: 100%; }

    .playlist-item { flex-wrap: wrap; }
    .playlist-item-art { order: 1; }
    .playlist-item-info { order: 2; }
    .playlist-item-controls { order: 3; }

    .playlist-item-extras {
        order: 4;
        flex-basis: 100%;
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 6px;
        margin-top: 8px;
    }

    .playlist-item-extras .playlist-item-meta,
    .playlist-item-extras .playlist-item-social {
        margin-right: 0;
    }

    /* Icon-only for remix / like / fan on mobile; likes count beside the title
       keeps its number. */
    .playlist-remix-cell-btn .playlist-remix-label,
    .playlist-like-btn span,
    .playlist-fan-btn span {
        display: none;
    }

    .playlist-fan-btn {
        padding: 7px;
    }

    .info-carousel-nav {
        opacity: 0.25;
    }

    .playlist-item-desktop-only { display: none !important; }

    .media-preview-dialog { width: min(340px, 94vw); padding: 18px; }
    .media-preview-layout {
        --media-preview-image-size: min(260px, 72vw);
        grid-template-columns: var(--media-preview-image-size);
        gap: 12px;
    }
}
