.help {
    font-size: 11px; color: gray; display: block; margin: 5px 0 0 0;
}
.submitAggregateContainer {
   display: flex; flex-direction: row; gap: 20px; align-items: center; justify-content: space-between; padding: 5px; border-radius: 24px; background-color: rgba(0, 0, 0, 0.1); 
}
.submitAggregateContainer button {
    padding: 5px; background-color: #696969; border-radius: 1000px; color: white;
}
button.bRanked {
    border-bottom-right-radius: 0; border-top-right-radius: 0;
}
button.bUnranked {
    border-bottom-left-radius: 0; border-top-left-radius: 0;
}
button.bRanked div, button.bUnranked div {
    padding: 15px; border-radius: 1000px;
}
button.bRanked.selected div, button.bUnranked.selected div, .submit-wrapper button {
    background-color: #D1D1D1; color: black;
}
.submit-wrapper button, .submit-btn {
    padding: 15px 60px; 
}
.submit-btn {
    border-radius: 1000px; margin: 10px; background-color: #D1D1D1; color: black; 
}
.submit-btn.red, body.dark .submit-btn.red{
    background-color: #d76666;
}
.countdown {
    text-align: center;
}
.countdown span.bold {
    font-weight: bold; font-size: 14px;
}
.countdown div {
    font-size: 11px; text-transform: uppercase;  letter-spacing: .075rem;
}
body.dark .countdown div {
    color: #DCDDDE;
}
.howTo {
    padding: 30px; border-radius: 24px; background-color: rgba(0, 0, 0, 0.1);  display: flex;
    flex-direction: column;
    align-items: center; /* Center everything horizontally */
    text-align: center;
}
.howTo .heading {
    font-size: 2.25em; text-align: center; margin-bottom: 30px; border-bottom: 1px solid #2a2a2a; width: 100%; padding-bottom: 15px;
}
.howToSection {
    display: flex;
    align-items: center;
    gap: 25px;
    max-width: 800px; /* Constrain width */
    width: 100%;
    margin-bottom: 20px;
}
.howTo .icon {
    flex-shrink: 0; /* Prevent icon from shrinking */
    font-size: 1.5em;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #F5F5F5; /* Solid dark gray */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}
body.dark .howTo .icon {
    background-color: #2a2a2a;
}
.howTo .text {
    font-size: 1.4em; flex: 1;
    text-align: left;
    max-width: 600px;
}
.howTo .largeButtonContainer {
    margin-bottom: 0; margin-top: 20px;
}
body.dark .submitAggregateContainer, body.dark .howTo {
    background-color: rgba(255, 255, 255, 0.1);
}
body.dark .submitAggregateContainer button {
    background-color: #202225;  
}
body.dark button.bRanked.selected div, body.dark button.bUnranked.selected div, body.dark .submit-wrapper button, body.dark .submit-btn {
    background-color: #D1D1D1; color: black; 
}
.searchImage {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #aaa; padding: 0;
}
#userAggregateSearch {
    margin: 0;
}
#userAggregateSearch:focus {
    outline: none;
}
.addAlbumAggregate {
  cursor: pointer;
}
.albumText {
    display: flex;
    flex-direction: column;
}
.albumInfoFlex {
    display: flex;
    align-items: center;
    gap: 0px;
}
tbody tr:first-child .upArrow {
    display: none;
}   

tbody tr:last-child .downArrow {
    display: none;
}
td.delete button {
    color: #d76666;
}
td.delete button:hover {
    color: gray;
}
table.hide-ranks th:first-child,
table.hide-ranks td:first-child {
    display: none;
}
td.grip {
    text-align: center; width: 10px; font-size: 1.5em; color: gray;
}
tbody tr {
    cursor: move;
}
tbody tr:active {
    cursor: grabbing;
}
.ui-state-highlight {
    background-color: rgba(0, 0, 0, 0.03); 
}
body.dark .ui-state-highlight {
    background-color: rgba(255, 255, 255, 0.1);
}
tbody tr.ui-sortable-helper {
    opacity: 0.8;
    background-color: #2a2a2a;
}
/* User List */
.flexContent {
    display: flex;
    gap: 20px; /* Space between columns */
    align-items: flex-start; /* Align to top */
    padding: 30px;
}
.yearEnd.headline {
    font-size: 26px; text-align: left; margin: 0;
}
.byLine {
    display: flex; margin: 10px 0 0 0; align-items: center; border-bottom: 1px solid #e2e2e2; padding: 0 0 8px 0;
}
body.dark .byLine {
    border-color: #38444D;
}
.byLine .userImage {
    width: 40px; height: 40px; 
}
.byLine .userImage img {
    width: 100%; height: auto; border-radius: 50%; margin: 0; float: none; border: none; vertical-align: middle; aspect-ratio: auto;
}
.byLine .userName {
    font-size: 18px; margin-left: 10px; 
}
.yearEnd.albumCovers {
    flex: 0 0 75%; /* Take 75% width, don't grow/shrink */
}
.yearEnd.albumList {
    flex: 1; /* Take remaining 25% */
    position: sticky; /* Optional: makes list stick while scrolling */
    top: 20px; /* Distance from top when sticky */
    text-align: left;
}
/* Text for list print */
.yearEnd.albumList ol {
    counter-reset: item;
    list-style: none;
    padding-left: 0;
}
.yearEnd.albumList li {
    counter-increment: item;
    padding-left: 44px;
    position: relative;
    margin-bottom: 5px; 
    line-height: 1.25; 
}
.yearEnd.albumList li::before {
    content: counter(item) ".";
    position: absolute;
    left: 0;
    width: 40px;
    text-align: right;
    font-weight: bold;
    color: #4A70A9;
    padding-right: 8px;
}
body.dark .yearEnd.albumList li::before {
    color: #ffdbb6;
}
/* Hide numbers for unranked lists */
.yearEnd.albumList ol.unranked li::before {
    content: none;
}
.yearEnd.albumList ol.unranked li {
    padding-left: 20px; /* Remove left padding since no numbers */
}
.yearEnd.albumList a:hover {
    text-decoration: none; color: #4A70A9;
}
body.dark .yearEnd.albumList a:hover {
    color: #ffdbb6;
}
/* Album Blocks */
.yearEnd.albumCovers {
    display: grid;
    grid-template-columns: repeat(30, 1fr);
    gap: 1px;
    background: rgba(0, 0, 0, 0.1)
}

