/* Homepage Modern Design - YouTube Music Inspired */

/* Main Layout */
.homepage-main {
    padding: 2rem 0 4rem;
    background: var(--body-bg);
    min-height: calc(100vh - 200px);
}

.homepage-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.homepage-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    margin-top: 2rem;
}

/* Remove sidebar space on artist, audio, and video pages */
.homepage-content:not(:has(.homepage-sidebar)),
.no-sidebar-page .homepage-content {
    grid-template-columns: 1fr;
}

.main-content-area {
    min-width: 0;
}

/* Page Header */
.page-header {
    margin-bottom: 3rem;
    padding: 2rem 0 1rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Empty State */
.empty-state-modern {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.empty-state-modern i {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state-modern h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 1rem 0;
}

.empty-state-modern p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Artist Profile Header */
.artist-profile-header {
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.artist-profile-content {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.artist-profile-image {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
    box-shadow: 0 8px 24px rgba(107, 5, 4, 0.2);
}

.artist-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    font-size: 4rem;
}

.artist-profile-info {
    flex: 1;
    min-width: 0;
}

.artist-profile-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 1rem 0;
    letter-spacing: -0.02em;
}

.artist-profile-bio {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 0 2rem 0;
    max-width: 800px;
}

.artist-profile-stats {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.artist-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.artist-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.artist-stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Music Section */
.music-section {
    margin-bottom: 3rem;
}

.section-header-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-title-modern {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    letter-spacing: -0.01em;
}

.section-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.section-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Music Grid - Modern Cards */
.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

/* Song Card Modern */
.song-card {
    background: transparent;
    border-radius: 8px;
    overflow: visible;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
    position: relative;
}

.song-card:hover {
    transform: translateY(-4px);
}

.song-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* Square aspect ratio */
    overflow: hidden;
    background: transparent;
    border-radius: 8px;
    z-index: 1;
    transition: all 0.3s ease;
}

.song-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.song-card:hover .song-image img {
    transform: scale(1.05);
}

.song-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 2.5rem;
}

.song-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    border-radius: 8px;
}

.song-card:hover .song-overlay {
    opacity: 1;
}

.play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.9);
}

.play-btn i {
    margin-left: 2px;
    /* Visual centering for play icon */
}

.song-card:hover .play-btn {
    transform: scale(1);
}

.play-btn:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: white;
}

.song-info {
    padding: 0.75rem 0.25rem 0 0.25rem;
    background: transparent;
}

.song-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
    transition: color 0.3s ease;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.song-card:hover .song-title {
    color: var(--primary-color);
}

.song-artist {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Top Charts Grid */
.top-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Limit to 10 items (5 per column) */
.chart-card:nth-child(n+11) {
    display: none;
}

.chart-card {
    background: white;
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.chart-card:hover {
    background: #fafafa;
    transform: translateY(-2px);
}

.chart-card-image {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--light-color);
}

.chart-card-image img,
.chart-card-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chart-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.25rem;
}

.chart-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.chart-card-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.chart-card-title:hover {
    color: var(--primary-color);
}

.chart-card-artist {
    display: block;
    font-size: 0.75rem;
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.chart-card-artist:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.chart-card-plays {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    font-weight: 500;
}

.chart-card-plays i {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Artists Grid Modern */
.artists-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

/* Limit to 10 artists on desktop in Trending Artists section (not on all-artists page) */
.artists-grid-modern:not(.all-artists-grid) .artist-card:nth-child(n+11) {
    display: none;
}

.artist-card {
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
    color: inherit;
    padding: 0;
    border: none;
    position: relative;
}

.artist-card:hover {
    transform: translateY(-4px);
}

.artist-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: transparent;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.artist-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.artist-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 2.5rem;
    border-radius: 12px;
}

.artist-info {
    padding: 0;
    position: relative;
}

.artist-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    transition: color 0.3s ease;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.artist-card:hover .artist-name {
    color: var(--primary-color);
}

.artist-songs {
    display: none;
}

/* Videos Grid Modern */
.videos-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.video-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(107, 5, 4, 0.03) 0%, rgba(139, 25, 24, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    pointer-events: none;
}

.video-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(107, 5, 4, 0.2);
}

.video-card:hover::before {
    opacity: 1;
}

.video-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: #000;
    border-radius: 16px 16px 0 0;
    z-index: 1;
    border-radius: 12px 12px 0 0;
}

.video-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-card:hover .video-image img {
    transform: scale(1.08);
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    font-size: 2.5rem;
}

