:root {
    --bg-base: #121212c2;
    --bg-surface: #1f1f27e8;
    --bg-element: #1f1f27e8;
    --text-main: #ffffff;
    --text-muted: #b3b3b3;
    --border-color: #282828;
    --player-bg: #00001e;
    --player-accent: #dcf80c;
    --track-base: #4d4d4d;
    --text-bright: #ffffff;
    --text-dim: #7a7a7a;
    --nav-logo: #ff4757;

    --bg-main: #0b0a12;
    --bg-card: #151421;
    --bg-sidebar: rgba(21, 20, 33, 0.85);
    
    --accent-gradient: linear-gradient(135deg, #ff416c, #ff4b2b);
    --accent-color: #ff416c;
    --accent-glow: rgba(255, 65, 108, 0.4);
    
    --text-primary: #ffffff;
    --text-secondary: #8c8a9e;
    --text-muted: #535165;
    
    --border-color: rgba(255, 255, 255, 0.06);
    --glass-blur: blur(12px);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
}

/* ==========================================
   GLOBAL CONFIGURATION & RESET
   ========================================== */

@keyframes floatDebris {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    50% {
        transform: translateY(20px) translateX(15px) rotate(1deg);
    }
    100% {
        transform: translateY(-15px) translateX(-10px) rotate(-0.5deg);
    }
}

.headTittle {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.headTittle p {
    width: 190px;
    text-align: center;
    align-items: center;
    margin-top: 5px;
    background: rgba(255, 255, 255, 0.124);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.headTittle p:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 15px rgba(155, 39, 0, 0.3);

}

.headTittle h1 {
    font-size: 50px;
    color: #ff551ad9;
}

.headTittle h3 {
    font-size: 14px;
    color: var(--player-accent);
}

/* MASTER VIEW GRID PORTS */
.dashboard-container {
    box-sizing: border-box;
    margin: 5px;
    display: flex;
    height: 790px;
    gap: 5px;

    overflow: hidden;
}

/* ==========================================
   NAVBAR BASE SHELL
   ========================================== */
.navbar {
    border-bottom: 1px solid #2f3542;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 2000;
}

.nav-container {
    height: 32px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #00000fca;
}


.nav-logo {
    color: var(--text-main);
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.nav-logo:hover {
    color: var(--nav-logo);
}

/* ==========================================================
   PREMIUM NAV-LINK LINK TEXT BUTTON CONSTRAINTS
   ========================================================== */

.nav-auth-btns {
    display: flex;
    gap: 15px;
}

.nav-link-btn {
    color: var(--nav-logo);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
}

/* 🌟 Interactive Hover States */
.nav-link-btn:hover {
    color: var(--text-main);
}

.nav-link-btn:active {
    transform: scale(0.96);
}

.nav-brand-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================
   LEFT SIDEBAR LAYER
   ========================================== */
.side-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.account-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #2b2b36;
    border-bottom: 1px solid #2b2b36;
}

.act-btn {
    display: block;
    text-align: center;
    color: #a0a0ab;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    padding: 8px;
    background: #1e1e26;
    border: 1px solid #1c1cb7;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.act-btn:hover {
    color: #ffffff;
    background: #2b2b36;
    border-color: #aaff00;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text-main);
}

.sidebar-footer-auth {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==========================================
   INFINITE AUTO-SCROLL HERO SLIDER
   ========================================== */

.slider-container {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;

}

.slider-track {
    position: relative;
    width: clamp(240px, 35vw, 320px);
    height: clamp(240px, 35vw, 320px);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Symmetrical Slide Cards --- */
.slide-card {
    position: absolute;
    box-sizing: border-box;
    cursor: pointer;
    width: 100%;
    height: 100%;
    border-radius: 28px;
    border: 1px solid #ffffff58;
    overflow: hidden;
    background-color: #00001e;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);

    user-select: none;
    -webkit-user-drag: none;

    transform-origin: center center;

    z-index: calc(10 - var(--abs-offset));

    opacity: calc(1 - (var(--abs-offset) * 0.35));

    transform: 
        translateX(calc(var(--offset) * 60px)) 
        translateY(calc(var(--abs-offset) * 10px))
        rotate(calc(var(--offset) * 5deg)) 
        scale(calc(1 - (var(--abs-offset) * 0.1)));

    /* Vendor Prefixes */
    -webkit-transform: 
        translateX(calc(var(--offset) * 60px)) 
        translateY(calc(var(--abs-offset) * 10px))
        rotate(calc(var(--offset) * 5deg)) 
        scale(calc(1 - (var(--abs-offset) * 0.1)));
    -moz-transform: 
        translateX(calc(var(--offset) * 60px)) 
        translateY(calc(var(--abs-offset) * 10px))
        rotate(calc(var(--offset) * 5deg)) 
        scale(calc(1 - (var(--abs-offset) * 0.1)));

    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), 
                opacity 0.6s ease, 
                z-index 0.6s step-end,
                box-shadow 0.3s ease;
}

.slide-card {
    pointer-events: none;
}
.slide-card.active,
.slide-card[style*="--abs-offset: 1"],
.slide-card[style*="--abs-offset: 2"] {
    pointer-events: auto;
}

/* --- Active Card Focus State --- */
.slide-card.active {
    opacity: 1;
    z-index: 12;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(255, 255, 255, 0.15);
}

.slide-card.active:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* --- Play Button --- */
.slide-center-play-btn {
    position: absolute;

    bottom: 30px;
    left: 50%;

    transform: translateX(-50%) scale(1);
    -webkit-transform: translateX(-50%) scale(1);
    -moz-transform: translateX(-50%) scale(1);
    -ms-transform: translateX(-50%) scale(1);

    border: none;
    cursor: pointer;

    width: clamp(44px, 12vw, 54px);
    height: clamp(44px, 12vw, 54px);

    border-radius: 50%;
    background: radial-gradient(circle, #ff8000 0%, #d8d8d8 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20; /* Keep it stacked high above all fanned cards */

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5),
                0 0 0 clamp(2px, 0.8vw, 3px) rgba(255, 255, 255, 0.35),
                0 0 0 clamp(4px, 1.5vw, 6px) rgba(0, 0, 0, 0.25);

    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                background 0.2s ease,
                box-shadow 0.2s ease;
}

.slide-center-play-btn svg {
    width: 35%;
    height: 35%;
    color: #000000;
}

.slide-center-play-btn .play-icon {
    margin-left: 3px;
}

.slide-center-play-btn:hover {
    transform: translateX(-50%) scale(1.1);
    -webkit-transform: translateX(-50%) scale(1.1);
    background: radial-gradient(circle, #ff9426 0%, #e5e5e5 100%);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6),
                0 0 0 clamp(2px, 0.8vw, 4px) rgba(255, 255, 255, 0.4),
                0 0 0 clamp(4px, 1.5vw, 8px) rgba(0, 0, 0, 0.3);
}

.slide-center-play-btn:active {
    transform: translateX(-50%) scale(0.95);
    -webkit-transform: translateX(-50%) scale(0.95);
    background: radial-gradient(circle, #e67300 0%, #cccccc 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ==========================================
   CENTER MAIN CONTENT REGION
   ========================================== */
.main-content {
    display: block;
    flex: 1;
    background: linear-gradient(45deg, #00008b2c, #ffffff15);
    border-radius: 20px;
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hero-banner {
    display: flex;
    gap: 24px;
    align-items: flex-end;
    margin-bottom: 30px;
}

.hero-cover {
    width: 192px;
    height: 192px;
    background-color: var(--bg-element);
    border-radius: 8px;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.hero-details {
    flex: 1;
}

.hero-details .subtitle {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.hero-details h1 {
    font-size: clamp(28px, 4vw, 48px);
    margin: 8px 0;
    letter-spacing: -1px;
    line-height: 1.1;
}

.hero-details .description {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 12px;
    max-width: 600px;
}

.content-toolbar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.play-all-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: none;
    color: #000;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.play-all-btn:hover { transform: scale(1.04); }

.search-box {
    flex-grow: 1;
    min-width: 200px;
    margin-top: 15px;
    position: relative;
}

.search-box input {
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 20px;
    color: white;
    width: 100%;
    box-sizing: border-box;

    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-box input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   GENRE SELECT FILTER BUTTONS
   ========================================== */
.Select_btn_container {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.genre-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
}

.genre-btn:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.genre-btn.active {
    background-color: rgba(255, 85, 26, 0.85) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
    transform: translateY(0);
}
.genre-canvas-view {
    display: flex;
    flex-direction: column;
    padding: 12px 0px 4px 0;
}
.volume-toggle {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #b4b4b4d9;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 50%;
}
.volume-toggle svg:hover {
    color: #ffffff;
}
.volume-toggle.is-muted {
    opacity: 0.6;
}
.volume-toggle:active {
    transform: scale(0.9);
}
/* ==========================================
   MODERN MEDIA DATATABLE & HIDING SCROLLBAR
   ========================================== */
.media-table-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    background: #ff00000a;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-sizing: border-box;
}

.table-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.table-header-left .header-thumb-spacer {
    width: 48px;
    text-align: center;
}

.table-header-right {
    width: 140px;
    text-align: right;
    padding-right: 16px;
}

/* ==========================================
   RIGHT SIDEBAR PANEL
   ========================================== */
section.sidebar-right {
    min-height: calc(100vh - 57px);
    background-color: #10003c;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;

    z-index: 100;
    overflow-y: auto;
    box-sizing: border-box;
}

.sidebar-right.hidden {
    width: 0;
    padding: 0;
    border-left: none;
    transform: translateX(100%);
    overflow: hidden;
}

.favorite-home{
    display: flex;
    justify-content: space-between;
    margin: 10px;

    .toggle-sidebar-right{
        background-color: #ffffff27;
        width: 47px;
        height: 47px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .toggle-sidebar-right svg{
        color: #ffffff;
    }
}

.mini-stat {
    background: #a913ce5e;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.mini-stat .num {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-color);
}

.mini-stat .lbl {
    font-size: 11px;
    color: var(--text-muted);
}


.now-playing-col {
    display: flex;
    align-items: center;
    gap: 14px;
}

.current-track-thumb {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ff5e62, #ff9966);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.current-track-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.current-track-meta .title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.current-track-meta h5 {
    color: var(--text-bright);
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.favorite-star-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.favorite-star-btn:hover { color: var(--text-bright); }

.current-track-meta p {
    color: var(--text-dim);
    font-size: 11px;
    margin: 4px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls-col {
    display: flex;
    align-items: flex-end;

}
.toggle_2{
    display: flex;
    gap: 20px;
}

.control-actions-group {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 20px;
}

.ctrl-btn {
    background: transparent;
    border: none;
    color: #b3b3b3;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ctrl-btn.active {
    opacity: 1;
    color: var(--player-accent);
    transform: scale(1.1);
}

.ctrl-btn:hover { color: var(--text-bright); }

.play-master {
    width: 42px;
    height: 42px;
    background-color: var(--player-accent);
    color: #000000 !important;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.play-master:hover {
    transform: scale(1.05);
}

.playback-progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    position: relative;
    margin-right: 40px;
}

.playback-progress-container .time-stamp {
    font-size: 11px;
    color: var(--text-dim);
    font-family: monospace, sans-serif;
    min-width: 30px;
}

.playback-progress-container .time-stamp.elapsed {
    position: absolute;
    bottom: -16px;
    left: 5px;
}

.playback-progress-container .time-stamp.total {
    position: absolute;
    bottom: -16px;
    right: 0;
}

.progress-bar-track {
    flex: 1;
    height: 10px;
    background-color: var(--track-base);
    border-radius: 20px;
    cursor: pointer;
    position: relative;
    transition: height 0.1s;
    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--player-accent);
    border-radius: 20px;
    width: 0%;
}

.player-volume-col {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

#player-thumb {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.playing-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.download-btn:hover {
    color: var(--player-accent);
}

.file-thumb {
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 4px 0 rgba(255, 255, 255, 0.215);
}

#download-container {
    opacity: 0;
    transform: translateY(30px) scale(0.5);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease;
    pointer-events: none;
}

#download-container.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    display: flex;
}

.thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.fallback-icon {
    font-size: 20px;
    color: #fff;
}

.default-artwork {
    font-size: 24px;
    color: #555;
}

.floating-action-add {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #F03C00;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 15px rgba(255, 255, 255, 0.331);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 99;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);

    }
}

.ctrl-btn svg {
    display: block;
    transition: stroke 0.2s ease;
}

.ctrl-btn:hover svg {
    stroke: var(--text-bright);
}

.floating-action-add:hover { transform: scale(1.08); }

.nav-menu-toggle {
    display: none;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-menu-toggle svg {
    width: 100%;
    height: 100%;
    display: block;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #18181c;
    padding: 24px;
    border-radius: 16px;
    width: 500px;
    color: white;
    border: 1px solid #2b2b36;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-title { margin-top: 0; margin-bottom: 20px; font-size: 1.25rem; }

.modal-body { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 20px; }

.preview-side { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.preview-box {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    background: #2b2b36;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #3e3e4a;
}

#imagePreview { width: 100%; height: 100%; object-fit: cover; display: none; }
#previewPlaceholder { color: #666; font-size: 12px; font-weight: 500; }

.file-input { display: none; }
.custom-file-upload {
    background: #2b2b36;
    color: #a0a0ab;
    padding: 6px 12px;
    width: 80%;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    text-align: center;
    transition: all 0.2s;
}

.custom-file-upload:hover { background: #3e3e4a; color: white; }

.file-row-item {
    display: flex;
    align-items: center;
    padding: 30px 7px ;
    margin: 3px;
    gap: 15px;
    height: 45px;
    background-color: #012f5c37;
    border: 1px solid #ffffff18;
    border-radius: 10px;
    box-sizing: border-box;
    overflow: hidden;
}


.file-row-item.active-row {
    height: 45px;
    background-color: #6494edb8;
    border-left: 4px solid #ff551ad9;
    gap: 0;

}
.file-row-item:hover {
    transform: translateX(-2px);
    transition: transform 0.2s ease;
}

.player-trigger-zone {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    z-index: 2999;
}


.dcn .track-dl-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;
    border-radius: 50%;

    background-color: #2c2c2c;
    color: var(--player-accent);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;

    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    user-select: none;
}

.download-Container{
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
}
.dcn .time-stamp.elapsed {
    font-size: 15px;
    font-weight: 500;
    color: #dbdbdb;
    line-height: 1;
}

.dcn .download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: rgba(1, 1, 60, 0.626);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 10px;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    height: 100%;
}

.dcn .download-btn:hover {
    background-color: rgba(255, 255, 255, 0.43);
    color: var(--player-accent);
}


.player-trigger-zone:hover ~ .master-player-bar,
.master-player-bar:hover {
    bottom: 10px;
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.dashboard-container:has(.sidebar-right.hidden) .main-content {
    flex: 1;
}

.toggle-sidebar-right {
    background: #ffffff44;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    color: #9e9e9e;
    padding: 10px;
    margin-right: 3%;
    transition: color 0.3s ease, transform 0.1s ease;
}

.toggle-sidebar-right:hover {
    color: #ffffff;
}

.toggle-sidebar-right.is-active {
    color: var(--player-accent);
}

.toggleFavorite svg path {
    fill: transparent;
    transition: fill 0.3s ease, stroke 0.3s ease;
}

.toggleFavorite {
    background-color: transparent;
    border: none;
    outline: none;
    padding: 5px;
    cursor: pointer;
    color: #9e9e9e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggleFavorite svg path:hover {
    fill: #e63946;
    stroke: #e63946;
}

.toggleFavorite.is-favorited svg path {
    fill: #e63946 !important;
    stroke: #e63946 !important;
}

/* Styling for the container holding your Favorites trigger/section */
#favorites-section {
    height: 470px;
    padding: 2px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: background 0.3s ease;

    overflow-y: auto;

    overflow-x: hidden;

    -webkit-overflow-scrolling: touch;
}

/* Optional: Clean, thin modern scrollbar styling */
#favorites-section::-webkit-scrollbar {
    width: 6px;
}

#favorites-section::-webkit-scrollbar-track {
    background: transparent;
}

#favorites-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

#favorites-section::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}
.favorites-h2 {
    text-align: center;
    margin: 0;
    padding: 0;
    font-size: 20px;
}

#favorites-section:hover {
    background: rgba(255, 255, 255, 0.06);
}

#media-container-Favorites {
    margin: 0;
    width: 440px;
}

.genre-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.menu-container {
    position: relative;
    display: none
}

/* Style the mobile popup menu container to point UP */
.mobile-popup-panel {
    display: none;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);

    margin-bottom: 92px;

    background-color: #00000fa0;
    min-width: 160px;
    box-shadow: 0px -6px 20px rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    border: 1px solid #e2e8f045;
    z-index: 4000;
    padding: 6px 0;
}
.default-artwork {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pop_up_menu {
    background: transparent;
    border: none;
}
.pop_up_menu svg {
    width: 20px;
    height: 20px;
    fill: #999999;
    transition: fill 0.2s ease;
}

/* Activated class toggled via JavaScript */
.mobile-popup-panel.active {
    display: flex;
}

/* List element internal vertical links layout styling */
.mobile-popup-panel button {
    background: none;
    border: none;
    width: 100%;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-align: left;
    font-family: system-ui, sans-serif;
    font-size: 14px;
    color: #cdcdcd;
    transition: background 0.15s ease;
}
.file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

}

.floating-search-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #007bff;
    color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;

    transition: transform 0.2s ease, background-color 0.2s ease;


    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
}

/* Hover & Active Effects */
.floating-search-btn:hover {
    transform: translateY(-4px);
    background-color: #0056b3;
}

.floating-search-btn.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.player-title-node{
    display: none;
}

/* ==========================================================================
   AUTO-SCALING FAVORITES ITEM CONTAINER
   ========================================================================== */
#media-container-Favorites .waveform-container,
#media-container-Favorites .waveform,
#media-container-Favorites .row-play-btn,
#media-container-Favorites .dcn {
    display: none !important;
}

#media-container-Favorites {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    display: flex;
    flex-direction: column;

}

#media-container-Favorites .file-row-item {
    width: auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;

    min-height: clamp(60px, 5.5vh, 56px);
    padding: clamp(6px, 1vh, 10px) clamp(8px, 1.5vw, 14px);
    gap: 12px;

    box-sizing: border-box;
    border-radius: clamp(6px, 1vw, 10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   1. HOVER STATE
   ========================================================================== */
#media-container-Favorites .file-row-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   2. ACTIVE STATE (Playing / Selected Track Row)
   ========================================================================== */
#media-container-Favorites .file-row-item.active-row,
#media-container-Favorites .file-row-item.is-playing {
    background-color: rgba(2, 0, 26, 0.6);
    border-color: rgba(255, 65, 108, 0.35);
    box-shadow: 0 4px 15px rgba(255, 65, 108, 0.1);
}

/* Child scaling states when active */
#media-container-Favorites .file-row-item.active-row .file-name {
    color: var(--accent-color, #ff416c);
    font-weight: 600;
}

#media-container-Favorites .file-row-item.active-row .row-play-btn {
    color: var(--accent-color, #ff416c);
}

/* ==========================================================================
   3. CLICKED STATE (Tactile physical scale down)
   ========================================================================== */
#media-container-Favorites .file-row-item:active {
    transform: scale(0.98);
    background-color: rgba(255, 65, 108, 0.15);
}

/* --- 1. DEFAULT HIDDEN STATES --- */
.file-row-item .play-trigger,
.file-row-item .waveform-container,
.file-row-item .time-stamp.elapsed,
.file-row-item .download-btn,
.file-row-item .dcn {
    display: none !important;
}

/* --- 2. ACTIVE STATES (REVEAL ON ROW CLICK) --- */
.file-row-item.active-row .play-trigger {
    display: inline-flex !important;
}

.file-row-item.active-row .waveform-container {
    display: flex !important;
}

.file-row-item.active-row .time-stamp.elapsed {
    display: inline-block !important;
}

.file-row-item.active-row .download-btn {
    display: inline-flex !important;
}

.file-row-item.active-row .dcn {
    display: block !important;
}

/* --- 3. ACTIVE STATES (HIDE ON ROW CLICK) --- */
.file-row-item.active-row .file-thumb,
.file-row-item.active-row .file-name {
    display: none !important;
}

.row-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    cursor: pointer;

    flex-shrink: 0;

    width: 45px;
    height: 45px;
    background-color: var(--player-accent);
    color: #000000 !important;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);

    transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.row-play-btn:hover {
    transform: scale(1.05);
}

/* Ensure the SVG vector matches your dark coloring */
.row-play-btn .row-icon-svg {
    display: block;
    fill: currentColor;
    width: 20px;
    height: 20px;
}

.waveform-container .wave-bar.played {
    background-color: #ff551a;
}
.waveform-container {
    display: flex;
    align-items: center;
    gap: 2px;
    width: 100%;
    overflow: hidden;
}

.wave-bar {
    width: 3px;
    border-radius: 2px;
    transition: background-color 0.2s ease, height 0.1s ease;
}
.music-workspace-split {
    display: flex;
    flex-direction: row;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.player-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    min-width: 0;
}


/* ==========================================================
   MOBILE SCREEN DROPDOWN BREAKPOINT CONFIGURATION
   ========================================================== */
@media (max-width: 820px) {
.genre-btn{
    padding: 10px 22px;
    justify-content: center;
    align-items: center;
    text-align: center;

    .file-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 90%;
    }
}
}
@media (max-width: 800px) {
.genre-btn{
    padding: 10px 20px;
    justify-content: center;
    align-items: center;
    text-align: center;
}

}
@media (max-width: 768px) {

    .nav-menu-toggle {
        display: flex;
    }

    .toggle_2 {
        display: none;
    }
    .file-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 300px;
    }

    .nav-auth-btns {
        position: absolute;
        top: 60px;
        left: 50%;
        width: 90%;
        border-radius: 10px;
        transform: translateX(-50%);
        background-color: #00000fed;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out;
    }

    .nav-auth-btns .nav-link-btn {
        width: 100%;
        text-align: center;
        padding: 16px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        box-sizing: border-box;
    }

    .nav-auth-btns.active {
        max-height: 160px;
        padding-bottom: 8px;
    }

    .nav-menu-toggle svg {
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: center;
    }

    .nav-menu-toggle.active svg {
        transform: rotate(180deg) scale(0.9);
    }

    .nav-menu-toggle.active svg #Vector {
        stroke: #ff4a5a;
        transition: stroke 0.3s ease;
    }

    .menu-container {
        position: relative;
        display: flex;
    }

    section.sidebar-right {
        position: absolute;
        height: 100vh;
        width: 100%;
        padding: 20px;
    }

    .master-player-bar {
        width: 90%;
    }

    /* ==========================================================================
       DYNAMIC BOTTOM DOCK NAVIGATION (ICON HIDE ON ACTIVE ENGINE)
       ========================================================================== */
    .Select_btn_container {
        width: 100%;
        background-color: rgba(0, 3, 32, 0.781);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 30px;
        padding: 6px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        z-index: 10;
        box-sizing: border-box;
        white-space: nowrap;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.067);
    }

    /* Base button properties (Inactive state) */
    .genre-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: #a0a0a0;
        padding: 10px;
        border-radius: 25px;
        cursor: pointer;
        outline: none;
        overflow: hidden;

        flex-grow: 1;
        flex-shrink: 1;
        flex-basis: 40px;

        transition: background-color 0.3s ease, color 0.3s ease, flex-grow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Icon parameters with transition structural allowances */
    .genre-btn svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        display: block;
        opacity: 1;
        transition: transform 0.3s ease, max-width 0.35s ease, opacity 0.2s ease;
        max-width: 20px; 
    }

    /* Text hiding masking rules */
    .genre-btn .btn-text {
        max-width: 0;
        opacity: 0;
        display: inline-block;
        white-space: nowrap;
        font-weight: 600;
        font-size: 13px;
        transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    }

    /* ACTIVE BUTTON: Hides icon and centers the dynamic text item allocation */
    .genre-btn.active {
        background-color: #ffffff;
        color: #121212;
        padding: 10px 16px;
        flex-grow: 6;
        flex-shrink: 0;
    }

    /* Target SVG exclusively within active button parent */
    .genre-btn.active svg {
        max-width: 0;
        opacity: 0;
        transform: scale(0);
    }

    /* Active Status Text Expansion (Removed left margin since icon vanishes) */
    .genre-btn.active .btn-text {
        opacity: 1;
        max-width: 100px;
    }

}
@media (max-width: 435px) {

    .download-Container span {
        display: none !important;
    }
    .file-thumb{
        height: 35px;
        width: 35px;
    }

    footer.master-player-bar .skip-rewind,
    footer.master-player-bar .skip-forward {
        display: none !important;
    }

    .now-playing-col {
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        overflow: hidden;
        order: 1;
        flex-shrink: 0;
    }

    /* Target the image directly to fill its new 50px container dimensions */
    .now-playing-col img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .track-info-metadata {
        order: 2;
        flex-grow: 0;
        display: flex;
        justify-content: flex-start;
        max-width: 170px;
        min-width: 0;
    }

    /* Prevents the text from blowing past the 100px width threshold */
    .player-title-node {
        display: block;
        font-size: 10px;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        font-size: 13px;
    }

    /* --- 4. Right Side Elements --- */
    .player-volume-col {
        order: 3;
        display: flex;
        align-items: center;
        gap: 5px;
        margin-left: auto;
    }

    .player-controls-col {
        order: 4;
        display: flex;
        align-items: center;
    }

    .control-actions-group {
        display: flex;
        align-items: center;
        margin: 0;
    }

    /* --- 5. Global Mobile Layout Rules --- */
    .floating-search-btn,
    .floating-action-add  {
        width: 50px;
        height: 50px;
    }

    .main-content {
        padding: 10px;
        background: transparent;
    }

    .Select_btn_container {
        justify-content: center;
        gap: 4px;
    }

    .slide-card {
        width: 300px;
        height: 300px;
    }

    .description {
        display: flex;
        flex-direction: column;
        text-align: center;
        font-size: 12px;
        margin-bottom: 0;
    }

    .media-table-container {
        padding: 5px;
    }

    .table-header-row {
        padding: 0;
        margin: 5px;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 1.3px;
    }

    .file-row-item {
        display: flex;
        align-items: center;
        padding: 7px;
        margin: 3px;
        gap: 12px;
    }

    .file-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13px;
    }

    #media-container {
        justify-content: center;
        align-items: center;
    }

    .mobile-popup-panel {
        margin-bottom: 103px;
    }
    .row-play-btn {
        width: 40px;
        height: 40px;
    }
}
@media (max-width: 414px) {

    .headTittle {
        justify-content: center;
        align-items: center;
        margin-bottom: 10px;
    }

    .headTittle p {
        width: 190px;
        margin-top: 0;
        padding: 7px;
    }
    .headTittle h1 {
        font-size: 32px;
        margin-bottom: 5px;
    }

    .Select_btn_container {
        justify-content: center;
        gap: 4px;
    }
    .headTittle h3 {
        font-size: 10px;
    }

    .slide-card {
        width: 260px;
        height: 260px;
    }
    .slide-center-play-btn {
        bottom: 10px;
    }
    .slider-container {
        height: 300px;
        padding-bottom: 20px;

    }
    .description {
        display: flex;
        flex-direction: column;
        text-align: center;
        font-size: 12px;
        margin-bottom: 0;
    }
    .media-table-container{
        padding: 5px;
    }
    .table-header-row {
        padding: 0;
        margin: 5px;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 1.3px;
    }
    .file-row-item {
        display: flex;
        align-items: center;
        padding: 7px;
        margin: 3px;
        gap: 12px;
    }
    .download-btn .dl-text {
        display: none !important;
    }
    .dcn {
        display: none !important;
    }

    .now-playing-col {
        display: none;
    }
    #media-container {
        justify-content: center;
        align-items: center;
    }


