* {
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-style: normal;
    /*   background: linear-gradient(to right, #fce4ec, #f3f5f9); */
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.app-container {
    position: relative;
    width: 100%;
    max-width: 940px;
    margin: 30px;
    background: #fff;
    border-radius: 20px;
    /*   box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1); */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.header {
    font-family: 'IBM Plex Sans', sans-serif;
    /*   background: linear-gradient(45deg, #ff0050, #ff66a6); */
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 24px;
    font-weight: bold;
}

.section {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.controls input,
.controls button {
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.controls input {
    flex: 2;
    border: 1px solid #ccc;
}

.controls button {
    flex: 1;
    background: linear-gradient(135deg, #ff0050, #ff66a6);
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.controls button:hover {
    transform: scale(1.05);
}

.switch-group {
    display: flex;
    flex-direction: row;
    /* chuyển từ column sang row */
    gap: 20px;
    padding: 5px;
    background: #f8f9fc;
    /*   border-radius: 16px; */
    /*  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); */
    justify-content: center;
    font-family: 'Open Sans', sans-serif;
    flex-wrap: wrap;
}

.input-wrapper {
    position: relative;
    width: 300px;
}

#username {
    width: 100%;
    padding-right: 70px;
    /* chừa chỗ cho nút */
    padding-left: 10px;
    height: 46px;
    font-size: 14px;
}

#changeBtn {
    position: absolute;
    right: 0;
    top: 0;
    height: 98%;
    padding: 0 12px;
    border: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
}

#changeBtn:disabled {
    background-color: gray;
    cursor: not-allowed;
}

#toggleBtn {
    position: relative;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    overflow: hidden;
}

#toggleBtn .text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.3s ease;
}

#toggleBtn .connect {
    opacity: 1;
}

#toggleBtn .disconnect {
    opacity: 0;
}

#toggleBtn.connected .connect {
    opacity: 0;
}

#toggleBtn.connected .disconnect {
    opacity: 1;
}

.toggle-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: background 0.3s ease;
    min-width: 200px;
}

.toggle-group span {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.slider {
    width: 48px;
    height: 24px;
    background-color: #ccc;
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 2px;
    top: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.slider.active {
    background-color: #4ade80;
}

.slider.active::before {
    transform: translateX(24px);
}

.tabs {
    display: flex;
    border-top: 1px solid #e03e3e;
    background: #fafafa;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
    border-bottom: 3px solid transparent;
    transition: 0.3s;
}
#chatTab {
    height: 400px;
    overflow-y: auto;
}

.tab-btn.active {
    border-bottom: 3px solid #ff0050;
    color: #ff0050;
    background: #fff;
}



.tab-content {
    font-family: 'IBM Plex Sans', sans-serif;
    display: none;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.4s ease;
    opacity: 1;
}


.chat-item {
    display: flex;
    margin-bottom: 14px;
    align-items: flex-start;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #ff0050;
    margin-right: 10px;
}




.message {
    background: #f1f1f1;
    padding: 12px 16px;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    max-width: 75%;
    line-height: 1.5;
}

.message strong {
    font-weight: bold;
}

.system-section {
    background: #222;
    color: #0f0;
    font-size: 13px;
    padding: 10px 20px;
    max-height: 160px;
    overflow-y: auto;
    display: none;
    font-family: 'IBM Plex Sans', sans-serif;
    border-top: 1px solid #444;
    border-bottom: 1px solid #444;
    position: fixed;
    bottom: 0;
    width: 100%;
    left: 0;
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.toast-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    /* 👈 Thay vì right */
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    z-index: 9999;
}

.toast {
    background: rgba(30, 30, 30, 0.95);
    color: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    max-width: 400px;
}

.toast .time {
    color: #888;
    margin-right: 6px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}



/* Khung chính của YouTube Player */
#youtubePlayerContainer {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    width: 90%;
    max-width: 720px;
    animation: fadeInPopup 0.4s ease;
    overflow: hidden;
}