.yearEnd.block {
    position: relative;
    padding-bottom: 100%; /* Square aspect ratio */
    overflow: hidden;
    grid-column: span 6; /* Desktop default: 5 across (30/6=5) */
}
    /* Special case for exactly 5 albums */
    .yearEnd.block.desktop-half {
        grid-column: span 15; /* 2 across (30/15=2) */
    }
    
    .yearEnd.block.desktop-third {
        grid-column: span 10; /* 3 across (30/10=3) */
    }
body.dark .yearEnd.albumCovers {
    background: rgba(255, 255, 255, 0.1);
}
.yearEnd.block .rankNumber {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.8); /* Dark semi-transparent background */
    color: #fff;
    padding: 4px 6px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 3px;
    z-index: 10;
    line-height: 1;
}
.yearEnd.block img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crops to fill square */
    display: block;
}

.yearEnd.albumList li.highlightText, .yearEnd.albumList li.highlightText a {
    color: #4A70A9; /* Or whatever color you want */
}
body.dark .li.highlightText, body.dark .yearEnd.albumList li.highlightText a, body.dark .moreInfo .category {
    color: #ffdbb6;
}

/* Optional: also highlight the album cover */
.yearEnd.block.highlight {
    opacity: 0.7;
}
.moreInfo {
    font-size: 12px; padding-left: 20px;
}
.moreInfo div {
    margin-bottom: 5px;
}
.moreInfo .category {
    font-weight: bold;  color: #4A70A9;
}
@media screen and (min-width : 0px) and (max-width : 750px) {
    .submitAggregateContainer {
        flex-direction: column; /* Stack vertically */
        gap: 10px;
        width: 100%;
    }
    .toggle-wrapper, .submit-wrapper {
        display: flex;
        gap: 0;
        width: 100%; /* Ensure buttons don't overflow */
    }
    .toggle-wrapper button, .submit-wrapper button {
        flex: 1; text-align: center; 
    }
    .toggle-wrapper button div {
        padding: 10px;
    }
    .countdown {
        width: 100%; padding: 15px; box-sizing: border-box;
    }
    /* User List */
    .flexContent {
        flex-direction: column;
    }    
    .yearEnd.albumCovers,
    .yearEnd.albumList {
        flex: 1;
        width: 100%;
    }    
    .yearEnd.albumList {
        position: static; /* Disable sticky on mobile */
    }
}
@media (max-width: 480px) {
    .howToSection {
        gap: 15px;
    }
    .howTo .heading {
        font-size: 2em;
    }
    .howTo .icon {
        font-size: 1.25em; width: 40px; height: 40px;
    }
    .howTo .text {
        font-size: 1.2em;
    }
    .flexContent {
        padding: 20px 10px 0 10px;
    }
    .yearEnd.albumCovers {
        grid-template-columns: repeat(12, 1fr);
    }
    .yearEnd.block {
        position: relative;
        padding-bottom: 100%;
        overflow: hidden;
        background: #1a1a1a;
        grid-column: span 4; /* Each takes 3 columns = 4 across (12/3=4) */
    }
    .yearEnd.block.span-large {
        grid-column: span 4; /* 3 across */
    }

    .yearEnd.block.span-half {
        grid-column: span 6; /* 2 across */
    }

    .yearEnd.block.span-full {
        grid-column: span 12; /* 1 across (full width) */
    }
    .yearEnd.albumList li::before {
        width: 30px;
    }
    .yearEnd.albumList li {
        padding-left: 34px;
    }
}
@media (hover: hover) and (pointer: fine) {
    tbody tr:hover {
        background-color: rgba(0, 0, 0, 0.03); 
    }
    body.dark tbody tr:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }
}