/*
    linernotd.com - Integrated Stylesheet
    - Redesigned with a new, sober aesthetic.
    - Features a 3-way theme system.
    - Preserves original layout and component styles.
    - Merged with profile.css and other component styles.
*/

/* ======================================================================== */
/* THEME & FONT DEFINITIONS                                                 */
/* ======================================================================== */

/* Theme 1: Default (Dark Gray) - Applied if no theme class is present */
:root {
    --bg-main: #111111;
    --bg-secondary: #222222;
    --bg-header: rgba(17, 17, 17, 0.75);
    --text-main: #FFFFFF;
    --text-muted: #999999;
    --border-color: #333333;
    --accent: #FFFFFF; 
    --accent-hover: #BBBBBB;
    --bg-hover: #333333;
    --yellow-accent: #f59e0b;
    --legacy-blue: #3b82f6;
}

/* Theme 2: Bright Cream - Applied via .theme-cream class */
.theme-cream {
    --bg-main: #FDFBF6;
    --bg-secondary: #FFFFFF;
    --bg-header: rgba(253, 251, 246, 0.75);
    --text-main: #2c2c2c;
    --text-muted: #6b6b6b;
    --border-color: #e0e0e0;
    --accent: #000000;
    --accent-hover: #333333;
    --bg-hover: #F0EFEA;
}

/* Theme 3: Pitch Black - Applied via .theme-pitch-black class */
.theme-pitch-black {
    --bg-main: #000000;
    --bg-secondary: #111111;
    --bg-header: rgba(0, 0, 0, 0.75);
    --text-main: #FFFFFF;
    --text-muted: #AAAAAA;
    --border-color: #2a2a2a;
    --accent: #FFFFFF;
    --accent-hover: #CCCCCC;
    --bg-hover: #1c1c1c;
}

/* ======================================================================== */
/* GLOBAL STYLES & RESETS                                                   */
/* ======================================================================== */

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}
h1, h2, h3, h4, h5 {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.05em;
}
.theme-cream .section-title,
.theme-cream .dashboard-card-header,
.theme-cream .settings-title {
    color: #1E1E1E;
}
.nav-link {
    transition: color 0.2s;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.1em;
    font-size: 1.0rem;
    color: var(--text-muted);
}
.nav-link:hover, .nav-link.active {
    color: var(--accent);
}

#mobile-menu-panel { 
    transition: transform 0.3s ease-in-out; 
    background-color: var(--bg-secondary); 
}
#mobile-menu-overlay.hidden #mobile-menu-panel { 
    transform: translateX(100%); 
}

.loader {
    position: fixed;
    inset: 0;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.loader-spinner {
    border: 4px solid var(--bg-secondary);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.content-hidden {
    display: none;
}

/* ======================================================================== */
/* ALBUM PAGE STYLES                                                        */
/* ======================================================================== */

.cover-art-container {
    border: 1px solid var(--border-color);
}
.streaming-links-small a {
    color: var(--text-main);
    transition: color 0.2s;
}
.streaming-links-small a .streaming-logo {
    fill: currentColor;
    width: 24px;
    height: 24px;
}
.streaming-links-small a:hover {
    color: var(--accent);
}
.streaming-links-small a.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(100%);
    color: var(--text-muted);
}

.tracklist ol {
    list-style: none;
    padding-left: 0;
}
.tracklist li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}
.tracklist li:last-child {
    border-bottom: none;
}
.tracklist li span:first-child {
    color: var(--text-main);
    font-weight: 600;
}
.tracklist li span:last-child {
    color: var(--text-muted);
}

.genre-tag, .type-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s;
}
.genre-tag {
    background-color: var(--text-muted);
    color: var(--bg-main);
}
.type-tag {
    background-color: var(--text-main);
    color: var(--bg-secondary);
}
.genre-tag:hover, .type-tag:hover {
    transform: translateY(-2px);
}

.lineup-scroll-container {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.artist-lineup-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
    text-decoration: none;
}
.artist-lineup-item:not(.unlinked):hover {
    background-color: var(--bg-hover);
}
.artist-lineup-item .artist-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}
.artist-lineup-item .artist-name {
    color: var(--text-main);
    font-weight: 600;
}
.artist-lineup-item .artist-instrument {
    color: var(--text-muted);
}

.analysis-dropdown-content {
    display: none;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}
