@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(
        135deg,
        #0f1c1b 0%,
        #142524 50%,
        #0f1c1b 100%
    );
    color: #ffffff;
    overflow-x: hidden;
}


.container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: rgba(20, 37, 36, 0.95);
    padding: 20px;
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #1a1f2e;
}

.logo-text h2 {
    font-size: 18px;
    margin-bottom: 2px;
}

.logo-text p {
    font-size: 11px;
    color: #a0aec0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: #a0aec0;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.nav-section {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 12px;
    color: #718096;
    text-transform: uppercase;
    font-weight: 600;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 50px;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    background: rgba(20, 37, 36, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.back-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.back-btn i {
    font-size: 18px;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 20px 12px 40px; /* chừa chỗ cho icon bên trái */
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 25px;
    color: #fff;
    font-size: 14px;
}

.search-bar .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #a0aec0;
    pointer-events: none; /* để click vẫn focus input */
}


.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.header-actions button {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-premium {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ffb0fb54 0%, #fdc8ff2d 100%);
    border: none;
    border-radius: 20px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-premium i {
    font-size: 16px;
}

.btn-vip {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.btn-register {
    padding: 10px 20px;
    background: #06b6d4;
    border: none;
    border-radius: 20px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

/* Content Section */
.content-section {
    padding: 30px 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h1 {
    font-size: 32px;
    font-weight: 700;
}

.section-header a {
    color: #06b6d4;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Chart Cards */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.chart-card {
    background: rgba(255, 255, 255, 0.035);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.chart-card:hover {
    /* transform: translateY(-5px); */
    background: rgba(255, 255, 255, 0.07);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.play-btn-small {
    width: 36px;
    height: 36px;
    background: #06b6d4;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.play-btn-small i {
    font-size: 14px;
}

/* Song List */
.song-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

.song-item:hover {
    background: rgba(255, 255, 255, 0.07);
}


.song-rank {
    font-size: 18px;
    font-weight: 700;
    color: #718096;
    width: 30px;
    text-align: center;
}

.song-rank.top {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.song-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    position: relative;
    overflow: hidden;
}

.song-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.song-thumbnail i {
    font-size: 20px;
    color: #fff;
}

.song-info {
    flex: 1;
}

.song-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.song-artist {
    font-size: 12px;
    color: #a0aec0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    padding: 2px 6px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    border-radius: 4px;
    font-size: 10px;
    color: #ef4444;
    font-weight: 600;
}

.song-label {
    font-size: 11px;
    color: #718096;
}

.song-label i {
    font-size: 10px;
    margin-right: 4px;
}

/* Music Player */
.music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 28, 27, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);  
    backdrop-filter: blur(20px);
    padding: 14px 30px;
    z-index: 1000;
}

.player-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.player-song-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.player-thumbnail {
    position: relative;
    width: 56px;          /* hoặc size bạn muốn */
    height: 56px;
    border-radius: 8px;
    overflow: hidden;     /* 🔥 QUAN TRỌNG NHẤT */
    flex-shrink: 0;
    background: #1f2933;
}

.player-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;    /* luôn phủ khung */
    display: block;
    border-radius: inherit;
    transition: transform 0.3s ease, filter 0.25s ease;
}


.player-details {
    flex: 1;
    min-width: 0;
}

/* TITLE – nhỏ lại 1 chút */
.player-title {
    font-size: clamp(13px, 1.2vw, 16px);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 2px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ARTIST – nhỏ hơn title */
.player-artist {
    font-size: clamp(11px, 1vw, 13px);
    color: #a0aec0;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn i {
    font-size: 16px;
}

.play-btn {
    width: 38px;
    height: 38px;
    background: #fff;
    border-radius: 50%;
    color: #1a1f2e;
    font-size: 16px;
}

.play-btn i {
    font-size: 16px;
}

.play-btn:hover {
    transform: scale(1.1);
    color: #1a1f2e;
}

.progress-container {
    width: 400px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.time {
    font-size: 10px;
    color: #718096;
    min-width: 40px;
}

.progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

/* .progress-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 30%;
    background: #06b6d4;
    border-radius: 2px;
} */

.player-extra {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
}

.quality-badge {
    padding: 3px 6px;
    background: rgba(6, 182, 212, 0.2);
    border: 1px solid #06b6d4;
    border-radius: 4px;
    font-size: 10px;
    color: #06b6d4;
    font-weight: 600;
}

/* Explore Page */
.explore-banner {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 16px;
    padding: 60px 40px;
    margin-bottom: 50px;
    text-align: center;
}

.banner-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
}

.banner-content p {
    font-size: 18px;
    color: #a0aec0;
}

/* Genres Grid */
.genres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.genre-card {
    position: relative;
    background: rgba(255, 255, 255, 0.035);
    border-radius: 8px; /* đã chỉnh từ 16px */
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.genre-card:hover {
    background: rgba(255, 255, 255, 0.07);
}

.genre-bg {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    border-radius: 8px; /* đã chỉnh từ 16px */
    overflow: hidden;
}

.genre-name {
    position: absolute;
    top: 12px;
    left: 14px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    border-radius: 8px; /* giữ nguyên 8px */
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    z-index: 2;
}


/* Playlist Grid */
.playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.playlist-card {
    /* bỏ background và border-radius */
    overflow: visible;  /* để nút play không bị cắt */
    transition: all 0.3s;
    cursor: pointer;
}

.playlist-card:hover {
    /* có thể thêm transform nếu muốn */
    /* transform: translateY(-4px); */
}

.playlist-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px; /* bo góc nhẹ */
}

.playlist-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit; /* kế thừa bo góc từ .playlist-img */
}

.playlist-cover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.play-btn-hover {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 50px;
    height: 50px;
    background: #06b6d4;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
}

.playlist-card:hover .play-btn-hover {
    opacity: 1;
    transform: translateY(0);
}

.playlist-info {
    padding: 8px 0;      /* padding trên dưới để tạo khoảng cách */
    text-align: left;    
}

.playlist-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 0px 0;   /* tăng margin-bottom để h3 tách khỏi p */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.playlist-info p {
    font-size: 13px;
    color: #a0aec0;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}



/* New Releases Grid */
.new-releases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.release-card {
    cursor: pointer;
}

.release-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px; /* bo góc nhẹ */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin-bottom: 12px;
    overflow: hidden;
}

.release-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit; /* kế thừa bo góc nhẹ */
}

.release-img:hover .play-btn-hover {
    opacity: 1;
    transform: translateY(0);
}

.release-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.release-card p {
    font-size: 13px;
    color: #a0aec0;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.release-date {
    font-size: 11px;
    color: #718096;
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .charts-container {
        grid-template-columns: 1fr;
    }

    .player-content {
        flex-wrap: wrap;
    }

    .player-extra {
        display: none;
    }

    .explore-banner {
        padding: 40px 20px;
    }

    .banner-content h1 {
        font-size: 32px;
    }

    .genres-grid,
    .playlist-grid,
    .artists-grid,
    .new-releases-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}




/* Recommend horizontal scroll */
.recommend-row {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
}

.recommend-row::-webkit-scrollbar {
    height: 6px;
}

.recommend-row::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.recommend-row .playlist-card {
    min-width: 200px;
    flex-shrink: 0;
    scroll-snap-align: start;
}






.header-actions .user-avatar {
    width: 41px;
    height: 41px;
    border-radius: 50%;
    overflow: hidden;
    background: #06b6d4;
    display: inline-flex; /* không đè display: flex của header-actions */
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.header-actions .user-avatar:hover {
    transform: scale(1.05);
}

.header-actions .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



.logo-text p,
.song-artist,
.playlist-info p,
.release-card p,
.banner-content p,
.time,
.song-label {
    color: #9fb2ad;
}

