
:root {
    --nct-bg-dark: #0f1c1b;
    --nct-bg: #142524;
    --nct-bg-soft: #1a2e2c;

    --nct-glass: rgba(20, 37, 36, 0.85);
    --nct-glass-soft: rgba(255,255,255,0.05);

    --nct-line: rgba(255,255,255,0.08);

    --nct-text-sub: #9fb2ad;
    --nct-accent: #00d2d3;
    --nct-danger: #ff4d4f;
}
/* ================= EXTRA COLUMN ================= */
.playlist-extra {
    position: relative; /* quan trọng để popup căn từ nút 3 chấm */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================= BUTTON 3 CHẤM ================= */
.btn-row-more {
    background: none;
    border: none;
    color: var(--nct-text-sub);
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
}

/* ================= POPUP ================= */
.row-popup {
    position: absolute;
    top: 100%; /* ngay dưới nút */
    right: 0;  /* căn phải với nút */
    margin-top: 6px; /* khoảng cách nhỏ */
    background: var(--nct-glass);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid var(--nct-line);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    overflow: hidden;
    min-width: 180px;
    display: none;
    z-index: 50;
    transition: all 0.15s ease;
}

.row-popup.show {
    display: block;
}

/* Các popup-item */
.popup-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.popup-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.popup-item i {
    width: 18px;
    text-align: center;
    font-size: 16px;
}

/* Heart đã thích */
.popup-item i.fa-heart.favorited {
    color: #ff4d4f;
}

/* Nút xóa */
.popup-item.danger {
    color: #ff4d4f;
}

.popup-item.danger:hover {
    background: #ff4d4f;
    color: #fff;
}





/* ===== POPUP CHỌN PLAYLIST ===== */
    .playlist-popup-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .5);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
    }

    .playlist-select-popup {
        background: #2d2d2d;
        border-radius: 12px;
        padding: 12px;
        min-width: 250px;
    }

    .playlist-select-item {
        padding: 8px 12px;
        cursor: pointer;
        color: #fff;
        border-bottom: 1px solid var(--nct-line);
    }

    .playlist-select-item:hover {
    background: rgba(255,255,255,0.08);
    }

    .playlist-select-close {
        text-align: center;
        padding: 8px;
        cursor: pointer;
        font-weight: bold;
    }



.playlist-select-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background 0.2s;
}

.playlist-select-item:hover {
    background: rgba(255,255,255,0.1);
}

/* Checkbox nhỏ kiểu YouTube */
.playlist-select-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--nct-accent);
    cursor: pointer;
}
















    /* Heart icon mặc định (chưa thích) */
    .popup-item i.fa-heart {
        color: #fff;
        /* trắng hoặc màu mặc định */
        transition: color 0.2s ease;
    }

    /* Heart đã thích */
    .popup-item i.fa-heart.favorited {
        color: #ff4d4f;
        /* đỏ */
    }











    .btn-heart-playlist {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #fff;
}

.btn-heart-playlist.favorited i {
    color: #ff4d4f;
}












.btn-share,
.btn-heart-playlist {
    display: inline-flex;       /* cho icon và chữ nằm ngang */
    align-items: center;        /* căn giữa theo chiều dọc */
    gap: 8px;                   /* khoảng cách giữa icon và chữ */
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--nct-line);
    color: #fff;
    padding: 8px 12px;         /* giảm padding quá rộng nếu muốn */
    border-radius: 999px;
    font-size: 16px;
    cursor: pointer;
}
.btn-share i,
.btn-heart-playlist i {
    font-size: 16px;
    /* không cần margin nữa vì đã dùng gap */
}















.playlist-cover-big {
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
}

.playlist-cover-big img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay */
.playlist-cover-edit {
    position: absolute;
    inset: 0;
    background: rgba(15,28,27,0.6);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: opacity .2s ease;
}

/* icon */
.playlist-cover-edit i {
    font-size: 22px;
}

/* CHỈ chủ playlist mới hover được */
.playlist-cover-big.editable:hover .playlist-cover-edit {
    opacity: 1;
    cursor: pointer;
}












/* Overlay */
.playlist-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,28,27,0.55);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

.playlist-popup-overlay.show {
    opacity: 1;
    pointer-events: all;
}

/* Popup */
.playlist-select-popup {
    background: rgba(20,37,36,0.9);
    border: 1px solid var(--nct-line);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 16px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 12px 32px rgba(0,0,0,0.6);
    color: #fff;

    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.playlist-popup-overlay.show .playlist-select-popup {
    transform: scale(1);
    opacity: 1;
}

/* Header */
.tieude {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
}

.tieude .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}

.tieude .close-btn:hover { color: #fff; }

/* Form wrap */
.edit-playlist-form-wrap { display: flex; gap: 24px; flex-wrap: wrap; }

/* Cover */
.cover-wrap { position: relative; width: 160px; height: 160px; border-radius: 12px; overflow: hidden; flex-shrink: 0; cursor: pointer; background: rgba(255,255,255,0.05); backdrop-filter: blur(12px);}
.cover-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; border-radius: 12px; }
.cover-wrap:hover img { transform: scale(1.05); }
.cover-wrap .edit-wrap { position: absolute; inset:0; background: rgba(0,0,0,0.4); display: flex; flex-direction: column; align-items: center; justify-content: center; gap:6px; color:#fff; opacity:0; transition: opacity 0.3s; border-radius:12px;}
.cover-wrap:hover .edit-wrap { opacity:1; }

/* Playlist info */
.playlist-info { flex:1; display:flex; flex-direction:column; gap:12px;}
#playlistNameInput { width:100%; padding:12px; border-radius:10px; border:none;   background: rgba(255,255,255,0.06); color:#fff; font-size:16px; resize:none; }
#playlistNameInput:focus { background: rgba(255,255,255,0.1); outline:none; }
.value-count { font-size:12px; color:#aaa; text-align:right; }
.radio-wrap span { color:#ccc; font-size:14px; }
.radio-options { display:flex; gap:16px; margin-top:6px; }
.radio-options input[type="radio"] { accent-color: var(--nct-accent); margin-right:6px; }

/* Buttons */
.btn-wrap { display:flex; gap:12px; margin-top:16px; }
.cancel-btn, .submit-btn { flex:1; padding:12px; border-radius:10px; border:none; font-size:16px; font-weight:500; cursor:pointer; transition: background 0.2s, transform 0.1s;}
.cancel-btn { background: rgba(255,255,255,0.06); color:#fff; }
.cancel-btn:hover { background: rgba(255,255,255,0.12); }
.submit-btn { background: rgba(0,210,211,0.85); color:#fff; }
.submit-btn:hover { background: rgba(0,210,211,1); }
.cancel-btn:active, .submit-btn:active { transform: scale(0.97); }