/* Hiệu ứng xuất hiện */
@keyframes fadeInPopup {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Header của popup */
#youtubePlayerContainer .popup-header {
    background: linear-gradient(135deg, #ff0050, #ff66a6);
    color: white;
    padding: 14px 20px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Nút đóng trong header */
#youtubePlayerContainer .popup-header .close-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#youtubePlayerContainer .popup-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Khung chứa iframe */
#youtubePlayerContainer iframe {
    width: 100%;
    height: 405px;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Nút dưới video nếu có thêm */
#youtubePlayerContainer .control-buttons {
    display: flex;
    justify-content: flex-end;
    padding: 12px 20px;
    background: #f9f9f9;
    gap: 10px;
}

#youtubePlayerContainer .control-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease-in-out;
    font-size: 14px;
}

#youtubePlayerContainer .control-buttons button:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

#youtubePlayerContainer .btn-minimize {
    background: linear-gradient(to right, #ffd700, #ffa500);
    color: #000;
}

#youtubePlayerContainer .btn-close {
    background: linear-gradient(to right, #ff4d4f, #ff1a1a);
    color: #fff;
}


#youtubePlayerContainer {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    padding: 15px;
    transition: all 0.3s ease;
    display: none;
}

#youtubePlayerContainer.minimized {
    position: fixed;
    /* chắc chắn luôn nổi trên */
    bottom: 20px;
    right: 20px;
    top: unset !important;
    left: unset !important;

    width: 280px;
    max-width: 280px;
    max-height: 70px;
    padding: 12px 20px;

    background: linear-gradient(135deg, #fcfcfc 0%, #ff8aad 100%);
    color: white;
    font-size: 15px;
    font-weight: 600;

    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;

    border-radius: 30px;
    /* box-shadow: 0 12px 28px rgba(255, 74, 110, 0.45); */

    overflow: hidden;
    cursor: pointer;

    transition: all 0.3s ease;
}

/* Thêm icon thu nhỏ (ví dụ nút restore bên trong) */
#youtubePlayerContainer.minimized .restore-btn {
    margin-left: auto;
    background: rgba(255 255 255 / 0.25);
    border: none;
    border-radius: 50%;
    width: 32px;
    font-size: 12px;
    height: 32px;
    color: white;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background 0.3s ease;
}

#youtubePlayerContainer.minimized .restore-btn:hover {
    background: rgba(255 255 255 / 0.45);
}


#youtubePlayerContainer.minimized iframe,
#youtubePlayerContainer.minimized .control-buttons,
#youtubePlayerContainer.minimized .popup-header,
#youtubePlayerContainer.minimized .close-btn {
    display: none !important;
}

.control-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.control-buttons button {
    background: #ff0050;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.control-buttons button:hover {
    background: #ff3366;
}

.restore-btn {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    width: 40px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.wave-bar {
    width: 5px;
    height: 8px;
    background: white;
    border-radius: 2px;
    animation: waveAnim 1.2s infinite ease-in-out;
    transform-origin: bottom center;
}

/* Tạo delay cho từng thanh sóng để animation nhấp nhô lần lượt */
.wave-bar:nth-child(1) {
    animation-delay: 0s;
}

.wave-bar:nth-child(2) {
    animation-delay: 0.15s;
}

.wave-bar:nth-child(3) {
    animation-delay: 0.3s;
}

.wave-bar:nth-child(4) {
    animation-delay: 0.45s;
}

.wave-bar:nth-child(5) {
    animation-delay: 0.6s;
}

/* Keyframes cho sóng nhấp nhô */
@keyframes waveAnim {

    0%,
    100% {
        height: 8px;
        background-color: white;
    }

    50% {
        height: 20px;
        background-color: #ff6f91;
    }
}

.player-title {
    font-size: 13px;
    font-weight: bold;
    color: #000000;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.player-title .scrolling-text {
    display: inline-block;
    padding-left: 100%;
    animation: scrollText 12s linear infinite;
}

/* Animation chạy từ phải sang trái */
@keyframes scrollText {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-100%);
    }
}

#micStatustitle {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    height: 24px;
}

.scrolling-text {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-left 12s linear infinite;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}


#micStatus {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    height: 24px;
}



