:root {
    --bg-odd: #181818;
    --bg-even: #343434;
    --bg-hover: #545454;
    --border: #3a3a3a;
    --header-bg: #3a0d24;
    --header-text: #f2f2f2;
    --main-text-color: #f2f2f2;
}

/* Main container */
.list_page_container {
    margin-inline: auto;
    padding: 2rem;
    width: 100%;
    max-width: 1400px;
    box-sizing: border-box;
}

/* List header section */
.list_header {
    text-align: center;
    margin-bottom: 2rem;
}

.list_header h1 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
    color: var(--header-text);
}

.list_description {
    color: var(--header-text);
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.list_count {
    color: var(--header-text);
    font-size: 1rem;
    opacity: 0.8;
}

/* Loading indicator */
.htmx-indicator {
    display: none;
    text-align: center;
    padding: 2rem;
}

.htmx-indicator.htmx-request {
    display: block;
}

.indicator_text {
    color: var(--header-text);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.indicator_image {
    width: 50px;
    height: auto;
}

/* List entries container */
.list_entries_content {
    position: relative;
}

.list_entries {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Individual list entry */
.list_entry {
    background: linear-gradient(to bottom right, rgba(50, 50, 50, 0.4), rgba(30, 30, 30, 0.4));
    background-color: rgba(48, 48, 48, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(3px);
    overflow: hidden;
    transition:
        background-color 0.3s ease 50ms,
        box-shadow 0.4s ease 50ms,
        transform 0.2s ease;
}

.list_entry:hover {
    background: linear-gradient(to bottom right, rgba(60, 60, 60, 0.5), rgba(40, 40, 40, 0.5));
    background-color: rgba(70, 70, 70, 0.7);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Entry header with position and band info */
.list_entry_header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
}

/* Rank number — elegant, book-like ordinal */
.list_position {
    font-size: 1.6rem;
    font-style: italic;
    font-weight: 400;
    color: rgba(210, 210, 210, 0.65);
    min-width: 56px;
    text-align: center;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.band_link {
    flex: 1;
    text-decoration: none;
    color: var(--main-text-color);
}

/* Band info section */
.list_band_info {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1.5rem;
    align-items: center;
}

.list_band_photo_container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.list_band_photo {
    border: solid 1.2px #3c0f0f;
    width: 100%;
    max-width: 150px;
    aspect-ratio: 1.3;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.band_link:hover .list_band_photo {
    transform: scale(1.05);
}

.list_band_details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.list_band_name {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    color: var(--header-text);
}

.list_band_meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 1rem;
    color: rgba(242, 242, 242, 0.8);
}

.list_band_years {
    opacity: 0.9;
}

/*
 * Location: flag + text in pure inline flow.
 * The fi flag icon is display:inline-block with line-height:1em;
 * vertical-align:middle makes it sit on the text midline naturally.
 */
.list_band_location {
    line-height: 1.55;
}

.list_band_location_flag {
    display: inline;
}

.list_band_location_flag .country_span {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.35rem;
    /* Offset upward slightly to compensate for the flag's 1em line-height
       sitting below the text midpoint at larger line-heights */
    position: relative;
    top: -0.08em;
}

.list_band_location_text {
    display: inline;
}

/* ============================================================
   Albums section
   ============================================================ */

.list_albums_section {
    /* Decorative gradient divider instead of a plain border */
    border-top: 1px solid transparent;
    background-image: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.12) 20%,
        rgba(255, 255, 255, 0.12) 80%,
        transparent 100%
    );
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: top;
}

/* Toggle button — reset browser button defaults, inherit serif font */
.list_albums_toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 0.9rem 1.5rem 0.75rem 1.5rem;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    text-align: left;
    cursor: default;
    pointer-events: none;
}

/* "Featured Albums" — italic serif, understated */
.list_albums_title {
    font-size: 1.05rem;
    font-style: italic;
    font-weight: 400;
    font-family: inherit;
    color: rgba(242, 242, 242, 0.75);
    margin: 0;
    letter-spacing: 0.04em;
}

/* Count badge — shown only on mobile */
.list_albums_count {
    display: none;
    opacity: 0.75;
    font-size: 0.88em;
    margin-left: 0.4em;
}

/* Chevron icon — hidden on desktop */
.list_albums_toggle_icon {
    display: none;
    font-size: 0.75rem;
    opacity: 0.55;
    flex-shrink: 0;
    font-style: normal;
}

.list_albums_content {
    padding: 0.25rem 1.5rem 1.5rem 1.5rem;
}

.list_albums_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Individual album card */
.list_album_card {
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.list_album_card:hover {
    background: rgba(50, 50, 50, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.list_album_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.list_album_year {
    color: rgba(242, 242, 242, 0.9);
    font-weight: bold;
}

.list_album_type {
    color: rgba(242, 242, 242, 0.7);
    font-style: italic;
}

.list_album_name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--header-text);
    margin-bottom: 0.8rem;
    line-height: 1.3;
    min-height: 2.6em;
}

.list_album_genres {
    margin-bottom: 0.8rem;
}

.list_album_genres .genres_main {
    justify-content: flex-start;
    padding-top: 0;
    padding-bottom: 0;
}

/* Album links */
.list_album_links {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.album_link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.album_link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.album_link img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    font-size: 1.25rem;
}

.pagination a {
    color: var(--header-text);
    text-underline-offset: 0.2em;
    transition: color .15s;
}

.pagination a:hover {
    color: #fff;
}

.selected_page {
    font-weight: 700;
    color: var(--header-text);
}

.unselected_page {
    color: rgba(242, 242, 242, 0.7);
}

.pagination_break {
    color: rgba(242, 242, 242, 0.5);
}

/* Error message */
.error_message {
    padding: 2rem;
    text-align: center;
    color: #ff6b6b;
    background: var(--bg-odd);
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    font-size: 1.05rem;
}

/* Hidden input for HTMX */
.list_slug_input {
    display: none;
}

/* ============================================================
   All Lists Page
   ============================================================ */

.all_lists_page_container {
    margin-inline: auto;
    padding: 2rem;
    width: 100%;
    max-width: 1400px;
    box-sizing: border-box;
}

.all_lists_header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.all_lists_header h1 {
    font-size: 2.5rem;
    color: var(--header-text);
    margin-bottom: 0.75rem;
}

.all_lists_header_desc {
    color: var(--header-text);
    font-size: 1.05rem;
    opacity: 0.8;
    max-width: 600px;
    margin-inline: auto;
}

.all_lists_content {
    position: relative;
}

/* Card grid */
.all_lists_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Individual card */
.all_lists_card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 290px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-decoration: none;
    color: var(--header-text);
    background: #1a1a1a;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.3s ease;
}

.all_lists_card:hover {
    transform: translateY(-4px);
    border-color: rgba(160, 40, 60, 0.6);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(160, 40, 60, 0.25);
}

/* Photo background layer */
.all_lists_card_photo_layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.all_lists_card_photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: blur(0.5px) brightness(0.62) saturate(0.88);
    transform: scale(1.04);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.all_lists_card:hover .all_lists_card_photo {
    filter: blur(0px) brightness(0.75) saturate(1.0);
    transform: scale(1.07);
}

.all_lists_card_overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 5, 15, 0.15) 0%,
        rgba(10, 5, 15, 0.50) 55%,
        rgba(10, 5, 15, 0.82) 100%
    );
}