.analysis-dropdown.open .analysis-dropdown-content { display: block; }
.analysis-dropdown.open .analysis-dropdown-arrow { transform: rotate(90deg); }
.analysis-dropdown-arrow { transition: transform 0.3s ease; }

.review-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent);
    color: var(--bg-main) !important;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.1em;
    text-decoration: none;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}
.review-button:hover {
    background-color: var(--accent-hover);
}

.album-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.nav-arrow {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    text-decoration: none;
    transition: all 0.2s;
}
.nav-arrow:not(.disabled):hover {
    border-color: var(--accent);
    background-color: var(--bg-hover);
}
.nav-arrow.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.nav-arrow .arrow-icon {
    font-size: 2rem;
    color: var(--accent);
}
.nav-arrow.prev { justify-content: flex-start; text-align: left; }
.nav-arrow.next { justify-content: flex-end; text-align: right; }
.nav-arrow.prev .arrow-icon { margin-right: 1rem; }
.nav-arrow.next .arrow-icon { margin-left: 1rem; }
.nav-arrow .nav-label { color: var(--text-muted); }
.nav-arrow .nav-album-title {
    color: var(--text-main);
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.05em;
}

/* ======================================================================== */
/* DASHBOARD CARD STYLES                                                    */
/* ======================================================================== */
.dashboard-card {
    background-color: var(--bg-secondary);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
    border: 1px solid var(--border-color);
}
.dashboard-card:hover {
    border-color: var(--accent);
}
.album-section-card {
    background-color: var(--bg-hover);
    padding: 1rem;
    border-radius: 0.375rem;
}
.dashboard-card-header {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-main);
}
.dashboard-card-content {
    padding: 1.25rem;
}

/* ======================================================================== */
/* FRONTPAGE STYLES                                                         */
/* ======================================================================== */

#frontpage-slider {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}
.slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-size: cover;
    background-position: center;
    z-index: 1;
}
.slide.active { opacity: 1; z-index: 2; }
.slide-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 1.5rem;
    padding-bottom: 2.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 25%, transparent 60%);
    color: white; /* This should remain white for readability on images */
    text-align: center;
}
#frontpage-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 3;
}
#frontpage-dots .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background-color 0.3s;
}
#frontpage-dots .dot.active { background-color: white; }

.main-content-wrapper {
    position: relative;
    background-color: transparent;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.main-content-wrapper::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://firebasestorage.googleapis.com/v0/b/controlled-freedom.firebasestorage.app/o/faviconln.svg?alt=media&token=d1e6685e-eca6-4ef7-96bd-a84516ec0f1c');
    background-size: 75px 75px;
    background-repeat: repeat;
    opacity: 0.03;
    z-index: 0;
}
.main-content-wrapper > .container {
    position: relative;
    z-index: 1;
}

.on-this-day-item {
    display: flex; align-items: center; gap: 1rem; padding: 1rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.on-this-day-item:hover {
    border-color: var(--accent);
    background-color: var(--bg-hover);
}
.on-this-day-item img {
    width: 80px; height: 80px; object-fit: cover;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}
.on-this-day-item .artist-photo { filter: grayscale(100%); }
.on-this-day-item:hover .artist-photo { filter: grayscale(0%); }

.dropdown-container { position: relative; }
.dropdown-list {
    position: absolute;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    z-index: 20; width: 200px;
    opacity: 0; visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}
.dropdown-container:hover .dropdown-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-list a {
    display: block; padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    color: var(--text-main);
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.1em;
    font-size: 1.0rem;
}
.dropdown-list a:hover {
    background-color: var(--accent);
    color: var(--bg-main);
}
#mobile-nav-links .mobile-nav-link {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.1em;
}

/* MODAL STYLES (Consolidated) */