@keyframes scroll-left {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.related-card {
    width: 150px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(to bottom right, #ffffff, #f1f1f1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 10px;
    position: relative;
    animation: fadeInUp 0.6s ease forwards;
}

.related-card img {
    width: 100%;
    height: auto;
    border-bottom: 1px solid #eee;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.related-card div {
    font-size: 13px;
    color: #333;
    margin-top: 8px;
    padding: 0 10px;
    line-height: 1.4;
    font-weight: 600;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card:hover {
    transform: translateY(-8px) scale(1.04);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    background: linear-gradient(to bottom right, #ffe0f0, #f8f8ff);
}

.related-card:hover div {
    color: #ff4081;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.player-frame-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 ratio */
}

#youtubePlayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Ngăn rê chuột trực tiếp */
}

.iframe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    /* nếu bạn muốn bật control khi click thì để auto */
}

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}



@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

#micButton {
    position: absolute;
    bottom: 20px;
    right: 50px;

    width: 220px;
    height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;

    background: linear-gradient(135deg, #ffffff, #ff66a6);
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 40px;
    cursor: pointer;
    /*  box-shadow: 0 3px 10px rgba(255, 0, 80, 0.35); */
    transition: all 0.25s ease-in-out;
    z-index: 10;
}

#micButton:hover {
    transform: scale(1.04);
    background: linear-gradient(135deg, #ff3377, #ff80b3);
    box-shadow: 0 5px 14px rgba(255, 0, 80, 0.45);
}

#micButton:active {
    transform: scale(0.96);
    box-shadow: 0 2px 6px rgba(255, 0, 80, 0.3);
}

.mic-status-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 5px;
    margin-bottom: 5px;
}

.mic-status-text {
    align-items: center;
    color: #1565c0;
    font-size: 15px;
    font-weight: 500;
}

.mic-status-text2 {
    align-items: center;
    color: #c09215;
    font-size: 15px;
    font-weight: 500;
}

.mic-status-text.show {
    opacity: 1;
    transform: translateY(0);
}

@keyframes equalizer {

    0%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(2.4);
    }
}

/* Sidebar nằm ngoài form, trượt từ phải vào */
.song-sidebar-floating {
    position: absolute;
    /* hoặc dùng fixed nếu cần nổi toàn màn */
    top: 80px;
    /* chỉnh theo vị trí form */
    right: -820px;
    /* ẩn ngoài màn hình */
    width: 750px;
    background: #ffffff;
    border-radius: 16px 0 0 16px;
    padding: 16px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: 9999;
    max-height: 100vh;
    overflow-y: auto;
}

.song-sidebar-floating.active {
    right: 0;
    /* trượt vào */
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    /*  background: #fff6fa; */
    border-top-width: medium;
    border-radius: 10px;
    padding: 10px;
}

.song-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.song-list li {
    background: #fce4ec;
    padding: 10px 14px;
    margin-bottom: 10px;
    border-radius: 10px;
    font-size: 15px;
    /*    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.song-list li::before {
    content: "Song";
    margin-right: 3px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

.open-sidebar-btn {
    margin-top: 20px;
    padding: 10px 14px;
    background-color: #ff4081;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

#songQueueList {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 300px;
}

#songQueueList li:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Nút chính */
.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background-color: #4CAF50;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    font-size: 16px;
}

.btn:hover {
    background-color: #45a049;
}

/* Popup nền mờ */
.popup {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

/* Nội dung popup */
.popup-content {
    background-color: white;
    border-radius: 10px;
    width: 320px;
    margin: 10% auto;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
    padding: 20px;
    animation: slideDown 0.3s ease;
}

/* Header */
.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.popup-header h2 {
    font-size: 18px;
    margin: 0;
}

.close {
    font-size: 22px;
    cursor: pointer;
}

/* Item cài đặt */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.setting-item div span {
    display: block;
    font-weight: bold;
}
.setting-item div small {
    display: block;
    color: #888;
    font-size: 12px;
    margin-top: 2px;
}
/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    background-color: #ccc;
    border-radius: 34px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .3s;
}