/* Card body */
.all_lists_card_body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1;
    padding: 1.25rem 1.4rem 1.4rem;
    gap: 0.5rem;
}

/* Badges */
.all_lists_card_badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
}

.all_lists_card_badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(242, 242, 242, 0.9);
}

.all_lists_card_badge--auto {
    background: rgba(100, 20, 40, 0.55);
    border-color: rgba(180, 50, 70, 0.5);
    color: rgba(255, 180, 190, 0.95);
}

/* Card text */
.all_lists_card_title {
    font-size: 1.35rem;
    font-weight: bold;
    margin: 0;
    line-height: 1.3;
    color: #f2f2f2;
}

.all_lists_card:hover .all_lists_card_title {
    color: #fff;
}

.all_lists_card_desc {
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(242, 242, 242, 0.75);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.all_lists_card_count {
    font-size: 0.82rem;
    color: rgba(242, 242, 242, 0.55);
    margin-top: 0.15rem;
}

/* ============================================================
   Responsive — List Page
   ============================================================ */

@media (max-width: 768px) {
    .list_page_container {
        padding: 1rem;
    }

    .list_header h1 {
        font-size: 2rem;
    }

    .list_description {
        font-size: 1rem;
    }

    .list_entry_header {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
    }

    .list_position {
        font-size: 1.3rem;
        min-width: auto;
    }

    .list_band_info {
        grid-template-columns: 100px 1fr;
        gap: 1rem;
    }

    .list_band_photo {
        max-width: 100px;
    }

    .list_band_name {
        font-size: 1.4rem;
    }

    .list_band_meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Albums: activate toggle on mobile */
    .list_albums_toggle {
        cursor: pointer;
        pointer-events: auto;
        padding: 0.85rem 1rem;
        border-radius: 4px;
        transition: background 0.2s ease;
    }

    .list_albums_toggle:hover {
        background: rgba(255, 255, 255, 0.04);
    }

    .list_albums_count {
        display: inline;
    }

    .list_albums_toggle_icon {
        display: inline;
    }

    .list_albums_content {
        padding: 0 1rem 1rem 1rem;
    }

    .list_albums_grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .list_band_info {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .list_band_photo_container {
        justify-content: center;
    }

    .list_band_meta {
        align-items: center;
    }

    /* Centering inline location on narrow screen */
    .list_band_location {
        display: block;
        text-align: center;
    }
}

/* Desktop: albums content always visible, toggle non-interactive */
@media (min-width: 769px) {
    .list_albums_content {
        display: block !important;
    }
}

/* ============================================================
   Responsive — All Lists Page
   ============================================================ */

@media (max-width: 768px) {
    .all_lists_page_container {
        padding: 1rem;
    }

    .all_lists_header h1 {
        font-size: 2rem;
    }

    .all_lists_grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .all_lists_card_desc {
        -webkit-line-clamp: 4;
    }
}

@media (max-width: 480px) {
    .all_lists_card_title {
        font-size: 1.15rem;
    }

    .all_lists_card_body {
        padding: 1rem;
    }
}