/* Unique hover effect for Favorites */
#media-container-Favorites .file-row-item:hover {
    background-color: rgba(255, 74, 90, 0.1);
}

.master-player-bar {
    display: grid;
    grid-template-rows: auto auto;
    grid-template-columns: 1fr 1fr;
    bottom: 10px;
    width: 95%;
    height: auto;
    box-sizing: border-box;

    row-gap: 8px;
    padding: 16px 20px;
}

/* Row 1, Column 1: Control buttons (left-aligned) */
.control-actions-group {
    grid-row: 1;
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
}

/* Row 1, Column 2: Volume + Extra Actions (right-aligned) */
.player-volume-col {
    grid-row: 1;
    grid-column: 2;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0;
}

/* Row 2: Progress Timeline */
.playback-progress-container {
    grid-row: 2;
    grid-column: 1 / span 2;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    margin-bottom: 7px;
}
.mobile-popup-panel {
    margin-bottom: 103px;
}



}
@media (max-width: 360px) {

    .mobile-popup-panel {
        margin-bottom: 103px;
    }
    .mobile-popup-panel button {
        gap: 7px;
    }
     .file-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
        font-size: 13px;
    }
    .slide-card {
        width: 250px;
        height: 250px;
    }
    .slide-center-play-btn {
        bottom: 20px;
    }

}
@media (max-width: 340px) {

.master-player-bar {
        width: 94%;
        left: 3%;
        height: 60px;
        padding: 0 10px;
        gap: 6px;
        bottom: -90px;
    }
    .slide-card {
        width: 220px;
        height: 220px;
    }
    .slider-container{
        height: 250px;
    }
    .slide-center-play-btn {
        bottom: 10px;
    }
    .master-player-bar.is-visible,
    .master-player-bar:hover {
        bottom: 10px;
    }

    .master-player-bar .now-playing-col {
        width: 38px;
        height: 38px;
    }

    .master-player-bar .player-title-node {
        font-size: 11px; /* Downscales typography fluidly */
    }
    
    /* Shrinks interaction SVGs so they never overflow layout blocks */
    .master-player-bar svg {
        transform: scale(0.85);
    }
    
    .Select_btn_container {
        padding: 4px;
    }
    .genre-btn {
        padding: 8px 4px;
        flex-basis: 36px;
    }

    .genre-btn svg {
        width: 18px;
        height: 18px;
        max-width: 18px;
    }

    /* Core layout adjustment for active button text limits */
    .genre-btn .btn-text {
        font-size: 11px;
        transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    }

    .genre-btn.active {
        padding: 8px 10px;
        flex-grow: 4;
        justify-content: start;
    }

    /* Caps active text window length so it will text-truncate instead of exploding layout bounds */
    .genre-btn.active .btn-text {
        max-width: 75px;
        text-overflow: ellipsis;
        overflow: hidden;
        display: inline-block;
    }

}

