/* ==============================================
   TRENDING PAGE - Aesthetic 2x2 Grid Layout
   ============================================== */

.trending-page {
    width: 100%;
    height: 100%;
    padding: 28px;
    display: flex;
    flex-direction: column;
    overflow: auto;
    box-sizing: border-box;
}

/* Header */
.trending-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 24px;
    padding-left: 8px;
}

.trending-title svg {
    color: #a855f7;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.5));
}

/* Grid Layout - 2x2 */
.trending-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 24px;
    min-height: 500px;
}

/* Individual Box */
.trending-box {
    display: flex;
    background: linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    min-height: 220px;
}

.trending-box:hover {
    transform: translateY(-4px);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.4),
        0 0 60px rgba(168, 85, 247, 0.15),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

/* Left Side - Album Cover & Info */
.box-left {
    width: 45%;
    min-width: 180px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.08) 0%, transparent 100%);
}

.cover-wrap {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.trending-box:hover .cover-wrap img {
    transform: scale(1.08);
}

.cover-wrap .no-cover {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2d1b4e 0%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
}

/* Album info overlay - like homepage */
.cover-wrap .album-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 10px 12px;
    text-align: left;
}

.cover-wrap .album-info h4 {
    margin: 0 0 3px 0;
    font-size: 13px;
    color: #ffffff;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cover-wrap .album-info p {
    margin: 0;
    font-size: 11px;
    color: #b3b3b3;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cover-wrap .play-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.5);
}

.cover-wrap .play-btn svg {
    margin-left: 2px;
}

.trending-box:hover .play-btn {
    opacity: 1;
    transform: translateY(0);
}

.play-btn:hover {
    transform: scale(1.1) !important;
}

/* Hide old album-name and artist-name outside cover */
.box-left > .album-name,
.box-left > .artist-name {
    display: none;
}

/* Right Side - Song List */
.box-right {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-left: 1px solid rgba(255,255,255,0.06);
}

.songs-header {
    display: flex;
    align-items: center;
    padding: 0 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
}

.songs-header .col-num {
    width: 28px;
}

.songs-header .col-title {
    flex: 1;
}

.songs-header .col-time {
    width: 40px;
    display: flex;
    justify-content: flex-end;
}

.songs-header .col-time svg {
    opacity: 0.5;
}

.songs-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.songs-list::-webkit-scrollbar {
    width: 4px;
}

.songs-list::-webkit-scrollbar-track {
    background: transparent;
}

.songs-list::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.3);
    border-radius: 2px;
}

.song-row {
    display: flex;
    align-items: center;
    padding: 10px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.song-row:hover {
    background: rgba(168, 85, 247, 0.15);
}

.song-row .col-num {
    width: 28px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.35);
    font-weight: 500;
}

.song-row:hover .col-num {
    color: #a855f7;
}

.song-row .col-title {
    flex: 1;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 12px;
}

.song-row:hover .col-title {
    color: #fff;
}

.song-row .col-time {
    width: 40px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.35);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.no-songs {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255,255,255,0.25);
    font-size: 0.9rem;
    font-style: italic;
}

/* Empty State */
.empty-msg {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: rgba(255,255,255,0.3);
}

.empty-msg svg {
    opacity: 0.4;
}

/* Responsive - Tablet */
@media (max-width: 1100px) {
    .trending-grid {
        gap: 20px;
    }
    
    .box-left {
        width: 40%;
        padding: 16px;
    }
    
    .box-right {
        padding: 16px;
    }
    
    .song-row {
        padding: 8px;
    }
}

/* Responsive - Mobile */
@media (max-width: 800px) {
    .trending-page {
        padding: 16px;
    }
    
    .trending-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        gap: 16px;
        min-height: auto;
    }
    
    .trending-box {
        border-radius: 16px;
        min-height: 180px;
    }
    
    .box-left {
        width: 35%;
        min-width: 130px;
        padding: 12px;
    }
    
    .cover-wrap {
        border-radius: 10px;
    }
    
    .cover-wrap .album-info {
        padding: 8px 10px;
    }
    
    .cover-wrap .album-info h4 {
        font-size: 11px;
    }
    
    .cover-wrap .album-info p {
        font-size: 10px;
    }
    
    .box-right {
        padding: 12px;
    }
    
    .song-row .col-title {
        font-size: 0.85rem;
    }
}
