* { box-sizing: border-box; }

html, body {
    font-family: 'Circular', 'Segoe UI', Tahoma, sans-serif;
    background-color: #121212;
    color: #ffffff;
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden; 
    overscroll-behavior: none; 
}

.main-layout {
    display: flex;
    height: 100vh;
    height: 100dvh;
    width: 100%;
}

.player-sidebar {
    width: 350px;
    background-color: #121212;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    border-right: 1px solid #282828;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.sidebar-content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: hidden; 
    justify-content: flex-start; 
}


.sidebar-footer {
    margin-top: auto; 
    padding-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 0.7rem;
    color: #727272;
    flex-shrink: 0;
}

.sidebar-footer a {
    color: #727272;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
    cursor: pointer; 
}

.sidebar-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.playlist-area {
    flex-grow: 1;
    background: linear-gradient(180deg, #1e1e1e 0%, #121212 100%);
    padding: 40px;
    overflow-y: auto;
    overflow-x: hidden; 
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
}

.brand-header { 
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-shrink: 0;
}

.brand-header h2 { margin: 0; color: #ffffff; font-size: 1.5rem; }

.mole-logo {
    width: 60px; height: 60px; border-radius: 50%;
    object-fit: cover; box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

p#current-track { 
    font-size: 1.2em; 
    color: #ffffff; 
    margin-bottom: 30px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%; 
    padding: 0 5px;
}

.icon {
    width: 20px; height: 20px; fill: currentColor; display: block;
}

.action-btn {
    background-color: transparent;
    border: 1px solid #727272;
    color: #fff;
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.action-btn:hover { 
    border-color: #fff; 
    background-color: rgba(255,255,255,0.1); 
}
.action-btn .icon { width: 18px; height: 18px; }

#install-btn {
    display: none; 
    border-color: #1DB954;
    color: #1DB954;
}
#install-btn:hover {
    background-color: #1DB954;
    color: #000;
}

.custom-player-ui {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 0.75rem;
    font-family: monospace;
    color: #b3b3b3;
}

input[type=range] {
    -webkit-appearance: none; 
    width: 100%; 
    background: #4d4d4d;
    cursor: pointer; 
    height: 4px;
    border-radius: 2px;
}
input[type=range]:focus { outline: none; }

input[type=range]::-webkit-slider-runnable-track {
    width: 100%; height: 4px; cursor: pointer; background: transparent; border-radius: 2px;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; 
    height: 12px; 
    width: 12px; 
    border-radius: 50%;
    background: #ffffff; 
    margin-top: -4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5); 
    transition: transform 0.1s;
}

input[type=range]:hover::-webkit-slider-thumb { 
    transform: scale(1.2); 
    background: #ffffff; 
}

input[type=range]::-moz-range-track { 
    width: 100%; height: 4px; cursor: pointer; background: transparent; border-radius: 2px; 
}
input[type=range]::-moz-range-thumb { 
    height: 12px; width: 12px; border: none; border-radius: 50%; background: #ffffff; 
}