/* ==========================================================================
   THE PLAYER CONTAINER
   ========================================================================== */
.player-container {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 100vw;
    min-height: calc(100vh - 57px);
    box-sizing: border-box;

    background: var(--bg-card);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    /* Padding uses mobile-first spacing with responsive bottom inset padding */
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    color: #ffffff;
    overflow-y: auto;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px; /* Reduced from 24px for vertical space economy */
}

.header-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 8px;
}

.header-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* ==========================================================================
   ARTWORK STAGE AREA (Fluidly Resizes on Small Screens)
   ========================================================================== */
.artwork-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    min-height: 140px;
}

.artwork-outer-ring {
    width: 200px;
    height: 200px;
    max-width: 55vw;
    max-height: 55vw;
    border-radius: 50%;
    padding: 6px;
    background: linear-gradient(145deg, rgba(255,255,255,0.03), rgba(0,0,0,0.5));
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05),
                0 12px 28px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    aspect-ratio: 1 / 1;
}

.artwork-inner-node {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 3px solid #100f1a;
    animation: spin 20s linear infinite;
    animation-play-state: paused;
}

.playing-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   TRACK INFORMATION & META (Guarded against long titles)
   ========================================================================== */
.track-info-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.track-meta {
    flex: 1;
    min-width: 0;
}