input:checked+.slider {
    background-color: #4CAF50;
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Nút nhỏ gọn, bo tròn, bóng đổ, icon-only */
.song-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.song-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* Mỗi loại nút màu riêng */
.song-btn.skip {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.song-btn.delete {
    background-color: #ffebee;
    color: #c62828;
}

.song-btn.priority {
    background-color: #e3f2fd;
    color: #1565c0;
}


.input-row {
    display: flex;
    gap: 8px;
    padding: 10px;
    background: #f7f7f7;
    border-radius: 8px;
    margin: 8px 0;
}
.input-row input {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    outline: none;
}
.input-row button {
    background-color: #4CAF50;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
}
.input-row button:hover {
    background-color: #45a049;
}

/* Nút đổi tên */
.bot-name-actions button {
    background-color: #2196F3;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 14px;
}
.bot-name-actions button:hover {
    background-color: #1976D2;
}



.related-video-wrapper {
    margin-top: 50px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: flex-start;
}



.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.related-card img {
    width: 100%;
    height: auto;
    display: block;
}

.related-card-title {
    font-size: 13px;
    color: #333;
    padding: 8px;
    text-align: center;
    font-weight: 500;
    background: #fafafa;
    height: 55px;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.scrolling-text2 {
    display: inline-block;
    white-space: nowrap;
    animation: scroll-left 8s linear infinite;
}


.btn-control {
    padding: 9px 8px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    transition: 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.btn-control i {
    font-size: 14px;
}

/* Mỗi loại màu riêng */
.btn-priority {
    background-color: #ffe082;
    color: #795548;
}

.btn-priority:hover {
    background-color: #ffd54f;
}

.btn-delete {
    background-color: #ffcdd2;
    color: #c62828;
}

.btn-delete:hover {
    background-color: #ef9a9a;
}

.btn-skip {
    background-color: #64b5f6;
    color: #fff;
}

.btn-skip:hover {
    background-color: #42a5f5;
}



#giftContainer {
    position: fixed;
    top: 20%;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
}

/* Container quà tặng */
.gift-item {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #ff7e5f, #feb47b);
    border-radius: 50px;
    padding: 10px 18px;
    margin-bottom: 12px;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 8px 20px rgba(255, 126, 95, 0.5);
    user-select: none;
    max-width: 380px;
    animation: giftSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: relative;
    overflow: visible;
  }
  
  /* Avatar người tặng */
  .user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 16px;
    border: 3px solid #fff;
    box-shadow:
      0 0 6px 2px rgba(255, 126, 95, 0.6),
      0 2px 10px rgba(255, 126, 95, 0.4);
    transition: transform 0.3s ease;
  }
  .gift-item:hover .user-avatar {
    transform: scale(1.1);
  }
  
  /* Ảnh quà */
  .gift-img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: contain;
    margin-right: 18px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
  }
  .gift-item:hover .gift-img {
    transform: scale(1.1);
  }
  
  /* Text chứa tên người và quà */
  .gift-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
  }
  
  /* Tên người tặng */
  .gift-user {
    font-weight: 800;
    font-size: 18px;
    color: #fff;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    text-shadow:
      0 0 8px rgba(255, 255, 255, 0.9),
      0 2px 8px rgba(255, 126, 95, 0.8);
  }
  
  /* Tên quà tặng */
  .gift-name {
    font-size: 15px;
    color: #ffe0c0;
    margin-top: 3px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  }
  
  /* Combo count số lượng */
  .gift-count {
    font-size: 30px;
    font-weight: 900;
    color: #fff;
    margin-left: 20px;
    min-width: 52px;
    text-align: center;
    user-select: none;
    text-shadow:
      0 0 10px #fff,
      0 0 20px #ff6f00,
      0 0 30px #ff6f00;
    animation: glowPulse 2s infinite ease-in-out;
  }
  
  /* Hiệu ứng nhảy số */
  .combo-bounce {
    animation: bounceScale 0.35s ease;
  }
  
  /* Hiệu ứng xuất hiện mượt hơn */
  .gift-enter {
    animation: giftSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  
  /* Hiệu ứng biến mất */
  .gift-exit {
    animation: giftSlideOut 0.4s ease forwards;
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
  }
  
  /* Keyframes */
  @keyframes bounceScale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.5); }
  }
  
  @keyframes giftSlideIn {
    0% {
      transform: translateX(-120%) scale(0.8);
      opacity: 0;
    }
    60% {
      transform: translateX(15px) scale(1.05);
      opacity: 1;
    }
    80% {
      transform: translateX(-5px) scale(0.98);
    }
    100% {
      transform: translateX(0) scale(1);
    }
  }
  
  @keyframes giftSlideOut {
    0% {
      opacity: 1;
      transform: translateX(0) scale(1);
    }
    100% {
      opacity: 0;
      transform: translateX(120%) scale(0.8);
    }
  }
  
  @keyframes glowPulse {
    0%, 100% {
      text-shadow:
        0 0 10px #fff,
        0 0 20px #ff6f00,
        0 0 30px #ff6f00;
    }
    50% {
      text-shadow:
        0 0 15px #fff,
        0 0 30px #ff9100,
        0 0 40px #ff9100;
    }
  }
  .input-icon {
    display: flex;
    align-items: center; /* Căn giữa icon và chữ theo chiều dọc */
    border: 1px solid #fa4b4b;
    border-radius: 8px;
    padding: 0 10px;
    background: #000000;
    width: fit-content;
}

