:root {
    --apple-red: #24c8fa;
    --bg-color: #000;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-active: rgba(255, 255, 255, 0.2);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'MiSans', sans-serif; 
    font-weight: 450;
    user-select: none; 
}

b, strong { font-weight: 600; }

body { 
    background-color: var(--bg-color); 
    color: #fff; 
    overflow: hidden;
}

.gpu-accelerated {
    backface-visibility: hidden;
}
.gpu-accelerated #main-viewport,
.gpu-accelerated #bg-canvas,
.gpu-accelerated #bg-canvas .bgbg {
    will-change: transform, opacity;
}

#bg-canvas { 
    position: fixed; 
    z-index: -1; 
    filter: blur(100px) brightness(0.6); 
    transition: background 1.5s ease; 
    background-size: cover; 
    background-position: center; 
    background-color: #000;
    will-change: transform;
}

#top-bar { 
    position: fixed; 
    top: 0; 
    width: 100%; 
    padding: 1.8519vh;
    z-index: 200001;
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    pointer-events: none; 
}

.search-container { 
    background: var(--glass-bg); 
    backdrop-filter: blur(1.8519vh); 
    border-radius: 999px; 
    padding: 0.5.5vh 1.3889vh;
    display: flex; 
    align-items: center; 
    width: 32.4074vh;
    border: 0.0926vh solid rgba(255,255,255,0.1); 
    transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1); 
    pointer-events: auto; 
}

.search-container input { 
    background: transparent; 
    border: none; 
    color: #fff; 
    outline: none; 
    width: 100%; 
    padding-left: 0.9259vh;
}

#main-viewport { 
    height: 100vh; 
    transition: transform 0.8s cubic-bezier(0.6, 0, 0.3, 1); 
    will-change: transform;
   
}

.song-page { 
    height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 0 8%; 
}

.cover-art { 
    width: 37.0370vh;
    height: 37.0370vh; 
    border-radius: 1.1111vh; 
    box-shadow: 0 0.4630vh 3.7037vh rgba(0,0,0,0.3); 
    margin-bottom: 2.3148vh; 
    transition: 0.3s; 
}

.title-meta h1 { 
    font-size: 2.9630vh; 
    margin-bottom: 0.4630vh; 
    width: 37.0370vh;
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
}

.title-meta p { 
    font-size: 1.6667vh; 
    color: rgba(255,255,255,0.6); 
    margin-bottom: 2.3148vh; 
}

.controls-panel { 
    width: 37.0370vh;
    background: var(--glass-bg); 
    backdrop-filter: blur(1.8519vh); 
    border-radius: 1.4815vh; 
    padding: 1.8519vh; 
    border: 0.0926vh solid rgba(255,255,255,0.1); 
}

.progress-container { 
    margin-bottom: 1.3889vh; 
}

input[type="range"] { 
    -webkit-appearance: none; 
    width: 100%; 
    background: rgba(255,255,255,0.2); 
    height: 0.3704vh; 
    border-radius: 0.1852vh; 
    outline: none; 
}

input[type="range"]::-webkit-slider-thumb { 
    -webkit-appearance: none; 
    width: 1.1111vh;
    height: 1.1111vh; 
    background: #fff; 
    border-radius: 50%; 
    cursor: pointer; 
    box-shadow: 0 0 0.9259vh rgba(0,0,0,0.5); 
}

.time-info { 
    display: flex; 
    justify-content: space-between; 
    font-size: 1.1111vh; 
    color: rgba(255,255,255,0.5); 
    margin-top: 0.4630vh; 
}

.buttons-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 1.3889vh; 
}

.btn { 
    cursor: pointer; 
    opacity: 0.8; 
    transition: 0.2s; 
    padding: 0.7407vh; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.btn:hover { 
    opacity: 1; 
    background: var(--glass-active); 
}

.btn-play { 
    background: #fff; 
    color: #000; 
    width: 4.1667vh;
    height: 4.1667vh; 
}

.btn-play:hover { 
    transform: scale(1.1); 
    background: #fff; 
}

.volume-row { 
    display: flex; 
    align-items: center; 
    gap: 0.9259vh;
    opacity: 0.6; 
}

.lyric-side { 

    flex: 1; 
    max-width: 40vw;
    height: 80vh; 
    margin-left: 300px;
    pointer-events: auto;
    user-select: none; 
    -webkit-user-select: none;
    transition: opacity 0.8s ease, 
                visibility 0.8s ease,
                flex 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                margin-left 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                max-width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1; 
    visibility: visible;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    display: block;
}

#search-overlay { 
    position: fixed; 
    inset: 0; 
    z-index: 1000;
    display: none; 
    padding: 9.2593vh 4.6296vh;
    overflow-y: auto; 
    backdrop-filter: blur(2.7778vh); 
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4.6296vh);
}

.back-btn { 
    position: absolute; 
    top: 2.7778vh; 
    left: 4.6296vh;
    cursor: pointer; 
    font-size: 1.8519vh; 
    color: var(--apple-red); 
    z-index: 1100;
    pointer-events: auto;
}

.back-to-list-btn {
    position: absolute;
    top: 2.7778vh;
    left: 4.6296vh;
    cursor: pointer;
    font-size: 1.8519vh;
    color: var(--apple-red);
    z-index: 1100;
    pointer-events: auto;
}

.result-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(18.5185vh, 1fr));
    gap: 2.7778vh;
    margin-top: 3.7037vh; 
}