.track-title {
    font-size: clamp(1.05rem, 5.2vw, 1.35rem);

    font-weight: 700;
    margin: 0 0 4px 0;
    letter-spacing: -0.5px;
    color: var(--text-primary);

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.track-artist {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toggle-sidebar-right {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.toggle-sidebar-right:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   PROGRESS SECTOR
   ========================================================================== */
.progress-container {
    margin-bottom: 20px;
}

.waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 36px;
    padding: 0 4px;
    width: 100%;
}

.wave-bar {
    flex-grow: 1;
    width: 100%;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    transition: background 0.1s ease;
}

.wave-bar.played {
    background: #ffffff;
}

.waveform-timeline {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 6px;
}

#master-play-trigger.control-btn svg {
    width: 35px !important;
    height: 35px !important;
}

/* ==========================================================================
   MAIN CONTROLS WRAPPER (CSS Grid Layout)
   ========================================================================== */
.main-controls {
    display: grid;
    grid-template-rows: auto auto;
    row-gap: clamp(12px, 3.5vh, 24px);
    width: 100%;
    margin-top: auto;
    box-sizing: border-box;
}

/* Base button properties with auto-scaling padding */
.main-controls button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    padding: clamp(6px, 1.5vw, 10px);
    border-radius: 50%;
}

