/**
 * MP3AZ Styles
 */

:root {
    --primary: #28a745;
    --primary-hover: #218838;
    --bg-main: #f5f5f5;
    --bg-white: #ffffff;
    --text-dark: #333333;
    --text-gray: #666666;
    --text-light: #999999;
    --border-color: #e0e0e0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Open Sans', sans-serif;
    background: var(--bg-main);
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.5;
    padding-bottom: 90px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* Header */
.site-header { background: var(--bg-white); border-bottom: 1px solid var(--border-color); padding: 15px 0; }
.logo { font-size: 24px; font-weight: 700; color: var(--primary); }
.logo:hover { color: var(--primary-hover); text-decoration: none; }
.header-nav { display: inline-flex; gap: 5px; }
.header-nav a { color: var(--text-dark); padding: 6px 12px; font-size: 14px; border-radius: 4px; }
.header-nav a:hover { background: var(--bg-main); color: var(--primary); text-decoration: none; }
.mobile-menu-btn { background: none; border: 1px solid var(--border-color); padding: 6px 10px; font-size: 20px; color: var(--text-dark); border-radius: 4px; float: right; }
.mobile-nav { padding: 15px 0; border-top: 1px solid var(--border-color); margin-top: 15px; }
.mobile-nav a { display: block; padding: 10px 0; color: var(--text-dark); border-bottom: 1px solid var(--border-color); }
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--primary); text-decoration: none; }
.header-search { margin-top: 15px; }
.header-search form { display: flex; }
.header-search input { flex: 1; padding: 10px 15px; border: 1px solid var(--border-color); border-right: none; border-radius: 4px 0 0 4px; font-size: 14px; }
.header-search input:focus { outline: none; border-color: var(--primary); }
.header-search button { padding: 10px 20px; background: var(--primary); color: white; border: 1px solid var(--primary); border-radius: 0 4px 4px 0; cursor: pointer; }
.header-search button:hover { background: var(--primary-hover); }

/* Main */
.main-content { padding: 30px 0; }
.section-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); display: inline-block; }