.song-card img { 
    width: 100%; 
    border-radius: 0.9259vh; 
    margin-bottom: 0.9259vh; 
    cursor: pointer;
}

.loading-tip {
    position: fixed;
    bottom: 1.8519vh;
    right: 1.8519vh;
    font-size: 1.1111vh;
    padding: 0.4630vh 0.9259vh;
    border-radius: 0.4630vh;
    transition: color 0.8s ease;
    z-index: 100;
}

#searchBtn { 
    margin-left: 0.9259vh;
    padding: 0.4630vh; 
    background: transparent; 
}

.search-container { 
    width: 35.1852vh;
}

#toast-container {
    position: fixed;
    z-index: 300000 !important;
    top: 95%;
    left: 50%;
    transform: translate(-50%, -100%);
    z-index: 10000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#share-overlay-modal {
    opacity: 0;
    transition: opacity 0.25s ease;
}
#share-overlay-modal.is-open { opacity: 1; }
#share-overlay-modal.is-closing { opacity: 0; pointer-events: none; }
#share-overlay-modal > div {
    transform: scale(0.96);
    transition: transform 0.25s ease;
}
#share-overlay-modal.is-open > div { transform: scale(1); }
#share-overlay-modal.is-closing > div { transform: scale(0.96); }

.toast-item {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(1.3889vh);
    color: white;
    padding: 1.1111vh 2.3148vh;
    border-radius: 1.3889vh;
    font-size: 1.3889vh;
    margin-bottom: 0.9259vh;
    box-shadow: 0 0.9259vh 2.7778vh rgba(0,0,0,0.3);
    border: 0.0926vh solid rgba(255,255,255,0.1);
    animation: toast-in 0.4s cubic-bezier(0.2, 1, 0.2, 1), 
               toast-out 0.4s cubic-bezier(0.2, 1, 0.2, 1) 2.5s forwards;
    white-space: nowrap;
}

.song-info-side {
    flex: 0 0 42.5926vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 3.7037vh;
    border-radius: 2.7778vh;
    background: rgba(255, 255, 255, 0.03); 
    backdrop-filter: blur(2.3148vh);
    -webkit-backdrop-filter: blur(2.3148vh);
    border: 0.0926vh solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 1.3889vh 4.6296vh -1.1111vh rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: background-color 1.2s ease, 
                color 0.8s ease, 
                background 0.8s ease,
                all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: background-color, transform;
   
}

.song-page.lyrics-hidden .lyric-side {
    flex: 0;
    max-width: 0;
    margin-left: 0;
    opacity: 0;
    visibility: hidden;
}

#searchInp::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.bgbg {
    position: absolute;
    top: 0;
    left: 50%;
    transition: opacity 1s ease-in-out !important; 
    will-change: transform, opacity;
   
    pointer-events: none;
}
.cover-art {cursor: pointer;}
@keyframes rotateBg {
    from { transform: translateX(-50%) rotate(0deg); }
    to   { transform: translateX(-50%) rotate(360deg); }
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {to { opacity: 0; transform: translateY(-20px) scale(0.9); }}
.song-card p {
    font-size: 1.6667vh;
    margin-top: 0.463vh;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.song-card .artist-name {
    font-size: 1.2963vh;
    color: rgba(255, 255, 255, 0.5);
}
.search-container {position: relative;}
#app-logo {transition: opacity 0.3s ease;}
body.search-active #app-logo {opacity: 0;}
body.favorites-active #app-logo,
body.playlists-active #app-logo,
body.artist-active #app-logo,
body.album-active #app-logo {
    opacity: 0 !important;
    pointer-events: none !important;
}

@media (max-width: 1024px) {
    #top-bar {
        padding: 2vh 4vw;
        transition: opacity 0.5s ease;
    }
    .search-container {width: 60vw;}
    .song-info-side {
        flex: 0 0 auto;
        width: 75vw;
        height: auto;
        padding: 4vh;
        margin: 0 auto;
        transform: translateY(0);
        transition: opacity 0.5s ease, transform 0.5s ease, background-color 1s ease;
    }

    .cover-art {
        width: 60vw;
        height: 60vw;
        margin-bottom: 3vh;
    }
    .controls-panel {width: 100%;}
    body.mobile-lyric-active .song-info-side,
    body.mobile-lyric-active #top-bar {
        opacity: 0;
        pointer-events: none;
    }
    .toast-item {
        font-size: 1.8vh;
        padding: 1.5vh 5vw;
    }
    .song-page {
        position: relative; 
        flex-direction: column;
        padding: 0;
        justify-content: center;
        overflow: hidden;
    }

    .lyric-side {
        position: absolute;
        top: 0;
	    left: 0;
	    right: 0;
	    bottom: 15%;
        width: 80%;
        height: 90%;
        margin: auto;
        place-items: center;
        padding: 12vh 8vw 5vh 8vw; 
        background: rgba(0, 0, 0, 0);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.5s ease, visibility 0.5s ease;
        transform: none !important; 
    }

    body.mobile-lyric-active .lyric-side {
        opacity: 1;
        visibility: visible;
        pointer-events: none;
    }

    #search-overlay {
        position: fixed;
        inset: 0;
        padding: 10vh 5vw;
    }
}

#announcement-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(1.3889vh);
    -webkit-backdrop-filter: blur(1.3889vh);
    animation: fade-in 0.4s ease-out;
}

