
/* =========================================
   MUSIC LIBRARY - WHITE & PASTEL PURPLE
   Main colors: Purple - White - Light Pink
========================================= */

/* 1. RESET & GLOBAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --purple: #8b6bc1;
    --purple-dark: #68469f;
    --purple-light: #eee7fa;
    --purple-pale: #f8f5fd;
    --pink: #f7e8f3;
    --white: #ffffff;
    --text: #393044;
    --muted: #888092;
    --border: #eee9f4;
    --shadow: 0 5px 20px rgba(105, 72, 150, 0.09);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #faf9fc;
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
textarea {
    font-family: inherit;
}

/* 2. MAIN LAYOUT */
.container,
.main-container {
    width: 100%;
    max-width: 1500px;
    margin: auto;
}

.main-content,
.content,
.page-content {
    min-width: 0;
    padding: 30px;
}

/* 3. SIDEBAR */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: var(--white);
    padding: 25px 18px;
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 100;
    overflow-y: auto;
}

.sidebar h2,
.sidebar .site-name {
    color: var(--purple-dark);
    text-align: center;
    margin-bottom: 30px;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin: 8px 0;
}

.sidebar a {
    display: block;
    padding: 12px 16px;
    color: #665b75;
    border-radius: 12px;
    transition: 0.25s;
}

.sidebar a:hover,
.sidebar a.active {
    background: var(--purple-light);
    color: var(--purple-dark);
    font-weight: bold;
}

/* 4. LOGO */
.logo-link {
    display: block;
    text-align: center;
    margin: 0 auto 25px;
}

.logo {
    width: 145px;
    height: auto;
    object-fit: contain;
    margin: auto;
}

/* 5. HEADER */
.header,
.topbar,
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 30px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.header h1,
.page-title {
    color: var(--purple-dark);
    font-size: 26px;
    font-weight: 700;
}

/* 6. SEARCH */
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--purple-pale);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 8px 16px;
}

.search-box input,
.search-bar input,
input[type="search"] {
    border: none;
    outline: none;
    background: transparent;
    padding: 9px;
    color: var(--text);
    width: 100%;
}

input:focus,
textarea:focus {
    border-color: var(--purple);
    outline: 2px solid rgba(139, 107, 193, 0.12);
}

/* 7. BANNER */
.banner {
    width: 100%;
    min-height: 230px;
    margin: 25px 0 35px;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(120deg, #e7dafa, #f9eaf5);
    position: relative;
}

.banner img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.banner-content {
    padding: 40px;
    color: var(--purple-dark);
}

.banner-content h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.banner-content p {
    font-size: 16px;
}

/* 8. SECTION TITLES */
.section,
.content-section {
    margin: 30px 0;
}

.section-title,
.content-section h2 {
    font-size: 23px;
    color: var(--purple-dark);
    margin-bottom: 20px;
}

.section-title::after {
    content: "";
    display: block;
    width: 55px;
    height: 3px;
    background: #c7a9ed;
    margin-top: 7px;
    border-radius: 5px;
}

/* 9. CARD GRID */
.card-grid,
.album-grid,
.artist-grid,
.song-grid,
.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 22px;
}

.card,
.album-card,
.artist-card,
.song-card,
.genre-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 17px;
    padding: 14px;
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
    overflow: hidden;
}

.card:hover,
.album-card:hover,
.artist-card:hover,
.song-card:hover,
.genre-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(105, 72, 150, 0.15);
}

.card img,
.album-card img,
.artist-card img,
.song-card img,
.genre-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
}

.card h3,
.album-card h3,
.artist-card h3,
.song-card h3,
.genre-card h3 {
    color: var(--text);
    font-size: 16px;
    margin: 8px 0 4px;
}

.card p,
.album-card p,
.artist-card p,
.song-card p,
.genre-card p {
    color: var(--muted);
    font-size: 13px;
}

/* 10. BUTTONS */
.btn,
button,
.button {
    display: inline-block;
    border: none;
    border-radius: 25px;
    background: var(--purple);
    color: var(--white);
    padding: 10px 20px;
    cursor: pointer;
    transition: 0.25s;
}

.btn:hover,
button:hover,
.button:hover {
    background: var(--purple-dark);
    transform: translateY(-2px);
}

.btn-light {
    background: var(--purple-light);
    color: var(--purple-dark);
}

