/* Playlist UI Styles - Spotify-like */
.playlist-bottom-sheet {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    visibility: hidden;
}

.playlist-bottom-sheet.active {
    visibility: visible;
}

.sheet-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.playlist-bottom-sheet.active .sheet-backdrop {
    opacity: 1;
}

.sheet-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #1a183f;
    border-radius: 12px 12px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.playlist-bottom-sheet.active .sheet-container {
    transform: translateY(0);
}

.sheet-drag-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 12px auto;
    cursor: grab;
}

.sheet-header {
    padding: 0 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sheet-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    text-align: center;
}

.track-info {
    text-align: center;
}

.track-name {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.sheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

/* Playlist Items */
.playlists-list {
    margin-bottom: 16px;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 0 15px;
    transition: background 0.2s ease;
    cursor: pointer;
    gap: 15px;
    margin-bottom: 15px;
}

.playlist-item:active {
    background: rgba(255, 255, 255, 0.1);
}

.playlist-cover {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    background: linear-gradient(135deg, #1db954, #1ed760);
}

.playlist-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-checked {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(29, 185, 84, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.playlist-info {
    flex: 1;
}

.playlist-name {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: white;
    margin-bottom: 2px;
}

.playlist-meta {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.playlist-action {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon {
    width: 20px;
    height: 20px;
    transition: all 0.2s ease;
}

.action-icon.checked {
    filter: brightness(0) saturate(100%) invert(52%) sepia(98%) saturate(415%) hue-rotate(90deg) brightness(95%) contrast(85%);
}

.create-playlist-option {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
}

.create-playlist-option .playlist-icon {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.icon-plus {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.empty-playlists {
    text-align: center;
    padding: 40px 24px;
    color: rgba(255, 255, 255, 0.6);
}

/* Full Screen Create Playlist Modal */
.playlist-full-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #131229;
    background: linear-gradient(90deg, #131229 0%, #170837 100%);
    background: -moz-linear-gradient(90deg, #131229 0%, #170837 100%);
    background: -webkit-linear-gradient(90deg, #131229 0%, #170837 100%);
    z-index: 10001;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.playlist-full-modal.active {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-back-btn {
    background: none;
    border: none;
    color: white;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.modal-back-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.modal-title {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin: 0;
}

.header-spacer {
    width: 40px;
}

.modal-content {
    flex: 1;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
}



.playlist-name-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.playlist-name-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    
}

.action-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.btn-cancel, .btn-create {
    padding: 8px 25px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgb(255 255 255 / 10%);
}

.btn-cancel:active {
    background: rgba(255, 255, 255, 0.2);
}

.btn-create {
    background: #673de6;
    color: white;
        border: 1px solid rgb(103 61 230 / 28%);
}

.btn-create:active {
    background: #1ed760;
}

.btn-create:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

/* Toast Notification */
.playlist-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 10002;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.playlist-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.sheet-content::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.sheet-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Responsive */
@media (max-width: 768px) {
    .playlist-header-view {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .playlist-cover-large {
        width: 140px;
        height: 140px;
    }
}


/* PLAYLIST CARD STYLE */

.playlist-tracks-cards .gs-card { background: none;  padding: 0; margin-bottom: 15px;}
.playlist-tracks-cards .gs-card .gs-time-wrap, .playlist-tracks-cards .gs-card .gs-fav {display: none;}
.playlist-tracks-cards .gs-card .gs-cover {   width: 55px;    height: 55px;}