.modal-card {
    width: 46.2963vh;
    max-width: 90vw;
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(2.7778vh);
    -webkit-backdrop-filter: blur(2.7778vh);
    border: 0.0926vh solid rgba(255, 255, 255, 0.1);
    border-radius: 2.7778vh;
    padding: 3.7037vh;
    box-shadow: 0 4.6296vh 9.2593vh rgba(0, 0, 0, 0.5);
   
    color: #fff;
    text-align: left;
}

.modal-header {
    font-size: 2.5926vh;
    font-weight: 800;
    margin-bottom: 2.3148vh;
    color: var(--apple-red);
    display: flex;
    align-items: center;
    gap: 1.3889vh;
}

.modal-body {
    font-size: 1.6667vh;
    line-height: 1.6;
    max-height: 40vh;
    overflow-y: auto;
    margin-bottom: 3.7037vh;
    color: rgba(255, 255, 255, 0.85);
}
.modal-body p { margin-bottom: 1.3889vh; }
.modal-btn {
    width: 100%;
    background: #fff;
    color: #000;
    padding: 1.4815vh 0;
    border-radius: 1.3889vh;
    font-size: 1.6667vh;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.modal-btn:hover { transform: scale(1.02); }
.modal-btn:active { transform: scale(0.98); opacity: 0.8; }
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-body::-webkit-scrollbar {width: 0.3704vh;}
.modal-body::-webkit-scrollbar-track {background: transparent;}
.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.1852vh;
    transition: background 0.3s;
}
.modal-body:hover::-webkit-scrollbar-thumb {background: rgba(255, 255, 255, 0.25);}
body.modal-active {overflow: hidden;}
.side-tools {
    position: fixed;
    right: 2.3vh;
    bottom: 5vh;
    display: flex;
    flex-direction: column;
    gap: 1.5vh;
    z-index: 1002;
}

.tool-btn {
    width: 4.5vh;
    height: 4.5vh;
    border-radius: 1vh;
    background: var(--glass-bg);
    backdrop-filter: blur(1vh);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    color: rgba(255,255,255,0.6);
}

.tool-btn.active {
    color: #fff;
    background: var(--apple-red);
    border-color: transparent;
}

.tool-btn svg { width: 2.2vh; height: 2.2vh; }

#initial-loader {
    position: fixed;
    inset: 0;
    background: #1a1a1a;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
    will-change: opacity;
}

.loader-content {
    text-align: center;
   
}

.loader-logo {
    width: 25.9259vh;
    height: auto;
    margin-bottom: 1.8519vh;
    animation: loader-pulse 2s ease-in-out infinite;
}

.loader-subtext {
    font-size: 1.4815vh;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.463vh;
    font-weight: 400;
}

@keyframes loader-pulse {
    0%, 100% { opacity: 0.6; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1); }
}

#initial-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

:root {
    --apple-red: #24c8fa;
    --bg-color: #000;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-active: rgba(255, 255, 255, 0.2);
}

* { 
    margin: 0; padding: 0; box-sizing: border-box; 
    font-family: 'MiSans', sans-serif; font-weight: 450; user-select: none; 
}

body { background-color: var(--bg-color); color: #fff; overflow: hidden; height: 100vh; }
#bg-canvas { 
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vw; z-index: -1; 
    filter: blur(6.4815vh) brightness(0.6); transition: background 1.5s ease; 
    background-color: #000;
}

.bgbg {
    position: absolute; top: 50%; left: 50%; width: 150vw; height: 150vw;
    margin-top: -75vw; margin-left: -75vw;
    transition: opacity 2s ease-in-out !important; 
    will-change: transform, opacity;
    animation: none; pointer-events: none;
}

@keyframes rotateBg {
    from { transform: translateZ(0) rotate(0deg); }
    to   { transform: translateZ(0) rotate(360deg); }
}

#flow-canvas {
    position: absolute; inset: 0; width: 100%; height: 100%;
    z-index: 0; opacity: 0; transition: opacity 0.6s ease; pointer-events: none;
}
body.bg-mode-flow #flow-canvas { opacity: 1; }
body.bg-mode-flow .bgbg { opacity: 0 !important; }
body.bg-mode-flow #bg-canvas { filter: none; }
body.bg-mode-blur #flow-canvas { opacity: 0; }
body.bg-mode-solid #flow-canvas { opacity: 0; }
body.bg-mode-solid .bgbg { opacity: 0 !important; }

#top-bar { 
    position: fixed; top: 0; width: 100%; 
    padding: 1.8519vh; z-index: 200001;
    display: flex; align-items: center; justify-content: space-between; 
    pointer-events: none; 
}
body:not(.sidebar-visible):not(.sidebar-expanded) #app-logo { margin-left: 1.25vh; }

#app-logo { transition: opacity 0.3s ease; font-size: 2.2222vh; pointer-events: auto; }
body.search-active #app-logo { opacity: 0; pointer-events: none; }

body.search-active #dl-wrap,
body.favorites-active #dl-wrap,
body.playlists-active #dl-wrap,
body.artist-active #dl-wrap,
body.album-active #dl-wrap,
body.settings-active #dl-wrap {
    opacity: 0 !important;
    pointer-events: none !important;
}
body.sidebar-visible #app-logo,
body.sidebar-expanded #app-logo { opacity: 1 !important; pointer-events: auto !important; }