/* Breadcrumb */
.breadcrumb-section { background: var(--bg-white); padding: 12px 0; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.breadcrumb { margin: 0; padding: 0; background: none; font-size: 13px; }
.breadcrumb-item a { color: var(--text-gray); }
.breadcrumb-item.active { color: var(--text-dark); }

/* Music List */
.music-list { background: var(--bg-white); border-radius: 5px; border: 1px solid var(--border-color); }
.music-item { display: flex; align-items: center; padding: 12px 15px; border-bottom: 1px solid var(--border-color); cursor: pointer; transition: background 0.2s; }
.music-item:last-child { border-bottom: none; }
.music-item:hover { background: var(--bg-main); }
.music-item.active { background: rgba(40, 167, 69, 0.1); }
.music-item-img { width: 50px; height: 50px; border-radius: 5px; object-fit: cover; margin-right: 15px; background: var(--border-color); flex-shrink: 0; }
.music-item-info { flex: 1; min-width: 0; }
.music-item-title { font-weight: 600; color: var(--text-dark); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-item-title a { color: var(--text-dark); }
.music-item-title a:hover { color: var(--primary); text-decoration: none; }
.music-item-artist { font-size: 13px; color: var(--text-gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-item-artist a { color: var(--text-gray); }
.music-item-artist a:hover { color: var(--primary); }
.music-item-duration { color: var(--text-light); font-size: 13px; margin-right: 15px; flex-shrink: 0; }
.music-item-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-play-sm, .btn-download-sm { width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.btn-play-sm { background: var(--primary); color: white; }
.btn-play-sm:hover { background: var(--primary-hover); }
.btn-download-sm { background: var(--border-color); color: var(--text-dark); text-decoration: none; }
.btn-download-sm:hover { background: #d0d0d0; text-decoration: none; }

/* Spinner */
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Song Page */
.song-card { background: var(--bg-white); border-radius: 5px; border: 1px solid var(--border-color); padding: 25px; margin-bottom: 20px; }
.song-cover { width: 100%; max-width: 250px; aspect-ratio: 1; border-radius: 8px; object-fit: cover; background: var(--border-color); }
.song-title { font-size: 24px; font-weight: 700; color: var(--text-dark); margin-bottom: 5px; }
.song-artist { font-size: 18px; margin-bottom: 15px; }
.song-artist a { color: var(--primary); }
.song-meta { margin-bottom: 20px; }
.song-meta-item { display: inline-block; margin-right: 20px; margin-bottom: 8px; font-size: 14px; color: var(--text-gray); }
.song-meta-item i { color: var(--primary); margin-right: 5px; }
.song-actions { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 20px; }
.btn-download { display: inline-flex; align-items: center; gap: 8px; padding: 12px 30px; background: var(--primary); color: white; border: none; border-radius: 5px; font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn-download:hover { background: var(--primary-hover); color: white; text-decoration: none; }

/* Lyrics */
.lyrics-section { background: var(--bg-white); border-radius: 5px; border: 1px solid var(--border-color); margin-bottom: 20px; }
.lyrics-header { padding: 15px 20px; border-bottom: 1px solid var(--border-color); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.lyrics-header h3 { font-size: 16px; font-weight: 600; margin: 0; }
.lyrics-header i { transition: transform 0.3s; }
.lyrics-header.collapsed i { transform: rotate(-90deg); }
.lyrics-body { padding: 20px; }
.lyrics-text { white-space: pre-line; color: var(--text-gray); line-height: 1.8; }

/* Similar Songs */
.similar-section { background: var(--bg-white); border-radius: 5px; border: 1px solid var(--border-color); padding: 20px; margin-bottom: 20px; }
.similar-title { font-size: 16px; font-weight: 700; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); }

/* Sidebar */
.sidebar-box { background: var(--bg-white); border-radius: 5px; border: 1px solid var(--border-color); padding: 20px; margin-bottom: 20px; }
.sidebar-title { font-size: 16px; font-weight: 700; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); }
.category-list { list-style: none; padding: 0; margin: 0; }
.category-list li { margin-bottom: 8px; }
.category-list a { color: var(--text-dark); display: flex; align-items: center; padding: 8px 10px; border-radius: 5px; }
.category-list a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.category-list a:hover { background: var(--bg-main); color: var(--primary); text-decoration: none; }
.category-list i { margin-right: 10px; color: var(--primary); flex-shrink: 0; }

/* Pagination */
.pagination-wrapper { margin-top: 25px; display: flex; justify-content: center; }
.pagination .page-link { color: var(--text-dark); border-color: var(--border-color); }
.pagination .page-link:hover { background: var(--bg-main); color: var(--primary); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* Footer */
.site-footer { background: var(--bg-white); border-top: 1px solid var(--border-color); padding: 25px 0; margin-top: 30px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.footer-links a { color: var(--text-gray); font-size: 13px; }
.footer-links a:hover { color: var(--primary); }
.footer-copyright { text-align: center; color: var(--text-light); font-size: 13px; margin-top: 15px; }

/* Footer Player */
.footer-player { position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg-white); border-top: 1px solid var(--border-color); padding: 12px 0; z-index: 1000; display: none; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); }
.footer-player.active { display: block; }
.player-container { display: flex; align-items: center; gap: 15px; max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.player-song-info { display: flex; align-items: center; gap: 12px; min-width: 180px; max-width: 220px; flex-shrink: 0; }
.player-cover { width: 50px; height: 50px; border-radius: 4px; object-fit: cover; background: var(--border-color); flex-shrink: 0; }
.player-song-text { min-width: 0; flex: 1; }
.player-song-title { font-weight: 600; font-size: 14px; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-song-artist { font-size: 12px; color: var(--text-gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.player-btn { background: none; border: none; color: var(--text-dark); font-size: 20px; cursor: pointer; padding: 5px; }
.player-btn:hover { color: var(--primary); }
.player-btn-play { width: 44px; height: 44px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.player-btn-play:hover { background: var(--primary-hover); color: white; }
.player-btn-play .spinner { width: 22px; height: 22px; }
.player-progress-section { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.player-time { font-size: 12px; color: var(--text-gray); min-width: 40px; }
.player-progress-bar { flex: 1; height: 5px; background: var(--border-color); border-radius: 3px; cursor: pointer; }
.player-progress-fill { height: 100%; background: var(--primary); border-radius: 3px; width: 0%; }
.player-volume { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.player-volume-icon { font-size: 18px; color: var(--text-gray); cursor: pointer; }
.player-volume-icon:hover { color: var(--primary); }
.player-volume-slider { width: 80px; height: 4px; -webkit-appearance: none; background: var(--border-color); border-radius: 2px; }
.player-volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; background: var(--primary); border-radius: 50%; cursor: pointer; }
.player-download-btn { display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--primary); color: white; border-radius: 4px; font-size: 13px; flex-shrink: 0; text-decoration: none; }
.player-download-btn:hover { background: var(--primary-hover); color: white; text-decoration: none; }

/* Artist Page */
.artist-header { background: var(--bg-white); border-radius: 5px; border: 1px solid var(--border-color); padding: 25px; margin-bottom: 20px; display: flex; align-items: center; gap: 20px; }
.artist-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; background: var(--border-color); flex-shrink: 0; }
.artist-info h1 { font-size: 28px; margin-bottom: 10px; }
.artist-stats { color: var(--text-gray); font-size: 14px; }
.artist-stats span { margin-right: 20px; }

/* Search */
.search-info { background: var(--bg-white); border-radius: 5px; border: 1px solid var(--border-color); padding: 15px 20px; margin-bottom: 20px; }
.search-info strong { color: var(--primary); }

/* 404 */
.error-page { text-align: center; padding: 60px 20px; }
.error-page h1 { font-size: 72px; color: var(--primary); margin-bottom: 20px; }
.error-page p { font-size: 18px; color: var(--text-gray); margin-bottom: 30px; }

/* Responsive */
@media (max-width: 991px) {
    .player-volume { display: none; }
    .player-song-info { max-width: 180px; }
    .player-download-btn span { display: none; }
}

@media (max-width: 767px) {
    body { padding-bottom: 80px; }
    .music-item-duration { display: none; }
    .sidebar-box { margin-top: 20px; }
    .song-cover { max-width: 180px; margin: 0 auto 20px; display: block; }
    .song-title { font-size: 20px; text-align: center; }
    .song-artist { text-align: center; }
    .song-meta { text-align: center; }
    .song-actions { justify-content: center; }
    .artist-header { flex-direction: column; text-align: center; }
    .artist-avatar { width: 100px; height: 100px; }
    .artist-info h1 { font-size: 22px; }
    .footer-player { padding: 10px 0; }
    .player-container { gap: 10px; flex-wrap: wrap; }
    .player-song-info { min-width: 0; max-width: 45%; flex: 1; order: 1; }
    .player-cover { width: 45px; height: 45px; }
    .player-song-title { font-size: 13px; }
    .player-controls { order: 2; }
    .player-btn { font-size: 18px; }
    .player-btn-play { width: 40px; height: 40px; font-size: 18px; }
    .player-progress-section { order: 3; width: 100%; flex: none; }
    .player-time { min-width: 35px; font-size: 11px; }
    .player-download-btn { display: none; }
}

/* Content Card (About, Contact pages) */
.content-card {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
}
.content-card h1 {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}
.content-card h1 i {
    color: var(--primary);
    margin-right: 10px;
}
.content-body h3 {
    font-size: 18px;
    margin-top: 25px;
    margin-bottom: 10px;
    color: var(--text-dark);
}
.content-body p {
    margin-bottom: 15px;
    color: var(--text-gray);
}
.content-body ul {
    margin-left: 20px;
    margin-bottom: 15px;
}
.content-body ul li {
    margin-bottom: 8px;
    color: var(--text-gray);
}

/* Contact Form */
.contact-form .form-label {
    font-weight: 600;
    color: var(--text-dark);
}
.contact-form .form-control {
    border-color: var(--border-color);
    padding: 10px 15px;
}
.contact-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
}
.contact-info p {
    margin-bottom: 10px;
    color: var(--text-gray);
}
.contact-info i {
    color: var(--primary);
    margin-right: 8px;
}

/* Music Rank */
.music-rank {
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Music Item Views */
.music-item-views {
    color: var(--text-light);
    font-size: 12px;
    margin-right: 15px;
    white-space: nowrap;
}
.music-item-views i {
    margin-right: 3px;
}

/* Section Header */
.section-header {
    margin-bottom: 25px;
}
.section-header h1 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 5px;
}
.section-header h1 i {
    color: var(--primary);
    margin-right: 8px;
}
.section-header .text-muted {
    font-size: 14px;
}

/* Page Header Box */
.page-header-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.page-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark, #212121);
}
.today-badge {
    background: #4CAF50;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.total-count {
    font-size: 13px;
    color: #999;
    margin-left: auto;
}

/* Filter Bar */
.filter-bar {
    background: var(--bg-white, #fff);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-right: 4px;
}
.filter-btn {
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    color: #555;
    background: #f0f0f0;
    transition: all 0.2s;
    white-space: nowrap;
}
.filter-btn:hover {
    background: #e0e0e0;
    color: #333;
}
.filter-btn.active {
    background: #4CAF50;
    color: #fff;
}
.filter-btn i {
    margin-right: 3px;
}

/* Song Card */
.songs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.song-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-white, #fff);
    border-radius: 10px;
    padding: 10px 14px;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.song-card:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.song-card.top-song {
    border-left: 3px solid #FFD700;
    background: linear-gradient(90deg, #fffdf0 0%, var(--bg-white, #fff) 30%);
}

/* Song Rank */
.song-rank {
    font-size: 15px;
    font-weight: 700;
    color: #bbb;
    min-width: 28px;
    text-align: center;
}
.song-rank.rank-top {
    color: #FFD700;
    font-size: 18px;
}

/* Song Thumbnail */
.song-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}
.song-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.song-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #aaa;
}
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    color: #fff;
    font-size: 20px;
    text-decoration: none;
    border-radius: 8px;
}
.song-card:hover .play-overlay {
    opacity: 1;
}

/* Song Info */
.song-info {
    flex: 1;
    min-width: 0;
}
.song-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark, #212121);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.song-title:hover {
    color: #4CAF50;
}
.song-artist {
    display: block;
    font-size: 12px;
    color: #888;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.song-artist:hover {
    color: #4CAF50;
}

/* Song Meta */
.song-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}
.song-duration {
    font-size: 12px;
    color: #999;
}
.song-views {
    font-size: 11px;
    color: #aaa;
}
.song-views i {
    margin-right: 2px;
}

/* Song Date */
.song-date {
    font-size: 11px;
    color: #bbb;
    flex-shrink: 0;
    min-width: 65px;
    text-align: right;
}

/* Song Trophy */
.song-trophy {
    font-size: 20px;
    flex-shrink: 0;
}

/* Load More */
.btn-load-more {
    background: #4CAF50;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-load-more:hover {
    background: #388E3C;
    transform: scale(1.02);
}
.btn-load-more i {
    margin-right: 6px;
}

/* Sidebar - Top Artists */
.top-artist-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.top-artist-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.top-artist-list li:last-child {
    border-bottom: none;
}
.artist-rank {
    font-size: 13px;
    font-weight: 700;
    color: #bbb;
    min-width: 22px;
}
.top-artist-list a {
    flex: 1;
    font-size: 14px;
    color: var(--text-dark, #333);
    text-decoration: none;
}
.top-artist-list a:hover {
    color: #4CAF50;
}
.artist-count {
    font-size: 11px;
    color: #aaa;
}

/* Sidebar - Popular Tags */
.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.search-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #f0f0f0;
    border-radius: 15px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
}
.search-tag:hover {
    background: #4CAF50;
    color: #fff;
}
.search-tag:hover .tag-count {
    background: rgba(255,255,255,0.3);
    color: #fff;
}
.tag-count {
    font-size: 10px;
    background: #ddd;
    padding: 1px 6px;
    border-radius: 10px;
    color: #888;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .filter-bar {
        padding: 10px;
    }
    .filter-group {
        gap: 4px;
    }
    .filter-btn {
        font-size: 12px;
        padding: 4px 10px;
    }
    .song-card {
        padding: 8px 10px;
        gap: 8px;
    }
    .song-rank {
        font-size: 13px;
        min-width: 22px;
    }
    .song-thumb {
        width: 42px;
        height: 42px;
    }
    .song-title {
        font-size: 13px;
    }
    .song-date {
        display: none;
    }
    .song-trophy {
        font-size: 16px;
    }
    .page-title {
        font-size: 18px;
    }
}
