@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;800&display=swap');

:root {
    --bg-color: #ffffff;         
    --surface-color: #f9f9f9;    
    --text-color: #666666;       
    --text-bright: #000000;      
    --accent-color: #000000;     
    --header-bg: #ffffff;        
    --border-color: #e5e5e5;     
}

*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    margin: 0; padding: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    position: relative;
    -webkit-font-smoothing: antialiased; 
}

/* Use 'clip' instead of 'hidden'. It prevents horizontal scroll without breaking sticky menus inside! */
#app-content {
    overflow-x: clip;
}

/* Apply the permanent vertical scrollbar ONLY to the html element to prevent double scrollbars */
html {
    overflow-y: scroll;
}

/* --- Header & Logo --- */
.main-header {
    display: flex; justify-content: center; align-items: center;
    padding: 20px 20px; margin: 0; background-color: var(--header-bg); 
    border: none; border-bottom: 1px solid var(--border-color); 
    position: sticky; 
    top: 0; 
    z-index: 9000; 
}
.logo { 
    position: absolute; left: 20px; font-size: 22px; font-weight: 700; 
    color: var(--text-bright); letter-spacing: 3px; text-transform: uppercase; 
}
.logo a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
}
.site-logo-img {
    max-height: 40px;
    width: auto;
    vertical-align: middle;
    margin-right: 15px;
}

/* --- Main Navigation & Dropdowns --- */
.main-nav > ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; }
.main-nav > ul > li { position: relative; padding: 10px 0; }
.main-nav a { 
    color: var(--text-color); 
    text-decoration: none; 
    text-transform: uppercase; 
    font-size: 14px; 
    font-weight: 600; 
    letter-spacing: 2px; 
    transition: none !important; /* FORCES INSTANT BLACK SELECTION */
    padding: 8px 16px; 
    border-radius: 4px;
    position: relative; 
}

.main-nav > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 16px;
    width: calc(100% - 32px);
    height: 2px;
    background-color: var(--text-bright);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s cubic-bezier(0.86, 0, 0.07, 1); 
}

.main-nav > ul > li > a:hover:not(.active-nav)::after {
    transform: scaleX(1);
    transform-origin: left; 
}

.main-nav a:hover:not(.active-nav) { 
    color: var(--text-bright); 
}

.main-nav a.active-nav { 
    background-color: #000000 !important; 
    color: #ffffff !important; 
}

.dropdown {
    visibility: hidden;
    opacity: 0;
    position: absolute; top: 100%; left: 50%; 
    transform: translate3d(-50%, 10px, 0); 
    background-color: #000000; 
    border: 1px solid #333333; 
    border-radius: 5px;
    padding: 10px 0; min-width: 180px; z-index: 1000; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column; gap: 0; list-style: none;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s; 
    will-change: transform, opacity;
}
.main-nav > ul > li:hover .dropdown { 
    visibility: visible;
    opacity: 1;
    transform: translate3d(-50%, 0, 0); 
}
.dropdown li { width: 100%; text-align: center; padding: 0; }
.dropdown a { 
    display: block; padding: 14px 20px; 
    font-size: 12px; color: #aaaaaa; 
    transition: background-color 0s, color 0s; /* INSTANT HOVER IN DROPDOWN */
    will-change: background-color, color;
    border-radius: 0;
}
.dropdown a::after {
    display: none;
}
.dropdown a:hover { 
    background-color: #222222; 
    color: #ffffff; 
}

/* --- Hero Slider (Soft Wipe Mask Reveal) --- */
.hero-wrapper { width: calc(100% - 20px); margin: 15px auto 50px auto; padding: 0; }
.hero-slider-container { 
    width: 100%; aspect-ratio: 4 / 1; position: relative; 
    overflow: hidden; background-color: var(--surface-color); 
    border: 1px solid #000000; border-radius: 5px; display: block;
}

.hero-slider-container .slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center;
    z-index: 0;
    backface-visibility: hidden;
    
    /* Soft Gradient Mask */
    -webkit-mask-image: linear-gradient(to right, #000 40%, transparent 60%);
    -webkit-mask-size: 300% 100%;
    -webkit-mask-position: 100% 0; 
    mask-image: linear-gradient(to right, #000 40%, transparent 60%);
    mask-size: 300% 100%;
    mask-position: 100% 0;
}

.hero-slider-container .slide.last-active { z-index: 1; }
.hero-slider-container .slide.active { z-index: 2; }

.slider-arrow {
    position: absolute; top: 50%; transform: translate3d(0, -50%, 0); background: rgba(0, 0, 0, 0.2);
    color: #ffffff; border: none; width: 45px; height: 45px; font-size: 18px; cursor: pointer;
    z-index: 10; display: flex; align-items: center; justify-content: center; border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); backdrop-filter: blur(4px);
    will-change: transform, background-color;
}
.slider-arrow:hover { background: rgba(0, 0, 0, 0.8); transform: translate3d(0, -50%, 0) scale3d(1.1, 1.1, 1); }
.slider-arrow.prev { left: 20px; }
.slider-arrow.next { right: 20px; }