.search-container { 
    background: var(--glass-bg); backdrop-filter: blur(1vh); 
    border-radius: 999px; padding: 0.7407vh 1.3889vh;
    display: flex; align-items: center; width: 35.1852vh;
    border: 0.0926vh solid rgba(255, 255, 255, 0.1); 
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), top 0.8s cubic-bezier(0.4, 0, 0.2, 1), left 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.8s cubic-bezier(0.4, 0, 0.2, 1); 
    pointer-events: auto;
}

.search-container input { 
    background: transparent; border: none; color: #fff; outline: none; 
    width: 100%; padding-left: 0.9259vh; font-size: 1.4815vh;
}
.search-container input::placeholder { color: rgba(255, 255, 255, 0.4); }
#main-viewport { 
    height: 100vh; transition: transform 0.8s cubic-bezier(0.6, 0, 0.3, 1); 
    will-change: transform;
}

.song-page { 
    height: 100vh; display: flex; align-items: center; 
    justify-content: center; padding: 0 8%;
}

.song-info-side {
    flex: 0 0 42.5926vh; display: flex; flex-direction: column;
    align-items: flex-start; padding: 3.7037vh; border-radius: 2.7778vh;
    background: rgba(255, 255, 255, 0.03); 
    backdrop-filter: blur(2.3148vh); -webkit-backdrop-filter: blur(2.3148vh);
    border: 0.0926vh solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 1.3889vh 4.6296vh -1.1111vh rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: background-color 1.2s ease, color 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: background-color, transform;
}

.cover-art { 
    width: 39vh; height: 39vh; border-radius: 1.3889vh; 
    box-shadow: 0 0.463vh 3.7037vh rgba(0,0,0,0.3); 
    margin-bottom: 2.3148vh; transition: 0.3s; cursor: pointer;
}

.title-meta h1 { 
    font-size: 2.963vh; margin-bottom: 0.463vh; width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff !important;
}
.title-meta p { font-size: 1.6667vh; color: rgba(255,255,255,0.6); margin-bottom: 2.3148vh; }

.lyric-side { 
    flex: 1; 
    max-width: 40vw;
    height: 80vh; 
    margin-left: 300px;
    pointer-events: auto;
    user-select: none; 
    -webkit-user-select: none;
    transition: opacity 0.8s ease, 
                visibility 0.8s ease,
                flex 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                margin-left 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                max-width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1; 
    visibility: visible;
}
.song-page.lyrics-hidden .lyric-side { flex: 0; max-width: 0; margin-left: 0; opacity: 0; visibility: hidden; }
iframe { width: 100%; height: 100%; border: none; background: transparent; display: block; }
.search-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85); 
    z-index: 1000; display: none; padding: 9.2593vh 4.6296vh;
    overflow-y: auto; backdrop-filter: blur(4.6296vh);
}

.back-btn { 
    position: absolute; top: 2.7778vh; left: 4.6296vh;
    cursor: pointer; font-size: 1.8519vh; color: var(--apple-red); z-index: 1100;
    pointer-events: auto;
}