/* Generic modal backdrop/wrapper */
.modal {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.theme-cream .modal {
    background-color: rgba(240, 239, 234, 0.75);
}
.modal.is-open, .modal:not(.opacity-0) { /* Support both is-open and tailwind-style toggling */
    opacity: 1; visibility: visible;
}

/* Modal container for artist modal etc. */
.modal-container { 
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
}
.modal.opacity-0 .modal-container {
      opacity: 0;
      transform: scale(0.95) translateY(10px);
}
#artist-modal-title { color: var(--text-main); }


/* Modal content box for rating board/mood board modals */
.modal .modal-content {
    position: relative; background-color: var(--bg-secondary); padding: 1.5rem; border-radius: 0.75rem; width: 90%; max-width: 600px; transform: scale(0.95); opacity: 0; transition: transform 0.3s, opacity 0.3s;
    color: var(--text-main);
}
.modal.is-open .modal-content {
    transform: scale(1); opacity: 1;
}

/* Specific styles for Mood Modal */
.mood-modal-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.5rem; max-height: 40vh; overflow-y: auto; padding: 0.5rem; background: var(--bg-main); border-radius: 0.5rem;
}
.mood-modal-btn {
    border: 2px solid transparent; padding: 8px; border-radius: 0.375rem; font-weight: 600; transition: all 0.2s ease; text-align: center; opacity: 0.8; display: flex; align-items: center; justify-content: center; min-height: 40px; word-break: break-word;
    cursor: pointer;
}
.mood-modal-btn:hover:not(:disabled) {
    opacity: 1; transform: scale(1.05);
}
.mood-modal-btn.selected {
    opacity: 1; border-color: var(--accent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 50%, transparent);
}
.mood-modal-btn:disabled:not(.selected) {
    opacity: 0.4; cursor: not-allowed;
}
.mood-modal-footer {
    display: flex; justify-content: space-between; align-items: center; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border-color);
}

/* Specific styles for Log Modal */
#log-modal .modal-content {
  padding: 1.25rem 1.25rem 1.5rem; max-width: 640px;
}
#log-modal .log-input {
  width: 100%; background: var(--bg-main); color: var(--text-main);
  border: 1px solid var(--border-color); border-radius: .45rem; padding: .5rem .6rem; font-size: .9rem;
}
#log-modal .log-input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}
#log-modal .form-actions {
  display: flex; justify-content: flex-end; gap: .5rem; margin-top: .75rem;
}
#log-modal .form-grid {
  display: grid; grid-template-columns: 1.2fr 1fr .8fr .8fr; gap: .5rem;
}
@media (max-width: 520px) { #log-modal .form-grid { grid-template-columns: 1fr 1fr; } }


.artist-card {
    background-color: var(--bg-secondary);
    border-radius: 0.25rem;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    border: 1px solid var(--border-color);
}
.artist-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}
.artist-card.bandleader { border-left: 3px solid var(--accent); }
.artist-card.influential-sideman { border-left: 3px solid var(--yellow-accent); }
.artist-card.legacy-artist { border-left: 3px solid var(--legacy-blue); }

.artist-card .artist-photo-container { height: 192px; width: 100%; }
.modal .artist-photo-container { height: 256px; width: 100%; }
.artist-card img, .modal .artist-photo-container img {
      width: 100%; height: 100%;
      object-fit: cover; object-position: center;
}
.artist-card img { filter: grayscale(100%); transition: filter 0.3s ease; }
.artist-card:hover img { filter: grayscale(0%); }

.artist-placeholder {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    background-color: var(--bg-secondary);
}
.artist-placeholder svg { width: 50%; height: 50%; color: var(--text-muted); }

#artist-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.clickable-link {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: var(--text-muted);
    transition: color 0.2s, text-decoration-color 0.2s;
}
.clickable-link:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

.artist-modal-timeline {
    list-style: none; padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}
.artist-modal-timeline-item { position: relative; padding-bottom: 1rem; padding-left: 1.5rem; }
.artist-modal-timeline-item::before {
    content: ''; position: absolute;
    left: -0.4rem; top: 0.25rem;
    width: 0.65rem; height: 0.65rem;
    border-radius: 9999px;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
}

.known-for-box {
    background-color: var(--bg-hover); color: var(--text-main);
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    display: inline-block;
    font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.9rem;
}

.pagination-container {
    display: flex; justify-content: center; align-items: center;
    gap: 0.5rem; margin-top: 2rem; flex-wrap: wrap;
}
.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-main);
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0.25rem;
}
.pagination-btn:hover:not(:disabled) {
    background-color: var(--accent);
    color: var(--bg-main);
    border-color: var(--accent);
}
.pagination-btn.active {
    background-color: var(--accent);
    color: var(--bg-main);
    border-color: var(--accent);
}
.pagination-btn:disabled { cursor: not-allowed; opacity: 0.5; }

.styled-select { position: relative; }
.styled-select select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1.2em;
    padding-right: 2.5rem;
}
.theme-cream .styled-select select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232c2c2c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.collaborator-card { cursor: pointer; transition: transform 0.2s ease; }
.collaborator-card:hover { transform: scale(1.05); }

