/* Genre Filters */
.genre-filters {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--background-dark);
}

.genre-filters-label {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

#genre-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.genre-filter-btn {
    padding: 0.5rem 1.25rem;
    border: 2px solid var(--background-dark);
    background: var(--background);
    color: var(--text);
    cursor: pointer;
    font-family: "FiraCode";
    font-size: 0.9rem;
    border-radius: 5px;
    transition: all 0.2s;
}

.genre-filter-btn:hover {
    border-color: var(--accent);
}

.genre-filter-btn.active {
    background: var(--accent-light);
    color: var(--background);
    border-color: var(--accent-light);
}

/* Music Container */
.music-container {
    display: flex;
    gap: 2rem;
}

/* Sidebar */
.album-sidebar {
    width: 600px;
    position: sticky;
    top: 2rem;
    height: fit-content;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.sidebar-content {
    padding: 2rem;
    border: 1px solid var(--text);
    border-radius: 20px;
    background-color: var(--background);
    position: relative;
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 2rem;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
    z-index: 10;
    align-items: center;
    justify-content: center;
}

.sidebar-close:hover {
    background: var(--text);
    color: var(--background);
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
}

.sidebar-text {
    font-size: 1rem;
    margin: 0;
    color: var(--text);
}

.sidebar-text .garamond,
.sidebar-text .garamond p,
.sidebar-text .garamond em,
.sidebar-text .garamond strong {
    font-family: "EBGaramond", serif !important;
}

.sidebar-link {
    display: inline-block;
    padding: 0.1rem 0.25rem;
    margin-right: 0.5rem;
    background-color: var(--text);
    color: var(--background);
    text-decoration: none;
    border-radius: 5px;
    transition: opacity 0.2s;
    font-size: 0.95rem;
}

.sidebar-link:hover {
    opacity: 0.8;
}

/* Album Grid */
.albums-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.album-wrapper {
    background-color: var(--background);
    border: 1px solid var(--text);
    border-radius: 50px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    max-height: 130px;
    line-height: 0.9;
    cursor: pointer;
    transition: all 0.1s;
    img {
        filter: saturate(0.75);
    }
    p {
        line-height: 1;
    }
}

.album-wrapper:hover {
    border-color: var(--accent-light);
    border-radius: 55px;
    img {
        filter: saturate(1.1);
    }
}

.album-wrapper.selected {
    border-color: var(--accent);
    border-width: 2px;
    img {
        filter: saturate(1.1);
    }
}

.album-cover {
    flex-shrink: 0;
    width: 25%;
    height: 100%;
    overflow: hidden;
}

.album-cover picture {
    width: 100%;
    height: 100%;
    display: block;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left;
    display: block;
}

.album-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.album-title {
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    color: var(--accent)
}

.album-artist {
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    color: var(--text);
    opacity: 0.8;
}

.album-year {
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    color: var(--text);
    opacity: 0.6;
}

.album-genres {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.genre-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--accent-light);
    color: var(--background);
    font-size: 0.85rem;
    border-radius: 3px;
    font-weight: 500;
    font-family: "EBGaramond";
}

@media (max-width: 1024px) {
    .music-container {
        flex-direction: column;
    }

    .album-sidebar {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 50vh;
        z-index: 100;
        background-color: var(--background);
        border-top: 1px solid var(--text);
        transform: translateY(100%);
        transition: transform 0.3s ease-in-out;
    }

    .album-sidebar.visible {
        transform: translateY(0);
    }

    .sidebar-content {
        border: none;
        border-radius: 0;
        overflow-y: auto;
        padding-top: 3rem;
    }

    .sidebar-close {
        display: flex;
    }

    .sidebar-title {
        font-size: 1.2rem;
    }

    .sidebar-text {
        font-size: 1.3rem;
    }

    .sidebar-text p {
        font-size: 1.3rem;
    }

    .sidebar-text .garamond,
    .sidebar-text .garamond p {
        font-size: 1.3rem;
    }

    .album-title {
        font-size: 1.1rem;
    }
}