.main-controls button:hover {
    color: var(--text-primary);
    transform: scale(1.08);
}

.main-controls button:active {
    transform: scale(0.92);
}

/* ==========================================================================
   TOP ROW GRID (Playback Engine: Skip Back, Play/Pause, Skip Forward)
   ========================================================================== */
.controls-row-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-items: center;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

/* Fluid Play/Pause Button sizing */
#master-play-trigger.play-pause {
    width: clamp(54px, 16vw, 72px);
    height: clamp(54px, 16vw, 72px);
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 8px 24px var(--accent-glow);
    grid-column: 2;
}

#master-play-trigger.play-pause svg {
    width: clamp(20px, 6vw, 28px) !important;
    height: clamp(20px, 6vw, 28px) !important;
}

/* Fluid navigation arrows */
.skip-rewind svg,
.skip-forward svg {
    width: clamp(20px, 6vw, 26px);
    height: clamp(20px, 6vw, 26px);
}

/* Place navigation arrows on the left and right grids */
.skip-rewind {
    grid-column: 1;
    justify-self: end;
    margin-right: clamp(10px, 4vw, 20px);
}

.skip-forward {
    grid-column: 3;
    justify-self: start;
    margin-left: clamp(10px, 4vw, 20px);
}

/* ==========================================================================
   BOTTOM ROW GRID (Utilities: Fav, Loop, Volume, Share)
   ========================================================================== */