.profile-button {
    display: inline-block; padding: 0.5rem 1.5rem;
    background-color: var(--accent);
    color: var(--bg-main) !important;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.05em; text-decoration: none; border-radius: 0.25rem;
    transition: background-color 0.2s ease; text-align: center;
}
.profile-button:hover { background-color: var(--accent-hover); }

.modal-input, .modal-select {
    background-color: var(--bg-secondary);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.modal-input::placeholder { color: var(--text-muted); opacity: 0.7; }

/* BANNER & TYPEWRITER */
.banner-section {
    position: relative; width: 100%; height: 35vh; max-height: 200px;
    overflow: hidden; background-color: var(--bg-secondary);
}
.banner-img {
    width: 100%; height: 100%; object-fit: cover; opacity: 0.15;
    transition: opacity 1s ease-out;
}
.banner-overlay {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
    padding: 1rem; color: var(--text-main);
}
.typewriter h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.75rem;
    max-width: 90vw;
    font-weight: bold;
    color: var(--text-main);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    overflow: hidden;
    border-right: .15em solid var(--accent);
    white-space: nowrap; margin: 0 auto; letter-spacing: .1em;
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}
.banner-subtitle { font-size: 0.9rem; }
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--accent); }
}
@media (min-width: 768px) {
    .banner-section { height: 30vh; max-height: 250px; }
    .typewriter h2 { font-size: 3rem; max-width: none; }
    .banner-subtitle { font-size: 1.125rem; }
}

/* ======================================================================== */
/* PROFILE PAGE STYLES (MERGED & REFACTORED)                                */
/* ======================================================================== */

.profile-card { 
    background-color: var(--bg-secondary); 
    border: 1px solid var(--border-color);
}
#profile-avatar { 
    border-color: var(--bg-secondary); 
}
.section-header { 
    display: flex; 
    align-items: baseline; 
    justify-content: space-between; 
    padding-bottom: 0.5rem; 
    border-bottom: 1px solid var(--border-color); 
}
.section-title { 
    font-size: 0.9rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    color: var(--text-muted); 
}
.profile-tab { 
    padding: 0.75rem 1rem; 
    font-family: 'Bebas Neue', sans-serif; 
    letter-spacing: 0.1em; 
    font-size: 1.1rem; 
    border-bottom: 3px solid transparent; 
    transition: all 0.3s ease; 
    color: var(--text-muted); 
}
@media (min-width: 640px) { 
    .profile-tab { padding: 1rem 1.5rem; } 
}
.profile-tab:hover { 
    color: var(--text-main); 
}
.profile-tab.active { 
    color: var(--accent); 
    border-bottom-color: var(--accent); 
}
#activity-log-container > .activity-block:not(:first-child) { 
    border-top: 1px solid var(--border-color); 
}
.activity-block { 
    transition: background-color 0.2s ease-in-out; 
    margin: 0 -1.5rem; 
    padding: 1rem 1.5rem;
}
.activity-block:hover { 
    background-color: var(--bg-hover); 
}
.highlight-section { 
    background-color: var(--bg-hover); 
    border: 1px solid var(--border-color); 
    border-radius: 0.5rem; 
    padding: 0.75rem; 
}
.highlight-section .album-slot, .highlight-section .quartet-slot { 
    transition: transform 0.2s ease-in-out; 
    will-change: transform; 
}
.highlight-section .album-slot:hover, .highlight-section .quartet-slot:hover { 
    transform: scale(1.04); 
    z-index: 10; 
    position: relative; 
}
.highlight-section .album-slot img, .highlight-section .quartet-slot img { 
    transition: box-shadow 0.2s ease-in-out;
    border: 1px solid var(--border-color);
}
.highlight-section .album-slot:hover img, .highlight-section .quartet-slot:hover img { 
    box-shadow: 0 4px 20px rgba(0,0,0,0.15); 
}
.theme-cream .highlight-section .album-slot:hover img, 
.theme-cream .highlight-section .quartet-slot:hover img {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1); 
}
:is(.theme-pitch-black, :root) .highlight-section .album-slot:hover img, 
:is(.theme-pitch-black, :root) .highlight-section .quartet-slot:hover img {
    box-shadow: 0 4px 25px rgba(0,0,0,0.5); 
}
    