.controls-wrapper {
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 15px; 
    width: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.controls-wrapper:has(.volume-wrapper:hover), 
.controls-wrapper:has(.volume-wrapper:focus-within) {
    transform: translateX(-60px); 
}

.control-btn, #play-pause-btn { flex-shrink: 0; }

.control-btn {
    background: transparent; border: none; color: #b3b3b3; cursor: pointer;
    transition: color 0.2s; 
    display: flex; align-items: center; justify-content: center; 
    padding: 0;
    width: 32px; height: 32px; 
}
.control-btn:hover { color: #fff; }
.control-btn.active { color: #1DB954; position: relative;}
.control-btn.active::after {
    content: '•'; position: absolute; bottom: -8px; font-size: 14px; color: #1DB954;
}

#play-pause-btn {
    width: 50px; height: 50px; 
    border-radius: 50%; background-color: #ffffff; color: #000000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); 
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s, background-color 0.2s; border: none; cursor: pointer;
    margin: 0 5px;
}
#play-pause-btn:hover { transform: scale(1.05); }
#play-pause-btn:active { transform: scale(0.95); }

#play-pause-btn svg { width: 20px; height: 20px; fill: currentColor; }
#play-pause-btn .play-icon { margin-left: 2px; }
#play-pause-btn .pause-icon { margin-left: 0; }

.volume-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.volume-slider-container {
    width: 0; 
    opacity: 0;
    overflow: hidden;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, margin-left 0.3s ease;
    display: flex;
    align-items: center;
    margin-left: 0;
}

.volume-wrapper:hover .volume-slider-container,
.volume-wrapper:focus-within .volume-slider-container {
    width: 80px; 
    opacity: 1;
    margin-left: 10px;
}

#volume-slider::-webkit-slider-thumb {
    height: 10px; width: 10px; margin-top: -3px;
}


.playlist-header {
    font-size: 2rem; font-weight: bold; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid #333;
    display: flex; justify-content: space-between; align-items: center;
}

.track-item {
    padding: 12px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95rem;
    color: #b3b3b3;
    display: flex;
    align-items: center;
    overflow: hidden; 
}

.track-item:hover { background-color: rgba(255,255,255,0.1); color: #fff; }
.track-item.active { color: #1DB954; font-weight: bold; background-color: rgba(29, 185, 84, 0.1); }

.playlist-container { counter-reset: track-counter; }

.track-item::before {
    counter-increment: track-counter;
    content: counter(track-counter);
    margin-right: 20px;
    min-width: 25px; 
    text-align: right;
    font-variant-numeric: tabular-nums;
    opacity: 0.6;
    flex-shrink: 0; 
}

.track-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1; 
    min-width: 0; 
}

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85); z-index: 2000;
    display: none; justify-content: center; align-items: center;
    backdrop-filter: blur(5px); opacity: 0; transition: opacity 0.3s ease;
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal-content {
    background: #121212; border: 1px solid #282828; padding: 40px;
    border-radius: 10px; max-width: 600px; width: 90%; max-height: 90vh;
    overflow-y: auto; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    text-align: left;
}
.modal-content h1 { margin-top: 0; font-size: 1.8rem; margin-bottom: 20px; border-bottom: 1px solid #333; padding-bottom: 15px;}
.modal-content h2 { margin-top: 25px; font-size: 1.2rem; color: #fff; }
.modal-content h3 { color: #fff; margin-top: 20px; font-size: 1.1rem; }
.modal-content p { color: #b3b3b3; line-height: 1.6; margin-bottom: 15px; }
.modal-content a { color: #1DB954; text-decoration: none; }
.modal-content a:hover { text-decoration: underline; }
.close-modal-btn {
    position: absolute; top: 15px; right: 15px; background: transparent;
    border: none; color: #727272; font-size: 1.5rem; cursor: pointer; transition: color 0.2s;
}
.close-modal-btn:hover { color: #fff; }
.about-center { text-align: center; }
.about-logo { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.version-tag { color: #1DB954; font-weight: bold; margin-bottom: 20px; display: block; }
.discord-highlight { color: #5865F2; font-weight: bold; }
.legal-warning { border: 1px solid #b91d1d; background-color: rgba(185, 29, 29, 0.1); padding: 15px; border-radius: 5px; margin-top: 20px; font-size: 0.9rem; color: #ffb3b3; }
.specs-box { background-color: #1e1e1e; padding: 15px; border-radius: 8px; margin: 20px 0; font-size: 0.9rem; color: #ccc; text-align: left; }


::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #121212; }
::-webkit-scrollbar-thumb { background: #535353; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #888; }

.bottom-fade-overlay {
    position: fixed; 
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px; 
    background: linear-gradient(to bottom, rgba(18, 18, 18, 0) 0%, #121212 90%);
    pointer-events: none; 
    z-index: 90; 
}

.sidebar-divider { height: 1px; background: #282828; margin: 20px 0; width: 100%; flex-shrink: 0; }
.sidebar-section-title { color: #b3b3b3; font-size: 0.75rem; font-weight: bold; margin-bottom: 10px; letter-spacing: 1px; text-transform: uppercase; }

.my-playlists {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 0 1 auto; 
    overflow-y: auto;     
    min-height: 0;        
    margin-bottom: 10px;  
    scrollbar-width: thin; 
    scrollbar-color: #535353 transparent;
}


.my-playlists::-webkit-scrollbar { width: 6px; }
.my-playlists::-webkit-scrollbar-track { background: transparent; }
.my-playlists::-webkit-scrollbar-thumb { background-color: #535353; border-radius: 10px; }


.my-playlists li { padding: 8px 10px; color: #b3b3b3; cursor: pointer; border-radius: 4px; font-size: 0.9rem; transition: color 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-playlists li:hover { color: #fff; background: rgba(255,255,255,0.05); }
.my-playlists li.active { color: #fff; font-weight: bold; border-left: 3px solid #1DB954; padding-left: 7px; background: rgba(255,255,255,0.02); }


.add-playlist-btn {
    background: transparent;
    border: 1px dashed #727272; 
    color: #727272;             
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    flex-shrink: 0; 
    margin-top: 5px;
    

    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.add-playlist-btn:hover {
    border-color: #fff;
    color: #fff;
}


#context-menu { position: absolute; z-index: 5000; background: #282828; border-radius: 4px; padding: 5px 0; min-width: 160px; box-shadow: 0 5px 15px rgba(0,0,0,0.5); display: none; border: 1px solid #444; }
.ctx-item { padding: 10px 15px; font-size: 0.85rem; color: #fff; cursor: pointer; transition: background 0.1s; display: block; text-decoration: none; }
.ctx-item:hover { background: #3e3e3e; }
.ctx-divider { height: 1px; background: #444; margin: 5px 0; }
.ctx-danger { color: #ff5555; }
.ctx-header { padding: 8px 15px; color: #888; font-size: 0.75rem; border-bottom: 1px solid #444; margin-bottom: 5px; font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.notification-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #1DB954; 
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    pointer-events: none;
    text-align: center;
    min-width: 200px;
}
.notification-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.notification-toast.error { background-color: #E91429; } 


.custom-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8); z-index: 9000;
    display: none; justify-content: center; align-items: center;
    backdrop-filter: blur(4px);
}
.custom-modal-box {
    background: #282828; border-radius: 8px; padding: 25px; width: 320px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8); text-align: center;
}
.custom-modal-title { color: #fff; font-weight: bold; margin-bottom: 15px; font-size: 1.1rem; }
.custom-modal-input {
    width: 100%; padding: 10px; border-radius: 4px; border: 1px solid #444;
    background: #121212; color: #fff; margin-bottom: 20px; font-size: 1rem;
}
.custom-modal-input:focus { outline: none; border-color: #1DB954; }
.custom-modal-actions { display: flex; justify-content: center; gap: 10px; }
.btn-modal { padding: 10px 20px; border-radius: 20px; border: none; cursor: pointer; font-weight: bold; font-size: 0.9rem; transition: transform 0.1s;}
.btn-modal:active { transform: scale(0.95); }
.btn-cancel { background: transparent; color: #b3b3b3; border: 1px solid #535353; }
.btn-confirm { background: #1DB954; color: #000; }


.mole-inline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin: 0 2px;
    animation: moleWiggle 2s infinite ease-in-out;
}

@keyframes moleWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}

.about-description {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 25px;
    line-height: 1.6;
}

.specs-box-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #333;
}

.spec-item {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.spec-label {
    font-size: 0.75rem;
    color: #727272;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.spec-value {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 600;
}

/* Zone Changelog */
.changelog-box {
    text-align: left;
    margin-bottom: 30px;
    padding: 0 10px;
}

.changelog-box h3 {
    font-size: 1.1rem;
    color: #1DB954;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    color: #b3b3b3;
    font-size: 0.95rem;
    line-height: 1.5;
}

.feature-list li::before {
    content: "•";
    color: #1DB954;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0px;
}

.feature-list strong {
    color: #fff;
}

.about-footer {
    margin-top: 20px;
    border-top: 1px solid #333;
    padding-top: 20px;
}

.community-link {
    color: #5865F2; 
    text-decoration: none; 
    font-weight: bold;
}
.community-link:hover {
    text-decoration: underline;
}

.contact-box {
    background: #181818;
    padding: 12px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #333;
    margin-top: 10px;
}

.discord-tag {
    color: #5865F2; 
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 768px) {
    html, body {
        overflow-y: auto !important; 
        height: auto !important;      
        -webkit-overflow-scrolling: touch; 
    }
    .main-layout {
        display: block; 
        height: auto !important; 
        overflow: visible !important;
    }
    .player-sidebar {
        width: 100%;
        padding: 20px;
        border-right: none;
        border-bottom: 1px solid #333;
        height: auto;
        padding-bottom: 20px; 
        background-color: #121212;
    }

    .playlist-area {
        overflow: visible;
        height: auto;
        padding: 20px 5px; 
        padding-bottom: calc(100px + env(safe-area-inset-bottom)); 
    }
    
    .sidebar-footer {
        margin-top: 20px;
    }

   
    .track-item {
        padding: 10px 5px; 
    }

    .track-item::before {
        margin-right: 8px; 
        min-width: 20px; 
        font-size: 0.85rem; 
    }

    .specs-box-modern {
        grid-template-columns: 1fr;
    }
    .spec-item {
        flex-direction: row;
        justify-content: space-between;
        border-bottom: 1px solid #333;
        padding-bottom: 8px;
        gap: 15px;
    }
    .spec-item:last-child {
        border-bottom: none;
    }
}

.playlist-header {
    
    display: flex;
    align-items: center;
    gap: 20px; 
    font-size: 2rem; 
    font-weight: bold; 
    margin-bottom: 20px; 
    padding-bottom: 10px; 
    border-bottom: 1px solid #333;
    justify-content: flex-start;
    gap: 15px;
}

.pixel-cat {
    height: 48px; 
    width: auto;
    
    
    image-rendering: pixelated; 
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 768px) {
    .pixel-cat {
        display: none !important;
    }
}