@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

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

html, body {
    font-family: "Inter", sans-serif;
    background: #121212;
    max-width: 100%;
    overflow-x: hidden;
}

/* ===== TOPBAR ===== */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    max-width: 1500px;
    margin: 20px auto;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.logo img {
    height: 40px;
    width: 40px;
}

.logo h1 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
}

.info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    text-decoration: none;
    transition: transform 0.15s ease;
}

.logout-btn svg {
    width: 20px;
    height: 20px;
    stroke: #e53935;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.logout-btn:hover {
    transform: translateY(-2px);
}

/* ===== CARDS ===== */

.card {
    background: #1b1b1b;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

.card-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 14px 0 16px;
}

.card-empty {
    font-size: 0.95rem;
    color: #6a6a6a;
}

/* ===== NOW PLAYING ===== */

.now-playing-card {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 28px;
}

.card-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.track-cover {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.track-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.track-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

.track-artist {
    font-size: 0.95rem;
    color: #b3b3b3;
}

/* ===== STATS ===== */

.stats-card {
    max-width: 1500px;
    margin: 24px auto;
    padding: 0 28px;
}

.top-songs-grid,
.top-artists-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.top-song,
.top-artist {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.top-song img,
.top-artist img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
}

.song-title,
.song-artist,
.artist-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-title,
.artist-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
}

.song-artist {
    font-size: 0.8rem;
    color: #b3b3b3;
}

.song-stats,
.artist-stats {
    font-size: 0.75rem;
    color: #6a6a6a;
}

/* ===== RECENT ===== */

.recent-list {
    display: flex;
    flex-direction: column;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.recent-item:last-child {
    border-bottom: none;
}

.recent-cover {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}

.recent-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.recent-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-artist {
    font-size: 0.85rem;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-time {
    font-size: 0.75rem;
    color: #6a6a6a;
    white-space: nowrap;
}

/* ===== STATS OVERVIEW ===== */

.stats-overview {
    max-width: 1500px;
    margin: 24px auto;
    padding: 0 28px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    background: #1b1b1b;
    border-radius: 15px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
}

.stat-label {
    font-size: 0.85rem;
    color: #b3b3b3;
}

/* ===== SUBNAV ===== */

.subnav {
    max-width: 1500px;
    margin: 6px auto 26px;
    padding: 0 28px 14px;
    display: flex;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.subnav a {
    font-size: 0.9rem;
    font-weight: 600;
    color: #b3b3b3;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.subnav a:hover:not(.active) {
    background: #2a2a2a;
    color: #ffffff;
}

.subnav a.active {
    background: #1db954;
    color: #000000;
}

.avatar-link {
    display: flex;
    align-items: center;
}

.avatar-link:hover .avatar-img {
    outline: 2px solid #1db954;
    outline-offset: 2px;
}

/* ===== MOBILE ===== */

@media (max-width: 600px) {
    .topbar {
        padding: 12px 18px;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .top-songs-grid,
    .top-artists-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .recent-cover {
        width: 44px;
        height: 44px;
    }

    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-value {
        font-size: 1.3em;
    }

    .subnav {
        gap: 8px;
        padding: 0 18px 14px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .subnav a {
        font-size: 0.85rem;
        padding: 7px 12px;
        border-radius: 7px;
        flex: 0 0 auto;
    }
}
