/* style.css - Global Styles & Homepage */

/* ==================== Global Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f5f7fa;
    color: #1a1a2e;
    line-height: 1.5;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* ==================== Header style ==================== */
.site-header {
    text-align: center;
    padding: 40px 20px 30px;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 30px;
}

.logo {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a1a2e;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: #e74c3c;
}

.tagline {
    color: #666;
    margin-top: 8px;
    font-size: 0.9rem;
}

/* ==================== Search box style ==================== */
.search-section {
    max-width: 600px;
    margin: 0 auto 40px;
}

.search-form {
    display: flex;
    gap: 10px;
    background: white;
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    background: transparent;
}

.search-input:focus {
    outline: none;
}

.search-btn {
    background: #1a1a2e;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #e74c3c;
}

/* ==================== General list style ==================== */
.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 25px 0 15px 0;
    padding-left: 8px;
    border-left: 4px solid #e74c3c;
}

.list-container {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.song-item, .album-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: #333;
}

.song-item:hover, .album-item:hover {
    background: #fafafa;
}

.song-item:last-child, .album-item:last-child {
    border-bottom: none;
}

.song-number, .album-number {
    width: 36px;
    font-size: 0.85rem;
    color: #bbb;
    font-weight: 500;
}

.song-info, .album-info {
    flex: 1;
}

.song-name, .album-name {
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.song-artist, .album-artist {
    font-size: 0.8rem;
    color: #999;
}

.song-duration {
    width: 60px;
    text-align: right;
    font-size: 0.75rem;
    color: #bbb;
}

.album-song-count {
    width: 80px;
    text-align: right;
    font-size: 0.7rem;
    color: #bbb;
}

.action-btn {
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    margin-left: 12px;
}

.action-btn:hover {
    background: #e74c3c;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 16px;
    border: 1px solid #eee;
    color: #999;
}

/* ==================== Homepage Trending Now Style ==================== */
.trending-section {
    max-width: 880px;
    margin: 0 auto;
}

/*Trending Now Form */
.trending-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
}

/* Table header style */
.trending-header {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trending-header .col-number {
    width: 55px;
    flex-shrink: 0;
}

.trending-header .col-song {
    flex: 1;
    white-space: nowrap;
    overflow: visible;
}

.trending-header .col-artist {
    width: 220px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: visible;
}

/* Blank on the right side of the header */
.trending-header div:last-child {
    width: 106px;
    flex-shrink: 0;
}

/* line style */
.trending-row {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    transition: background 0.2s ease;
    cursor: pointer;
    background: white;
}

.trending-row:hover {
    background: #fafafa;
}

.trending-row:last-child {
    border-bottom: none;
}

.col-number {
    width: 55px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #999;
    flex-shrink: 0;
}

.col-song {
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.col-artist {
    width: 220px;
    font-size: 0.85rem;
    font-weight: 400;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Button Style */
.view-btn {
    background: transparent;
    color: #e74c3c;
    border: 1px solid #e74c3c;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    margin-left: 16px;
    flex-shrink: 0;
    text-align: center;
    min-width: 90px;
}

.view-btn:hover {
    background: #e74c3c;
    color: white;
}

/* ==================== Footer Style ==================== */
.site-footer {
    text-align: center;
    padding: 40px 20px 30px;
    margin-top: 50px;
    border-top: 1px solid #e8e8e8;
    color: #888;
    font-size: 0.8rem;
}

/* ==================== Responsive Styles ==================== */

@media (max-width: 950px) {
    .trending-section {
        max-width: 92%;
    }
}

@media (max-width: 768px) {
    
    .trending-row .view-btn {
        display: none !important;
    }
    
    
    .trending-header {
        font-size: 0.7rem;
    }
    
    .trending-header .col-artist {
        width: auto;
        min-width: 60px;
    }
}

@media (max-width: 600px) {
    .container { 
        padding: 15px; 
    }
    .logo { 
        font-size: 1.6rem; 
    }
    .song-item, .album-item { 
        padding: 12px 15px; 
        flex-wrap: wrap; 
    }
    .song-number, .album-number { 
        width: 30px; 
    }
    .song-duration, .album-song-count { 
        width: auto; 
    }
    .action-btn { 
        margin-left: auto; 
    }
    .search-form { 
        flex-direction: column; 
        border-radius: 20px; 
        background: transparent; 
        gap: 8px; 
    }
    .search-input { 
        background: white; 
        border-radius: 30px; 
        border: 1px solid #ddd; 
        width: 100%;
        box-sizing: border-box;
    }
    .search-btn { 
        padding: 10px; 
        border-radius: 30px; 
        width: 100%;
    }
    
    .col-number {
        width: 42px;
        font-size: 0.85rem;
    }
    .col-artist {
        width: 130px;
        font-size: 0.75rem;
    }
    .col-song {
        font-size: 0.9rem;
    }
    .trending-header, .trending-row {
        padding: 10px 12px;
    }
    .trending-header {
        font-size: 0.65rem;
    }
    .trending-header .col-artist {
        min-width: 50px;
    }
    .view-btn {
        min-width: 70px;
        padding: 3px 8px;
        font-size: 0.6rem;
    }
}


@media (max-width: 480px) {
    .trending-header .col-artist {
        min-width: 45px;
    }
    .trending-header {
        font-size: 0.6rem;
    }
}

/* Ad Container Styles */
.ad-container {
    margin: 40px auto 20px;
    text-align: center;
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 10px;
    max-width: 880px;
}

/* Responsive Ad Container */
@media (max-width: 768px) {
    .ad-container {
        margin: 30px auto 15px;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .ad-container {
        margin: 20px auto 10px;
        padding: 6px;
    }
}