.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16vh, 1fr)); gap: 2vh; margin-top: 2vh; padding: 0 1vh; }
.song-card { cursor: pointer; transition: all 0.3s ease; background: rgba(255,255,255,0.05); border-radius: 1.2vh; overflow: hidden; padding: 1vh; }
.song-card:hover { transform: scale(1.02); background: rgba(255,255,255,0.1); }
.song-card img { width: 100%; aspect-ratio: 1; border-radius: 0.8vh; margin-bottom: 1vh; object-fit: cover; }
.song-card .card-title { font-size: 1.4vh; font-weight: 600; color: #fff; margin-bottom: 0.5vh; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-card .card-subtitle { font-size: 1.2vh; color: rgba(255,255,255,0.6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#announcement-modal {
    position: fixed; inset: 0; z-index: 9999; display: none;
    align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(1.3889vh);
}
#announcement-modal.modal-closing { animation: announcement-out 0.3s ease forwards; pointer-events: none; }
#announcement-modal.modal-closing .modal-card { animation: modal-card-out 0.3s ease forwards; }
@keyframes announcement-out { to { opacity: 0; } }
@keyframes modal-card-out { to { opacity: 0; transform: scale(0.96) translateY(1vh); } }
@media (prefers-reduced-motion: reduce) {
    #announcement-modal.modal-closing,
    #announcement-modal.modal-closing .modal-card,
    #initial-loader,
    .sub-page-overlay,
    #theme-overlay,
    #confirm-dialog,
    .toast-item { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
.modal-card {
    width: 46.2963vh; max-width: 90vw; background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(2.7778vh); border-radius: 2.7778vh; padding: 3.7037vh;
    box-shadow: 0 4.6296vh 9.2593vh rgba(0, 0, 0, 0.5); color: #fff;
}
.modal-body { max-height: 40vh; overflow-y: auto; }
.modal-body::-webkit-scrollbar { width: 0.3704vh; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 0.1852vh; }

body.modal-active { overflow: hidden; }
#initial-loader {
    position: fixed; inset: 0; background: #1a1a1a; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s;
}
#initial-loader.loaded { opacity: 0; visibility: hidden; }
.side-tools { position: fixed; right: 2.3vh; bottom: 5vh; display: flex; flex-direction: column; gap: 1.5vh; z-index: 1002; }
.tool-btn {
    width: 4.5vh; height: 4.5vh; border-radius: 1vh; background: var(--glass-bg);
    backdrop-filter: blur(1vh); border: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s; color: rgba(255,255,255,0.6);
}
.tool-btn.active { color: #fff; background: var(--apple-red); border-color: transparent; }
@media (max-width: 1024px) {
    .song-page { flex-direction: column; padding: 0; position: relative; }
    .song-info-side { flex: 0 0 auto; width: 80vw; padding: 4vh; }
    .cover-art { width: 65vw; height: 65vw; }
    .lyric-side {
        position: absolute; inset: 0; width: 80vw; height: 100%; margin: 0;
        z-index: 1000; padding: 12vh 8vw; background: rgba(0,0,0,0.6);
        opacity: 0; visibility: hidden; pointer-events: none;
    }
    body.mobile-lyric-active .lyric-side { opacity: 1; visibility: visible; pointer-events: auto; }
    body.mobile-lyric-active .song-info-side, body.mobile-lyric-active #top-bar { opacity: 0; }
}

.loading-tip { position: fixed; bottom: 1.8519vh; right: 1.8519vh; font-size: 1.1111vh; transition: color 0.8s ease; z-index: 100; }
#toast-container { position: fixed; top: 92%; left: 50%; transform: translate(-50%, -100%); z-index: 10000; pointer-events: none; display: flex; flex-direction: column; align-items: center; }
.toast-item {
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(15px); color: white;
    padding: 1.1111vh 2.3148vh; border-radius: 1.3889vh; font-size: 1.3889vh;
    margin-bottom: 0.9259vh; border: 0.0926vh solid rgba(255,255,255,0.1);
    animation: toast-in 0.4s cubic-bezier(0.2, 1, 0.2, 1);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(2vh); } to { opacity: 1; transform: translateY(0); } }
.settings-main-title { text-align: center; font-size: 3.5vh; margin: 4vh 0; font-weight: 900; }
.settings-section { width: 80%; margin: 0 auto 5vh auto; }
.settings-label { font-size: 2.2vh; opacity: 0.6; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 1vh; margin-bottom: 2vh; }
.style-preview { width: 100%; aspect-ratio: 16/9; border-radius: 1vh; display: flex; align-items: center; justify-content: center; font-size: 1.5vh; border: 1px solid rgba(255,255,255,0.2); }
.settings-flex-row { display: flex; flex-wrap: wrap; gap: 4vh; }
.setting-item { display: flex; align-items: center; gap: 1.5vh; font-size: 1.8vh; }
.apple-switch { position: relative; display: inline-block; width: 5.5vh; height: 3vh; }
.apple-switch input { opacity: 0; width: 0; height: 0; }
.apple-switch .slider { position: absolute; cursor: pointer; inset: 0; background-color: #333; transition: .4s; border-radius: 3vh; }
.apple-switch .slider:before { position: absolute; content: ""; height: 2.2vh; width: 2.2vh; left: 0.4vh; bottom: 0.4vh; background-color: white; transition: .4s; border-radius: 50%; }
.apple-switch input:checked + .slider { background-color: var(--apple-red); }
.apple-switch input:checked + .slider:before { transform: translateX(2.5vh); }
.hex-input { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 0.5vh; color: #fff; padding: 0.5vh 1vh; font-size: 1.6vh; width: 12vh; outline: none; }
input[type="color"] { border: none; width: 4vh; height: 4vh; background: none; cursor: pointer; }
#bg-canvas.no-blur { filter: blur(0px) brightness(0.6) !important; }
.bgbg.no-flow { animation: none !important; transform: translateX(-50%) !important; }
#bg-canvas.solid-mode .bgbg { opacity: 0 !important; }
.tool-btn[title="推荐"] svg {
    transform: rotate(0deg);
    transition: transform 0.5s ease;
}
.tool-btn[title="推荐"]:active svg {transform: rotate(360deg);}
.side-tools {
    display: flex;
    flex-direction: column;
    gap: 1.5vh;
    transition: all 0.3s ease; 
}

.tool-btn {display: flex; }

.platform-icon-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.8vh;
    width: 1.8vh;
    margin-left: 0.8vh;
    vertical-align: middle;
    opacity: 0.9;
}

.platform-icon-tag svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.2));
}

.result-item.playing {background: rgba(36, 200, 250, 0.1);}
.result-item.playing .result-title {color: var(--apple-red) !important;}
.result-item.playing .result-index {color: var(--apple-red);}

#sys-sidebar-trigger {
    position: fixed;
    top: 0;
    left: 0;
    width: 25px;
    height: 100vh;
    z-index: 9999;
    pointer-events: auto;
}

.sys-sidebar {
    position: fixed;
    top: 0;
    left: -80px;
    width: 70px;
    height: 100vh;
    background: rgba(18, 18, 18, 0.45);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10001;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.4s ease,
                border-color 0.4s ease,
                opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3vh 0;
    box-sizing: border-box;
    overflow: hidden;
    pointer-events: auto;
}

#app-logo { position: relative; z-index: 200002; }

body.sidebar-visible .sys-sidebar {
    transform: translateX(80px);
}


body.settings-active #sys-sidebar,
body.settings-active #sys-sidebar-trigger {
    display: none !important;
}

#app-logo {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), margin-left 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease !important;
    
}

body.sidebar-visible #app-logo {
    transform: translateX(85px) !important;
    
}

body.sidebar-expanded .sys-sidebar {
    width: 220px;
    background: rgba(18, 18, 18, 0.88);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

body.sidebar-expanded #app-logo {
    transform: translateX(calc(110px - 1.8519vh)) translateX(-50%) !important;
    opacity: 1 !important;
}


#dl-wrap {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