.video-stats-box {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    z-index: 5;
    display: flex;
    flex-direction: row;
    gap: 0.375rem;
}

.video-stats-box .stat-item {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    border-radius: 12px 12px 0 0;
}

.video-card:hover .video-overlay {
    opacity: 1;
}

.video-info {
    padding: 1.25rem;
    background: white;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.video-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
    transition: color 0.3s ease;
    letter-spacing: -0.01em;
}

.video-card:hover .video-title {
    color: var(--primary-color);
}

.video-artist {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
    font-weight: 400;
}

/* Sidebar */
.homepage-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget-modern {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.widget-title-modern {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 1.25rem 0;
    letter-spacing: -0.01em;
}

/* Song of the Day Modern */
.song-of-day-modern {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.song-of-day-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: var(--light-color);
}

.song-of-day-image img,
.song-of-day-placeholder-modern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.song-of-day-placeholder-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    font-size: 3rem;
}

.song-of-day-play {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.song-of-day-play:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(107, 5, 4, 0.4);
}

.song-of-day-info {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.song-of-day-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.song-of-day-title:hover {
    color: var(--primary-color);
}

.song-of-day-artist {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.song-of-day-artist:hover {
    color: var(--primary-color);
}

/* Social Stats Modern */
.social-stats-modern {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.social-stat-modern {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.social-stat-modern:hover {
    background: rgba(107, 5, 4, 0.05);
    transform: translateX(4px);
}

.social-icon-modern {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.social-icon-modern.tiktok {
    background: #000000;
}

.social-icon-modern.youtube {
    background: #FF0000;
}

.social-info-modern {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.social-count {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-color);
}

.social-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state-modern {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state-modern i {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-modern p {
    font-size: 1rem;
    margin: 0;
}

.empty-state-small {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Section Footer & Discover More Button */
.section-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: center;
}

.btn-discover-more {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(107, 5, 4, 0.2);
}

.btn-discover-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(107, 5, 4, 0.3);
}

.btn-discover-more i {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.btn-discover-more:hover i {
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 1200px) {
    .homepage-content {
        grid-template-columns: 1fr 280px;
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .homepage-content {
        grid-template-columns: 1fr;
    }

    .homepage-sidebar {
        position: relative;
        top: 0;
    }

    .music-grid,
    .artists-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .videos-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .homepage-main {
        padding: 1.5rem 0 3rem;
    }

    .homepage-container {
        padding: 0 16px;
    }

    /* Hide sidebar on mobile */
    .homepage-sidebar {
        display: none;
    }

    .page-header {
        margin-bottom: 2rem;
        padding: 1.5rem 0 0.75rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .empty-state-modern {
        padding: 3rem 1.5rem;
    }

    .empty-state-modern i {
        font-size: 3rem;
    }

    .empty-state-modern h2 {
        font-size: 1.5rem;
    }

    /* Artist Profile Responsive */
    .artist-profile-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .artist-profile-image {
        width: 150px;
        height: 150px;
    }

    .artist-profile-name {
        font-size: 1.75rem;
    }

    .artist-profile-bio {
        font-size: 1rem;
        text-align: left;
    }

    .artist-profile-stats {
        justify-content: center;
        gap: 2rem;
    }

    .artist-stat-number {
        font-size: 1.5rem;
    }

    .music-grid,
    .artists-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }

    /* Limit to 12 songs on mobile in Discover section */
    .music-section .music-grid .song-card:nth-child(n+13) {
        display: none;
    }

    /* Limit to 9 artists on mobile in Trending Artists section (not on all-artists page) */
    .artists-grid-modern:not(.all-artists-grid) .artist-card:nth-child(n+10) {
        display: none;
    }

    .videos-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .section-title-modern {
        font-size: 1.25rem;
    }
}

/* Pagination Styles */
.pagination-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.pagination-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(107, 5, 4, 0.2);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
}

.pagination-count {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 400;
    margin-left: 0.5rem;
}

@media (max-width: 768px) {
    .pagination-modern {
        flex-direction: column;
        gap: 1rem;
    }

    .pagination-btn {
        width: 100%;
        justify-content: center;
        max-width: 200px;
    }

    .pagination-info {
        text-align: center;
    }
}

@media (max-width: 480px) {

    .music-grid,
    .artists-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }

    .videos-grid-modern {
        grid-template-columns: 1fr;
    }

    .top-charts-grid {
        grid-template-columns: 1fr;
    }
}