/* Music I Listen To — charts + history from Spotify */

.music-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 50px;
}

.music-intro {
    color: #666666;
    margin: 0 0 24px 0;
}

/* Range toggle */
.range-toggle {
    display: flex;
    gap: 8px;
    margin: 0 0 36px 0;
    flex-wrap: wrap;
}

.range-toggle button {
    font: inherit;
    font-size: 9.5pt;
    padding: 6px 14px;
    border: 1px solid #dddddd;
    background: #ffffff;
    color: #555555;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.range-toggle button:hover { border-color: #999999; color: #000000; }

.range-toggle button.active {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}

.music-section { margin: 0 0 44px 0; }

.music-section h3 {
    font-size: 12pt;
    font-weight: 600;
    margin: 0 0 16px 0;
}

/* Top artists — image tiles */
.artist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
}

.artist {
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.artist-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f0f0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.artist:hover .artist-img { transform: translateY(-3px); }

.artist-rank {
    font-size: 8.5pt;
    color: #bbbbbb;
    margin: 8px 0 0 0;
}

.artist-name {
    font-size: 9.5pt;
    font-weight: 600;
    margin: 2px 0 0 0;
    line-height: 1.3;
}

/* Top tracks — ranked rows */
.track-list { display: grid; gap: 10px; }

.track {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.track:hover { background: #f7f7f7; }

.track-num {
    width: 22px;
    text-align: right;
    color: #bbbbbb;
    font-size: 10pt;
    flex-shrink: 0;
}

.track-img {
    width: 52px;
    height: 52px;
    border-radius: 5px;
    object-fit: cover;
    background: #f0f0f0;
    flex-shrink: 0;
}

.track-meta { min-width: 0; }
.track-title { font-size: 10.5pt; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-artist { font-size: 9pt; color: #777777; margin: 2px 0 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Genre bars */
.genre-bars { display: grid; gap: 10px; }
.genre-row { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 12px; }
.genre-label { font-size: 9.5pt; color: #444444; text-transform: capitalize; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.genre-track { background: #f0f0f0; border-radius: 6px; height: 14px; overflow: hidden; }
.genre-fill { height: 100%; background: #1db954; border-radius: 6px; }

/* Recent plays */
.recent-list { display: grid; gap: 8px; }
.recent {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}
.recent-img { width: 38px; height: 38px; border-radius: 4px; object-fit: cover; background: #f0f0f0; flex-shrink: 0; }
.recent-meta { min-width: 0; flex: 1; }
.recent-title { font-size: 9.5pt; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-artist { font-size: 8.5pt; color: #888888; margin: 1px 0 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-when { font-size: 8pt; color: #bbbbbb; flex-shrink: 0; white-space: nowrap; }

.music-updated { font-size: 8.5pt; color: #bbbbbb; margin-top: 30px; }

.music-empty {
    color: #999999;
    font-size: 11pt;
    padding: 30px 0;
    line-height: 1.6;
}

@media (max-width: 480px) {
    .artist-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
    .genre-row { grid-template-columns: 90px 1fr; }
}