body.sidebar-visible #dl-wrap {
    transform: translateX(85px);
}

body.sidebar-expanded #dl-wrap {
    transform: translateX(calc(220px - 15.15vh));
}


body.search-active #app-logo,
body.favorites-active #app-logo,
body.playlists-active #app-logo,
body.artist-active #app-logo,
body.album-active #app-logo {
    opacity: 0 !important;
    pointer-events: none !important;
}


body.loading-phase #top-bar {
    opacity: 0 !important;
    pointer-events: none !important;
}


.result-grid.grid-view .page-footer-text {
    grid-column: 1 / -1;
}


.apple-btn.primary-btn:hover {
    background: rgba(36, 200, 250, 0.7) !important;
}

.sidebar-top {
    height: 6vh;
    width: 100%;
}

.sidebar-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.6vh;
    padding: 2vh 12px;
    box-sizing: border-box;
}

.sidebar-bottom {
    padding: 0 12px;
    box-sizing: border-box;
}

.sidebar-item {
    width: 100%;
    height: 50px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0 13px;
    box-sizing: border-box;
    color: rgba(255, 255, 255, 0.55);
    transition: background-color 0.25s, color 0.25s, transform 0.2s;
    overflow: hidden;
    white-space: nowrap;
    text-align: left;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sidebar-item:active {
    transform: scale(0.97);
}

.sidebar-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 600;
}

.sidebar-item .icon-wrapper {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-item .icon-wrapper svg {
    width: 20px;
    height: 20px;
}

.sidebar-item .sidebar-text {
    margin-left: 15px;
    font-size: 14px;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body.sidebar-expanded .sidebar-item .sidebar-text {
    opacity: 1;
    transform: translateX(0);
}

.back-btn {
    position: absolute; 
    top: 2.7778vh; 
    left: 4.6296vh;
    cursor: pointer; 
    font-size: 1.8519vh; 
    color: var(--apple-red); 
    z-index: 1100;
    pointer-events: auto;
    display: flex !important;
    align-items: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.sidebar-visible .back-btn,
body.sidebar-expanded .back-btn {
    opacity: 0 !important;
    pointer-events: none !important;
}

.search-container {
    position: fixed !important;
    left: calc(100% - 32.4074vh - 1.8519vh - var(--aer-topbar-reserve, 0px)) !important;
    right: auto !important;
    width: 32.4074vh !important;
    border-radius: 999px !important;
    z-index: 1600 !important;
    pointer-events: auto !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                top 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                width 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                border-radius 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.6s ease,
                background-color 0.4s ease !important;
}

body.page-search-center .search-container {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 480px !important;
    max-width: 80vw !important;
    border-radius: 24px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55) !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body.page-search-center .search-container #searchInp,
body.page-search-results .search-container #searchInp {
    border-radius: 24px;
    font-size: 15px;
    padding-left: 15px;
}

body.page-search-results .search-container {
    top: 4vh !important;
    left: 50% !important;
    transform: translate(-50%, 0) !important;
    width: 480px !important;
    max-width: 80vw !important;
    border-radius: 24px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35) !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

body.page-search-results #search-overlay {
    padding-top: 13vh !important;
    transition: padding-top 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

body.page-search-center #search-overlay .platform-tabs,
body.page-search-center #search-overlay .result-grid-container {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

body.page-search-results #search-overlay .platform-tabs,
body.page-search-results #search-overlay .result-grid-container {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.5s ease 0.2s;
}

.am-speed-popup-container {
    display: flex !important;
    align-items: center;
    gap: 24px;
}

.am-slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.am-slider-horizontal .am-slider-track {
    width: 200px;
    height: 10px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    cursor: ew-resize;
    overflow: hidden;
}

.am-slider-horizontal .am-slider-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: 5px;
    background: var(--apple-red, #24c8fa);
}

.am-slider-horizontal .am-slider-label {
    font-size: 1.6vh;
    color: rgba(255, 255, 255, 0.85);
    min-width: 4vh;
    text-align: center;
}

.am-slider-track {
    position: relative;
    width: 50px;
    height: 180px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 25px;
    overflow: hidden;
    cursor: ns-resize;
    touch-action: none;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.am-slider-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(255,255,255,1.0) 0%, rgba(255, 255,255,0.9) 100%);
    width: 100%;
    height: 33%;
    pointer-events: none;
    transition: height 0.05s linear;
}

.am-slider-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-family: monospace;
}