.slider-dots { position: absolute; bottom: 20px; left: 50%; transform: translate3d(-50%, 0, 0); display: flex; gap: 12px; z-index: 10; will-change: transform; }
.dot { width: 10px; height: 10px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.4); border: none; cursor: pointer; transition: all 0.3s ease; padding: 0; will-change: transform, background-color; transform: translateZ(0); }
.dot.active { background-color: #ffffff; transform: scale3d(1.3, 1.3, 1); }
.dot:hover { background-color: rgba(255, 255, 255, 0.9); }

.slider-progress-wrapper {
    position: absolute; bottom: 20px; right: 20px; width: 34px; height: 34px; z-index: 10; border-radius: 50%;
    background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center;
}
.slider-progress-svg { width: 20px; height: 20px; transform: rotate(-90deg) translateZ(0); }
.slider-progress-bg { fill: none; stroke: rgba(255, 255, 255, 0.2); stroke-width: 3; }
.slider-progress-bar { fill: none; stroke: #ffffff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100, 100; stroke-dashoffset: 100; }

/* --- Buttons --- */
.btn {
    display: inline-block; padding: 12px 28px; background-color: transparent; color: var(--text-bright);
    border: 1px solid var(--text-bright); text-decoration: none; text-transform: uppercase; font-size: 11px; font-weight: 500; letter-spacing: 2px;
    cursor: pointer; transition: all 0.3s ease;
    will-change: background-color, color; transform: translateZ(0);
}
.btn:hover { background-color: var(--text-bright); color: #ffffff; }
.btn-danger { color: #cc0000; border-color: #cc0000; }
.btn-danger:hover { background-color: #cc0000; color: #ffffff; }

.btn-save-top { position: fixed; top: 15px; right: 20px; z-index: 1000; background: var(--bg-color); }
.btn-save-bottom { position: fixed; bottom: 15px; right: 20px; z-index: 1000; background: var(--bg-color); }

/* --- Dynamic Sections & Grids --- */
.content-wrapper { padding: 0 10px; max-width: 1600px; margin: 0 auto; clear: both; }

.dynamic-section { 
    margin-bottom: 80px; 
    padding-bottom: 60px;
    border-bottom: 1px solid var(--border-color);
    position: relative; 
    z-index: 5; 
    text-align: center; 
}
.dynamic-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-title { 
    font-family: 'Inter', -apple-system, sans-serif !important;
    font-size: 20px !important; 
    font-weight: 600 !important; 
    text-transform: uppercase !important; 
    letter-spacing: 2px !important; 
    margin-bottom: 40px !important; 
    padding-bottom: 15px !important; 
    border-bottom: 1px solid var(--border-color); 
    color: var(--text-bright); 
    text-align: left !important; 
    display: block;
}

.layout-discovery .discovery-banner {
    width: 100%; height: 350px; background-color: var(--surface-color);
    display: flex; align-items: center; justify-content: center; color: var(--text-bright); border: 1px solid var(--border-color);
    font-size: 12px; letter-spacing: 2px; text-transform: uppercase; border-radius: 5px;
}

.layout-grid { display: grid; gap: 20px; width: 100%; justify-content: center; }

/* =========================================
   GRAPHIC BANNERS (For Expert Guide & Home)
========================================= */
.graphic-banner {
    width: 100%;
    display: block;
    cursor: pointer;
    background-color: #111111;
    overflow: hidden; 
    border-radius: 4px; 
    position: relative; 
}

.graphic-banner img {
    width: 100%;
    height: auto;
    display: block;
    /* the parent clips with its own radius - a radius here creates 1px seams while scaling */
    border-radius: 0;
    filter: none;
    /* keep the image on a single GPU layer at all times: the browser then uses the SAME
       resampling during the zoom and at rest, killing the flicker / sharpness "pop" */
    transform: scale(1.001) translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
    transition: transform 600ms cubic-bezier(0.25, 1, 0.5, 1);
}

.graphic-banner::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: inset 0 0 0 2px #ffffff;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none; 
    transition: opacity 0.6s ease; 
    z-index: 10;
}

.graphic-banner:hover img {
    transform: scale(1.02) translateZ(0);
}

.graphic-banner:hover::after {
    opacity: 1;
    transition: opacity 0.1s ease; 
}

.list-banners-grid {
    display: grid; 
    gap: 6px; 
    width: 100%;
    grid-template-columns: repeat(var(--desktop-cols, 4), 1fr);
}
@media (max-width: 900px) {
    .list-banners-grid { grid-template-columns: repeat(min(2, var(--desktop-cols)), 1fr) !important; }
}
@media (max-width: 500px) {
    .list-banners-grid { grid-template-columns: 1fr !important; }
}

/* --- Audio Cards --- */
.audio-card { 
    background-color: var(--surface-color); 
    border: 2px solid var(--border-color);
    padding: 2px; 
    border-radius: 5px; 
    overflow: hidden; 
    transition: border-color 0.32s ease, box-shadow 0.32s ease, transform 0.32s ease; 
    text-decoration: none; 
    color: var(--text-color); 
    display: flex; 
    flex-direction: column; 
    text-align: left;
    will-change: transform, box-shadow, border-color;
    transform: translateZ(0);
}

.audio-card:hover { 
    border-color: #000000; 
    box-shadow: 0 12px 25px rgba(0,0,0,0.1); 
    transform: scale3d(1.015, 1.015, 1) translate3d(0, -2px, 0);
} 

.audio-card-img-wrapper { 
    width: 100%; 
    aspect-ratio: 1/1; 
    overflow: hidden; 
    border-radius: 3px; 
    margin-bottom: 2px; 
    transform: translateZ(0);
}

.audio-card-img { 
    width: 100%; height: 100%; background-size: cover; background-position: center; background-color: #e0e0e0; 
    transition: transform 0.32s ease; 
    will-change: transform;
    transform: translateZ(0);
}
.audio-card:hover .audio-card-img { transform: scale3d(1.1, 1.1, 1); }

.audio-card-info { 
    padding: 15px 18px 18px 18px; 
    transition: transform 0.32s ease;
    transform-origin: left center;
    will-change: transform;
    transform: translateZ(0);
}
.audio-card:hover .audio-card-info { 
    transform: scale3d(1.05, 1.05, 1); 
}

.audio-card-title { font-size: 13px; font-weight: 600; margin: 0 0 6px 0; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.5px; }
.audio-card-artist { font-size: 11px; color: var(--text-color); margin: 0; text-transform: uppercase; letter-spacing: 1px; }

/* --- Universal Pages --- */
.entity-cover { width: 350px; height: 350px; background-size: cover; background-position: center; background-repeat: no-repeat; border: 2px solid #000000; border-radius: 5px; }

.track-list { width: 100%; border-collapse: collapse; margin-top: 20px; }

.track-list th, .track-list td { padding: 8px 15px; text-align: left; border-bottom: 2px solid #000000; font-size: 13px; color: var(--text-bright); }
.track-list th { color: #888; text-transform: uppercase; font-size: 10px; font-weight: 600; letter-spacing: 2px; background: transparent !important; padding-top: 15px; padding-bottom: 15px; }

.track-list tbody tr:hover { background-color: #e0e0e0; }
.track-list thead tr:hover, .track-list th:hover { background: transparent !important; }

.track-list a { color: var(--text-bright); text-decoration: none; transition: color 0.32s ease; font-weight: 500; will-change: color; }
.track-list a:hover { color: var(--text-color); }

.track-list .btn-play-huge, 
.track-list .btn-buy {
    height: 36px;
    width: 130px;
    font-size: 10px;
    gap: 6px;
    border-width: 1.5px;
    border-radius: 3px;
}
.track-list .btn-play-huge svg { width: 14px; height: 14px; }


/* --- Admin UI --- */
.admin-wrapper { max-width: 1100px; margin: 40px auto; padding: 40px; background: var(--surface-color); border: 1px solid var(--border-color); margin-bottom: 100px; border-radius: 5px; }
.admin-form-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 25px; }
.admin-form-group label { font-size: 10px; text-transform: uppercase; color: #888; font-weight: 600; letter-spacing: 2px; }
.admin-input { padding: 12px 15px; background: #ffffff; color: var(--text-bright); border: 1px solid var(--border-color); width: 100%; font-family: 'Inter', sans-serif; font-size: 12px; border-radius: 3px; }
.admin-input:focus { outline: none; border-color: #000000; }
.success-msg { color: #000000; border: 1px solid #000000; padding: 15px; margin-bottom: 30px; background: #ffffff; font-size: 12px; letter-spacing: 1px; font-weight: 500; }
.error-msg { color: #cc0000; border: 1px solid #cc0000; padding: 15px; margin-bottom: 30px; background: #ffffff; font-size: 12px; letter-spacing: 1px; }

table { width: 100%; border-collapse: collapse; margin-bottom: 40px; background: #ffffff; }
th, td { border: 1px solid var(--border-color); padding: 15px; text-align: left; font-size: 12px; color: var(--text-bright); }
th { background: var(--surface-color); text-transform: uppercase; font-size: 10px; color: #888; letter-spacing: 2px; font-weight: 600; }

.drag-handle { cursor: grab; color: #aaa; font-size: 14px; text-align: center; width: 40px; user-select: none; transition: color 0.2s; will-change: color; }
.drag-handle:hover { color: #000000; }
.sortable-ghost { opacity: 0.5; background-color: #ffffff; outline: 1px dashed #000000; }
.order-input { width: 60px; text-align: center; background: #ffffff; border: none; color: #888; pointer-events: none; }


/* =========================================
   ALBUM FULL-WIDTH HEADER BANNER
========================================= */
.page-label-container {
    max-width: 1200px;
    margin: 0 auto 30px auto;
    width: 100%;
}
.label-album {
    display: block;
    width: 100%;
    background-color: #000000;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 8px;
    padding: 12px 0;
    text-align: center;
    border-radius: 3px;
}


/* =========================================
   PRO TRACK PAGE LAYOUT (Massive)
========================================= */
.pro-track-layout {
    display: flex;
    gap: 80px; 
    align-items: center; 
    max-width: 1200px;
    margin: 0 auto;
}
.track-cover-panel { width: 550px; flex-shrink: 0; position: relative; }
.track-cover-panel .entity-cover { width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 5px; box-shadow: 0 20px 50px rgba(0,0,0,0.1); transform: translateZ(0); }

/* --- Back to Album Hover Button --- */
.back-to-album-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    will-change: transform, background-color;
}
.back-to-album-btn:hover {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
    transform: translate3d(-4px, 0, 0);
}
.back-to-album-btn svg { width: 14px; height: 14px; transition: transform 0.3s ease; }
.back-to-album-btn:hover svg { transform: translateX(-4px); }


.track-info-panel { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.genre-tag {
    display: inline-block; padding: 6px 16px; background: #000000; color: #ffffff; border-radius: 20px; 
    font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px;
    text-decoration: none; margin-bottom: 25px; align-self: flex-start;
    transition: transform 0.32s ease, background 0.32s ease;
    will-change: transform, background-color; transform: translateZ(0);
}
.genre-tag:hover { transform: scale3d(1.05, 1.05, 1); background: #333333; color: #ffffff; }

.track-title-massive { font-size: 72px; font-weight: 300; line-height: 1.05; margin: 0 0 10px 0; letter-spacing: -2px; color: var(--text-bright); }
.track-artist-sub { font-size: 26px; font-weight: 400; color: var(--text-color); margin: 0 0 45px 0; letter-spacing: 1px; }

.track-metadata-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 30px; margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px solid var(--border-color); }
.track-metadata-grid div { font-size: 15px; font-weight: 500; color: var(--text-bright); }
.track-metadata-grid span { font-size: 10px; text-transform: uppercase; color: #888; letter-spacing: 2px; margin-bottom: 5px; display: inline-block; }

.track-price-display { font-size: 36px; font-weight: 600; color: var(--text-bright); margin-bottom: 30px; letter-spacing: -1px; }
.track-action-zone { display: flex; gap: 16px; row-gap: 14px; align-items: center; flex-wrap: wrap; }

.btn-play-huge, .btn-buy, .btn-queue, .btn-in-library, .sb-share-btn {
    height: 46px;
    width: 172px;
    /* Flex items default to min-width:auto, which lets the longest label
       (e.g. "DOWNLOADED") overrule the fixed width and grow bigger than its
       siblings. Pinning flex + min-width keeps all three exactly equal. */
    flex: 0 0 172px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    /* Preview / Download / Copy Link are one visual family: identical box,
       identical corners - only the colour and contents differ. */
    border-radius: 6px;
    box-sizing: border-box;
    transition: all 0.32s ease;
    text-decoration: none;
    will-change: transform, background-color, color, border-color; 
    transform: translateZ(0);
}

.btn-play-huge { background: #000000; color: #ffffff; border: 2px solid #000000; }
.btn-play-huge:hover { background: transparent; color: #000000; transform: scale3d(1.02, 1.02, 1); }
.btn-play-huge svg { display: block; } 

.btn-buy { 
    background-color: var(--played-color, #000000) !important; 
    color: #ffffff !important; 
    border: 2px solid var(--played-color, #000000) !important; 
}
.btn-buy:hover {
    background-color: transparent !important;
    color: var(--played-color, #000000) !important;
    border-color: var(--played-color, #000000) !important;
    transform: scale3d(1.02, 1.02, 1);
}

/* =========================================
   SUBSCRIPTION CREDIT QUEUE / LIBRARY BUTTONS
========================================= */
/* DOWNLOAD (not yet taken) uses the same store accent as the ADD buttons,
   so the primary action reads identically in both purchase modes. */
.btn-queue {
    background-color: var(--played-color, #000000) !important;
    color: #ffffff !important;
    border: 2px solid var(--played-color, #000000) !important;
}
.btn-queue:hover {
    background-color: transparent !important;
    color: var(--played-color, #000000) !important;
    border-color: var(--played-color, #000000) !important;
    transform: scale3d(1.02, 1.02, 1);
}
.btn-queue:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.btn-in-library {
    background-color: #f4f4f4 !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}
.btn-in-library:hover { background-color: #000000 !important; color: #ffffff !important; transform: scale3d(1.02, 1.02, 1); }

.btn-buy-secondary {
    background: none; border: none; padding: 0; cursor: pointer; font-family: inherit;
    font-size: 11px; font-weight: 600; letter-spacing: 0.5px; color: #888; text-decoration: underline;
    text-underline-offset: 3px; text-transform: none;
}
.btn-buy-secondary:hover { color: var(--text-bright); }

.compact-btn.queue {
    background: var(--played-color, #cc0000) !important;
    color: #ffffff !important;
    border-color: var(--played-color, #cc0000) !important;
}
.compact-btn.queue:hover { opacity: 0.85; }
.compact-btn.in-library { background: #f4f4f4 !important; color: #000000 !important; border-color: #000000 !important; }
.compact-btn.in-library:hover { background: #000000 !important; color: #ffffff !important; }
.compact-buy-link {
    display: block; text-align: center; font-size: 9px; color: #888; text-decoration: underline;
    text-underline-offset: 2px; margin-top: 3px; cursor: pointer; background: none; border: none;
    font-family: inherit; width: 100%; padding: 0;
}
.compact-buy-link:hover { color: var(--text-bright); }

/* Card variant sits on a dark bar (homepage / top picks grids) */
.price-btn-container { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.price-btn.queue-card-btn { background: var(--played-color, #444) !important; color: #ffffff !important; }
.price-btn.in-library-card-btn { background: #4CAF50 !important; color: #ffffff !important; }
.price-btn-container .compact-buy-link { color: #999; margin-top: 0; }
.price-btn-container .compact-buy-link:hover { color: #ffffff; }

/* =========================================
   EXACT 50% SCALER FOR ALBUM PAGE
========================================= */
.pro-track-layout.half-scale { gap: 40px; margin-bottom: 40px !important; }
.pro-track-layout.half-scale .track-cover-panel { width: 275px; }
.pro-track-layout.half-scale .genre-tag { padding: 4px 10px; font-size: 8px; margin-bottom: 12px; }
.pro-track-layout.half-scale .track-title-massive { font-size: 36px; margin-bottom: 5px; letter-spacing: -1px; }
.pro-track-layout.half-scale .track-artist-sub { font-size: 13px; margin-bottom: 22px; }
.pro-track-layout.half-scale .track-metadata-grid { gap: 15px; margin-bottom: 20px; padding-bottom: 15px; }
.pro-track-layout.half-scale .track-metadata-grid div { font-size: 11px; }
.pro-track-layout.half-scale .track-metadata-grid span { font-size: 8px; margin-bottom: 2px; }
.pro-track-layout.half-scale .track-price-display { font-size: 18px; margin-bottom: 15px; }
.pro-track-layout.half-scale .track-action-zone { gap: 10px; }
.pro-track-layout.half-scale .btn-play-huge,
.pro-track-layout.half-scale .btn-buy,
.pro-track-layout.half-scale .btn-queue,
.pro-track-layout.half-scale .btn-in-library,
.pro-track-layout.half-scale .sb-share-btn,
.pro-track-layout.half-scale .album-nav-btn { height: 42px; width: 158px; flex: 0 0 158px; font-size: 11px; gap: 8px; border-width: 2px; }
.pro-track-layout.half-scale .album-nav-btn { width: 42px; flex: 0 0 42px; }
.pro-track-layout.half-scale .btn-play-huge svg,
.pro-track-layout.half-scale .album-nav-btn svg { width: 16px; height: 16px; }

/* =========================================
   SITE FOOTER
========================================= */
/* White footer, flush against whatever sits above it (e.g. the bottom
   banner on the homepage) - margin-top would show as a grey band. */
.site-footer { background-color: #ffffff; border-top: 1px solid var(--border-color); padding: 60px 20px 120px 20px; margin-top: 0; color: var(--text-color); }
.footer-logo-img { max-height: 44px; width: auto; object-fit: contain; display: block; }
.footer-column.brand h4 + .footer-logo-img, .footer-logo-img + h4 { margin-top: 14px; }
.footer-content { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 40px; }
.footer-column.brand { flex: 2; }
.footer-column.brand h4 { font-size: 28px; letter-spacing: 3px; margin: 0; color: var(--text-bright); text-transform: uppercase; }
.footer-column.nav-links { flex: 1; min-width: 200px; }
.footer-column h4 { color: var(--text-bright); font-size: 14px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; }
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column ul li { margin-bottom: 12px; }
.footer-column ul a { color: var(--text-color); text-decoration: none; font-size: 12px; transition: color 0.16s ease; text-transform: uppercase; letter-spacing: 1px; will-change: color;}
.footer-column ul a:hover { color: var(--text-bright); }
.footer-bottom { max-width: 1200px; margin: 40px auto 0 auto; padding-top: 20px; border-top: 1px solid var(--border-color); text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }

/* =========================================
   GLOBAL PERSISTENT AUDIO PLAYER (CUSTOM CANVAS)
========================================= */
.global-player-widget {
    position: fixed; bottom: -150px; left: 0; width: 100%; background: #000000; border-top: 1px solid #111111; 
    padding: 15px 20px; display: flex; align-items: center; gap: 30px; z-index: 9999;
    transition: bottom 0.4s cubic-bezier(0.25, 1, 0.5, 1); box-shadow: 0 -5px 5px -1px rgba(0,0,0,0.5); color: #ffffff; 
}
.global-player-widget.active { bottom: 0; }

.wave-canvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
    transform-origin: center left;
}

#wave-canvas-preview {
    clip-path: inset(0 100% 0 0); 
}

#wave-canvas-played {
    clip-path: inset(0 100% 0 0);
    /* the played-through fill has its own admin colour, separate from the
       store accent - footer.php restates this with the resolved value */
    filter: drop-shadow(0px 1px 0px var(--wave-color, var(--played-color, #ffffff))) drop-shadow(0px -1px 0px var(--wave-color, var(--played-color, #ffffff)));
}

.player-controls { display: flex; gap: 15px; align-items: center; }
.ctrl-btn { padding: 0; background: none; border: none; cursor: pointer; color: #ffffff; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid transparent; transition: all 0.16s ease; will-change: border-color, background-color, color; transform: translateZ(0); }
.ctrl-btn:hover { border-color: #555555; }
.ctrl-btn.play-pause { border-color: #ffffff; }
.ctrl-btn.play-pause:hover { background: #ffffff; color: #000000; }
.ctrl-btn.nav-btn { display: none; } 
.global-player-widget.album-mode .ctrl-btn.nav-btn { display: flex; }
.ctrl-btn.disabled { color: #333333 !important; pointer-events: none; }
.ctrl-btn.disabled:hover { border-color: transparent !important; background: transparent !important; }

.ctrl-btn svg { display: block; } 

.close-btn { color: #888888; transition: color 0.16s ease; margin-left: auto; width: 30px; height: 30px; will-change: color; }
.close-btn:hover { color: #ff3333; border-color: transparent; }

.player-track-info { display: flex; align-items: center; gap: 15px; width: 250px; flex-shrink: 0; }
.player-cover { width: 50px; height: 50px; border: 2px solid #ffffff; border-radius: 3px; background-size: cover; background-position: center; transform: translateZ(0); }
.player-meta h4 { margin: 0; font-size: 12px; font-weight: 600; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px;}
.player-meta p { margin: 2px 0 0 0; font-size: 10px; color: #aaaaaa; text-transform: uppercase; letter-spacing: 1px; }

.waveform-wrapper { 
    flex: 1; min-width: 0; height: 50px; position: relative; 
    background: transparent; 
    border-radius: 2px; 
    overflow: hidden; cursor: pointer; 
}

.waveform-loading {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: #000000; z-index: 60; display: none;
    align-items: center; justify-content: center; gap: 10px;
}
.loading-bar-bg { width: 60%; height: 4px; background: #333333; border-radius: 2px; overflow: hidden; }
.loading-bar-fill { width: 0%; height: 100%; background: #ffffff; transition: width 0.1s ease; }
#loading-pct { font-size: 10px; font-weight: 600; color: #ffffff; width: 30px; text-align: right; font-variant-numeric: tabular-nums; }

.time-display { width: 80px; text-align: right; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; color: #ffffff; }

.player-volume { display: flex; align-items: center; gap: 10px; width: 120px; }

/* DISABLE HOVER ON RANGE SLIDER COMPLETELY */
.player-volume input[type=range] { 
    -webkit-appearance: none;
    appearance: none;
    width: 100%; 
    background: transparent;
    cursor: pointer; 
    transform: translateZ(0); 
}

.player-volume input[type=range]:focus {
    outline: none;
}

.player-volume input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: #444444; 
    border-radius: 2px;
}

.player-volume input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: #ffffff;
    margin-top: -4px;
}

.player-volume input[type=range]::-moz-range-track {
    width: 100%;
    height: 4px;
    background: #444444;
    border-radius: 2px;
}

.player-volume input[type=range]::-moz-range-thumb {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
}

/* =========================================
   DISCOVER FRONTEND GRID
========================================= */
.discover-wrapper { padding: 40px 20px; max-width: 1400px; margin: 0 auto; }
.discover-header { font-size: 36px; font-weight: 300; text-transform: uppercase; letter-spacing: 5px; color: var(--text-bright); margin-bottom: 50px; text-align: center; border-bottom: 1px solid var(--border-color); padding-bottom: 20px;}

.d-row { display: grid; gap: 20px; margin-bottom: 20px; width: 100%; }
.d-row.type-full { grid-template-columns: 1fr; }
.d-row.type-half { grid-template-columns: repeat(2, 1fr); }
.d-row.type-quarter { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .d-row.type-half, .d-row.type-quarter { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .d-row.type-full, .d-row.type-half, .d-row.type-quarter { grid-template-columns: 1fr; }
}

.d-col { display: flex; gap: 20px; width: 100%; height: 100%; }
.d-col.split-none { flex-direction: column; }
.d-col.split-horizontal { flex-direction: row; }
.d-col.split-vertical { flex-direction: column; }

.d-item { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.d-item .audio-card { height: 100%; display: flex; flex-direction: column; }
.d-item .audio-card-img-wrapper { flex: 1; min-height: 150px; }

.split-horizontal .d-item .audio-card { flex-direction: row; align-items: center; padding-right: 15px;}
.split-horizontal .d-item .audio-card-img-wrapper { flex: 0 0 100px; min-height: 100px; margin-bottom: 0; margin-right: 15px; border-radius: 3px 0 0 3px;}
.split-horizontal .d-item .audio-card-info { padding: 0; }

/* =========================================
   DISCOVER PAGE BUILDER (ADMIN)
========================================= */
.builder-ui { display: flex; height: calc(100vh - 81px); background: var(--bg-color); color: var(--text-color); font-family: 'Inter', sans-serif; }
.b-left { width: 220px; background: var(--surface-color); border-right: 1px solid var(--border-color); padding: 20px; display: flex; flex-direction: column; gap: 15px; overflow-y: auto; }
.b-left h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-bright); margin: 0 0 10px 0; }
.b-component { border: 2px dashed #888; border-radius: 4px; padding: 15px; text-align: center; cursor: grab; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; background: #fff; transition: all 0.2s; }
.b-component:hover { border-color: var(--text-bright); color: var(--text-bright); }
.b-middle { flex: 1; background: #ebebeb; padding: 40px; overflow-y: auto; position: relative; }
.b-canvas { max-width: 1000px; margin: 0 auto; min-height: 100%; padding-bottom: 100px; }
.b-row { display: flex; gap: 15px; margin-bottom: 15px; position: relative; background: #fff; padding: 10px; border: 1px solid var(--border-color); border-radius: 5px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.b-row .delete-row { position: absolute; top: -10px; right: -10px; background: #cc0000; color: #fff; border: none; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 12px; z-index: 10; display: none; }
.b-row:hover .delete-row { display: block; }
.b-col { flex: 1; border: 2px dashed #ccc; border-radius: 3px; min-height: 120px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; position: relative; padding: 10px; background: #fafafa;}
.b-col:hover { border-color: #888; }
.b-col.active { border-color: #000000; background: #f0f0f0; box-shadow: inset 0 0 0 2px #000000; }
.b-item-preview { width: 100%; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #ddd; padding: 5px; border-radius: 3px; font-size: 10px; font-weight: 600; }
.b-item-preview img { width: 30px; height: 30px; border-radius: 2px; object-fit: cover; }
.b-item-preview .meta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.split-wrapper { display: flex; gap: 10px; width: 100%; height: 100%; }
.split-wrapper.vertical { flex-direction: column; }
.split-wrapper.horizontal { flex-direction: row; }
.b-right { width: 320px; background: var(--surface-color); border-left: 1px solid var(--border-color); display: flex; flex-direction: column; }
.b-inspector { flex: 1; padding: 20px; border-bottom: 1px solid var(--border-color); overflow-y: auto; background: #fff; }
.b-library { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.panel-title { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-bright); margin: 0 0 15px 0; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.lib-tabs { display: flex; border-bottom: 1px solid var(--border-color); }
.lib-tab { flex: 1; padding: 10px; text-align: center; font-size: 11px; font-weight: 600; text-transform: uppercase; cursor: pointer; background: #f5f5f5; border-bottom: 2px solid transparent; }
.lib-tab.active { background: #fff; border-bottom-color: #000; }
.lib-content { flex: 1; overflow-y: auto; padding: 15px; background: #fff; }
.lib-item { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border-color); margin-bottom: 8px; border-radius: 3px; cursor: grab; background: #fafafa; transition: border 0.2s; }
.lib-item:hover { border-color: #000; }
.lib-item img { width: 36px; height: 36px; border-radius: 3px; object-fit: cover; }
.lib-item-title { font-size: 11px; font-weight: 600; color: var(--text-bright); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.lib-item-artist { font-size: 9px; color: #888; margin: 0; text-transform: uppercase; }
.slot-dropzone { border: 2px dashed #aaa; border-radius: 4px; padding: 20px; text-align: center; margin-bottom: 15px; transition: all 0.2s; background: #fafafa; }
.slot-dropzone.drag-over { background: #e0e0e0; border-color: #000; }
.slot-dropzone .empty-text { font-size: 10px; text-transform: uppercase; font-weight: 600; color: #888; pointer-events: none; }
.btn-save-layout { position: fixed; bottom: 20px; right: 340px; z-index: 1000; background: #000; color: #fff; border: none; padding: 12px 24px; font-size: 11px; text-transform: uppercase; letter-spacing: 2px; border-radius: 4px; cursor: pointer; box-shadow: 0 10px 20px rgba(0,0,0,0.2); transition: transform 0.2s; }
.btn-save-layout:hover { transform: scale(1.05); }
.split-controls { display: flex; gap: 10px; margin-bottom: 20px; }
.btn-split { flex: 1; padding: 8px; font-size: 10px; text-transform: uppercase; background: #fff; border: 1px solid #ccc; cursor: pointer; border-radius: 3px; }
.btn-split.active { background: #000; color: #fff; border-color: #000; }

/* Make the top navigation sticky */
.main-header, 
.site-header { 
    position: sticky !important;
    top: 0;
    z-index: 99990 !important; 
    background-color: var(--bg-color, #000000); 
}
/* =====================================================================
   RESPONSIVE & ULTRA-HD LAYER
   Additive only - the desktop design stays exactly as it is.
   Section 1: proportional upscaling for 2K / 4K / 5K / 8K displays
   Section 2: graceful downscaling for laptops, tablets and phones
   ===================================================================== */

/* ---------------------------------------------------------------
   1. ULTRA-HD UPSCALING
   The design was built for ~1920px. On bigger screens everything
   is scaled up proportionally so it looks IDENTICAL, just sharper
   and bigger - the pro alternative to a lonely strip of content
   floating in a huge empty page.
   --------------------------------------------------------------- */
@media (min-width: 2201px) and (max-width: 3300px) {   /* 1440p / ultrawide */
    body { zoom: 1.33; }
}
@media (min-width: 3301px) and (max-width: 4600px) {   /* 4K UHD */
    body { zoom: 2; }
}
@media (min-width: 4601px) and (max-width: 6600px) {   /* 5K / 6K */
    body { zoom: 2.66; }
}
@media (min-width: 6601px) {                            /* 8K UHD */
    body { zoom: 4; }
}

/* ---------------------------------------------------------------
   2. FLUID MEDIA SAFETY NET
   Nothing inside the content areas may ever overflow the screen.
   --------------------------------------------------------------- */
#app-content img, #app-content video, #app-content iframe,
.content-wrapper img, .discover-wrapper img {
    max-width: 100%;
}

/* ===============================================================
   3. LAPTOP  (<= 1240px)
   The track / album hero uses a fixed 550px cover + 80px gap,
   which gets cramped before the other breakpoints kick in.
   =============================================================== */
@media (max-width: 1240px) {
    .pro-track-layout { gap: 40px; padding: 0 20px; }
    .track-cover-panel { width: 420px; }
    .track-title-massive { font-size: 56px; }
}

/* ===============================================================
   4. TABLET  (<= 1024px)
   Hero stacks: cover on top, info below - the classic pro-store
   product page pattern.
   =============================================================== */
@media (max-width: 1024px) {
    .pro-track-layout,
    .pro-track-layout.half-scale {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        text-align: center;
    }
    .track-cover-panel,
    .pro-track-layout.half-scale .track-cover-panel {
        width: min(440px, 88vw);
    }
    .pro-track-layout > div:not(.track-cover-panel) { width: 100%; max-width: 640px; }
    .track-metadata-grid,
    .track-metadata-grid-large { justify-items: center; }
    .track-title-massive { font-size: 48px; letter-spacing: -1px; }
    .track-action-zone,
    .pro-track-layout.half-scale .track-action-zone { justify-content: center; }
    .pro-track-layout .genre-tag { margin-left: auto; margin-right: auto; }
}

/* ===============================================================
   5. LARGE PHONE / SMALL TABLET  (<= 900px)
   Compact header: logo row on top, nav pills beneath it, cart
   below - all centered. Same look, just stacked.
   (Selectors carry extra specificity to outrank the inline
   header styles that use !important.)
   =============================================================== */
/* ---------------------------------------------------------------
   STACKED HEADER (class-driven, applied by JS in footer.php the
   moment the centered menu would collide with the logo or cart -
   regardless of how many menu items exist or how long the logo is)
   Layout: logo on top, menu pills under it, cart below.
   --------------------------------------------------------------- */
/* Two-row grid: brand and cart share the top row (left / right), the menu
   spans the row beneath. Grid areas do the placement, so the DOM order
   (logo, nav, cart) is left alone. */
header.main-header.stacked {
    display: grid !important;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "logo cart"
        "nav  nav";
    align-items: center;
    height: auto !important;
    padding: 7px 12px !important;
    gap: 6px 12px !important;
    position: sticky !important;
}
header.main-header.stacked .logo {
    grid-area: logo;
    position: static !important;
    left: auto !important; right: auto !important;
    width: auto !important;
    justify-self: start;
    justify-content: flex-start !important;
}
header.main-header.stacked .header-cart {
    grid-area: cart;
    position: static !important;
    left: auto !important; right: auto !important;
    width: auto !important;
    justify-self: end;
    align-items: flex-end !important;
}
header.main-header.stacked .logo a { font-size: 17px !important; }
header.main-header.stacked .site-logo-img { max-height: 28px !important; }

header.main-header.stacked .main-nav { grid-area: nav; width: 100%; }
header.main-header.stacked .main-nav > ul {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0 6px !important;
}
/* Identical to the desktop menu - same pill shape, same active/subscribe
   fills, same slide-in hover underline - only scaled down. Nothing about the
   look or behaviour changes, so the desktop rules for .active-nav,
   .nav-subscribe and .nav-account are deliberately left to apply as-is. */
header.main-header.stacked .main-nav > ul > li > a {
    padding: 6px 12px !important;
    font-size: 11px !important;
    letter-spacing: 0.75px !important;
}
/* The hover underline is inset by the padding so it matches the text width;
   rescale it to the smaller padding. Desktop is 16px / calc(100% - 32px). */
header.main-header.stacked .main-nav > ul > li > a::after {
    bottom: 3px;
    left: 12px;
    width: calc(100% - 24px);
}

/* Cart / credit meter shrinks to a single compact strip when stacked -
   the full 236px pill plus its note line eats too much vertical space. */
header.main-header.stacked #header-cart-btn,
header.main-header.stacked #header-credits-btn {
    padding: 4px 12px !important;
    width: auto !important;
    min-width: 0;
    border-radius: 5px !important;
    gap: 5px;
}
header.main-header.stacked .hc-min-note { display: none !important; }
header.main-header.stacked .hc-label { font-size: 10.5px; }
header.main-header.stacked .hc-meta { font-size: 11px; }
header.main-header.stacked #header-cart-btn svg,
header.main-header.stacked #header-credits-btn svg { width: 14px; height: 14px; }

/* No-JS fallback: stack on narrow screens even without the script */
@media (max-width: 760px) {
    /* Mirrors the JS-driven .stacked grid so the layout is identical
       whether or not the adaptive script runs. */
    html.no-js header.main-header {
        display: grid !important;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo cart"
            "nav  nav";
        align-items: center;
        height: auto !important;
        padding: 7px 12px !important;
        gap: 6px 12px !important;
    }
    html.no-js header.main-header .logo {
        grid-area: logo;
        position: static !important;
        left: auto !important;
        width: auto !important;
        justify-self: start;
        justify-content: flex-start !important;
    }
    html.no-js header.main-header .header-cart {
        grid-area: cart;
        position: static !important;
        right: auto !important;
        width: auto !important;
        justify-self: end;
    }
    html.no-js header.main-header .main-nav { grid-area: nav; width: 100%; }
    html.no-js header.main-header .hc-min-note { display: none !important; }
}

@media (max-width: 900px) {
    .track-metadata-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .track-metadata-grid-large { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ===============================================================
   6. PHONE  (<= 700px)
   =============================================================== */
@media (max-width: 700px) {
    .content-wrapper { padding: 0 12px; }

    .track-title-massive,
    .pro-track-layout.half-scale .track-title-massive { font-size: 34px; letter-spacing: -0.5px; }
    .track-artist-sub { font-size: 13px; }

    /* Action buttons: full-width, stacked, thumb-friendly */
    .track-action-zone,
    .pro-track-layout.half-scale .track-action-zone {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 12px;
    }
    .pro-track-layout .btn-play-huge,
    .pro-track-layout .btn-buy,
    .pro-track-layout .btn-queue,
    .pro-track-layout .btn-in-library,
    .pro-track-layout .sb-share-btn,
    .pro-track-layout.half-scale .btn-play-huge,
    .pro-track-layout.half-scale .btn-buy,
    .pro-track-layout.half-scale .btn-queue,
    .pro-track-layout.half-scale .btn-in-library,
    .pro-track-layout.half-scale .sb-share-btn {
        width: 100% !important;
        max-width: 400px;
        flex: 0 0 auto !important;   /* release the desktop flex-basis */
        height: 46px;
        font-size: 12px;
        letter-spacing: 1.5px;
    }

    /* List page action row: both buttons full width, share keeps right/below */
    .sb-share-btn.sb-share-btn--list,
    .compact-btn.play-album-btn {
        width: 100% !important;
        min-width: 0;
        height: 40px !important;
        justify-content: center;
        font-size: 11px !important;
    }

    /* Price + genre proportions on small screens */
    .track-price-display { font-size: 26px; margin-bottom: 18px; }
    .entity-cover, .track-cover-panel .entity-cover { border-width: 1px; }

    /* Sticky audio player: shrink proportionally via its own scale variable.
       The volume control stays - it just gets a shorter track. */
    .global-player-widget { --ps: 0.78; }
    .global-player-widget .player-volume { display: flex !important; gap: 6px; }
    /* The track name owns its own row here, so no truncation cap - the
       ellipsis rule in footer.php handles overflow. */
    .global-player-widget .player-meta h4 { max-width: none; }

    /* Footer stacks, centers and tightens up so it doesn't dominate the
       screen on a phone. The nav becomes a wrapped pill row rather than a
       long vertical list of one item per line. */
    .site-footer { padding: 32px 16px 100px 16px; }
    .footer-content { flex-direction: column; align-items: center; text-align: center; gap: 18px; }
    .footer-column.brand h4 { font-size: 20px; letter-spacing: 2px; }
    .footer-logo-img { max-height: 34px; margin: 0 auto; }
    .footer-column h4 { font-size: 12px; margin-bottom: 12px; }
    .footer-column ul {
        padding: 0;
        display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px;
    }
    .footer-column ul li { margin-bottom: 0; }
    .footer-column ul a { font-size: 11px; }
    .site-footer > div[style*="margin-top: 40px"] { margin-top: 22px !important; margin-bottom: 14px !important; }
    .footer-bottom { margin-top: 0; font-size: 10px; }

    /* Any content table scrolls sideways instead of breaking layout */
    #app-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ===============================================================
   7. SMALL PHONE  (<= 420px)
   =============================================================== */
@media (max-width: 420px) {
    .track-title-massive { font-size: 28px; }
    .track-metadata-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    header.main-header.stacked { padding: 6px 10px !important; gap: 5px 8px !important; }
    header.main-header.stacked .logo a { font-size: 15px !important; }
    header.main-header.stacked .main-nav > ul { gap: 0 4px !important; }
    header.main-header.stacked .main-nav > ul > li > a {
        padding: 5px 9px !important;
        font-size: 9.5px !important;
        letter-spacing: 0.5px !important;
    }
    header.main-header.stacked .main-nav > ul > li > a::after {
        bottom: 3px; left: 9px; width: calc(100% - 18px);
    }
    header.main-header.stacked #header-cart-btn,
    header.main-header.stacked #header-credits-btn { padding: 4px 9px !important; }
    header.main-header.stacked .hc-label { font-size: 9.5px; }
    header.main-header.stacked .hc-meta { font-size: 10px; }
    .global-player-widget { --ps: 0.7; }
    /* No cap - the title has its own full-width row on small screens */
    .global-player-widget .player-meta h4 { max-width: none; }
    #sleek-cart-panel { max-width: 100%; }
}

/* ===============================================================
   ITEM PAGE PHONE POLISH (track / album / list standalone pages)
   =============================================================== */
@media (max-width: 700px) {
    /* the item pages use an inline 60px top padding - tighten on phones */
    main.content-wrapper[style*="padding-top: 60px"] { padding-top: 26px !important; }

    .list-title-banner {
        padding: 18px 14px !important;
        font-size: 17px !important;
        letter-spacing: 2px !important;
    }
    .list-title-banner div { font-size: 10px !important; }

    .back-to-album-btn {
        position: static !important;
        display: inline-flex;
        width: -moz-fit-content;
        width: fit-content;
        margin: 0 auto 14px auto;
        justify-content: center;
    }

    /* tracklist headings breathe a bit less */
    .compact-table th { font-size: 9px; }
}

/* =====================================================================
   COPY-LINK / SHARE BUTTON
   Sizing is inherited from the shared .btn-play-huge/.btn-buy rules
   (base 56px, album page 46px, modal 42px) - this block only sets the
   inverted color scheme and the "copied" micro-animation.
   ===================================================================== */
.sb-share-btn {
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    font-family: inherit;
    white-space: nowrap;
}
.sb-share-btn:hover {
    background: #000000;
    color: #ffffff;
    transform: scale3d(1.02, 1.02, 1);
}

/* icon stack: link icon morphs into a checkmark when copied */
.sb-share-icons { position: relative; width: 18px; height: 18px; flex-shrink: 0; }
.sb-share-icons svg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    transition: opacity 0.22s ease, transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sb-share-btn .sb-icon-link { opacity: 1; transform: scale(1) rotate(0deg); }
.sb-share-btn .sb-icon-check { opacity: 0; transform: scale(0.3) rotate(-45deg); }

/* copied state: bold green confirmation, check pops in, label fades to COPIED! */
.sb-share-btn.copied,
.sb-share-btn.copied:hover {
    background: #ffffff;
    color: #0db14b;
    border-color: #0db14b;
    transform: scale3d(1.02, 1.02, 1);
}
.sb-share-btn.copied .sb-share-label {
    font-weight: 800;
    animation: sbCopiedFade 0.35s ease;
}
@keyframes sbCopiedFade {
    0%   { opacity: 0; transform: translateY(4px); }
    100% { opacity: 1; transform: translateY(0); }
}
.sb-share-btn.copied .sb-icon-link { opacity: 0; transform: scale(0.3) rotate(45deg); }
.sb-share-btn.copied .sb-icon-check { opacity: 1; transform: scale(1) rotate(0deg); }
.sb-share-btn .sb-share-label { transition: opacity 0.18s ease; }
.sb-share-btn.swapping .sb-share-label { opacity: 0; }

/* compact variant used next to PREVIEW LIST on list pages (36px row) */
.sb-share-btn.sb-share-btn--list {
    height: 36px;
    width: auto;
    min-width: 150px;
    padding: 0 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    gap: 8px;
    border-width: 1px;
}
.sb-share-btn.sb-share-btn--list .sb-share-icons { width: 14px; height: 14px; }