.input-icon .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px; /* Khoảng cách icon với chữ */
}

.input-icon input {
    border: none;
    outline: none;
    color: white;
    font-size: 14px;
    background: transparent;
    padding: 8px 0; /* Căn chữ thẳng hàng */
}


.song-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin: 6px 0;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.2s ease-in-out;
}
.song-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.song-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.song-avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.song-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.song-title {
    font-weight: bold;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-sub {
    font-size: 13px;
    color: #777;
}

.song-right {
    display: flex;
    gap: 6px;
}

.btn-control {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s ease-in-out;
    color: white;
}

.btn-control.priority {
    background: #ff9800;
}
.btn-control.priority:hover {
    background: #e68900;
}

.btn-control.delete {
    background: #f44336;
}
.btn-control.delete:hover {
    background: #d32f2f;
}

.btn-control.skip {
    background: #2196f3;
}
.btn-control.skip:hover {
    background: #1976d2;
}



.gpt-chat-container {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#gptMessages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.gpt-input-bar {
    position: fixed;

    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    gap: 5px;
    padding: 10px;
    background: #fff;
    border-top: 1px solid #eee;
    z-index: 1000;
}

.gpt-input-bar input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
}

.gpt-input-bar button {
    padding: 8px 14px;
    background: linear-gradient(45deg, #ff4e91, #ff7eb3);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
}
.admin-test-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
    max-width: auto;
    margin: 15px auto;
    animation: fadeIn 0.3s ease;
}

.admin-test-container input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #444;
    border-radius: 6px;
    outline: none;
    background: #2c2c2c;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.2s;
}

.admin-test-container input:focus {
    border-color: #ff4f70;
}

.admin-test-container button {
    background: linear-gradient(45deg, #ff4f70, #ff7f50);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.2s, background 0.3s;
}

.admin-test-container button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #ff6b81, #ffa07a);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}



   /* Nút thêm quà */
   .add-btn {
    margin-top: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
}
.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* Card quà */
.gift-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 16px 20px;
    margin-top: 16px;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
    transition: 0.3s ease;
    max-width: 980px;
}
.gift-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
}

/* Trái */
.gift-left {
    display: flex;
    align-items: center;
    gap: 18px;
}
.gift-icon {
    font-size: 28px;
    background: #f0f0f3;
    padding: 8px;
    border-radius: 10px;
}
.gift-controls {
    display: flex;
    gap: 10px;
}

.btn-outline {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #d0d0d5;
    background: #fafafa;
    font-size: 13px;
    cursor: pointer;
    transition: 0.25s;
}
.btn-outline:hover {
    background: #f3f3f5;
}

/* Phải */
.gift-right {
    display: flex;
    gap: 10px;
}
.btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    color: white;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: 0.25s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.btn.blue { background: #3b82f6; }
.btn.green { background: #10b981; }
.btn.red { background: #ef4444; }
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}