/* =====================================================================
   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;
}

*, *::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;
    overflow-x: hidden;
    -webkit-touch-callout: none;
}

#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    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;
}

/* ---------- 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);
    border: none;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    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 (auto-scroll, 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: infoCarouselScroll 32s infinite;
    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;
}

/* Placeholder background until final artwork is dropped in. Each panel can be
   given a real background image via inline style or a .info-panel--n class. */
.info-panel-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(52, 69, 155, 0.55), rgba(243, 138, 184, 0.35));
    background-size: cover;
    background-position: center;
}

.info-panel:nth-child(1) .info-panel-bg { background: linear-gradient(135deg, #1f2a54, #34459b); }
.info-panel:nth-child(2) .info-panel-bg { background: linear-gradient(135deg, #163a52, #2b8ea3); }
.info-panel:nth-child(3) .info-panel-bg { background: linear-gradient(135deg, #4a1f45, #a33a7f); }
.info-panel:nth-child(4) .info-panel-bg { background: linear-gradient(135deg, #12303a, #3aa39a); }

.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-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-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;
}

.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;
    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 {
    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: 28px;
    height: 28px;
    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: 16px;
    height: 16px;
    display: block;
}

.playlist-volume-btn:hover {
    background: #b8c0c8;
    transform: scale(1.05);
}

.playlist-volume-slider-wrapper {
    flex: 1;
    min-width: 0;
}

.playlist-volume-slider {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #d2d6dc;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.playlist-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d2d6dc;
    cursor: pointer;
}

.playlist-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d2d6dc;
    cursor: pointer;
    border: none;
}

.playlist-progress-container {
    margin: 0 0 12px;
    padding: 0 2px;
}

.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;
}

.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;
    background: rgba(2, 6, 23, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(75, 85, 99, 0.5);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.playlist-item:hover,
.playlist-item.playing {
    background: rgba(2, 6, 23, 0.8);
    border-color: rgba(75, 85, 99, 0.75);
}

.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 {
    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 { cursor: default; }
.playlist-likes-count-btn:hover {
    background: rgba(100, 116, 139, 0.25);
    border-color: rgba(148, 163, 184, 0.4);
}

.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;
}

.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; }

.playlist-remix-cell-btn:disabled {
    color: rgba(203, 213, 245, 0.6);
    cursor: not-allowed;
}

.playlist-remix-cell-btn:disabled:hover {
    background: rgba(100, 116, 139, 0.25);
    border-color: rgba(148, 163, 184, 0.4);
}

.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-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;
}

.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(760px, 96vw);
    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: 18px;
    position: relative;
}

.media-preview-close { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; font-size: 22px; }

.media-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 12px;
}

.media-preview-item {
    background: rgba(15, 23, 42, 0.45);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.media-preview-label {
    color: #cbd5f5;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
}

.media-preview-pack-art {
    width: min(280px, 32vw);
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.media-preview-artist-frame {
    width: min(280px, 32vw);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.media-preview-artist-photo,
.media-preview-artist-fallback {
    width: 100%;
    height: 100%;
    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;
}

.media-preview-artist-fallback svg { width: 64px; height: 64px; color: #cbd5f5; }

.media-preview-artist-username {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 33%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 12px 10px;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.15) 0%, rgba(2, 6, 23, 0.78) 55%, rgba(2, 6, 23, 0.92) 100%);
    color: #f8fafc;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.media-preview-pack-art,
.media-preview-artist-photo,
.media-preview-artist-fallback,
.media-preview-artist-username-link {
    cursor: pointer;
    transition: opacity 0.15s ease, filter 0.15s ease;
}

.media-preview-pack-art:hover,
.media-preview-artist-photo:hover,
.media-preview-artist-fallback:hover {
    filter: brightness(1.08);
    opacity: 0.92;
}

.media-preview-artist-username-link {
    color: inherit;
    text-decoration: none;
}

.media-preview-artist-username-link:hover {
    text-decoration: underline;
}

/* =====================================================================
   Module 3: Sequencer promo (wireframe)
   ===================================================================== */
.promo-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
}

.promo-visual {
    min-height: 200px;
    border-radius: 12px;
}

.promo-hero-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.promo-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.promo-video-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #e5e7eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s, border-color 0.2s;
}

.promo-video-link:hover {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(243, 138, 184, 0.6);
}

.promo-video-link .promo-play-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f38ab8;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
}

.promo-cta {
    margin-top: auto;
}

/* =====================================================================
   Module 4: Top artists grid
   ===================================================================== */
.artist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.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;
}

.artist-mini-card:hover {
    background: rgba(2, 6, 23, 0.75);
    border-color: rgba(243, 138, 184, 0.55);
    transform: translateY(-2px);
}

.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-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
}

.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;
}

/* =====================================================================
   Module 5: Platform stats (live counters)
   ===================================================================== */
.platform-stats-module {
    padding: 28px 20px;
}

.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: 20px;
}

.platform-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    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; }
.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; }

.shader-selector-container {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
}

.shader-selector-container label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    margin-bottom: 0.25rem;
    text-align: center;
}

.shader-selector-container select {
    padding: 0.4rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid #4b5563;
    background: rgba(2, 6, 23, 0.9);
    color: #e5e7eb;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 200px;
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 768px) {
    .landing-wrap { padding: 0 14px 50px; }

    .landing-logo img { width: 200px; }

    .module { padding: 16px; }

    .promo-grid { grid-template-columns: 1fr; }

    .info-carousel { height: clamp(140px, 22vh, 210px); }

    .info-panel-content h2 { font-size: 18px; }
    .info-panel-content p { font-size: 13px; }

    .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; tempo, key and the likes count
       keep their text. */
    .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-grid { grid-template-columns: 1fr; gap: 12px; }
    .media-preview-pack-art,
    .media-preview-artist-frame { width: min(260px, 72vw); }
}