.controls-row-bottom {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    justify-items: center;
    align-items: center;

    width: calc(100% - 16px); 
    max-width: 320px;
    margin: 0 auto;

    padding: clamp(0.6em, 2vh, 1.2em) clamp(0.8em, 3vw, 1.5em);

    background-color: #02001a;
    border-radius: 3em;
    box-sizing: border-box;
}

.controls-row-bottom button svg {
    width: clamp(16px, 5vw, 21px);
    height: clamp(16px, 5vw, 21px);
    transition: var(--transition-smooth, all 0.2s ease);
}

.toggleFavorite:hover {
    color: #ff416c !important;
}
.controls-row-bottom button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 36px; /* Prevents tiny click targets */
    background: transparent;
    border: none;
    color: var(--text-secondary, #8c8a9e);
    cursor: pointer;
}


/* Meta Row Wrapper */
.artist-genre-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

/* Base Artist Styling */
.track-artist {
    font-size: clamp(0.8rem, 4vw, 0.95rem);
    color: var(--text-primary, #ffffff);
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Clean separation dot */
.meta-divider {
    color: var(--text-muted, #535165);
    font-size: 0.8rem;
    user-select: none;
}

/* The dynamic, breadcrumb-style Genre Path */
.track-genre-path {
    font-size: clamp(0.75rem, 3.5vw, 0.85rem);
    color: var(--accent-color, #ff416c);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   RESPONSIVE OVERRIDE (For screens 340px and below)
   ========================================================================== */
@media screen and (max-width: 340px) {
    .artist-genre-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .meta-divider {
        display: none;
    }
}