/* SETTINGS PAGE STYLES */
.settings-section { 
    border: 1px solid var(--border-color); 
    background-color: var(--bg-secondary); 
    border-radius: 0.5rem; 
    overflow: hidden; 
}
.settings-header { 
    padding: 0.75rem 1.25rem; 
    background-color: var(--bg-hover); 
    border-bottom: 1px solid var(--border-color); 
}
.settings-title { 
    font-size: 1rem; 
    font-weight: 700; 
    color: var(--text-main); 
}
.settings-content { padding: 1.25rem; }
.settings-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 1.25rem; 
}
@media (min-width: 768px) { 
    .settings-grid { grid-template-columns: repeat(2, 1fr); } 
}
.settings-item, .settings-action { display: flex; flex-direction: column; }
.settings-label { 
    font-size: 1rem; 
    font-weight: 500; 
    color: var(--text-main); 
    margin-bottom: 0.5rem; 
}
.settings-input, .settings-textarea { 
    width: 100%; 
    background-color: var(--bg-main); 
    border: 1px solid var(--border-color); 
    border-radius: 0.375rem; 
    padding: 0.5rem 0.75rem; 
    font-size: 0.875rem; 
    color: var(--text-main); 
    transition: all 0.2s; 
}
.settings-input:focus, .settings-textarea:focus { 
    outline: none; 
    border-color: var(--accent); 
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent);
}
.settings-button { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    padding: 0.5rem 1rem; 
    border-radius: 0.375rem; 
    font-weight: 600; 
    font-size: 0.875rem; 
    transition: all 0.2s; 
    cursor: pointer; 
    border: 1px solid var(--border-color); 
    background-color: var(--bg-hover); 
    color: var(--text-main); 
}
.settings-button:hover { 
    background-color: var(--border-color); 
}
.settings-button.primary { 
    background-color: var(--accent); 
    color: var(--bg-main); 
    border-color: var(--accent); 
}
.settings-button.primary:hover { 
    background-color: var(--accent-hover); 
}
.settings-button.danger { 
    border-color: #ef4444; 
    color: #ef4444; 
}
.settings-button.danger:hover { 
    background-color: #ef4444; 
    color: white; 
}
.settings-button:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
}
.settings-note { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    margin-top: 0.5rem; 
}
.danger-zone { 
    border-color: #ef4444; 
}
.danger-zone .settings-header { 
    background-color: rgba(239, 68, 68, 0.05); 
}
.danger-zone .settings-title { 
    color: #ef4444; 
}
.settings-modal { 
    position: fixed; 
    inset: 0; 
    z-index: 100; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background-color: rgba(0,0,0,0.6); 
    backdrop-filter: blur(4px); 
    opacity: 0; 
    visibility: hidden; 
    transition: all 0.3s; 
}
.settings-modal.is-open { 
    opacity: 1; 
    visibility: visible; 
}
.settings-modal-content { 
    background-color: var(--bg-secondary); 
    padding: 1.5rem; 
    border-radius: 0.75rem; 
    width: 90%; 
    max-width: 500px; 
    transform: scale(0.95); 
    opacity: 0; 
    transition: all 0.3s; 
}
.settings-modal.is-open .settings-modal-content { 
    transform: scale(1); 
    opacity: 1; 
}

