/* =====================
   MAIN COLLECTION VIEW
   ===================== */

body {
    font-family: 'Fraunces', sans-serif;
    padding: 20px;
    background-color: #1a1a1a;
    color: #f0f0f0;
}
#letter-nav {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
}

.letter-tab {
    background: none;
    border: none;
    color: #555555;
    font-family: 'Fraunces', serif;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.letter-tab:hover {
    color: #f0f0f0;
}

.letter-tab.active {
    color: #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.letter-edge-tab {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 80px;
    background: #333333;
    border: 1px solid #444444;
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-family: 'Fraunces', serif;
    font-size: 0.85rem;
    overflow: hidden;
    z-index: 100;
}

#prev-letter-tab {
    left: 0;
    border-radius: 0 6px 6px 0;
    border-left: none;
}

#next-letter-tab {
    right: 0;
    border-radius: 6px 0 0 6px;
    border-right: none;
}

.letter-edge-tab:hover {
    width: 40px;
    background: #444444;
    color: #f0f0f0;
}

.collection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.release {
    cursor: pointer;
}

.release img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.release h2 {
    font-size: 0.85rem;
    margin: 5px 0;
}

.release p {
    font-size: 0.75rem;
    color: #aaaaaa;
    margin: 0;
}

.cover-wrapper {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
}

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

.format-icons {
    position: absolute;
    bottom: 5px;
    right: 5px;
    display: flex;
    gap: 3px;
    width: fit-content;
    height: fit-content;
}

.format-icon {
    width: 16px;
    height: 16px;
}

#header {
    padding: 20px 20px 10px 20px;
}

#loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #aaa;
}

#controls {
    padding: 10px 20px 20px 20px;
}

#search-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

#search-scope {
    display: flex;
    gap: 8px;
}

.scope-pill {
    background: transparent;
    border: 1px solid #555555;
    color: #aaaaaa;
    font-family: 'Fraunces', serif;
    font-size: 0.75rem;
    padding: 4px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scope-pill:hover {
    border-color: #f0f0f0;
    color: #f0f0f0;
}

.scope-pill.active {
    background: #f0f0f0;
    border-color: #f0f0f0;
    color: #1a1a1a;
}

#toggle-sort {
    background: transparent;
    border: 1px solid #f0f0f0;
    color: #f0f0f0;
    font-family: 'Fraunces', serif;
    font-size: 0.85rem;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0;
}

#toggle-sort:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

#search-wrapper {
    position: relative;
    flex: 1;
    max-width: 500px;
}

#search-bar {
    width: 100%;
    padding: 8px 40px 8px 20px;
    font-family: 'Fraunces', serif;
    font-size: 0.85rem;
    background: #f0f0f0;
    border: none;
    border-radius: 20px;
    color: #1a1a1a;
    box-sizing: border-box;
    outline: none;
}

#search-bar::placeholder {
    color: #888888;
}

#search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888888;
    pointer-events: none;
}

#search-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

#search-scope {
    display: flex;
    gap: 8px;
}

#format-filter {
    position: relative;
}

#format-pill {
    background: transparent;
    border: 1px solid #555555;
    color: #aaaaaa;
    font-family: 'Fraunces', serif;
    font-size: 0.75rem;
    padding: 4px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#format-pill:hover {
    border-color: #f0f0f0;
    color: #f0f0f0;
}

#format-pill.active-filter {
    background: #f0f0f0;
    border-color: #f0f0f0;
    color: #1a1a1a;
}

#format-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #2a2a2a;
    border: 1px solid #555555;
    border-radius: 12px;
    padding: 6px;
    flex-direction: column;
    gap: 4px;
    z-index: 100;
    min-width: 120px;
}

#format-dropdown.open {
    display: flex;
}

.format-option {
    background: transparent;
    border: none;
    color: #aaaaaa;
    font-family: 'Fraunces', serif;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.format-option:hover {
    background: #3a3a3a;
    color: #f0f0f0;
}

.format-option.active {
    color: #f0f0f0;
    font-weight: bold;
}

.section-divider {
    width: 100%;
    height: 2px;
    background: #333333;
    margin: 20px 0;
    flex-basis: 100%;
}

.letter-divider {
    flex-basis: 100%;
    margin: 20px 0 10px 0;
    display: flex;
    align-items: flex-end;
}

.letter-divider::before {
    content: attr(data-letter);
    display: inline-block;
    color: #888888;
    font-family: 'Fraunces', serif;
    font-size: 0.85rem;
    background: #222222;
    border: 1px solid #444444;
    border-bottom: none;
    padding: 4px 12px 2px 12px;
    border-radius: 4px 4px 0 0;
}

.letter-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #444444;
    margin-bottom: 1px;
}