.quick-speed-presets {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sub-page-overlay {
    position: fixed; 
    inset: 0; 
    z-index: 1000;
    display: none; 
    padding: 12vh 6vw 6vh 6vw;
    overflow-y: auto; 
    backdrop-filter: blur(40px); 
    background: rgba(10, 10, 10, 0.88);
    -webkit-backdrop-filter: blur(40px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(1vh);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}
.sub-page-overlay.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.sub-page-overlay.is-closing { opacity: 0; visibility: hidden; transform: translateY(1vh); pointer-events: none; }

.sub-page-header {
    margin-bottom: 24px;
}

.sub-page-title {
    font-size: 3.5vh;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}

.sub-page-tabs {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
}

.sub-page-tab {
    font-size: 1.8vh;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sub-page-tab.active {
    color: var(--apple-red);
}

.sub-page-tab .count {
    font-size: 1.2vh;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    padding: 2px 6px;
    border-radius: 10px;
}

.sub-page-tab.active .count {
    background: rgba(255, 59, 48, 0.15);
    color: var(--apple-red);
}

.apple-btn {
    border: none;
    outline: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1.5vh;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.apple-btn:active {
    transform: scale(0.97);
}

.apple-btn.primary-btn {
    background: var(--apple-red);
    color: white;
}

.apple-btn.primary-btn:hover {
    background: rgba(36, 200, 250, 0.75);
    filter: brightness(0.85);
}

.apple-btn.secondary-btn {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.apple-btn.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.apple-btn.accent-btn {
    background: linear-gradient(135deg, #0575e6 0%, #00f260 100%);
    color: white;
    border-radius: 20px;
}

.apple-btn.accent-btn:hover {
    opacity: 0.95;
    transform: scale(1.02);
}

.apple-btn.danger-btn {
    background: rgba(255, 59, 48, 0.12);
    color: #ff453a;
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.apple-btn.danger-btn:hover {
    background: rgba(255, 59, 48, 0.2);
}

.playlist-detail-header-container {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.03);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .playlist-detail-header-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.playlist-cover-wrapper {
    position: relative;
    width: 15vh;
    height: 15vh;
    min-width: 120px;
    min-height: 120px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.playlist-cover-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-metadata {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.meta-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.meta-form-row.inline {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.meta-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.25s ease;
    width: 100%;
}

.meta-input:focus {
    border-color: var(--apple-red);
}

.meta-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    font-weight: bold;
}

.playlist-stats-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.playlist-stat-badge {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 4px 10px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.playlist-stat-badge span {
    font-weight: bold;
    color: #fff;
}

.secondary-controls .btn.heart-btn.active svg {
    color: var(--apple-red) !important;
    fill: var(--apple-red) !important;
}

.secondary-controls .btn.reduce-btn.active svg {
    color: var(--apple-red) !important;
    fill: var(--apple-red) !important;
}




.playlists-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 3.5vh;
}
.playlists-header .sub-page-title { margin: 0 0 0.8vh; }
.playlists-intro { margin: 0; color: rgba(255,255,255,0.55); font-size: 1.55vh; }
.playlists-summary { margin-top: 1.2vh; color: var(--apple-red); font-size: 1.35vh; font-weight: 600; }
.playlists-header-actions { display: flex; align-items: center; gap: 10px; }
.playlists-create { min-height: 42px; padding: 11px 18px; white-space: nowrap; }
.playlists-import { min-height: 42px; padding: 11px 18px; white-space: nowrap; }
.playlists-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 1.6vh; }
.playlists-toolbar h2 { margin: 0; color: rgba(255,255,255,0.86); font-size: 1.9vh; font-weight: 700; }
.playlists-tools { display: flex; align-items: center; gap: 10px; }
.playlists-tools .apple-btn { padding: 7px 12px; font-size: 1.3vh; }
#playlists-grid.grid-view { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)) !important; gap: 18px !important; padding: 0 !important; }
.playlist-card { position: relative; min-width: 0; padding: 12px !important; background: linear-gradient(145deg, rgba(255,255,255,0.095), rgba(255,255,255,0.025)) !important; border: 1px solid rgba(255,255,255,0.11); border-radius: 16px; overflow: hidden; transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease; }
.playlist-card:hover { transform: translateY(-4px); border-color: rgba(36,200,250,0.42); background: linear-gradient(145deg, rgba(255,255,255,0.14), rgba(255,255,255,0.045)) !important; }
.playlist-card-cover-wrap { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 11px; background: rgba(255,255,255,0.06); }
.playlist-card-cover { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.playlist-card:hover .playlist-card-cover { transform: scale(1.04); }
.playlist-card-name { margin-top: 12px; overflow: hidden; color: #fff; font-size: 1.65vh; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.playlist-card-description { margin-top: 5px; overflow: hidden; color: rgba(255,255,255,0.48); font-size: 1.25vh; text-overflow: ellipsis; white-space: nowrap; }
.playlist-card-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; color: var(--apple-red); font-size: 1.2vh; font-weight: 600; }
.playlist-card-meta time { overflow: hidden; color: rgba(255,255,255,0.34); font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.batch-pl-checkbox { position: absolute; top: 18px; right: 18px; z-index: 1; display: none; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 4px; color: transparent; background: rgba(10,10,10,0.62); border: 1px solid rgba(255,255,255,0.5); border-radius: 50%; cursor: pointer; backdrop-filter: blur(8px); }
.batch-pl-checkbox svg { width: 16px; height: 16px; }
.batch-pl-checkbox.selected { color: #fff; background: var(--apple-red); border-color: var(--apple-red); }
.playlist-card.batch-mode .batch-pl-checkbox { display: flex; }
.playlists-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10vh 20px; color: rgba(255,255,255,0.48); text-align: center; }
.playlists-empty-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 5px; color: var(--apple-red); background: rgba(36,200,250,0.1); border: 1px solid rgba(36,200,250,0.22); border-radius: 20px; font-size: 32px; }
.playlists-empty strong { color: rgba(255,255,255,0.82); font-size: 1.8vh; }
.playlists-empty span { font-size: 1.35vh; }
.playlists-empty .apple-btn { margin-top: 8px; }
#playlists-grid.list-view { display: flex !important; flex-direction: column; gap: 8px !important; padding: 0 !important; }
#playlists-grid.list-view .playlist-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 10px 14px !important; }
#playlists-grid.list-view .playlist-card-cover-wrap { grid-row: 1 / 3; width: 64px; height: 64px; }
#playlists-grid.list-view .playlist-card-name { margin-top: 0; }
#playlists-grid.list-view .playlist-card-description { margin-top: 3px; }
#playlists-grid.list-view .playlist-card-meta { grid-column: 3; grid-row: 1 / 3; display: flex; flex-direction: column; align-items: flex-end; margin-top: 0; }
#playlists-grid.list-view .batch-pl-checkbox { top: 50%; right: 12px; transform: translateY(-50%); }
#playlists-grid.list-view .playlist-card.batch-mode .playlist-card-meta { padding-right: 34px; }
@media (max-width: 640px) {
    .playlists-header { align-items: flex-start; flex-direction: column; gap: 16px; }
    .playlists-header-actions { align-self: stretch; flex-direction: column; align-items: stretch; }
    .playlists-create { align-self: stretch; }
    .playlists-import { align-self: stretch; }
    .playlists-toolbar { align-items: flex-start; flex-direction: column; }
    .playlists-tools { width: 100%; justify-content: space-between; }
    #playlists-grid.grid-view { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
    .playlist-card { padding: 9px !important; border-radius: 13px; }
    .playlist-card-name { font-size: 1.55vh; }
    #playlists-grid.list-view .playlist-card { grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto auto auto; }
    #playlists-grid.list-view .playlist-card-cover-wrap { width: 52px; height: 52px; grid-row: 1 / 4; }
    #playlists-grid.list-view .playlist-card-meta { grid-column: 2; grid-row: 3; align-items: flex-start; flex-direction: row; margin-top: 6px; }
}

.bgbg.paused-anim {
    animation-play-state: paused !important;
}
body.aer-bg-paused .bgbg {
    animation-play-state: paused !important;
}


@layer aer-core-bar {
    #fixed-genius-bar {
        position: fixed;
        bottom: 2vh;
        left: 50%;
        z-index: 2000;
        width: min(80vh, calc(100vw - 4vh));
        max-width: calc(100vw - 4vh);
        height: 7vh;
        background: rgba(20, 20, 20, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 1.5vh;
        display: flex;
        align-items: center;
        padding: 0 2vh;
        color: #fff;
        transform: translateX(-50%);
        overflow: hidden;
        transition: transform 0.5s ease, opacity 0.5s ease;
    }
    
    #fixed-genius-bar .genius-progress-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 0.4vh;
        background: rgba(255, 255, 255, 0.1);
        overflow: hidden;
    }
    #fixed-genius-bar .genius-progress-fill {
        height: 100%;
        width: 100%;
        background: #fff;
        transform: scaleX(0);
        transform-origin: 0 50%;
        transition: transform 0.1s linear;
    }
    #fixed-genius-bar .fixed-genius-content {
        display: flex;
        align-items: center;
        width: 100%;
        height: 100%;
    }
    #fixed-genius-bar .fixed-actions {
        display: flex;
        align-items: center;
    }
    #fixed-genius-bar .fixed-time-box {
        display: flex;
        flex-direction: column;
        font-size: 1.2vh;
    }
    #fixed-genius-bar .fixed-seek-input {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }
    #fixed-genius-bar .btn {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
}

.cover-box { position: relative; border-radius: 1.3889vh; }
.item-cover-box { position: relative; border-radius: 4px; }
.cover-mask { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.55); border-radius: inherit; pointer-events: none; }
.url-loading > .cover-mask { display: flex; }
.cover-mask-spinner { width: 34%; aspect-ratio: 1; border: 0.35vh solid rgba(255,255,255,0.25); border-top-color: #fff; border-radius: 50%; animation: url-mask-spin 0.8s linear infinite; }
@keyframes url-mask-spin { to { transform: rotate(360deg); } }

.title-meta h1 { cursor: pointer; }
.title-meta h1:hover { opacity: 0.8; }



#fixed-genius-bar .fixed-actions .btn[data-ctl="prev"],
#fixed-genius-bar .fixed-actions .btn[data-ctl="next"] {
    position: relative;
}

#fixed-genius-bar .fixed-actions .btn[data-ctl="prev"]:hover,
#fixed-genius-bar .fixed-actions .btn[data-ctl="next"]:hover {
    background: transparent !important;
}

#fixed-genius-bar .fixed-actions .btn[data-ctl="prev"]:hover::after,
#fixed-genius-bar .fixed-actions .btn[data-ctl="next"]:hover::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1.7em;
    height: 1.7em;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.aer-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200003;
}

.aer-modal-card {
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    width: 94%;
    max-width: 560px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 32px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.aer-modal-overlay.is-open .aer-modal-card {
    transform: scale(1);
}

.aer-modal-title {
    text-align: center;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.aer-modal-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.5;
}

.aer-modal-img {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.aer-modal-song {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.aer-modal-song-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    flex: 1;
}


.share-qr {
    width: 84px;
    height: 84px;
    border-radius: 8px;
    flex: 0 0 auto;
    background: #ffffff;
}

.aer-modal-actions {
    display: flex;
    gap: 12px;
}

.aer-modal-btn {
    flex: 1;
    padding: 11px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.aer-modal-btn.primary {
    background: #ffffff;
    color: #000000;
}

.aer-modal-btn.accent {
    background: var(--apple-red, #24c8fa);
    color: #ffffff;
}

.aer-modal-btn.ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.04);
    font-weight: bold;
}

.aer-modal-input,
.aer-modal-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    padding: 10px;
    box-sizing: border-box;
    outline: none;
    font-family: inherit;
}