/* TOGGLE SWITCH STYLES */
.toggle-switch { 
    display: inline-flex; 
    align-items: center; 
    cursor: pointer; 
    flex-shrink: 0; 
}
.toggle-switch-input { display: none; }
.toggle-switch-track { 
    width: 44px; 
    height: 24px; 
    background-color: var(--border-color); 
    border-radius: 9999px; 
    position: relative; 
    transition: background-color 0.2s ease-in-out; 
}
.toggle-switch-thumb { 
    width: 20px; 
    height: 20px; 
    background-color: white; 
    border-radius: 9999px; 
    position: absolute; 
    top: 2px; 
    left: 2px; 
    transition: transform 0.2s ease-in-out; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
}
.toggle-switch-input:checked + .toggle-switch-track { 
    background-color: var(--accent); 
}
.toggle-switch-input:checked + .toggle-switch-track .toggle-switch-thumb { 
    transform: translateX(20px); 
}
.settings-item-with-toggle {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
@media (min-width: 640px) {
    .settings-item-with-toggle {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 1rem;
    }
}
.settings-item-with-toggle > .flex-grow { 
    flex-grow: 1; 
    width: 100%;
}

/* ======================================================================== */
/* SHARE CARD STYLES (MERGED & REFACTORED)                                  */
/* ======================================================================== */
.share-modal { 
    position: fixed; inset: 0; z-index: 110; display: flex; align-items: center; 
    justify-content: center; background-color: rgba(0,0,0,0.7); 
    backdrop-filter: blur(8px); opacity: 0; visibility: hidden; transition: all 0.3s ease; 
}
.share-modal.is-open { opacity: 1; visibility: visible; }
.share-modal-content { 
    background-color: var(--bg-secondary); padding: 1.5rem; border-radius: 0.75rem; 
    width: 90%; max-width: 450px; transform: scale(0.95); opacity: 0; 
    transition: all 0.3s ease; text-align: center; border: 1px solid var(--border-color);
}
.share-modal.is-open .share-modal-content { transform: scale(1); opacity: 1; }
.share-modal-image-container { 
    margin-bottom: 1.5rem; border: 1px solid var(--border-color); 
    border-radius: 0.5rem; overflow: hidden; 
}
.share-modal-image-container img { max-width: 100%; display: block; }

/* Styles for the generated card itself (used by html2canvas) */
.share-card {
    width: 600px;
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    padding: 28px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}
.share-card-header { 
    display: flex; align-items: center; gap: 16px; 
    margin-bottom: 24px; position: relative; 
}
.share-card-avatar { 
    width: 64px; height: 64px; border-radius: 9999px; 
    object-fit: cover; border: 3px solid var(--text-muted); 
}
.share-card-username { 
    font-size: 24px; font-weight: 900; line-height: 1.1; text-align: left; 
}
.share-card-handle { font-size: 14px; color: var(--text-muted); text-align: left; }
.share-card-logo { 
    position: absolute; top: -4px; right: 0px; 
    width: 100px; height: auto; opacity: 0.9;
    background-color: var(--text-main);
    -webkit-mask-image: url('https://firebasestorage.googleapis.com/v0/b/controlled-freedom.firebasestorage.app/o/linernotdlogo.svg?alt=media&token=29184a12-bed2-4860-9c8f-34e6dcd1a51f');
    mask-image: url('https://firebasestorage.googleapis.com/v0/b/controlled-freedom.firebasestorage.app/o/linernotdlogo.svg?alt=media&token=29184a12-bed2-4860-9c8f-34e6dcd1a51f');
    -webkit-mask-size: contain; mask-size: contain;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.share-card-section { margin-top: 20px; }
.share-card-section-title { 
    font-family: 'Bebas Neue', sans-serif; font-size: 18px; 
    letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 12px; text-align: left; 
}
.share-card-albums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.share-card-album-art { 
    width: 100%; height: auto; aspect-ratio: 1 / 1; 
    object-fit: cover; border-radius: 8px; 
}
.share-card-album-placeholder { 
    width: 100%; aspect-ratio: 1/1; background-color: var(--bg-secondary); 
    border-radius: 8px; 
}
.share-card-quartet { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.share-card-quartet-member { text-align: center; }
.share-card-quartet-avatar { 
    width: 100%; height: auto; aspect-ratio: 1/1; object-fit: cover; 
    border-radius: 9999px; border: 2px solid var(--border-color); 
}
.share-card-quartet-name {
    font-size: 12px; font-weight: 700; margin-top: 8px;
    line-height: 1.3; height: 2.6em; overflow: hidden;
}
.share-card-quartet-instrument { 
    font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; 
}

/* ======================================================================== */
/* COLLECTION/WISHLIST STYLES (MERGED & REFACTORED)                         */
/* ======================================================================== */
.collection-controls { 
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; 
    gap: 0.75rem; padding: 0.75rem; margin-bottom: 1.5rem; 
    border: 1px solid var(--border-color); border-radius: 0.5rem; background-color: var(--bg-hover); 
}
.collection-controls-left, .collection-controls-right { 
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; 
}
@media (max-width: 1024px) { 
    .collection-controls { flex-direction: column; align-items: stretch; } 
    .collection-controls-right { justify-content: flex-end; } 
}
.collection-search { position: relative; flex-grow: 1; min-width: 150px; }
.collection-search input { 
    width: 100%; background: var(--bg-secondary); border: 1px solid var(--border-color); 
    border-radius: 0.375rem; padding: 0.5rem 0.75rem 0.5rem 2.25rem; 
    font-size: 0.875rem; transition: all 0.2s; height: 38px; color: var(--text-main);
}
.collection-search i { 
    position: absolute; left: 0.75rem; top: 50%; 
    transform: translateY(-50%); color: var(--text-muted); pointer-events: none; 
}
.collection-filter-buttons, .collection-view-switcher { 
    display: flex; align-items: center; padding: 0.25rem; 
    background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 0.375rem; 
}
.collection-filter-btn, .collection-view-btn { 
    background: transparent; border: none; color: var(--text-muted); 
    padding: 0.25rem 0.75rem; border-radius: 0.25rem; font-size: 0.8rem; 
    font-weight: 600; cursor: pointer; transition: all 0.2s; white-space: nowrap; 
}
.collection-filter-btn.active, .collection-view-btn.active { 
    background: var(--bg-secondary); color: var(--text-main); box-shadow: 0 1px 2px rgba(0,0,0,0.05); 
}
.collection-sort select, .collection-rating-filter select { 
    background: var(--bg-secondary); border: 1px solid var(--border-color); 
    border-radius: 0.375rem; padding: 0 0.75rem; font-size: 0.875rem; height: 38px; color: var(--text-main);
}

/* Grid View */
.collection-grid-view { 
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); 
    gap: 1.5rem 1rem; 
}
.collection-grid-item { 
    text-align: left; background-color: var(--bg-secondary); 
    border: 1px solid var(--border-color); border-radius: 0.375rem; overflow:hidden; 
}
.collection-grid-item a { text-decoration: none; }
.collection-grid-item .cover-wrapper { position: relative; }
.collection-grid-item img { 
    width: 100%; height: auto; aspect-ratio: 1/1; 
    object-fit: cover; transition: opacity 0.2s; 
}
.collection-grid-item a:hover img { opacity: 0.8; }
.collection-grid-item .album-info-padding { padding: 0.75rem; }
.collection-grid-item .album-title { 
    font-weight: 700; color: var(--text-main); 
    transition: color 0.2s; font-size: 0.875rem; 
}
.collection-grid-item a:hover .album-title { color: var(--accent); }
.collection-grid-item .album-artist { 
    font-size: 0.8rem; color: var(--text-muted); 
}
.grid-icon { 
    position: absolute; width: 24px; height: 24px; display: flex; align-items: center; 
    justify-content: center; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); 
    border-radius: 999px; color: white; 
}
.grid-icon.favorite { color: #ec4899; }
.grid-rating { 
    position: absolute; font-size: 0.75rem; font-weight: 700; 
    color: white; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); 
    padding: 2px 6px; border-radius: 999px; 
}

/* List View */
.collection-list-view { display: flex; flex-direction: column; }
.collection-list-item { 
    display: grid; grid-template-columns: 80px 1fr auto; align-items: center; 
    gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--border-color); 
    transition: all 0.2s; cursor:pointer; 
}
.collection-list-item:hover { background: var(--bg-hover); }
.list-item-cover img { 
    width: 80px; height: 80px; object-fit: cover; 
    border-radius: 0.25rem; border: 1px solid var(--border-color); 
}
.list-item-info .album-title { 
    display: flex; align-items: baseline; font-weight: 700; 
    font-size: 1.125rem; color: var(--text-main); 
}
.list-item-info a:hover .album-title { color: var(--accent); }
.list-item-info .album-title .album-year-inline { 
    font-weight: 400; font-size: 1rem; color: var(--text-muted); 
    padding-left: 0.75rem; font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.05em; 
}
.list-item-info a:hover .album-year-inline { color: var(--accent); opacity: 0.8; }
.list-item-info .album-artist { font-size: 0.875rem; color: var(--text-muted); }
.list-item-info .album-artist a:hover { color: var(--accent); }
.list-item-genres { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.list-item-genres a:hover { color: var(--accent); }
.list-item-meta { 
    display: flex; flex-direction: column; align-items: flex-end; 
    gap: 0.25rem; text-align: right; 
}
.meta-top-row { display: flex; align-items: center; gap: 1rem; }
.list-item-rating { font-weight: 600; font-size: 1rem; min-width: 50px; }
.list-item-favorite { font-size: 1.125rem; color: #ec4899; }
.list-item-log .log-format { font-size: 0.8rem; font-weight: 600; text-transform: capitalize; }
.list-item-log .log-details { font-size: 0.75rem; color: var(--text-muted); }