/* =====================
   RELEASE DETAIL VIEW
   ===================== */

   #detail-header {
    padding: 20px 20px 0 20px;
}

#back-link {
    color: #f0f0f0;
    text-decoration: none;
    font-size: 0.9rem;
}

#back-link:hover {
    text-decoration: underline;
}

#detail {
    display: flex;
    gap: 40px;
    padding: 20px;
    align-items: flex-start;
}

#detail-art img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    position: relative;
}

#detail-art .format-icons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

#detail-art .format-icon-large {
    width: 30px;
    height: 30px;
}

#detail-info h1 {
    margin: 0 0 5px 0;
    font-size: 2rem;
}

#detail-info h2 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    font-weight: normal;
    color: #aaaaaa;
}

.detail-year, .detail-genre {
    margin: 0 0 5px 0;
    color: #aaaaaa;
    font-size: 0.9rem;
}

#detail-tracklist {
    margin-top: 25px;
}

#detail-tracklist h3 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #aaaaaa;
}

.tracklist-track {
    display: flex;
    gap: 15px;
    padding: 6px 0;
    border-bottom: 1px solid #2a2a2a;
    margin: 0;
    font-size: 0.9rem;
}

.track-position {
    color: #aaaaaa;
    min-width: 30px;
}

.track-duration {
    margin-left: auto;
    color: #aaaaaa;
}

.tracklist-heading {
    font-weight: bold;
    margin: 15px 0 5px 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sides-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sides-row {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.side {
    flex: 1;
}

.side-heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #aaaaaa;
    margin: 0 0 10px 0;
}

.tracklist-table {
    width: 100%;
    border-collapse: collapse;
}

.tracklist-45 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.track-45 {
    display: flex;
    gap: 15px;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px solid #2a2a2a;
}

.side-label-45 {
    color: #aaaaaa;
    min-width: 60px;
    font-size: 0.85rem;
}

.available-on {
    color: #aaaaaa;
    font-size: 0.9rem;
    margin: 10px 0;
}

.format-link {
    color: #f0f0f0;
    text-decoration: none;
    border-bottom: 1px solid #555555;
}

.format-link:hover {
    border-bottom-color: #f0f0f0;
}

/* =====================
   ARTIST PAGE
   ===================== */

#artist-page {
    padding: 20px;
}

#artist-header {
    margin-bottom: 30px;
}

#artist-header h1 {
    margin: 0 0 5px 0;
}

.artist-count {
    color: #aaaaaa;
    font-size: 0.9rem;
    margin: 0;
}

#artist-shelf {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    cursor: grab;
}

#artist-shelf:active {
    cursor: grabbing;
}

#artist-shelf::-webkit-scrollbar {
    height: 6px;
}

#artist-shelf::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 3px;
}

#artist-shelf::-webkit-scrollbar-thumb {
    background: #555555;
    border-radius: 3px;
}

.shelf-item {
    flex: 0 0 150px;
    text-decoration: none;
    color: #f0f0f0;
}

.shelf-item > .cover-wrapper > img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    display: block;
}

.shelf-title {
    font-size: 0.8rem;
    margin: 5px 0 2px 0;
}

.shelf-year {
    font-size: 0.75rem;
    color: #aaaaaa;
    margin: 0;
}

.artist-link {
    color: #aaaaaa;
    text-decoration: none;
}

.artist-link:hover {
    color: #f0f0f0;
}

#artist-hero {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 40px;
}

#artist-photo img {
    width: 300px;
    max-width: 300px;
    height: auto;
    object-fit: contain;
}

#artist-info {
    flex: 1;
}

#artist-info h1 {
    margin: 0 0 5px 0;
}

.artist-profile {
    color: #aaaaaa;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 15px 0;
    max-width: 600px;
}

.artist-url {
    color: #f0f0f0;
    font-size: 0.85rem;
    text-decoration: none;
}

.artist-url:hover {
    text-decoration: underline;
}