html {
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
    height: auto;
}

button,
input,
select {
    font: inherit;
}

:root {
    --bg: #000;
    --text: #fff;
    --muted: #7d7d7d;
    --chip: #fff;
    --chip-text: #000;
    --chip-active: #7d7d7d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Raleway, Arial, Helvetica, sans-serif;
}

.site-wrapper {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 35px 0;
}

/* HEADER */

.site-header {
    margin-bottom: 44px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    margin-bottom: 25px;
}

.header-top img {
    width: 350px;
}

.week-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
}

.week-btn {
    border: 0;
    background: #fff;
    color: #000;
    padding: 3px 10px;
    font: inherit;
    cursor: pointer;
    font-weight: 600;
    font-variant-numeric: lining-nums;
}

.arrow {
    font-size: 16px;
}

/* FILTERS */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.filter-btn {
    border: 0;
    background: var(--chip);
    color: var(--chip-text);
    padding: 5px 16px;
    font-size: 22px;
    line-height: 1.1;
    font-weight: 600;
    cursor: pointer;
}

.filter-btn,
.tag-filter,
.week-btn,
.back-to-top {
    transition:
        transform .18s ease,
        background-color .18s ease,
        color .18s ease;
    transform-origin: center;
}

.filter-btn:hover,
.tag-filter:hover,
.week-btn:hover,
.back-to-top:hover {
    transform: scale(1.035);
}

.filter-btn:active,
.tag-filter:active,
.week-btn:active,
.back-to-top:active {
    transform: scale(.98);
}

.listen-btn:hover {
    background: var(--chip-active);
}

.filter-btn.active,
.tag-filter.active-tag {
    background: var(--chip-active);
    color: #000;
}

.filter-btn.active {
    color: #000;
}

.updated {
    text-align: right;
    color: var(--muted);
    font-size: 15px;
    font-weight: 300;
    padding-top: 5px;
    margin: 0;
    font-variant-numeric: lining-nums;
}

.tag-filter {
    border: 0;
    background: #fff;
    color: #000;
    padding: 1px 6px;
    font: inherit;
    cursor: pointer;
    font-weight: 600;
}

.tag-filter.active-tag {
    background: #7d7d7d;
    color: #000;
}

/* GRID */

.albums-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px 30px;
}

/* CARD */

.album-card {
    min-width: 0;
}

.cover-link {
    display: block;
    border: 2px solid #7d7d7d;
}

.album-cover {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.album-infos {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: start;
    margin-top: 14px;
}

.album-title {
    margin: 0;
    font-size: 26px;
    line-height: 1;
    font-weight: 600;
}

.album-artist {
    margin: 5px 0 8px;
    font-size: 22px;
    line-height: 1;
}

.album-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    color: var(--muted);
    font-weight: 500;
    font-variant-numeric: lining-nums;
}

.album-meta span {
    background: #fff;
    color: #000;
    padding: 2px 8px;
    line-height: 1.1;
}

.listen-btn {
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #000;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.listen-wrapper {
    position: relative;
}

.platforms-menu {
    position: absolute;
    right: 0;
    top: 110%;
    display: none;
    flex-direction: column;
    gap: 4px;
    background: #fff;
    color: #000;
    padding: 6px;
    z-index: 20;
    min-width: 130px;
}

.platforms-menu a {
    color: #000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    padding: 4px 6px;
}

.platform-btn {
    transition: .18s ease;
}

.platform-btn:hover {
    transform: scale(1.05);
}

.listen-wrapper.open .platforms-menu {
    display: flex;
}

.site-footer {
    margin-top: 80px;
    padding-bottom: 48px;
    text-align: center;
}

.back-to-top {
    border: 0;
    background: #fff;
    color: #000;
    padding: 6px 18px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
}

.site-footer hr {
    margin: 56px 0 28px;
    border: 0;
    border-top: 2px solid #777;
    opacity: 1;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 22px;
    font-size: 16px;
    font-variant-numeric: lining-nums;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
}

/* RESPONSIVE */

@media (max-width: 900px) {

    .albums-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 36px 22px;
    }
}

@media (max-width: 620px) {
    .listen-btn {
        width: 45px;
        height: 45px;
        border: 0;
        border-radius: 50%;
        background: #fff;
        color: #000;
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
    }
     .albums-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 36px 22px;
    }
    .site-wrapper {
        width: calc(100% - 28px);
        padding: 28px 0;
    }
    .header-top img {
        width: 250px;
    }

    .filters {
        gap: 8px;
    }

    .filter-btn {
        font-size: 18px;
        padding: 5px 10px;
    }

    .updated {
        text-align: left;
        font-size: 14px;
    }

    .album-title {
        font-size: 19px;
    }

    .album-artist {
        font-size: 18px;
    }

    .album-meta {
        font-size: 13px;
    }

    .listen-btn {
        width: 42px;
        height: 42px;
        font-size: 19px;
    }
}

@media (max-width: 550px) {

    .header-top {
        display: block;
        text-align: center;
    }

    .week-selector {
        display: block;
        padding-top: 10px;
    }
    .updated {
        text-align: center;
    }

}