/* 11. SONG LIST */
.song-list {
    background: var(--white);
    border-radius: 16px;
    padding: 10px 20px;
    box-shadow: var(--shadow);
}

.song-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.song-item:last-child {
    border-bottom: none;
}

.song-item img {
    width: 55px;
    height: 55px;
    border-radius: 10px;
    object-fit: cover;
}

.song-info {
    flex: 1;
}

.song-info h3 {
    font-size: 15px;
}

.song-info p {
    color: var(--muted);
    font-size: 13px;
}

/* 12. MUSIC PLAYER */
.music-player,
.audio-player,
.player {
    background: var(--white);
    padding: 20px;
    border-radius: 18px;
    box-shadow: var(--shadow);
    margin: 25px 0;
}

audio {
    width: 100%;
    margin-top: 12px;
    accent-color: var(--purple);
}

/* 13. LYRICS */
.lyrics,
.lyrics-box {
    background: var(--purple-pale);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    margin: 20px 0;
    text-align: center;
    line-height: 2;
    color: #625274;
}

/* 14. GENRE */
.genre-card {
    text-align: center;
}

.genre-card img {
    border-radius: 50%;
    width: 120px;
    height: 120px;
    margin: 0 auto 12px;
}

/* 15. ARTIST */
.artist-card {
    text-align: center;
}

.artist-card img {
    width: 145px;
    height: 145px;
    border-radius: 50%;
    margin: 0 auto 12px;
}

/* 16. FORMS */
form {
    margin: 15px 0;
}

input,
textarea,
select {
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 14px;
    background: var(--white);
    color: var(--text);
}

textarea {
    width: 100%;
    resize: vertical;
}

/* 17. INTRODUCTION */
.intro,
.about-section {
    background: var(--white);
    border-radius: 18px;
    padding: 28px;
    box-shadow: var(--shadow);
    margin: 20px 0;
}

.intro h2,
.about-section h2 {
    color: var(--purple-dark);
    margin-bottom: 15px;
}

.intro p,
.about-section p {
    line-height: 1.9;
    color: #625b6d;
    margin-bottom: 12px;
}

/* 18. FOOTER */
footer,
.footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 25px;
    color: var(--muted);
    margin-top: 40px;
}

/* 19. TABLE */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
}

th,
td {
    padding: 13px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--purple-light);
    color: var(--purple-dark);
}

/* 20. RESPONSIVE - TABLET */
@media (max-width: 1024px) {
    .sidebar {
        width: 210px;
    }

    .main-content,
    .content,
    .page-content {
        padding: 22px;
    }

    .card-grid,
    .album-grid,
    .artist-grid,
    .song-grid,
    .genre-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* 21. RESPONSIVE - MOBILE */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 15px;
    }

    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .sidebar li {
        margin: 3px;
    }

    .sidebar a {
        padding: 8px 12px;
        font-size: 13px;
    }

    .main-content,
    .content,
    .page-content {
        padding: 16px;
    }

    .header,
    .topbar,
    .navbar {
        flex-wrap: wrap;
        padding: 15px;
    }

    .header h1,
    .page-title {
        font-size: 22px;
    }

    .banner img {
        height: 190px;
    }

    .banner-content {
        padding: 22px;
    }

    .banner-content h1 {
        font-size: 24px;
    }

    .card-grid,
    .album-grid,
    .artist-grid,
    .song-grid,
    .genre-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

/* 22. SMALL MOBILE */
@media (max-width: 420px) {
    .card-grid,
    .album-grid,
    .artist-grid,
    .song-grid,
    .genre-grid {
        grid-template-columns: 1fr 1fr;
    }

    .logo {
        width: 115px;
    }

    .section-title,
    .content-section h2 {
        font-size: 19px;
    }
/* ===== FIX SIDEBAR VA NOI DUNG ===== */

* {
    box-sizing: border-box;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    min-height: 100vh;
    padding: 30px;
    overflow-x: hidden;
}

.content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hinh anh khong tran khoi noi dung */
.content img,
.banner img {
    max-width: 100%;
}

/* Responsive cho dien thoai */
@media (max-width: 768px) {
    .sidebar {
        width: 180px;
    }

    .main-content {
        margin-left: 180px;
        width: calc(100% - 180px);
        padding: 15px;
    }
}

}
