:root {
    --primary-color: #1db954;
    --primary-color-hover: color-mix(in srgb, var(--primary-color) 80%, white);
    --accent-rgb: 29, 185, 84;
    /* Alias so var(--accent-color, #1db954) fallbacks in release-page.css /
       public-profile.css / artist-page.css / genre-picker.css follow the
       user's chosen accent instead of silently using the fallback color. */
    --accent-color: var(--primary-color);
    --secondary-color: #191414;
    --background: #121212;
    --surface: #282828;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --error: #e22134;
    --success: #1db954;
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Height of the sticky site chrome; --site-banner-h and --site-header-h are
       measured in base.html. Sticky page content should offset by this. */
    --site-header-h: 64px;
    --sticky-offset: calc(var(--site-banner-h, 0px) + var(--site-header-h, 64px) + 12px);
    /* Shared look (docs/DESIGN.md). The ui-* parts at the end of this file
       and the upload page are built from these. */
    --line: rgba(255, 255, 255, 0.09);
    --field-bg: rgba(255, 255, 255, 0.045);
    --field-bg-focus: rgba(255, 255, 255, 0.07);
    --panel-bg: rgba(255, 255, 255, 0.03);
    --muted: rgba(255, 255, 255, 0.45);
    --radius: 8px;
    --radius-lg: 12px;
    --ctl-h: 38px;
    --ctl-h-sm: 30px;
    --gap: 14px;
    --bad: #f87171;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.has-player-active {
    padding-bottom: var(--player-offset, 85px);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Site header. Must stay scoped to the direct body child - pages render their
   own <header> elements (.rp-header, .fav-header, …) that must not go sticky. */
body > header {
    background: rgba(18, 18, 18, 0.85);
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 500;
    isolation: isolate;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

body.has-site-banner > header {
    top: var(--site-banner-h, 36px);
}

/* Site-wide announcement bar */
#site-announcement-bar {
    position: sticky;
    top: 0;
    z-index: 501;
    font-size: 0.84rem;
    line-height: 1.35;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#site-announcement-bar[hidden] {
    display: none !important;
}

.site-announcement-bar-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.45rem 2.5rem 0.45rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    flex-wrap: wrap;
}

.site-announcement-bar-icon {
    font-size: 18px !important;
    flex-shrink: 0;
    opacity: 0.95;
}

.site-announcement-bar-text {
    font-weight: 500;
    letter-spacing: -0.01em;
}

.site-announcement-bar-link {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
    color: inherit;
    opacity: 0.95;
}

.site-announcement-bar-link:hover {
    opacity: 1;
}

.site-announcement-bar-dismiss {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 4px;
    opacity: 0.7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.site-announcement-bar-dismiss:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.15);
}

.site-announcement-bar-dismiss .material-symbols-outlined {
    font-size: 18px !important;
}

.site-announcement-bar--info {
    background: #1a3a5c;
    color: #e8f1ff;
}

.site-announcement-bar--warning {
    background: #5c3d12;
    color: #ffe8c8;
}

.site-announcement-bar--success {
    background: #1a3d28;
    color: #d8f5e3;
}

.header-content {
    display: grid;
    /* Plain 1fr (not minmax(0, 1fr)) so the side columns keep their default
       content-based minimum - .user-section has flex-shrink:0 (its icon
       buttons shouldn't get squashed), so letting its column shrink below
       that would just push it into overlapping .nav-center instead. */
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.logo-section {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    justify-self: start;
    z-index: 2;
}

.logo-section a {
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
}

.logo-section a:hover {
    opacity: 0.8;
}

.logo {
    display: inline-block;
    height: 38px;
    width: 142px;
    background-color: var(--primary-color);
    -webkit-mask: url('/static/svg/logo.svg') no-repeat center / contain;
            mask: url('/static/svg/logo.svg') no-repeat center / contain;
    transition: background-color 0.2s;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Centered nav - a real grid column (auto-sized to its own content) between
   two equal 1fr side columns, so it's always centered but can never overlap
   the logo/user sections the way absolute positioning could when either
   side's content grows (e.g. an extra icon in .user-section). */
.nav-center {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    font-weight: 500;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    position: relative;
}

.nav-icon {
    font-size: 18px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.07);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(var(--accent-rgb), 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.6rem;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    border-radius: 1px;
    background: var(--primary-color);
}

/* Nav notification badges - unread counts */
.nav-link .news-badge,
.nav-link .requests-badge {
    position: absolute;
    top: 1px;
    right: 1px;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ef5350;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 0 6px rgba(239, 83, 80, 0.5);
    pointer-events: none;
    letter-spacing: -0.2px;
}

/* User section (right side) */
.user-section {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    justify-self: end;
    z-index: 2;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s;
    font-size: 0.85rem;
    font-weight: 500;
}

.user-btn:hover {
    background: rgba(255, 255, 255, 0.07);
}

.user-btn.active {
    background: rgba(102, 126, 234, 0.12);
    color: #667eea;
}

.user-btn .material-symbols-outlined {
    font-size: 22px;
    color: var(--text-secondary);
}

.user-btn.active .material-symbols-outlined {
    color: #667eea;
}

.user-btn-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.logout-btn:hover {
    background: rgba(255, 99, 71, 0.12);
    color: #ff6347;
}

.logout-btn .material-symbols-outlined {
    font-size: 20px;
}

.login-btn {
    padding: 0.4rem 1rem;
    border-radius: 8px;
    background: var(--primary-color);
    color: #000;
    font-weight: 600;
    font-size: 0.82rem;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
}

.login-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.badge {
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Main Layout */
.main-layout {
    max-width: 100%;
    margin: 0;
    padding: 0;
    min-height: calc(100vh - 200px);
}


.genre-list::-webkit-scrollbar {
    width: 6px;
}

.genre-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.genre-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.content-wrapper {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

/* Search Section */
.search-section {
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem 2rem 0;
}

#catalogSearch {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#catalogSearch:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.15);
    transform: translateY(-1px);
}

#catalogSearch::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Filter Section */
.filter-section {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--surface);
    border: 2px solid transparent;
    border-radius: 25px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'DM Sans', sans-serif;
}

.filter-btn:hover {
    background: rgba(var(--accent-rgb), 0.2);
    border-color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
}

/* Content Grid - catalog card layout ONLY. See .cursor/rules/layout-modes.mdc */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 120px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

/* Detail mode - set by setContentLayoutMode('detail') for every SPA page */
#content.content-detail {
    display: block;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem 1.25rem 120px;
}

/* Safety net: if a renderer forgets setContentLayoutMode(), detail pages still break out
   of the card grid instead of collapsing into a 200px column. */
#content.content-grid:has(.rp),
#content.content-grid:has(.artist-page),
#content.content-grid:has(.series-page),
#content.content-grid:has(.fav-page),
#content.content-grid:has(.req-page),
#content.content-grid:has(.profile-page),
#content.content-grid:has(.not-found-inline),
#content.content-grid:has(.not-found-page),
#content.content-grid:has(.tombstone-page),
#content.content-grid:has(.rp-edit),
#content.content-grid:has(.sk-album-detail),
#content.content-grid:has(.artist-skeleton) {
    display: block;
    max-width: 1100px;
    padding: 1.5rem 1.25rem 120px;
}

.card {
    background-color: var(--surface);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.card:hover {
    background-color: #3e3e3e;
    transform: translateY(-5px);
}

.card-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image img.card-icon {
    width: 60%;
    height: 60%;
    object-fit: contain;
    display: block;
}

.card-image img.card-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.artist-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.artist-link:hover {
    text-decoration: underline;
    color: var(--primary-color-hover);
}

.card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Player */
/* Player Bar */
.player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(24, 24, 24, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 1000;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.4);
    height: auto;
    min-height: 72px;
    max-width: 100%;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.player.hidden {
    display: none !important;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 280px;
    flex-shrink: 0;
}

.player-cover {
    width: 70px;
    height: 70px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    background: var(--surface);
    display: block;
}

.player-text {
    overflow: hidden;
    min-width: 0;
    flex: 1;
}

.player-track {
    font-weight: 600;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    margin-bottom: 0;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-block;
    position: relative;
}

.player-track.scrolling {
    animation: marquee 15s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-100% + 180px)); }
}

.player-track:hover {
    color: var(--primary-color);
}

.artist-disambiguation {
    margin: 0.2rem 0 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.4;
}

.player-artist {
    color: var(--text-secondary);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-artist a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.player-artist a:hover {
    color: var(--primary-color);
}

.player-center {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1 1 0;
    min-width: 0;
    align-items: center;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.play-btn {
    background: var(--primary-color);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.play-btn:hover {
    background: var(--primary-color-hover);
}

.play-btn svg {
    margin-left: 2px;
}

.control-btn {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 50%;
}

.control-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.progress-container {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: visible;
    flex: 1 1 0;
    min-width: 0;
    transition: height 0.15s ease;
    touch-action: none;
}

.progress-container:hover {
    height: 8px;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    width: 0%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
}

.progress-bar::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.15s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.progress-container:hover .progress-bar::after,
.progress-container.seeking .progress-bar::after {
    opacity: 1;
}

.time-display {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    min-width: 45px;
    flex-shrink: 0;
}

.player-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 320px;
    flex-shrink: 0;
    justify-content: flex-end;
}

.volume-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 140px;
    flex-shrink: 0;
}

.player-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    flex-shrink: 0;
}

.volume-icon-btn .material-symbols-outlined {
    font-size: 24px;
}

.volume-icon-btn:hover {
    color: var(--text-primary);
}

.volume-slider-wrapper {
    position: relative;
    width: 110px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.volume-slider {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.volume-fill {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
    pointer-events: none;
    width: 0%;
    max-width: calc(100% - 8px);
    z-index: 1;
    transition: width 0.1s ease;
}

.volume-slider::-webkit-slider-runnable-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    margin-top: -4px;
    transition: all 0.2s;
}

.volume-slider:hover::-webkit-slider-thumb {
    transform: scale(1.2);
}

.volume-slider::-moz-range-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.volume-slider:hover::-moz-range-thumb {
    background: var(--primary-color);
    transform: scale(1.1);
}

.player-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.player-actions .player-quality-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
    flex-shrink: 0;
    box-sizing: border-box;
}

.player-quality-chip.lossless {
    background: rgba(29, 185, 84, 0.14);
    color: #1ed760;
    border-color: rgba(29, 185, 84, 0.35);
}

.player-quality-chip.lossy {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.12);
}

.player-quality-chip:hover {
    transform: translateY(-1px);
}

.player-quality-chip.lossless:hover {
    background: rgba(29, 185, 84, 0.22);
    border-color: rgba(29, 185, 84, 0.5);
}

.player-quality-chip.lossy:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.player-actions .action-icon-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 40px;
    height: 40px;
    position: relative;
}

.player-actions .action-icon-btn .material-symbols-outlined {
    font-size: 22px;
}

.player-actions .action-icon-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.player-actions .action-icon-btn svg {
    width: 20px;
    height: 20px;
}

#qualityInfo {
    cursor: pointer;
}
#qualityInfo::after { content: none; }
#qualityInfo:hover::after { opacity: 0; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal:not(.hidden) {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(135deg, var(--surface), var(--secondary-color));
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s;
    text-align: center;
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.modal-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-btn {
    background: var(--primary-color);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.modal-btn:hover {
    background: var(--primary-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.4);
}

/* Download Modal */
.dl-modal {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.5rem 1.75rem 1.75rem;
    max-width: 400px;
    width: 92%;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    animation: slideIn 0.25s ease-out;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.dl-modal-close {
    position: absolute;
    right: 0.75rem;
    top: 0.75rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.dl-modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.dl-modal-track {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.dl-modal-cover {
    width: 68px;
    height: 68px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.dl-modal-info {
    min-width: 0;
    flex: 1;
}

.dl-modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
    line-height: 1.3;
}

.dl-modal-artist {
    font-size: 0.83rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.dl-modal-meta {
    font-size: 0.72rem;
    color: var(--text-secondary);
    opacity: 0.65;
    display: flex;
    gap: 0.4rem;
    align-items: center;
    font-variant-numeric: tabular-nums;
}

.dl-modal-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    margin-bottom: 1.25rem;
}

.dl-modal-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-bottom: 0.6rem;
}

.dl-modal-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dl-option {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    color: var(--text-primary);
    text-align: left;
    width: 100%;
    font-family: inherit;
}

.dl-option-flac:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.35);
}

.dl-option-mp3:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.35);
}

.dl-option-mp3:hover .dl-option-arrow {
    color: rgb(59, 130, 246);
    opacity: 1;
}


.dl-option-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dl-option-flac .dl-option-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.dl-option-mp3 .dl-option-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}


.dl-option-icon .material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-size: 22px;
}

.dl-option-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.dl-option-format {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.dl-option-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.dl-option-size {
    font-size: 0.72rem;
    color: var(--text-secondary);
    opacity: 0.75;
    white-space: nowrap;
    margin-right: 0.25rem;
}

.dl-option-arrow {
    font-size: 18px;
    color: var(--text-secondary);
    opacity: 0.4;
    transition: color 0.15s, opacity 0.15s;
    flex-shrink: 0;
}

.dl-option-unavailable,
.dl-option:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.dl-option-flac:hover .dl-option-arrow {
    color: var(--primary-color);
    opacity: 1;
}

/* Warns before the one track download that completes an album is charged */
.dl-cost-note {
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(var(--accent-rgb, 29, 185, 84), 0.28);
    background: rgba(var(--accent-rgb, 29, 185, 84), 0.08);
    color: var(--text-primary);
    font-size: 0.8rem;
    line-height: 1.45;
}

.dl-cost-note.hidden {
    display: none;
}

.dl-cost-note--blocked {
    border-color: rgba(239, 83, 80, 0.35);
    background: rgba(239, 83, 80, 0.1);
}

/* Download progress bar */
.dl-progress {
    padding: 0.75rem 0 0.25rem;
}

.dl-progress.hidden {
    display: none;
}

.dl-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.dl-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    width: 0%;
    transition: width 0.4s ease;
}

.dl-progress-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.5rem;
}

/* Recent Uploads Modal - ru-* */
.ru-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vh 2vw;
}
.ru-modal.hidden { display: none; }
.ru-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(var(--accent-rgb), 0.10), rgba(0,0,0,0.78) 60%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: ruFade 0.18s ease-out;
}
.ru-dialog {
    position: relative;
    width: min(1400px, 96vw);
    height: min(86vh, 900px);
    background: linear-gradient(180deg, #1c1c1e 0%, #131315 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    box-shadow: 0 30px 90px -20px rgba(0,0,0,0.7), 0 0 0 1px rgba(var(--accent-rgb), 0.05);
    display: grid;
    grid-template-rows: auto auto 1fr;
    overflow: hidden;
    animation: ruSlide 0.22s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.ru-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.4rem 1.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ru-header-text { flex: 1 1 auto; }
.ru-header-text h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin: 0;
}
.ru-sub {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0.15rem 0 0;
}
.ru-close {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}
.ru-close:hover { background: rgba(255,255,255,0.1); color: #fff; transform: rotate(90deg); }
.ru-close .material-symbols-outlined { font-size: 20px; }

/* Column headers */
.ru-col-headers {
    display: grid;
    grid-template-columns: 56px minmax(0, 2.4fr) 120px 70px 110px;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1.1rem 0.5rem calc(1.1rem);
    margin: 0 0.6rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ru-col-headers span {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    opacity: 0.7;
}
.ru-ch-cover { /* spacer for cover column */ }
.ru-ch-source { text-align: center; }
.ru-ch-year { text-align: center; }
.ru-ch-when { text-align: right; }

.ru-body {
    overflow: hidden;
    position: relative;
    display: flex;
}
.ru-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.4rem 0.6rem 0.6rem;
    scroll-behavior: smooth;
}
.ru-list::-webkit-scrollbar { width: 10px; }
.ru-list::-webkit-scrollbar-track { background: transparent; }
.ru-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
.ru-list::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); background-clip: padding-box; border: 2px solid transparent; }

.ru-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 2.4fr) 120px 70px 110px;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1.1rem;
    margin: 2px 0;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    animation: ruFadeUp 0.3s both;
}
.ru-row:hover {
    background: rgba(255,255,255,0.05);
}
.ru-row:active { transform: scale(0.997); }

.ru-cover {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #2a2a2c, #1a1a1c);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.25);
    flex-shrink: 0;
}
.ru-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ru-cover .material-symbols-outlined { font-size: 28px; }

.ru-main { min-width: 0; }
.ru-title {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.ru-artist {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ru-source, .ru-year, .ru-when {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}
.ru-source { text-align: center; }
.ru-year { text-align: center; }
.ru-when {
    text-align: right;
    color: var(--primary-color);
    font-weight: 500;
    white-space: nowrap;
}

.ru-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    pointer-events: none;
}
.ru-empty.hidden { display: none; }
.ru-empty .material-symbols-outlined { font-size: 48px; opacity: 0.5; }
.ru-empty p { font-size: 0.95rem; margin: 0; }
.ru-error {
    padding: 2rem;
    text-align: center;
    color: var(--error);
    font-size: 0.9rem;
}

/* Skeleton loading */
.ru-skeleton-wrap { padding: 0.4rem 0.5rem; }
.ru-skeleton {
    height: 72px;
    margin: 4px 0;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08), rgba(255,255,255,0.04));
    background-size: 200% 100%;
    animation: ruShimmer 1.4s infinite;
}

body.ru-open { overflow: hidden; }

@keyframes ruFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ruSlide { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes ruFadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ruShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media (max-width: 900px) {
    .ru-modal { padding: 0; }
    .ru-dialog {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border: 0;
    }
    .ru-header { padding: 1rem 1rem 0.75rem; }
    .ru-col-headers {
        grid-template-columns: 48px minmax(0, 1fr) auto;
        margin: 0 0.4rem;
        padding: 0.5rem 0.85rem;
    }
    .ru-ch-source, .ru-ch-year { display: none; }
    .ru-row {
        grid-template-columns: 48px minmax(0, 1fr) auto;
        gap: 0.75rem;
        padding: 0.65rem 0.85rem;
    }
    .ru-cover { width: 48px; height: 48px; }
    .ru-source, .ru-year { display: none; }
    .ru-when { font-size: 0.75rem; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ── Shared release action buttons (used by .rp-actions and elsewhere) ── */
.action-icon-btn {
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    transition: all 0.15s ease;
    color: var(--text-secondary);
    text-decoration: none;
}

.action-icon-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.05);
}

.action-icon-btn .material-symbols-outlined {
    font-size: 21px;
}

.action-icon-btn svg {
    width: 21px;
    height: 21px;
}

.discogs-icon {
    width: 20px;
    height: 20px;
    opacity: 0.65;
    transition: opacity 0.15s ease;
}

.discogs-btn:hover .discogs-icon {
    opacity: 1;
}

/* Release notes */
.release-notes {
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    white-space: pre-line;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Log Viewer Modal */
.log-modal {
    background: #141414;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    width: 90%;
    max-width: 760px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}

.log-modal-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    color: rgba(255,255,255,0.55);
}

.log-modal-head .material-symbols-outlined {
    font-size: 20px;
    flex-shrink: 0;
}

.log-modal-filename {
    flex: 1;
    font-size: 0.82rem;
    font-family: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", Menlo, monospace;
    color: rgba(255,255,255,0.55);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}

.log-modal-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.log-modal-close .material-symbols-outlined {
    font-size: 20px;
}

.log-modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    padding: 16px 18px;
    margin: 0;
    /* Was 'JetBrains Mono', 'Fira Code' first - neither is loaded anywhere
       on the site (no @font-face, no webfont link), so on the vast
       majority of visitors' machines (these are developer-editor fonts,
       not something a typical browser has installed) it silently fell
       through to whatever generic monospace that OS/browser happens to
       default to - Consolas, Courier New, DejaVu Sans Mono, etc. all look
       and space text differently, hence "doesn't look good equally on all
       browsers". ui-monospace resolves to each platform's own well-designed
       system monospace face (SF Mono, Cascadia Mono, etc.) with sane,
       covering fallbacks - actually available everywhere, and consistently
       legible instead of accidentally landing on whatever's left.  */
    font-family: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    letter-spacing: 0.01em;
    color: rgba(255,255,255,0.78);
    white-space: pre;
    tab-size: 4;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.log-modal-body::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.log-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}

/* Report Modal */
.report-modal {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.75rem;
    max-width: 460px;
    width: 92%;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    animation: slideIn 0.25s ease-out;
}

.report-release {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.report-cover {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

.report-release-info {
    min-width: 0;
    flex: 1;
}

.report-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
}

.report-artist {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.35rem;
}

.report-type-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

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

.report-option {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text-primary);
    text-align: left;
    width: 100%;
    font-family: inherit;
}

.report-option:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
}

.report-option.selected {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.35);
}

.report-option-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(96, 165, 250, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #60a5fa;
}

.report-option-icon .material-symbols-outlined {
    font-size: 20px;
}

.report-option-icon-orange {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.report-option-icon-red {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.report-option-text {
    flex: 1;
    min-width: 0;
}

.report-option-title {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 0.15rem;
}

.report-option-desc {
    display: block;
    font-size: 0.72rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.report-option-arrow {
    font-size: 20px;
    color: var(--text-secondary);
    opacity: 0.4;
    flex-shrink: 0;
}

.report-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.4rem 0;
    margin-bottom: 1rem;
    font-family: inherit;
    transition: color 0.15s;
}

.report-back-btn:hover {
    color: var(--text-primary);
}

.report-back-btn .material-symbols-outlined {
    font-size: 18px;
}

.report-help-text {
    margin: 0.35rem 0 0.75rem;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.report-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    padding: 0.75rem;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.report-textarea:focus {
    outline: none;
    border-color: rgba(16, 185, 129, 0.4);
}

.report-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.report-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--primary-color);
    border: none;
    border-radius: 10px;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.report-submit-btn:hover {
    background: var(--primary-color-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

.report-submit-btn .material-symbols-outlined {
    font-size: 18px;
}

.report-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinning {
    animation: spin 1s linear infinite;
}

/* Track List */
.track-list-container {
    padding: 0;
    background: var(--surface);
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* Inside the release page the section shell already provides the frame */
.rp-tracklist .track-list-container {
    background: none;
    border-radius: 0;
}

.track-list-header {
    display: grid;
    grid-template-columns: 38px 1fr 56px 30px;
    gap: 0 0.7rem;
    padding: 0.4rem 0.9rem;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    line-height: 1;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Header cells must inherit the header's font sizing rather than item rules */
.track-list-header > div {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    height: auto;
    color: inherit;
    display: block;
    text-align: left;
    flex-direction: row;
}
.track-list-header .track-list-number { text-align: center; }
.track-list-header .track-list-title { text-align: left !important; display: block !important; }
.track-list-header .track-list-duration { text-align: right; padding-right: 2px; display: block !important; justify-content: initial; }

.track-list {
    display: flex;
    flex-direction: column;
}

/* Multi-disc headers in album view */
.disc-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem 0.4rem;
    margin-top: 0.35rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.disc-header:first-child {
    margin-top: 0;
}

.disc-header-icon {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.35);
}

.disc-header-title {
    font-weight: 700;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(255, 255, 255, 0.7);
}

.disc-header-count {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.3);
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

/* Side header (A/B) - slightly lighter styling */
.side-header .disc-header-title {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
}

.track-list-item {
    display: grid;
    grid-template-columns: 38px 1fr 56px 30px;
    gap: 0 0.7rem;
    padding: 0.3rem 0.9rem;
    cursor: pointer;
    transition: background-color 0.12s ease;
    align-items: center;
    min-height: 38px;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.track-list-item:last-child {
    border-bottom: none;
}

.track-list-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.track-list-item.active {
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    border-radius: 0;
    box-shadow: inset 2px 0 0 var(--primary-color);
}

.track-list-item.active .track-list-number,
.track-list-item.active .track-title-text,
.track-list-item.active .track-list-duration {
    color: var(--primary-color);
}

.track-list-number {
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    position: relative;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s ease;
}

.track-number-text {
    transition: opacity 0.15s ease;
}

.track-list-item:hover .track-number-text {
    opacity: 0;
}

.track-play-btn {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, opacity 0.15s ease;
    opacity: 0;
    pointer-events: none;
}

.track-play-btn:hover {
    color: var(--primary-color-hover);
}

.track-list-item:hover .track-play-btn {
    opacity: 1;
    pointer-events: auto;
}

.track-play-btn:focus-visible {
    opacity: 1;
    pointer-events: auto;
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.track-list-title {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    line-height: 1.25;
}

.track-title-text {
    font-weight: 450;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.track-artist-text {
    font-size: 0.74rem;
    color: rgba(179, 179, 179, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.05rem;
    line-height: 1.2;
}

.track-artist-text a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.track-artist-text a:hover {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: var(--primary-color);
    text-underline-offset: 2px;
}

.track-list-item.active .track-artist-text a {
    color: var(--primary-color);
}

.track-list-duration {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    padding-right: 2px;
}

/* Catalog sections */
.catalog-section {
    margin-bottom: 1rem;
}

.catalog-letter {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--surface);
}

.genre-card {
    background: linear-gradient(135deg, var(--surface), var(--secondary-color));
    border: 2px solid transparent;
    transition: all 0.3s;
}

.genre-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-box {
    background-color: var(--surface);
    padding: 3rem;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--background);
    border: 1px solid var(--surface);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--background);
    border: 1px solid var(--surface);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Credited As field on upload page */
.credited-as-group {
    background: rgba(255, 180, 50, 0.06);
    border: 1px solid rgba(255, 180, 50, 0.15);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
}

.credited-as-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 180, 50, 0.8);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.credited-as-input {
    width: 100%;
    padding: 0.4rem 0.6rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
}

.credited-as-input:focus {
    outline: none;
    border-color: rgba(255, 180, 50, 0.4);
}

.credited-as-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

.track-artist-row {
    display: flex;
    gap: 0.35rem;
    align-items: flex-start;
}

.credited-as-hint {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
    margin: 0.25rem 0 0 0;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    border: none;
    border-radius: 25px;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: var(--primary-color-hover);
    transform: scale(1.02);
}

.btn-secondary {
    padding: 1rem;
    background-color: var(--surface);
    border: 1px solid var(--text-secondary);
    border-radius: 25px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
}

.error-message {
    background-color: rgba(226, 33, 52, 0.2);
    color: var(--error);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--error);
}

.success-message {
    background-color: rgba(var(--accent-rgb), 0.2);
    color: var(--success);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--success);
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
}

/* Admin Panel */
.admin-panel {
    max-width: 1200px;
    margin: 1rem auto;
    background-color: var(--surface);
    padding: 1.25rem;
    border-radius: var(--border-radius);
}

.admin-panel h2 {
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.5rem;
}

/* Upload Type Selector */
.upload-type-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.type-btn {
    background: var(--background);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    min-width: 200px;
}

.type-btn:hover {
    border-color: var(--primary-color);
    background: rgba(var(--accent-rgb), 0.05);
}

.type-btn.active {
    border-color: var(--primary-color);
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--text-primary);
}

.type-btn .icon {
    font-size: 2rem;
}

.type-btn .label {
    font-weight: 600;
    font-size: 1rem;
}

.type-btn .desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* File Upload Section */
.file-upload-section {
    margin-bottom: 2rem;
}

.upload-area {
    border: 2px dashed var(--text-secondary);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--background);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(var(--accent-rgb), 0.05);
}

.upload-area.drag-over {
    border-color: var(--primary-color);
    background: rgba(var(--accent-rgb), 0.1);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-area h3 {
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 1.25rem;
}

.upload-area p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.file-limit {
    margin-top: 1rem;
    font-size: 0.85rem !important;
    color: var(--primary-color) !important;
}

/* Upload Area Icon (Material Symbols) */
.upload-area-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Files Summary Bar */
/* Upload Progress */
.upload-progress {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--background);
    border-radius: var(--border-radius);
}

.upload-progress.hidden {
    display: none;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-color-hover));
    border-radius: 4px;
    transition: none;
    width: 0%;
}

/* Upload Per-File Status */
.upload-file-list {
    margin-top: 0.75rem;
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.upload-file-list:empty {
    display: none;
}
.upload-file-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.02);
}
.upload-file-row .ufl-icon {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    font-size: 14px;
}
.upload-file-row .ufl-icon .material-symbols-outlined {
    font-size: 16px;
}
.upload-file-row .ufl-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
}
.upload-file-row .ufl-size {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
}
.upload-file-row.ufl-uploading .ufl-name {
    color: var(--text-primary);
}
.upload-file-row.ufl-done .ufl-icon {
    color: var(--primary-color);
}
.upload-file-row.ufl-done .ufl-name {
    color: var(--text-secondary);
}
.upload-file-row.ufl-error .ufl-icon {
    color: #ff4444;
}
.upload-file-row.ufl-error .ufl-name {
    color: #ff4444;
}

/* File List */
.file-list {
    margin-bottom: 2rem;
}

.file-list.hidden {
    display: none;
}

.file-item {
    background: var(--background);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    font-size: 1.5rem;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.file-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Per-Track Featured Artists */
.track-featured-section {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.featured-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.featured-artists-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.file-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.file-status.success {
    color: var(--success);
}

.file-status.error {
    color: var(--error);
}

.file-status.loading {
    color: var(--text-secondary);
}

.remove-file {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    transition: var(--transition);
}

.remove-file:hover {
    color: var(--error);
}

/* Upload Form */
.upload-form {
    margin-top: 2rem;
}

.upload-form.hidden {
    display: none;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Cover Art Section */
.cover-art-upload-area {
    width: fit-content;
}

.cover-preview-large {
    width: 100%;
    height: 250px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.cover-preview-large:hover {
    border-color: var(--primary-color);
    background: rgba(var(--accent-rgb), 0.05);
}

.cover-preview-large.has-image {
    border-style: solid;
    cursor: pointer;
    position: relative;
}

.cover-preview-large.has-image::after {
    content: 'Click to replace';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: var(--primary-color);
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    opacity: 0;
    transition: var(--transition);
}

.cover-preview-large.has-image:hover::after {
    opacity: 1;
}

.cover-preview-large.has-image:hover {
    border-color: var(--primary-color);
}

.cover-preview-large img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cover-placeholder {
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.cover-placeholder .upload-icon {
    font-size: 3rem;
}

.cover-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

/* Old cover art styles for compatibility */
.cover-art-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.cover-preview {
    width: 200px;
    height: 200px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
}

.cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-placeholder {
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.9rem;
}

.cover-upload {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cover-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.cover-status.success {
    color: var(--success);
}

/* Track List */
.track-list {
    background: var(--background);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.track-item {
    padding: 1rem;
    border-bottom: 1px solid var(--surface);
    display: grid;
    grid-template-columns: 40px 1fr 2fr 80px;
    gap: 1rem;
    align-items: center;
}

.track-item:last-child {
    border-bottom: none;
}

.track-number {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

.track-title {
    font-weight: 500;
}

.track-artist {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.track-duration {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: right;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions button {
    flex: 1;
}

.status-message {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.status-message.success {
    background-color: rgba(var(--accent-rgb), 0.2);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.status-message.error {
    background-color: rgba(226, 33, 52, 0.2);
    color: var(--error);
    border-left: 4px solid var(--error);
}

.status-message.hidden {
    display: none;
}

/* Duplicate Warning */
.duplicate-warning {
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid rgba(255, 167, 38, 0.35);
    border-left: 4px solid #ffa726;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}
.duplicate-warning.hidden { display: none; }
.duplicate-warning-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffa726;
    margin-bottom: 0.75rem;
}
.duplicate-dismiss-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255, 167, 38, 0.6);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    display: flex;
}
.duplicate-dismiss-btn:hover { color: #ffa726; }
.duplicate-warning-body {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.duplicate-warning-body .dup-item {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.duplicate-warning-body .dup-item:last-child { border-bottom: none; }
.duplicate-warning-body .dup-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 4px;
    margin-right: 0.4rem;
}
.dup-label--release { background: rgba(102, 126, 234, 0.25); color: #8ea4f7; }
.dup-label--track { background: rgba(var(--accent-rgb), 0.2); color: var(--primary-color); }
.duplicate-warning-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}
.duplicate-warning-actions .btn-secondary {
    font-size: 0.82rem;
    padding: 0.4rem 1rem;
}

/* Upload Info Box */
.upload-info-box {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0 0 2rem 0;
    display: flex;
    gap: 1rem;
}

.upload-info-box .info-icon {
    font-size: 2rem;
    line-height: 1;
}

.upload-info-box .info-content {
    flex: 1;
}

.upload-info-box h4 {
    margin: 0 0 0.75rem 0;
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 600;
}

.upload-info-box ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style: disc;
}

.upload-info-box li {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.upload-info-box li:last-child {
    margin-bottom: 0;
}

/* Section Description */
.section-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: -0.5rem 0 1rem 0;
}

/* Editable Track List */
.track-list-editable {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Track List Artist Summary Bar */
.track-list-artist-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(102, 126, 234, 0.06);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.summary-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.summary-artist {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 500;
}

.summary-credited-badge {
    font-size: 0.7rem;
    color: rgba(255, 180, 50, 0.9);
    background: rgba(255, 180, 50, 0.1);
    border: 1px solid rgba(255, 180, 50, 0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Compact Track Row */
.track-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.track-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.track-row.dragging {
    opacity: 0.5;
}

.track-row.drag-over-top {
    border-top: 2px solid var(--primary-color);
}

.track-row.drag-over-bottom {
    border-bottom: 2px solid var(--primary-color);
}

.track-row-drag {
    color: rgba(255, 255, 255, 0.2);
    font-size: 1rem;
    line-height: 1;
    cursor: grab;
    user-select: none;
    padding: 0.35rem 0.1rem;
    transition: color 0.2s;
    flex-shrink: 0;
}

.track-row-drag:hover {
    color: rgba(255, 255, 255, 0.5);
}

.track-row.dragging .track-row-drag {
    cursor: grabbing;
}

.track-row-num {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    width: 2.8rem;
    min-width: 2rem;
    text-align: center;
    flex-shrink: 0;
    margin-top: 0.15rem;
    border: 1px solid transparent;
    outline: none;
    cursor: text;
}
.track-row-num:hover {
    border-color: rgba(102, 126, 234, 0.3);
}
.track-row-num:focus {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.25);
}

.track-row-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.track-row-title {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    transition: border-color 0.2s;
    width: 100%;
}

.track-row-title:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(255, 255, 255, 0.06);
}

.track-row-title::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.track-row-artist {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0.35rem 0.6rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    transition: border-color 0.2s;
    width: 100%;
}

.track-row-artist:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(255, 255, 255, 0.06);
}

.track-row-artist::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* Credited-as field inside compilation track rows */
.track-row-credited-as {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    transition: border-color 0.2s;
    width: 100%;
}

.track-row-credited-as:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.track-row-credited-as::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.track-row-featured {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.track-row-file {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-row-duration {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 0.35rem;
    min-width: 3rem;
    text-align: right;
}

.track-row-remove {
    background: transparent;
    border: none;
    color: rgba(255, 100, 100, 0.4);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.2rem 0.3rem;
    border-radius: 4px;
    line-height: 1;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.track-row-remove:hover {
    color: #ff6464;
    background: rgba(255, 100, 100, 0.1);
}

/* Keep old styles for backward compatibility but hide them */
.track-item-editable {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.track-item-editable:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.track-item-editable.dragging {
    opacity: 0.5;
}

.track-item-editable.drag-over-top {
    border-top: 3px solid var(--primary-color);
}

.track-item-editable.drag-over-bottom {
    border-bottom: 3px solid var(--primary-color);
}

.track-item-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.track-drag-handle {
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
    line-height: 1;
    cursor: grab;
    user-select: none;
    padding: 0.25rem;
    transition: color 0.2s;
}

.track-drag-handle:hover {
    color: rgba(255, 255, 255, 0.6);
}

.track-item-editable.dragging .track-drag-handle {
    cursor: grabbing;
}

.track-number-badge {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 2.5rem;
    text-align: center;
}

.track-filename-display {
    flex: 1;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-metadata-fields {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr;
    gap: 0.75rem;
    align-items: start;
}

.track-metadata-fields .form-group {
    margin-bottom: 0;
}

.track-metadata-fields label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.4rem;
}

.track-metadata-fields input {
    font-size: 0.9rem;
    padding: 0.6rem 0.75rem;
}

/* Track Featured Artists in Track List */
.track-featured-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Multi-disc upload sections */
.disc-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.disc-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: #667eea;
    white-space: nowrap;
}

.disc-name-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    color: #fff;
    font-size: 0.85rem;
    transition: border-color 0.2s;
}

.disc-name-input:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.5);
}

.disc-name-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.disc-track-count {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

.disc-remove-btn {
    background: transparent;
    border: none;
    color: rgba(255, 100, 100, 0.6);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    line-height: 1;
    transition: all 0.2s;
}

.disc-remove-btn:hover {
    color: #ff6464;
    background: rgba(255, 100, 100, 0.1);
}

.add-more-tracks-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.add-more-tracks-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.8);
}

.add-more-tracks-btn .icon {
    font-size: 1.1rem;
}

.add-cd-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    background: rgba(102, 126, 234, 0.06);
    border: 2px dashed rgba(102, 126, 234, 0.25);
    border-radius: 8px;
    color: rgba(102, 126, 234, 0.8);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.add-cd-btn:hover {
    background: rgba(102, 126, 234, 0.12);
    border-color: rgba(102, 126, 234, 0.45);
    color: #667eea;
}

.add-cd-btn .icon {
    font-size: 1.2rem;
}

/* Album Info Grid Layout */
.album-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

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

.cover-preview-compact {
    width: 350px;
    height: 350px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.cover-preview-compact:hover {
    border-color: var(--primary-color);
    background: rgba(var(--accent-rgb), 0.05);
}

.cover-preview-compact.has-image {
    border-style: solid;
}

.cover-preview-compact img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cover-preview-compact .cover-placeholder {
    text-align: center;
    padding: 1rem;
}

.cover-preview-compact .upload-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.cover-preview-compact p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.form-fields-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Log / Cue file pill buttons */
.file-pill {
    display: inline-block;
    padding: 0.4rem 1rem;
    border: 1px dashed var(--border-color, #555);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary, #aaa);
    transition: background 0.15s, border-color 0.15s;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-pill:hover,
.file-pill.drag-over {
    background: rgba(255,255,255,0.05);
    border-color: var(--primary-color);
}

/* Compact Compilation Toggle */
.compilation-toggle-compact {
    margin-top: 0.5rem;
}

.compilation-toggle-compact .toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.compilation-toggle-compact .toggle-label:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.compilation-toggle-compact input[type="checkbox"] {
    display: none;
}

.compilation-toggle-compact .toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.compilation-toggle-compact .toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.compilation-toggle-compact input[type="checkbox"]:checked + .toggle-slider {
    background: var(--primary-color);
}

.compilation-toggle-compact input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.compilation-toggle-compact .toggle-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* Edition Linking */
#editionFields {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
#editionFields .form-group {
    margin-bottom: 0.75rem;
}
#editionFields .form-group:last-child {
    margin-bottom: 0;
}
.edition-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--primary-color);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 260px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.edition-search-item {
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.15s;
}
.edition-search-item:hover {
    background-color: rgba(var(--accent-rgb), 0.2);
}
.edition-search-item:last-child {
    border-bottom: none;
}
.edition-search-item img {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}
.edition-search-item .edition-item-info {
    flex: 1;
    min-width: 0;
}
.edition-search-item .edition-item-title {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.edition-search-item .edition-item-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.selected-parent-release {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 6px;
    margin-top: 0.4rem;
}
.selected-parent-release img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}
.selected-parent-release .parent-info {
    flex: 1;
    min-width: 0;
}
.selected-parent-release .parent-title {
    font-weight: 500;
    font-size: 0.9rem;
}
.selected-parent-release .parent-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.selected-parent-release .parent-remove {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    display: flex;
}
.selected-parent-release .parent-remove:hover {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.modal-content {
    position: relative;
    z-index: 1;
    background: var(--background);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Success Modal */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
}

.success-modal.hidden {
    display: none;
}

.success-modal .modal-content {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 450px;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: successPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.success-modal h2 {
    margin: 0 0 1rem 0;
    font-size: 1.75rem;
    font-weight: 600;
}

.success-modal p {
    margin: 0 0 2rem 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-actions .btn {
    flex: 1;
    max-width: 200px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Upload Button Enhancement */
.btn-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    width: 100%;
}

.btn-upload .btn-icon {
    font-size: 1.3rem;
}

.btn-upload:hover .btn-icon {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

.metadata-preview {
    margin-top: 2rem;
    padding: 1rem;
    background-color: var(--background);
    border-radius: var(--border-radius);
}

.metadata-preview pre {
    color: var(--text-secondary);
    overflow-x: auto;
}

small {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: block;
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    /* Modals - scrollable on short viewports */
    .modal:not(.hidden) {
        align-items: flex-start;
        padding: max(0.75rem, env(safe-area-inset-top, 0px)) 0.75rem max(0.75rem, env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-content,
    .dl-modal,
    .report-modal,
    .spec-modal,
    .log-modal {
        max-height: min(90dvh, calc(100vh - 1.5rem));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        margin: auto 0;
    }

    .req-modal-overlay {
        align-items: flex-end;
        padding: max(0.5rem, env(safe-area-inset-top, 0px)) 0.75rem max(0.75rem, env(safe-area-inset-bottom, 0px));
    }

    .req-modal {
        max-height: min(92dvh, calc(100vh - 1rem));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main-layout {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .sidebar {
        position: static;
        margin-bottom: 1.5rem;
    }

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

    /* Header mobile */
    body > header {
        padding: 0.5rem 0;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .logo {
        height: 30px;
    }

    .user-section {
        margin-left: auto;
    }

    .user-btn-name {
        display: none;
    }

    .user-btn .badge {
        display: none;
    }

    .nav-center {
        width: 100%;
        order: 3;
        gap: 0.15rem;
        flex-wrap: wrap;
        margin: 0;
        padding-top: 0.35rem;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .nav-link {
        font-size: 0.75rem;
        padding: 0.3rem 0.55rem;
        gap: 0.2rem;
    }

    .nav-icon {
        font-size: 16px;
    }

    .nav-link.active::after {
        display: none;
    }

    /* Mobile-optimized player */
    .player {
        gap: 0.5rem 0.65rem;
        padding: 0.5rem 0.85rem max(0.5rem, env(safe-area-inset-bottom, 0px));
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        align-items: center;
        width: 100%;
        max-width: 100vw;
        left: 0;
        right: 0;
        bottom: 0;
        transform-origin: left bottom;
        -webkit-transform-origin: left bottom;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: #1a1a1a;
        box-sizing: border-box;
        z-index: 10000;
        contain: layout style;
    }

    .player::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 40px;
        background: #1a1a1a;
        pointer-events: none;
    }

    .player-info {
        grid-column: 1;
        grid-row: 1;
        width: auto;
        max-width: none;
        min-width: 0;
    }

    .player-right {
        grid-column: 2;
        grid-row: 1;
        width: auto;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .player-center {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
    }

    .player-cover {
        width: 48px;
        height: 48px;
    }

    .player-track {
        font-size: 0.9rem;
    }

    .player-artist {
        font-size: 0.78rem;
    }

    .player-center {
        min-width: 0;
    }

    .play-btn {
        width: 40px;
        height: 40px;
    }

    .control-btn {
        width: 34px;
        height: 34px;
    }

    /* Hide volume on mobile - hardware buttons control volume */
    .volume-wrapper {
        display: none;
    }

    .player-actions {
        display: flex;
        gap: 0.25rem;
    }

    .player-actions .action-icon-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }

    .player-actions .player-quality-chip {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 0.55rem;
    }

    .progress-wrapper {
        gap: 0.4rem;
        align-items: center;
    }

    .progress-container {
        height: 28px;
        background: transparent;
        display: flex;
        align-items: center;
    }

    .progress-container::before {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        height: 5px;
        background-color: rgba(179, 179, 179, 0.3);
        border-radius: 3px;
        pointer-events: none;
    }

    .progress-bar {
        top: 50%;
        transform: translateY(-50%);
        height: 5px;
    }

    .progress-container:hover {
        height: 28px;
    }

    .progress-container:hover .progress-bar {
        height: 5px;
        transform: translateY(-50%);
    }

    .time-display {
        font-size: 0.75rem;
        min-width: 35px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 1.5rem;
    }

    /* Admin panel mobile */
    .upload-type-selector {
        flex-direction: column;
    }

    .cover-art-container {
        flex-direction: column;
    }

    .cover-preview {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    .track-item {
        grid-template-columns: 30px 1fr 60px;
        gap: 0.5rem;
    }

    .track-artist {
        display: none;
    }

    /* Mobile container */
    .container {
        padding: 0 12px;
    }

    /* Track list responsive */
    .track-list-header {
        grid-template-columns: 30px 1fr 48px 28px;
        gap: 0 0.5rem;
        padding: 0.45rem 0.75rem;
    }

    .track-list-item {
        grid-template-columns: 30px 1fr 48px 28px;
        gap: 0 0.5rem;
        padding: 0.35rem 0.75rem;
    }

    .track-title-text {
        font-size: 0.9rem;
    }

    .track-artist-text {
        font-size: 0.75rem;
    }

    .track-list-duration {
        font-size: 0.85rem;
    }
}

/* Even smaller screens */
@media (max-width: 480px) {
    .logo {
        height: 26px;
    }

    .nav-link {
        font-size: 0.7rem;
        padding: 0.25rem 0.45rem;
    }

    .nav-icon {
        font-size: 14px;
    }

    .player {
        padding: 0.4rem 0.6rem max(0.4rem, env(safe-area-inset-bottom, 0px));
        gap: 0.35rem 0.45rem;
    }

    .player-info {
        gap: 0.5rem;
    }

    .player-cover {
        width: 40px;
        height: 40px;
    }

    .player-track {
        font-size: 0.82rem;
    }

    .player-artist {
        font-size: 0.72rem;
    }

    .play-btn {
        width: 36px;
        height: 36px;
    }

    .play-btn .material-symbols-outlined {
        font-size: 20px;
    }

    .control-btn {
        width: 30px;
        height: 30px;
    }

    .control-btn .material-symbols-outlined {
        font-size: 20px;
    }

    .time-display {
        font-size: 0.7rem;
        min-width: 32px;
    }

    .player-actions .action-icon-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
    }

    .player-actions .player-quality-chip {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 0.5rem;
    }

    /* Track list tighter */
    .track-list-header {
        grid-template-columns: 26px 1fr 44px 26px;
        padding: 0.4rem 0.6rem;
        font-size: 0.62rem;
    }

    .track-list-item {
        grid-template-columns: 26px 1fr 44px 26px;
        gap: 0 0.4rem;
        padding: 0.3rem 0.6rem;
    }

    .track-list-number {
        font-size: 0.8rem;
    }

    .track-title-text {
        font-size: 0.85rem;
    }

    .track-list-duration {
        font-size: 0.8rem;
    }
}

/* Admin Dashboard */
.admin-dashboard {
    margin: 2rem 0;
}

.dashboard-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--surface);
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.table-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.sort-select,
.limit-select {
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
}

.admin-table {
    width: 100%;
    background: var(--surface);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.admin-table thead {
    background: rgba(255, 255, 255, 0.05);
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table td {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.table-cover {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.7;
    transition: var(--transition);
}

.btn-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-single {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

/* Modal */
/* Removed duplicate modal styles - using definition at line 770 */

/* Removed duplicate - see line 749 for modal-content styles */

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--background);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.btn-primary:hover {
    background: var(--primary-color-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #c41d2e;
}

/* Recent Section - Bottom Changelog */
/* Removed - Recent section now in modal */

/* Admin Dashboard: Artist Detail View */
.artist-detail-view {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.artist-detail-view.hidden {
    display: none;
}

.artist-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #191414 0%, #282828 100%);
    border-top: 1px solid rgba(var(--accent-rgb), 0.2);
    margin-top: 4rem;
    padding: 1rem 0;
    color: var(--text-secondary);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.footer-section {
    flex: 1;
    min-width: 180px;
}

.footer-section h4 {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.footer-section p {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-secondary);
    opacity: 0.85;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
    opacity: 0.85;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    background: rgba(var(--accent-rgb), 0.05);
    border: 1px solid rgba(var(--accent-rgb), 0.1);
}

.footer-links a:hover {
    color: var(--primary-color);
    opacity: 1;
    background: rgba(var(--accent-rgb), 0.15);
    border-color: rgba(var(--accent-rgb), 0.3);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.2);
}

.footer-bottom {
    width: 100%;
    text-align: center;
    font-size: 0.7rem;
    opacity: 0.5;
}

.footer-bottom p {
    margin: 0;
}

@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .footer-links a {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
}

.artist-detail-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.btn-back {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
}

.artist-discography {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.discography-section {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.discography-header {
    margin-bottom: 1rem;
}

.discography-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.discography-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.discography-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.discography-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    cursor: pointer;
    user-select: none;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.item-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn-expand {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-expand:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.item-tracks {
    padding: 0 1rem 1rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.item-tracks.hidden {
    display: none;
}

.tracks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tracks-table thead {
    background: rgba(255, 255, 255, 0.03);
}

.tracks-table th {
    text-align: left;
    padding: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tracks-table td {
    padding: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tracks-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.tracks-table .actions {
    display: flex;
    gap: 0.5rem;
}

.no-tracks {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

.no-content {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

.loading {
    text-align: center;
    padding: 1rem;
    color: var(--text-secondary);
}

.error {
    text-align: center;
    padding: 1rem;
    color: #ff4444;
}

.artist-link {
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

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

.modal-wide {
    max-width: 600px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.cover-art-upload-section {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cover-preview {
    width: 100px;
    height: 100px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
}

.cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-preview .no-cover {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .artist-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .tracks-table {
        font-size: 0.8rem;
    }
    
    .tracks-table th,
    .tracks-table td {
        padding: 0.5rem;
    }
}

/* Utility class for hiding elements */
.hidden {
    display: none !important;
}

/* Homepage Styles */
.homepage {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    grid-column: 1 / -1;
}

.homepage-hero {
    position: relative;
    padding: 4rem 2rem 3rem;
    text-align: center;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(var(--accent-rgb), 0.12), transparent),
        var(--background);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.homepage-hero-inner {
    max-width: 680px;
    margin: 0 auto;
}

.homepage-label {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 1rem;
    gap: 0.4rem;
}

.homepage-title {
    font-size: 2.6rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.homepage-subtitle {
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin: 0 auto 2rem;
    max-width: 480px;
    line-height: 1.6;
}

.homepage-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: #000;
    border: none;
    padding: 0.7rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.homepage-cta-btn .material-symbols-outlined {
    font-size: 20px;
}

.homepage-cta-btn:hover {
    background: var(--primary-color-hover);
    transform: translateY(-1px);
}

.homepage-cta-btn:active {
    transform: translateY(0);
}

/* Stats row */
.homepage-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 2rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.homepage-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.homepage-stat-num {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.homepage-stat-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Feature cards */
.homepage-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 2rem;
}

.feature-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.2s ease;
}

.feature-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.feature-icon {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    display: block;
}

.feature-card h3 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.feature-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Hide old CTA (no longer used) */
.homepage-cta,
.cta-button {
    display: none;
}

@media (max-width: 768px) {
    .homepage-hero {
        padding: 3rem 1.25rem 2.5rem;
    }

    .homepage-title {
        font-size: 1.9rem;
    }

    .homepage-subtitle {
        font-size: 0.95rem;
    }

    .homepage-stats {
        gap: 1.5rem;
        padding: 1.5rem 1rem;
    }

    .homepage-stat-num {
        font-size: 1.4rem;
    }

    .homepage-features {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1.5rem 1.25rem;
    }

    .feature-card {
        padding: 1.25rem;
    }
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast.error {
    background: var(--error);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-message {
    font-size: 0.95rem;
}

/* Profile Page Styles */
.profile-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

/* Profile Header */
.profile-header {
    margin-bottom: 1.5rem;
    padding: 1.5rem 1.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
}

.profile-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.profile-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profile-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary, #b3b3b3);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.profile-header-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.profile-header-btn .material-symbols-outlined {
    font-size: 1.05rem;
}

.profile-header-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.profile-header-top h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.profile-role-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.profile-role-badge.role-admin {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--primary-color);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
}

.profile-role-badge.role-user {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-role-badge.role-moderator {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.profile-role-badge.badge-trusted {
    background: rgba(59, 130, 246, 0.14);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.profile-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.profile-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
}

.profile-meta-item .material-symbols-outlined {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.3);
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.5rem;
}

.profile-tab {
    background: none;
    border: none;
    padding: 0.85rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.profile-tab .material-symbols-outlined {
    font-size: 1.15rem;
}

.profile-tab:hover {
    color: rgba(255, 255, 255, 0.7);
}

.profile-tab.active {
    color: #fff;
}

.profile-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px 1px 0 0;
}

/* Tab Content */
.profile-tab-content {
    position: relative;
}

.profile-pane {
    display: none;
    animation: fadeIn 0.25s ease;
}

.profile-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Profile Cards */
.profile-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 1.75rem;
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-card-header .material-symbols-outlined {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.4);
}

.profile-card-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

/* Account Info List */
.profile-info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.profile-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-info-row:first-child {
    padding-top: 0;
}

.profile-info-label {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
}

.profile-info-value {
    font-size: 0.92rem;
    color: #fff;
    font-weight: 500;
    text-align: right;
}

/* Profile uploads tab → static/css/profile-uploads.css */

/* Settings Grid */
.profile-settings-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.form-group input {
    width: 100%;
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.form-hint {
    display: block;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 0.35rem;
}

.btn-primary {
    padding: 0.7rem 1.75rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-color-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.empty-state,
.error-state,
.loading-text {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.95rem;
}

.error-state {
    color: rgba(255, 100, 100, 0.6);
}

/* Danger Card */
.danger-card {
    border-color: rgba(239, 68, 68, 0.2);
}
.credit-card { margin-top: 1.25rem; }

.credit-summary {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.1rem;
}

.credit-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.credit-stat-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
}

.credit-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.credit-explainer {
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 1rem;
}

.credit-explainer a { color: var(--primary-color); text-decoration: none; }
.credit-explainer a:hover { text-decoration: underline; }

.credit-history-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.82rem;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    padding: 0;
}

.credit-history-toggle:hover { color: rgba(255, 255, 255, 0.75); }

.credit-history-toggle .material-symbols-outlined {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.credit-history-toggle.expanded .material-symbols-outlined {
    transform: rotate(180deg);
}

.credit-history {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    max-height: 260px;
    overflow-y: auto;
}

.credit-history-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.credit-history-row:last-child { border-bottom: none; }

.credit-history-label { color: rgba(255, 255, 255, 0.75); }
.credit-history-date { color: rgba(255, 255, 255, 0.3); font-size: 0.76rem; }
.credit-history-delta { font-weight: 600; text-align: right; min-width: 2.2rem; }
.credit-history-delta.positive { color: #2ecc71; }
.credit-history-delta.negative { color: rgba(255, 255, 255, 0.45); }

.credit-history-empty,
.credit-history-loading {
    padding: 0.75rem 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
}
.danger-description {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.88rem;
    margin: 0 0 1rem;
    line-height: 1.5;
}
.btn-danger {
    padding: 0.7rem 1.75rem;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}
.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 2FA - profile settings */
.profile-card-heading { flex: 1; min-width: 0; }
.profile-card-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
    line-height: 1.4;
}
.profile-twofa-card .profile-card-header { align-items: flex-start; }

.twofa-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
}
.twofa-status-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.twofa-status-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.twofa-status-icon .material-symbols-outlined { font-size: 1.35rem; }
.twofa-status-icon--on {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--primary-color);
}
.twofa-status-icon--off {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
}
.twofa-status-title { font-size: 0.95rem; font-weight: 600; color: #fff; margin: 0; }
.twofa-status-desc { font-size: 0.78rem; color: rgba(255, 255, 255, 0.45); margin: 0.15rem 0 0; }

.twofa-setup {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.twofa-steps {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.twofa-step {
    flex: 1;
    min-width: 100px;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.twofa-step.active {
    color: var(--primary-color);
    background: rgba(var(--accent-rgb), 0.1);
    border-color: rgba(var(--accent-rgb), 0.35);
}
.twofa-step.done {
    color: rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.1);
}
.twofa-step-panel { display: none; }
.twofa-step-panel.active { display: block; }
.twofa-qr-wrap {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
    padding: 1rem;
    background: #fff;
    border-radius: 12px;
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
}
.twofa-qr-wrap img { display: block; max-width: 200px; width: 100%; height: auto; }
.twofa-secret-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}
.twofa-secret-row input {
    flex: 1;
    min-width: 0;
    font-family: ui-monospace, monospace;
    font-size: 0.82rem;
}
.twofa-inline-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.5rem;
}
.twofa-code-input {
    flex: 1 1 120px;
    min-width: 0;
    max-width: 160px;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    font-family: ui-monospace, monospace;
    letter-spacing: 0.08em;
    height: 42px;
    box-sizing: border-box;
}
.twofa-inline-form .btn-secondary,
.twofa-inline-form .btn-danger,
.twofa-inline-form .btn-primary {
    height: 42px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.twofa-code-field { margin-bottom: 0.75rem; }
.twofa-code-field .twofa-code-input { max-width: 160px; width: 100%; }
.twofa-step-panel .btn-primary { margin-top: 0.25rem; }
.twofa-status .btn-primary { flex-shrink: 0; }
.twofa-code-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}
.twofa-form-error {
    margin: 0.45rem 0 0;
    font-size: 0.78rem;
    color: #f87171;
}
.twofa-form-error[hidden] { display: none; }
.twofa-enabled {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.twofa-enabled[hidden], .twofa-setup[hidden] { display: none !important; }
.twofa-stats-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.twofa-stat {
    flex: 1;
    padding: 0.75rem 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
}
.twofa-stat-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.25rem;
}
.twofa-stat-value { font-size: 0.92rem; color: #fff; }
.twofa-section {
    padding: 0.85rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.twofa-section:first-of-type { border-top: none; padding-top: 0; }
.twofa-section--danger {
    margin-top: 0.25rem;
    padding: 0.85rem;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.15);
}
.twofa-section-title {
    margin: 0 0 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}
.twofa-section--danger .twofa-section-title { color: #fca5a5; }
.twofa-recovery-block {
    margin: 0.75rem 0 1rem;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}
.twofa-recovery-block[hidden] { display: none !important; }
.twofa-recovery-warn { color: #FFD54F !important; margin-bottom: 0.65rem !important; }
.twofa-actions-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.65rem;
}
.twofa-actions-row .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    padding: 0.45rem 0.85rem;
}
.twofa-actions-row .material-symbols-outlined { font-size: 1rem; }

/* 2FA Recovery Codes Grid */
.recovery-codes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}
.recovery-code-chip {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-family: monospace;
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s;
    font: inherit;
    width: 100%;
}
.recovery-code-chip:hover { background: rgba(255,255,255,0.1); }
@media (max-width: 600px) {
    .recovery-codes-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Profile Security Tab */
#security-tab .profile-card { margin-bottom: 1rem; }

.email-change-verify {
    margin: 0.75rem 0 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}
.email-change-verify[hidden] { display: none !important; }
.email-change-title {
    margin: 0 0 0.25rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
}
.email-change-intro {
    margin: 0 0 0.85rem !important;
    font-size: 0.8rem;
}
.email-verify-card {
    padding: 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}
.email-verify-card--totp {
    border-color: rgba(var(--accent-rgb), 0.25);
    background: rgba(var(--accent-rgb), 0.06);
}
.email-verify-card--email {
    border-color: rgba(96, 165, 250, 0.25);
    background: rgba(59, 130, 246, 0.06);
}
.email-verify-card[hidden] { display: none !important; }
.email-verify-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}
.email-verify-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.2rem;
}
.email-verify-card--totp .email-verify-icon {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--primary-color);
}
.email-verify-card--email .email-verify-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}
.email-verify-card-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.email-verify-card-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}
.email-verify-card-text .form-hint {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.4;
}
.email-verify-or {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.65rem 0;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.35);
}
.email-verify-or[hidden] { display: none !important; }
.email-verify-or::before,
.email-verify-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}
.email-verify-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.email-verify-row .btn-secondary {
    height: 42px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
}
.email-change-code-hint {
    margin: 0.45rem 0 0 !important;
    font-size: 0.76rem;
}
#profileSaveBtn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* 2FA Step indicator */

/* Delete Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}
.modal-content {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    max-width: 420px;
    width: 90%;
}
.modal-content h3 {
    color: #fff;
    font-size: 1.1rem;
    margin: 0 0 0.75rem;
}
.modal-content p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 0.5rem;
}
.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}
.btn-secondary {
    padding: 0.7rem 1.75rem;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Profile Responsive */
@media (max-width: 768px) {
    .profile-header {
        padding: 1.25rem;
    }

    .profile-header-top {
        flex-wrap: wrap;
    }

    .profile-tabs {
        gap: 0;
    }

    .profile-tab {
        padding: 0.75rem 1rem;
        font-size: 0.82rem;
    }

    .my-uploads-row {
        padding: 0.85rem 0.75rem;
    }
}

/* Featured Artists UI */
.featured-artists-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.featured-artists-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.featured-artist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.featured-artist-item input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.featured-artist-item .btn-remove {
    padding: 0.5rem 0.75rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.featured-artist-item .btn-remove:hover {
    opacity: 0.8;
}

.btn-add-artist {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.btn-add-artist:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(var(--accent-rgb), 0.05);
}

.btn-add-artist span:first-child {
    font-size: 1.2rem;
    font-weight: bold;
}
/* Compilation Toggle Styles */
.compilation-toggle-group {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.compilation-toggle-group:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 52px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
    background: var(--primary-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.toggle-text {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    flex: 1;
}

.help-text {
    margin: 0.75rem 0 0 0;
    padding-left: 68px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}

/* Shared catalog leftovers used outside #catalogView (artist page, series, loaders) */
.cat-albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.1rem 1rem;
}
.cat-loading {
    display: flex;
    justify-content: center;
    padding: 3rem;
}
.cat-loading .loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@media (max-width: 768px) {
    .cat-albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }
}

/* Shared ReleaseCard tile (catalog grid, artist discography, series) */
.cat-album-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    padding: 0.85rem;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    color: inherit;
}
.cat-album-card:hover,
.cat-album-card:focus,
.cat-album-card:visited {
    text-decoration: none;
    color: inherit;
}
.cat-album-card:hover {
    background: rgba(255,255,255,0.07);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.cat-album-cover {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.65rem;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.cat-album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cat-album-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cat-album-cover-placeholder .material-symbols-outlined,
.cat-album-cover .material-symbols-outlined {
    font-size: 2.5rem;
    color: rgba(255,255,255,0.1);
}
.cat-album-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(168,85,247,0.15);
    color: #c084fc;
    backdrop-filter: blur(4px);
}
.cat-album-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255,255,255,0.92);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
    line-height: 1.3;
    min-height: 1.3em;
}
.cat-album-artist {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    min-height: 1.3em;
}
.cat-album-year {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
    margin-top: auto;
    padding-top: 0.15rem;
    min-height: 1.5em;
}
.cat-album-year .edition-chip { margin-left: auto; }

/* Upload Header */
.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.upload-header h2 {
    margin: 0;
}

.rules-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.rules-link:hover {
    background: rgba(var(--accent-rgb), 0.2);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.rules-link .icon {
    font-size: 1.2rem;
}

/* Upload Rules Page */
.upload-rules-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.rules-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--surface);
}

.rules-header h1 {
    margin: 0;
    font-size: 2.5rem;
    color: var(--text-primary);
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-color);
}

.rules-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.rules-section {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.rules-section h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rules-text {
    color: var(--text-secondary);
    line-height: 1.8;
}

.rules-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rules-text ul li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.rules-text ul li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.rules-text strong {
    color: var(--text-primary);
}

.rules-text em {
    color: rgba(255, 255, 255, 0.5);
}

.rules-text p {
    margin: 0.75rem 0;
}

.rules-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--surface);
    text-align: center;
}

.rules-footer .btn-primary {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

/* Metadata Loading State */
.metadata-loading {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    margin: 2rem 0;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(var(--accent-rgb), 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.metadata-loading h3 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.loading-progress {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.loading-filename {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin: 0.5rem 0 1.5rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.metadata-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(var(--accent-rgb), 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.metadata-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Edition count chip on browse tiles - "3 leidimai" */
.edition-chip {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.62);
    margin-left: 0.4rem;
    vertical-align: 1px;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* Loading Overlay (legacy - kept for non-SPA pages, but SPA navigation now uses .spa-progress) */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(30px) saturate(0.8);
    -webkit-backdrop-filter: blur(30px) saturate(0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Top progress bar (NProgress-style) for SPA navigation */
.spa-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    background: transparent;
    transition: opacity 0.18s ease-out;
}
.spa-progress.active { opacity: 1; }
.spa-progress.done {
    opacity: 0;
    transition: opacity 0.35s ease-out 0.05s;
}
.spa-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg,
        var(--primary-color, var(--primary-color)) 0%,
        #34d97f 50%,
        var(--primary-color, var(--primary-color)) 100%);
    box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.55), 0 0 2px rgba(var(--accent-rgb), 0.85);
    border-radius: 0 2px 2px 0;
}

/* ─────────────────────────────────────────────────────────────────────
   Smooth image loading: skeleton shimmer behind every cover image,
   fade in once the image decodes. Covers stop popping in as blank
   squares - they shimmer until the bitmap arrives, then fade to it.
   ───────────────────────────────────────────────────────────────────── */
@keyframes smShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.cat-album-cover img,
.ru-cover img,
.rp-cover img,
.player-cover,
.cat-artist-image img,
img.smooth-img {
    background: linear-gradient(110deg,
        rgba(255,255,255,0.04) 8%,
        rgba(255,255,255,0.10) 18%,
        rgba(255,255,255,0.04) 33%) 0 0 / 200% 100%;
    animation: smShimmer 1.4s linear infinite;
    opacity: 0;
    transition: opacity 0.28s ease-out;
}
.cat-album-cover img.img-loaded,
.ru-cover img.img-loaded,
.rp-cover img.img-loaded,
.player-cover.img-loaded,
.cat-artist-image img.img-loaded,
img.smooth-img.img-loaded {
    animation: none;
    background: transparent;
    opacity: 1;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(var(--accent-rgb), 0.15);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============================================
   Statistics Tab - Clean Redesign
   ============================================ */

/* Overview Metrics Row */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stats-metric {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stats-metric:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.stats-metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.4rem;
    background: linear-gradient(135deg, #667eea, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-metric-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Two Column Layout */
.stats-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Stats Sections */
.stats-section {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 0.85rem 0.95rem;
    min-width: 0;
}
.stats-section-recent { margin-top: 1rem; }

.stats-section-header {
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-section-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    letter-spacing: 0.01em;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Track Items */
.stats-track-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.35rem;
    border-radius: 6px;
    transition: background 0.15s ease;
    min-width: 0;
}

.stats-track-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.stats-rank {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.stats-track-item:nth-child(1) .stats-rank,
.stats-artist-item:nth-child(1) .stats-rank { color: #fbbf24; }
.stats-track-item:nth-child(2) .stats-rank,
.stats-artist-item:nth-child(2) .stats-rank { color: #94a3b8; }
.stats-track-item:nth-child(3) .stats-rank,
.stats-artist-item:nth-child(3) .stats-rank { color: #cd7f32; }

.stats-cover {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    display: block;
}

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

a.stats-cover { transition: opacity 0.15s; }
a.stats-cover:hover { opacity: 0.85; }

.stats-track-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    overflow: hidden;
}

.stats-track-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    transition: color 0.15s ease;
    max-width: 100%;
}
a.stats-track-title:hover { color: var(--primary-color, var(--primary-color)); }

.stats-track-meta {
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stats-track-meta a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.15s ease;
}
.stats-track-meta a:hover { color: #fff; }

/* Play Count Bar */
.stats-play-info {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
    min-width: 78px;
    justify-content: flex-end;
}

.stats-play-bar {
    width: 44px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.stats-play-bar-fill {
    height: 100%;
    background: var(--primary-color, var(--primary-color));
    border-radius: 2px;
    transition: width 0.5s ease;
}

.stats-play-count {
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    min-width: 24px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Artist Items */
.stats-artist-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.35rem;
    border-radius: 6px;
    transition: background 0.15s ease;
    min-width: 0;
}

.stats-artist-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.stats-artist-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 700;
    text-transform: uppercase;
}

.stats-artist-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.stats-artist-name {
    font-size: 0.86rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
    max-width: 100%;
}
a.stats-artist-name:hover { color: var(--primary-color, var(--primary-color)); }

.stats-artist-plays {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Recent Play Items */
.stats-recent-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.35rem;
    border-radius: 6px;
    transition: background 0.15s ease;
    min-width: 0;
}

.stats-recent-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.stats-recent-cover {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    display: block;
}
a.stats-recent-cover:hover { opacity: 0.85; }

.stats-recent-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stats-recent-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    overflow: hidden;
}

.stats-recent-title {
    font-size: 0.83rem;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
    display: block;
    max-width: 100%;
}
a.stats-recent-title:hover { color: var(--primary-color, var(--primary-color)); }

.stats-recent-meta {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stats-recent-meta a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.15s ease;
}
.stats-recent-meta a:hover { color: #fff; }

.stats-recent-time {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Empty state inside stats */
.stats-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: rgba(255, 255, 255, 0.35);
}

.stats-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.35;
    display: block;
}

.stats-empty-text {
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 900px) {
    .stats-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .stats-play-bar {
        display: none;
    }
    .stats-play-info {
        min-width: 32px;
    }
}


/* ?????????????????????????????????????????????????????????????????????
   Hamburger nav + Skeleton screens
   ????????????????????????????????????????????????????????????????????? */

/* Hamburger toggle: hidden on desktop, visible on mobile */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-primary, #eee);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
    transition: background 0.15s, border-color 0.15s;
}
.nav-toggle:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.18);
}
.nav-toggle .material-symbols-outlined { font-size: 22px; }
.nav-toggle[aria-expanded="true"] .material-symbols-outlined::before { content: ""; }

/* Hamburger drawer - triggers well above the phone-only breakpoint below,
   because .nav-center's 7 full-text links (~715px) plus .logo-section and
   .user-section routinely add up to more than a 1280-1400px viewport can
   hold; collapsing into the drawer here avoids the two clusters visually
   colliding at ordinary laptop widths. */
@media (max-width: 1400px) {
    .nav-toggle { display: inline-flex; }
    .header-content {
        flex-wrap: nowrap;
        gap: 0.6rem;
    }
    .nav-center {
        position: fixed;
        top: 56px;
        right: 0;
        left: 0;
        transform: none;
        z-index: 80;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.15rem;
        padding: 0.5rem 0.75rem 0.85rem;
        margin: 0;
        background: rgba(18,18,18,0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255,255,255,0.06);
        border-bottom: 1px solid rgba(255,255,255,0.06);
        border-radius: 0 0 14px 14px;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        transition: max-height 0.25s ease, opacity 0.18s ease, padding 0.25s ease;
    }
    .nav-center.is-open {
        max-height: 70vh;
        opacity: 1;
        pointer-events: auto;
        overflow: auto;
    }
    .nav-center .nav-link {
        font-size: 0.95rem;
        padding: 0.7rem 0.9rem;
        border-radius: 8px;
        gap: 0.55rem;
        justify-content: flex-start;
    }
    .nav-center .nav-icon { font-size: 20px; }
    .nav-center .nav-link.active::after { display: none; }
    .nav-center .nav-link.active {
        background: rgba(var(--accent-rgb), 0.14);
    }
    /* Backdrop dim */
    body.nav-open::after {
        content: '';
        position: fixed;
        inset: 56px 0 0 0;
        background: rgba(0,0,0,0.45);
        z-index: 70;
        animation: navBackdropFade 0.18s ease-out;
    }
}
@keyframes navBackdropFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ??? Skeleton screens (album/artist/catalog placeholder while API loads) ?? */
@keyframes skBlink {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.sk {
    background: linear-gradient(110deg,
        rgba(255,255,255,0.05) 8%,
        rgba(255,255,255,0.10) 18%,
        rgba(255,255,255,0.05) 33%) 0 0 / 200% 100%;
    animation: skBlink 1.4s linear infinite;
    border-radius: 6px;
    display: block;
}
.sk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}
.sk-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sk-card .sk-cover { width: 100%; aspect-ratio: 1; border-radius: 8px; }
.sk-card .sk-line  { height: 11px; border-radius: 4px; }
.sk-card .sk-line.sk-line-sm { width: 60%; height: 9px; opacity: 0.7; }

.sk-album-detail {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem 0;
}
.sk-album-detail-hero {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
}
.sk-album-detail-hero .sk-cover {
    width: 220px;
    height: 220px;
    border-radius: 10px;
    flex-shrink: 0;
}
.sk-album-detail-hero .sk-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 1rem;
}
.sk-album-detail-hero .sk-line-title { height: 32px; width: 60%; border-radius: 6px; }
.sk-album-detail-hero .sk-line-sub   { height: 14px; width: 40%; border-radius: 4px; opacity: 0.85; }
.sk-album-detail-hero .sk-line-meta  { height: 11px; width: 30%; border-radius: 4px; opacity: 0.65; }

.sk-track-list { display: flex; flex-direction: column; gap: 0.55rem; }
.sk-track-row {
    display: grid;
    grid-template-columns: 28px 1fr 60px;
    gap: 0.85rem;
    align-items: center;
    padding: 0.55rem 0.75rem;
}
.sk-track-row .sk-num   { width: 18px; height: 11px; border-radius: 3px; }
.sk-track-row .sk-text  { height: 12px; border-radius: 4px; }
.sk-track-row .sk-dur   { width: 36px; height: 11px; border-radius: 3px; justify-self: end; }

@media (max-width: 768px) {
    .sk-album-detail-hero { flex-direction: column; align-items: center; gap: 1rem; }
    .sk-album-detail-hero .sk-cover { width: 180px; height: 180px; }
    .sk-album-detail-hero .sk-meta { width: 100%; align-items: center; text-align: center; }
}



/* Theme color picker (profile settings) */
.playback-quality-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.playback-quality-opt {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 0.85rem 0.9rem;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease;
    font-family: inherit;
}
.playback-quality-opt .material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-size: 1.25rem;
    color: var(--primary-color);
}
.playback-quality-opt-label {
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}
.playback-quality-opt-desc {
    font-family: inherit;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.35;
}
.playback-quality-opt:hover { border-color: rgba(255, 255, 255, 0.18); }
.playback-quality-opt.active {
    border-color: var(--primary-color);
    background: rgba(29, 185, 84, 0.08);
}

.theme-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 0.75rem; }
.theme-swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform 0.15s ease, border-color 0.15s ease; }
.theme-swatch:hover { transform: scale(1.1); }
.theme-swatch.active { border-color: var(--text-primary); box-shadow: 0 0 0 2px rgba(255,255,255,0.15); }
.theme-custom-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 0.5rem; }
.theme-custom-row input[type="color"] { width: 40px; height: 32px; border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; background: transparent; cursor: pointer; padding: 2px; }
.theme-hex-input { background-color: #1a1a1a; color: var(--text-primary); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; padding: 0.4rem 0.6rem; font-family: inherit; font-size: 0.85rem; width: 90px; }
.theme-hex-input:focus { outline: none; border-color: var(--primary-color); }

/* ==========================================================================
   404 Not Found + Tombstone (deleted release/artist) pages
   ========================================================================== */
.not-found-page,
.tombstone-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem 1rem;
}
.not-found-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}
.not-found-card {
    max-width: 520px;
    width: 100%;
    background: var(--surface-elevated, #181818);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}
.not-found-code {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
    color: var(--primary-color, #1db954);
    margin-bottom: 0.5rem;
}
.not-found-title {
    font-size: 1.5rem;
    margin: 0 0 0.75rem;
    color: #fff;
}
.not-found-text {
    color: rgba(255,255,255,0.7);
    line-height: 1.55;
    margin: 0 0 1.75rem;
}
.not-found-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.not-found-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.15rem;
    border-radius: 999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.not-found-btn .material-symbols-outlined { font-size: 1.15rem; }
.not-found-btn--primary {
    background: var(--primary-color, #1db954);
    color: #000;
}
.not-found-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.4); }
.not-found-btn--secondary {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.not-found-btn--secondary:hover { background: rgba(255,255,255,0.14); }

/* Tombstone */
.tombstone-card {
    max-width: 760px;
    width: 100%;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.75rem;
    padding: 2rem;
    background: var(--surface-elevated, #181818);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}
.tombstone-card:not(:has(.tombstone-cover)) { grid-template-columns: 1fr; }
.tombstone-cover {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    filter: grayscale(0.6) brightness(0.85);
    opacity: 0.85;
}
.tombstone-body { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
.tombstone-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    align-self: flex-start;
    background: rgba(255, 90, 90, 0.12);
    color: #ff8a8a;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tombstone-badge .material-symbols-outlined { font-size: 0.95rem; }
.tombstone-title {
    font-size: 1.7rem;
    margin: 0;
    color: #fff;
    word-break: break-word;
}
.tombstone-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}
.tombstone-reason {
    margin-top: 0.6rem;
    padding: 0.85rem 1rem;
    background: rgba(255,255,255,0.04);
    border-left: 3px solid var(--primary-color, #1db954);
    border-radius: 6px;
}
.tombstone-reason--empty { border-left-color: rgba(255,255,255,0.18); }
.tombstone-reason-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: rgba(255,255,255,0.55);
    margin-bottom: 0.25rem;
    font-weight: 600;
}
.tombstone-reason-text {
    color: #fff;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.tombstone-meta {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}
.tombstone-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}
@media (max-width: 640px) {
    .tombstone-card { grid-template-columns: 1fr; padding: 1.5rem; }
    .tombstone-cover { width: 100%; height: auto; max-width: 280px; margin: 0 auto; }
}

/* ==========================================================================
   Admin delete modal - reason + hide info
   ========================================================================== */
.adm-delete-options {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 1rem 0 0.5rem;
    text-align: left;
}
.adm-delete-options label {
    font-size: 0.85rem;
    color: var(--text-secondary, rgba(255,255,255,0.7));
    font-weight: 600;
    display: block;
    margin-bottom: 0.35rem;
}
.adm-delete-options textarea {
    width: 100%;
    min-height: 90px;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    font: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.adm-delete-options textarea:focus {
    outline: none;
    border-color: var(--primary-color, #1db954);
}
.adm-delete-options textarea:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.adm-delete-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    cursor: pointer;
    user-select: none;
    padding: 0.5rem 0.6rem;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}
.adm-delete-checkbox input[type='checkbox'] {
    margin-top: 0.18rem;
    accent-color: var(--primary-color, #1db954);
}
.adm-delete-checkbox-text {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    line-height: 1.4;
}
.adm-delete-hint {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.55);
    margin-top: 0.2rem;
    line-height: 1.4;
}

/* Ensure inline 404 / tombstone / skeletons break out of the catalog grid */
#content > .not-found-inline,
#content > .tombstone-page,
#content > .not-found-page,
#content > .sk-album-detail,
#content > .artist-page,
#content > .series-page,
#content > .fav-page,
#content > .fav-empty,
#content > .req-page,
#content > .artist-skeleton { grid-column: 1 / -1; width: 100%; }

/* ==========================================================================
   Series - strip on release pages + dedicated series page
   ========================================================================== */
/* No margin: the strip is a flex child of .rp-main, which owns the spacing */
.series-strip {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
}
.series-strip > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.75rem 1.1rem;
    border-radius: 12px;
    user-select: none;
}
.series-strip > summary::-webkit-details-marker { display: none; }
.series-strip[open] > summary { border-radius: 12px 12px 0 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.series-strip-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: rgba(255,255,255,0.85);
    font-size: 0.92rem;
}
.series-strip-icon { font-size: 1.05rem; color: var(--primary-color, #1db954); }
.series-strip-label { color: rgba(255,255,255,0.6); }
.series-strip-name {
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}
.series-strip-name:hover { color: var(--primary-color, #1db954); text-decoration: underline; }
.series-strip-count {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.05);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
}
.series-strip-chevron {
    margin-left: auto;
    font-size: 1.3rem;
    color: rgba(255,255,255,0.5);
    transition: transform 0.2s ease;
}
.series-strip[open] > summary .series-strip-chevron { transform: rotate(180deg); }
.series-strip-list {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.85rem 1.1rem 0.7rem;
    scrollbar-width: thin;
}
.series-strip-list::-webkit-scrollbar { height: 6px; }
.series-strip-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 6px; }
.series-strip-item {
    flex: 0 0 140px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent;
    transition: background 0.15s, transform 0.15s, border-color 0.15s;
}
.series-strip-item:hover { background: rgba(255,255,255,0.06); transform: translateY(-2px); }
.series-strip-item.is-current {
    border-color: var(--primary-color, #1db954);
    background: color-mix(in srgb, var(--primary-color, #1db954) 12%, transparent);
}
.series-strip-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    background: rgba(0,0,0,0.3);
}
.series-strip-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
}
.series-strip-thumb-placeholder .material-symbols-outlined { font-size: 2.4rem; }
.series-strip-info { min-width: 0; }
.series-strip-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
    word-break: break-word;
}
.series-strip-meta {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.55);
    margin-top: 0.1rem;
}

/* Dedicated series page */
.series-page {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 0;
}
.series-hero {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
}
.series-hero-cover {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    background: rgba(0,0,0,0.3);
}
.series-hero-cover--natural {
    width: auto;
    height: auto;
    max-width: min(280px, 42vw);
    max-height: 280px;
    object-fit: contain;
}
.series-hero:has(.series-hero-cover--natural) {
    grid-template-columns: auto 1fr;
    align-items: center;
}
.series-hero-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
}
.series-hero-cover-placeholder .material-symbols-outlined { font-size: 5rem; }
.series-hero-info { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }

/* Quiet parent trail, always a direct child of #content so album / artist /
   label pages do not inherit each wrapper's flex gap. */
#content > .arch-crumbs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.55rem;
    padding: 0.12em 0 0.2em;
    min-width: 0;
    font-size: 0.68rem;
    line-height: 1.35;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.32);
    white-space: nowrap;
}
#content > .arch-crumbs .arch-crumb-link {
    color: inherit;
    text-decoration: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
#content > .arch-crumbs .arch-crumb-link:first-child {
    flex-shrink: 0;
}
#content > .arch-crumbs .arch-crumb-link:hover {
    color: rgba(255, 255, 255, 0.55);
}
#content > .arch-crumbs .arch-crumb-sep {
    flex-shrink: 0;
    opacity: 0.55;
}
.series-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary-color, #1db954);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
}
.series-hero-eyebrow .material-symbols-outlined { font-size: 1rem; }
.series-hero-title { font-size: 2.2rem; margin: 0; color: #fff; }
.series-hero-meta { color: rgba(255,255,255,0.6); font-size: 0.92rem; }
.series-hero-alt { color: rgba(255,255,255,0.45); font-size: 0.85rem; margin-top: 0.15rem; }
.series-hero-desc { color: rgba(255,255,255,0.75); margin-top: 0.5rem; line-height: 1.5; }
/* Series and taxonomy pages render the shared .cat-album-card. */
.series-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.08);
    border-radius: 12px;
}
.series-empty .material-symbols-outlined { font-size: 2rem; display: block; margin-bottom: 0.4rem; }

@media (max-width: 640px) {
    .series-hero { grid-template-columns: 1fr; text-align: center; }
    .series-hero-cover { width: 100%; height: auto; max-width: 240px; margin: 0 auto; }
    .series-hero-eyebrow { justify-content: center; }
}

/* Admin: series picker fields in edit modals */
.adm-series-row {
    display: grid;
    grid-template-columns: 1fr 110px;
    gap: 0.5rem;
}
@media (max-width: 520px) {
    .adm-series-row { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════
   FAVOURITES - toast notifications, track row menu, fav page, fav buttons
   v=20260509o
   ═══════════════════════════════════════════════════════════════════════ */

/* Header favourite shortcut button - square, icon only */
.user-section .user-btn-icon {
    padding: 8px 10px;
    gap: 0;
}
.user-section .user-btn-icon .material-symbols-outlined {
    font-size: 22px;
}
.user-section .user-btn-icon.active .material-symbols-outlined,
.user-section .user-btn-icon:hover .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
    color: #ff5577;
}

/* ─── Toast notifications ─────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: calc(100vw - 36px);
}
.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px 12px 14px;
    min-width: 260px;
    max-width: 380px;
    background: rgba(28, 28, 32, 0.96);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    transform: translateX(420px);
    opacity: 0;
    transition: transform 280ms cubic-bezier(.2,.8,.2,1), opacity 220ms ease;
    font-size: 14px;
    line-height: 1.35;
}
.toast.toast-visible {
    transform: translateX(0);
    opacity: 1;
}
.toast.toast-leaving {
    transform: translateX(420px);
    opacity: 0;
}
.toast .toast-icon {
    font-size: 22px;
    flex-shrink: 0;
}
.toast .toast-msg {
    flex: 1;
    word-break: break-word;
}
.toast .toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    padding: 2px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color .15s, background .15s;
}
.toast .toast-close .material-symbols-outlined { font-size: 18px; }
.toast .toast-close:hover { color: #fff; background: rgba(255,255,255,0.08); }
.toast.toast-success { border-left: 3px solid #4caf50; }
.toast.toast-success .toast-icon { color: #4caf50; }
.toast.toast-error { border-left: 3px solid #f44336; }
.toast.toast-error .toast-icon { color: #ff6b6b; }
.toast.toast-info { border-left: 3px solid #6c8cff; }
.toast.toast-info .toast-icon { color: #8aa6ff; }
.toast.toast-favourite { border-left: 3px solid #ff4d6d; }
.toast.toast-favourite .toast-icon { color: #ff4d6d; font-variation-settings: 'FILL' 1; }

/* ─── Track row 3-dot menu button ─────────────────────────────────── */
.track-list-item .track-list-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .15s;
    height: 24px;
}
.track-list-item:hover .track-list-menu,
.track-list-item.active .track-list-menu,
.track-list-item .track-list-menu:focus-within {
    opacity: 1;
}
/* Touch devices never hover, so the row menu has to stay reachable */
@media (hover: none) {
    .track-list-item .track-list-menu { opacity: 1; }
    .track-list-item .track-number-text { opacity: 1 !important; }
}
.track-row-menu-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, color .15s;
    padding: 0;
}
.track-row-menu-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}
.track-row-menu-btn .material-symbols-outlined { font-size: 18px; }

/* Dropdown menu (positioned via JS) */
.track-row-menu {
    position: fixed;
    z-index: 9999;
    width: 180px;
    background: #1f1f24;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(0,0,0,0.5);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .14s ease, transform .14s ease;
}
.track-row-menu.trm-open { opacity: 1; transform: translateY(0); }
.track-row-menu .trm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    transition: background .12s, color .12s;
}
.track-row-menu .trm-item:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.track-row-menu .trm-item .material-symbols-outlined { font-size: 17px; color: var(--text-secondary); }
.track-row-menu .trm-item:hover .material-symbols-outlined { color: #fff; }

/* Release download picker (anchored to download button) */
.release-dl-menu {
    position: fixed;
    z-index: 9999;
    min-width: 140px;
    max-width: 260px;
    background: #1f1f24;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .14s ease, transform .14s ease;
}
.release-dl-menu.release-dl-menu-open {
    opacity: 1;
    transform: translateY(0);
}
.release-dl-menu-item {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 8px 14px;
    font-family: inherit;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background .12s;
}
.release-dl-menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
}
.release-dl-menu-item + .release-dl-menu-item {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.release-dl-menu-item:disabled,
.release-dl-menu-item.release-dl-menu-item-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.release-dl-menu-item:disabled:hover,
.release-dl-menu-item.release-dl-menu-item-disabled:hover {
    background: none;
}
.release-dl-menu-hint {
    color: var(--text-secondary);
    font-size: 0.8em;
}

/* ─── Favourite buttons (filled state) ─────────────────────────────── */
[data-fav-type][data-fav-id].is-favourited .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
    color: #ff4d6d;
}
.action-icon-btn.release-fav-btn:hover .material-symbols-outlined { color: #ff4d6d; }
#playerFavBtn .material-symbols-outlined { transition: color .15s; }
#playerFavBtn:hover .material-symbols-outlined { color: #ff8aa0; }
#playerFavBtn.is-favourited .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
    color: #ff4d6d;
}

/* ─── Favourites page (/favourites) ───────────────────────────────── */
.fav-page {
    max-width: 1120px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 1rem 1.5rem 3rem;
    width: 100%;
    font-family: inherit;
}
body.has-player-active .fav-page { padding-bottom: 5.5rem; }

.fav-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 4rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.fav-header { margin-bottom: 1.25rem; }
.fav-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.fav-eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ff6b8a;
    margin-bottom: 0.35rem;
}
.fav-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.4rem;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.15;
}
.fav-title .material-symbols-outlined {
    font-size: 1.65rem;
    color: #ff4d6d;
    font-variation-settings: 'FILL' 1;
}
.fav-lead {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
    max-width: 36rem;
}
.fav-browse-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 1rem;
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: rgba(255, 77, 109, 0.18);
    border: 1px solid rgba(255, 77, 109, 0.4);
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.fav-browse-btn:hover {
    background: rgba(255, 77, 109, 0.28);
    border-color: rgba(255, 77, 109, 0.55);
    transform: translateY(-1px);
}
.fav-browse-btn .material-symbols-outlined { font-size: 1.1rem; }

.fav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.fav-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.fav-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}
.fav-tab.active {
    background: rgba(255, 77, 109, 0.16);
    border-color: rgba(255, 77, 109, 0.45);
    color: #fff;
}
.fav-tab .material-symbols-outlined { font-size: 1.05rem; }
.fav-tab-count {
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
}
.fav-tab.active .fav-tab-count {
    background: rgba(255, 77, 109, 0.35);
    color: #ffe0e8;
}

.fav-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 1rem;
    padding: 0 0.15rem;
}
.fav-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.fav-sort-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.fav-sort-select {
    padding: 0.4rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}
.fav-sort-select:focus {
    outline: none;
    border-color: rgba(255, 77, 109, 0.5);
}

.fav-empty,
.fav-empty-tab {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
}
.fav-empty-tab .material-symbols-outlined,
.fav-empty .fav-empty-icon {
    font-size: 3rem;
    color: rgba(255, 77, 109, 0.35);
    margin-bottom: 0.75rem;
    display: block;
}
.fav-empty h2,
.fav-empty-tab-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}
.fav-empty-lead,
.fav-empty-hint {
    margin: 0 auto;
    max-width: 22rem;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-secondary);
}
.fav-empty-hint { margin-top: 0.35rem; }
.fav-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.25rem;
    padding: 0.65rem 1.25rem;
    background: linear-gradient(135deg, #ff4d6d, #ff758f);
    color: #fff;
    border: none;
    border-radius: 9px;
    text-decoration: none;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.fav-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 77, 109, 0.35);
}
.fav-cta-btn--ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
}
.fav-cta-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

/* Release cards */
.fav-rel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.65rem;
}
.fav-rel-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.85rem;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.fav-rel-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 77, 109, 0.25);
    transform: translateY(-1px);
}
.fav-rel-card-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}
.fav-rel-card-link:link,
.fav-rel-card-link:visited,
.fav-rel-card-link:hover,
.fav-rel-card-link:active {
    color: inherit;
    text-decoration: none;
}
.fav-rel-cover {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}
.fav-rel-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fav-rel-cover .material-symbols-outlined { color: rgba(255, 255, 255, 0.28); font-size: 1.75rem; }
.fav-rel-main { flex: 1; min-width: 0; }
.fav-rel-title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}
.fav-rel-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.fav-rel-type {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.55);
}
.fav-rel-artist {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.72);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fav-rel-meta {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.42);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fav-rel-unfav {
    background: none;
    border: none;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    color: #ff4d6d;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: background 0.12s, transform 0.12s;
}
.fav-rel-unfav .material-symbols-outlined {
    font-size: 1.35rem;
    font-variation-settings: 'FILL' 1;
}
.fav-rel-unfav:hover { background: rgba(255, 77, 109, 0.14); transform: scale(1.06); }

/* Tracks tab */
.fav-tr-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}
.fav-play-all {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, #ff4d6d, #ff758f);
    color: #fff;
    border: none;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.fav-play-all:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 77, 109, 0.35);
}
.fav-play-all .material-symbols-outlined { font-size: 1.25rem; font-variation-settings: 'FILL' 1; }
.fav-shuffle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.fav-shuffle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 77, 109, 0.35);
}
.fav-shuffle-btn .material-symbols-outlined { font-size: 1.2rem; }
.fav-tr-stats {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.fav-tracklist.track-list-container {
    margin-top: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.fav-tracklist .track-list-item {
    min-height: 52px;
}
.fav-tr-album {
    margin-top: 0.15rem;
    font-size: 0.78rem;
    line-height: 1.3;
}
.fav-tr-album-link {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: color 0.12s;
}
.fav-tr-album-link:hover { color: #ff8aa0; text-decoration: underline; }

@media (max-width: 700px) {
    .fav-page { padding: 0.75rem 1rem 3.5rem; }
    .fav-header-top { flex-direction: column; align-items: stretch; }
    .fav-browse-btn { align-self: flex-start; }
    .fav-rel-grid { grid-template-columns: 1fr; }
    .fav-tr-actions { flex-direction: column; align-items: stretch; }
    .fav-tr-stats { margin-left: 0; text-align: center; }
    .fav-toolbar { justify-content: stretch; }
    .fav-sort { width: 100%; justify-content: space-between; }
    .fav-sort-select { flex: 1; max-width: 12rem; }
}


/* ==========================================================================
   Music Requests page (/requests)
   ========================================================================== */
.req-page {
    width: 100%;
    box-sizing: border-box;
    padding: 0.25rem 0 2rem;
}
body.has-player-active .req-page { padding-bottom: 1rem; }
.req-loading { display: flex; justify-content: center; padding: 3rem 0; }

.req-header { margin-bottom: 0.25rem; }
.req-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.req-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.1;
}
.req-new-btn {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 0.95rem;
    border: none;
    border-radius: 999px;
    background: var(--primary-color);
    color: #0d0d0d;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}
.req-new-btn:hover { background: var(--primary-color-hover); }

.req-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-top: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.req-tabs {
    display: flex;
    gap: 1.35rem;
    min-width: 0;
}
.req-tab {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    margin: 0 0 -1px;
    padding: 0 0 0.7rem;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
}
.req-tab:hover { color: var(--text-primary); }
.req-tab.active {
    color: #fff;
    border-bottom-color: var(--primary-color);
}
.req-tab-count {
    font-size: 0.75rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: rgba(255,255,255,0.38);
}
.req-tab.active .req-tab-count { color: rgba(255,255,255,0.55); }

.req-tools {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    margin-bottom: 0.4rem;
}
.req-search-wrap { position: relative; display: flex; align-items: center; width: 11.5rem; }
.req-search-icon {
    position: absolute; left: 0.15rem; font-size: 1.05rem;
    color: rgba(255,255,255,0.38); pointer-events: none;
}
.req-search-input {
    width: 100%; box-sizing: border-box;
    padding: 0.28rem 0.2rem 0.28rem 1.55rem;
    background: transparent; border: none;
    color: var(--text-primary); font-family: inherit; font-size: 0.86rem;
}
.req-search-input::placeholder { color: rgba(255,255,255,0.35); }
.req-search-input:focus { outline: none; }
.req-sort-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 0.28rem 1.15rem 0.28rem 0.35rem;
    border: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.45)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right center;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.86rem;
    cursor: pointer;
}
.req-sort-select:focus { outline: none; color: var(--text-primary); }

.req-unseen-banner {
    display: flex; flex-direction: column; gap: 0.45rem;
    margin: 1rem 0 0; padding: 0.7rem 0 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.req-unseen-row { display: flex; align-items: flex-start; gap: 0.55rem; font-size: 0.86rem; }
.req-unseen-row .material-symbols-outlined { font-size: 1.1rem; flex: none; margin-top: 0.05rem; }
.req-unseen-row.is-fulfilled .material-symbols-outlined { color: #86efac; }
.req-unseen-row.is-rejected .material-symbols-outlined { color: #fca5a5; }
.req-unseen-text { flex: 1 1 auto; color: var(--text-primary); line-height: 1.4; }
.req-unseen-note { color: var(--text-secondary); font-size: 0.78rem; margin-top: 0.15rem; }
.req-unseen-link { color: inherit; text-decoration: none; font-weight: 600; white-space: nowrap; flex: none; }
.req-unseen-link:hover { text-decoration: underline; }
.req-unseen-dismiss {
    align-self: flex-start; background: none; border: none; cursor: pointer;
    color: var(--text-secondary); font-size: 0.78rem; padding: 0.15rem 0;
    font-family: inherit;
}
.req-unseen-dismiss:hover { color: var(--text-primary); }

.req-empty {
    margin: 2.5rem 0 0;
    padding: 0;
    text-align: left;
    color: var(--text-secondary);
    font-size: 0.92rem;
    background: none;
    border: none;
}
.req-empty .material-symbols-outlined { display: none; }
.req-empty p { margin: 0 0 0.75rem; }

.req-list { display: flex; flex-direction: column; }

.req-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 0.85rem 1rem;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.req-cover {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.req-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.req-cover .material-symbols-outlined {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.28);
}
.req-row.req-st-rejected .req-name { color: rgba(255,255,255,0.72); }
.req-row-body { min-width: 0; }
.req-row-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.3;
    color: var(--text-primary);
}
.req-artist { font-weight: 400; color: var(--text-secondary); }
.req-artist::before { content: " · "; color: rgba(255,255,255,0.28); }
.req-row-meta {
    margin: 0.18rem 0 0;
    color: rgba(255,255,255,0.42);
    font-size: 0.8rem;
    line-height: 1.45;
}
.req-dot { margin: 0 0.35rem; color: rgba(255,255,255,0.22); }
.req-row-meta a,
.req-discogs-link { color: inherit; text-decoration: none; }
.req-row-meta a:hover,
.req-discogs-link:hover { text-decoration: underline; }

.req-notes {
    margin: 0.28rem 0 0;
    max-width: 42rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.req-admin-note {
    margin: 0.22rem 0 0;
    font-size: 0.8rem;
    color: #f0b4b4;
    line-height: 1.4;
}

.req-row-side {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}
.req-vote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.05rem;
    min-width: 3rem;
    height: 32px;
    padding: 0 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    cursor: pointer;
}
.req-vote:hover:not(.is-static) {
    border-color: rgba(255,255,255,0.28);
    color: #fff;
}
.req-vote .material-symbols-outlined { font-size: 0.95rem; }
.req-vote.is-voted {
    color: var(--primary-color);
    border-color: rgba(var(--accent-rgb), 0.45);
}
.req-vote.is-static { cursor: default; border-color: transparent; }
.req-vote-count { font-size: 0.8rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.req-open {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 0.7rem;
    margin-left: 0.2rem;
    border-radius: 999px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
}
.req-open:hover { background: rgba(255,255,255,0.06); }

.req-more-btn {
    position: relative;
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.req-more-btn:hover { background: rgba(255,255,255,0.06); color: #fff; }
.req-more-btn .material-symbols-outlined { font-size: 1.15rem; }
.req-more-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
}

.req-menu {
    position: fixed;
    z-index: 9999;
    width: 220px;
    background: #1c1c1c;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.45);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.14s ease, transform 0.14s ease;
}
.req-menu.is-open { opacity: 1; transform: translateY(0); }
.req-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 9px 12px;
    font-family: inherit;
    font-size: 0.86rem;
    text-align: left;
    cursor: pointer;
}
.req-menu-item:hover { background: rgba(255,255,255,0.06); }
.req-menu-item .material-symbols-outlined { font-size: 17px; color: var(--text-secondary); }
.req-menu-item:hover .material-symbols-outlined { color: #fff; }
.req-menu-item.is-danger { color: #fca5a5; }
.req-menu-item.is-danger .material-symbols-outlined { color: #fca5a5; }

/* New / edit modal */
.req-modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 4rem 1rem 2rem; overflow-y: auto;
}
.req-modal {
    background: #1a1a1f; border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px; padding: 1.4rem 1.5rem 1.2rem; width: 100%; max-width: 640px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
.req-modal-head {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem;
}
.req-modal-head h3 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.req-modal-close {
    background: transparent; border: none; cursor: pointer; color: var(--text-secondary);
    padding: 0.3rem; border-radius: 8px; display: flex;
}
.req-modal-close:hover { background: rgba(255,255,255,0.06); color: #fff; }

.req-modal-form { display: flex; flex-direction: column; gap: 0.85rem; }
.req-form-row { display: grid; grid-template-columns: 1fr 1fr 110px; gap: 0.7rem; }
.req-cover-field { display: flex; align-items: center; gap: 0.85rem; }
.req-cover-preview {
    width: 72px; height: 72px; flex-shrink: 0;
    border-radius: 6px; background: rgba(255,255,255,0.05); overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.req-cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.req-cover-preview .material-symbols-outlined { font-size: 1.6rem; color: rgba(255,255,255,0.28); }
.req-cover-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.65rem; }
.req-cover-upload { cursor: pointer; margin: 0; }
@media (max-width: 600px) { .req-form-row { grid-template-columns: 1fr; } }
.req-form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.req-form-group[hidden],
.req-cover-field[hidden],
.req-checkbox[hidden] { display: none !important; }
.req-media-pick { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; }
.req-form-group label {
    font-size: 0.75rem; font-weight: 600; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.req-form-group input, .req-form-group textarea, .req-form-group select {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; padding: 0.55rem 0.7rem; color: var(--text-primary);
    font-family: inherit; font-size: 0.9rem; width: 100%; box-sizing: border-box;
    transition: border-color 0.15s, background 0.15s;
}
/* Custom source picker (native select popup cannot be styled on Windows) */
.req-source-picker { position: relative; width: 100%; }
.req-source-trigger {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    width: 100%; min-height: 42px; padding: 0.6rem 0.75rem; box-sizing: border-box;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px; color: #e8e8ec; font-family: inherit; font-size: 0.9rem;
    font-weight: 500; cursor: pointer; text-align: left;
    transition: border-color 0.15s, background 0.15s;
}
.req-source-trigger:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); }
.req-source-trigger[aria-expanded="true"] {
    border-color: rgba(var(--accent-rgb), 0.55); background: rgba(255,255,255,0.08);
}
.req-source-trigger .material-symbols-outlined {
    font-size: 1.25rem; color: rgba(255,255,255,0.45); flex-shrink: 0;
    transition: transform 0.15s;
}
.req-source-trigger[aria-expanded="true"] .material-symbols-outlined { transform: rotate(180deg); }
.req-source-menu {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20;
    margin: 0; padding: 0.35rem; list-style: none;
    background: #1e1e24; border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,0.45);
    max-height: 220px; overflow-y: auto; box-sizing: border-box;
}
.req-source-menu[hidden] { display: none; }
.req-source-menu li {
    padding: 0.55rem 0.7rem; border-radius: 7px; cursor: pointer;
    font-size: 0.9rem; color: #e4e4e7; line-height: 1.3;
}
.req-source-menu li:hover { background: rgba(255,255,255,0.08); color: #fff; }
.req-source-menu li.is-selected {
    background: rgba(var(--accent-rgb), 0.22); color: #fff;
}
.req-discogs-row { display: flex; gap: 0.5rem; align-items: stretch; }
.req-discogs-row input { flex: 1; min-width: 0; }
.req-discogs-fetch {
    flex: 0 0 auto; white-space: nowrap; display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.5rem 0.75rem !important;
}
.req-discogs-fetch:disabled { opacity: 0.45; cursor: not-allowed; }
.req-form-group input:focus, .req-form-group textarea:focus, .req-source-trigger:focus {
    outline: none; border-color: rgba(var(--accent-rgb), 0.6); background: rgba(255,255,255,0.06);
}
.req-form-group textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.req-opt { font-weight: 400; color: rgba(255,255,255,0.3); text-transform: none; letter-spacing: 0; font-size: 0.7rem; }

.req-checkbox { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; color: var(--text-secondary); cursor: pointer; }
.req-checkbox input { width: 16px; height: 16px; accent-color: var(--primary-color); }

.req-modal-foot { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.5rem; }
.req-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.1rem; border-radius: 10px; border: none; cursor: pointer;
    font-family: inherit; font-size: 0.88rem; font-weight: 600;
}
.req-btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid rgba(255,255,255,0.1); }
.req-btn-ghost:hover { background: rgba(255,255,255,0.06); color: #fff; }
.req-btn-primary { background: var(--primary-color); color: #111; }
.req-btn-primary:hover { box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.35); }
.req-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }

.req-modal-error {
    margin-top: 0.4rem; padding: 0.5rem 0.7rem; border-radius: 8px;
    background: rgba(239,68,68,0.12); color: #fca5a5; font-size: 0.85rem;
    border: 1px solid rgba(239,68,68,0.3);
}

/* Catalog-match expandable candidate panel (admin only) */
.req-match-flag {
    display: inline-flex; align-items: center; gap: 0.3rem; align-self: flex-start;
    margin: 0.15rem 0 0; padding: 0.22rem 0.55rem; border-radius: 7px; cursor: pointer;
    background: rgba(var(--accent-rgb), 0.1); border: 1px solid rgba(var(--accent-rgb), 0.3); color: var(--primary-color);
    font-family: inherit; font-size: 0.74rem; font-weight: 600;
}
.req-match-flag:hover { background: rgba(var(--accent-rgb), 0.18); }
.req-match-flag .material-symbols-outlined { font-size: 0.95rem; }
.req-match-panel[hidden] { display: none; }
.req-match-panel {
    display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.35rem;
    padding: 0.5rem; border-radius: 9px; background: rgba(var(--accent-rgb), 0.05); border: 1px solid rgba(var(--accent-rgb), 0.15);
}
.req-match-loading, .req-match-empty { font-size: 0.8rem; color: var(--text-secondary); padding: 0.3rem 0.1rem; }
.req-match-candidate {
    display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 0.55rem;
    padding: 0.3rem; border-radius: 8px; text-decoration: none; color: inherit;
}
.req-match-candidate--link:hover { background: rgba(255,255,255,0.05); }
.req-match-cover { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: rgba(255,255,255,0.06); flex-shrink: 0; }
.req-match-info { min-width: 0; }
.req-match-title { font-size: 0.84rem; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-match-sub { font-size: 0.72rem; color: var(--text-secondary); }
.req-match-actions { display: flex; gap: 0.3rem; flex-wrap: wrap; justify-content: flex-end; }
.req-match-actions .req-btn { padding: 0.32rem 0.6rem; font-size: 0.76rem; }

/* Creation-time "already in the library?" warning inside the create modal */
.req-match-warning {
    display: flex; flex-direction: column; gap: 0.3rem; padding: 0.6rem;
    border-radius: 10px; background: rgba(245,158,11,0.07); border: 1px solid rgba(245,158,11,0.25);
}
.req-match-warning-head {
    display: flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; font-weight: 600; color: #fbbf24;
}
.req-match-warning-head .material-symbols-outlined { font-size: 1.05rem; }
.req-modal-foot--warning { margin-top: 0.4rem; }

/* Reject / fulfil admin modals */
.req-modal--small { max-width: 440px; }
.req-modal-body { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 0.5rem; }
.req-btn-danger { background: rgba(239,68,68,0.85); color: #fff; }
.req-btn-danger:hover { background: #ef4444; box-shadow: 0 6px 18px rgba(239,68,68,0.35); }
.req-reject-presets { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.7rem; }
.req-chip-preset {
    padding: 0.28rem 0.6rem; border-radius: 999px; cursor: pointer;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--text-secondary);
    font-family: inherit; font-size: 0.76rem;
}
.req-chip-preset:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

.req-fulfil-results { display: flex; flex-direction: column; gap: 0.2rem; max-height: 220px; overflow-y: auto; }
.req-fulfil-result {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem; border-radius: 8px;
    background: transparent; border: none; cursor: pointer; text-align: left; color: var(--text-primary);
    font-family: inherit; font-size: 0.84rem;
}
.req-fulfil-result:hover { background: rgba(255,255,255,0.06); }
.req-fulfil-result img { width: 32px; height: 32px; border-radius: 5px; object-fit: cover; background: rgba(255,255,255,0.06); flex-shrink: 0; }
.req-fulfil-picked[hidden] { display: none; }

@media (max-width: 760px) {
    .req-bar { flex-direction: column; align-items: stretch; gap: 0.15rem; }
    .req-tabs { overflow-x: auto; gap: 1rem; }
    .req-tab { white-space: nowrap; }
    .req-tools { margin: 0.1rem 0 0.5rem; }
    .req-search-wrap { flex: 1; width: auto; }
    .req-row { grid-template-columns: 52px minmax(0, 1fr); gap: 0.7rem 0.75rem; align-items: start; }
    .req-cover { width: 52px; height: 52px; }
    .req-row-side { grid-column: 2; justify-content: flex-start; }
}

/* ---------- Spectrogram modal ---------- */
.spec-modal {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 1.25rem 1.5rem 1.5rem;
    width: min(96vw, 1100px);
    max-width: 96vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
    animation: slideIn 0.25s ease-out;
    box-sizing: border-box;
}
.spec-modal-close {
    position: absolute; right: 0.75rem; top: 0.75rem;
    background: transparent; border: none; color: var(--text-muted);
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.15s;
    z-index: 2;
}
.spec-modal-close:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.spec-modal-head {
    display: flex; align-items: center; gap: 0.75rem;
    margin-bottom: 1rem; padding-right: 2.5rem;
    flex-shrink: 0;
}
.spec-modal-head .material-symbols-outlined {
    color: var(--primary-color); font-size: 1.6rem;
}
.spec-modal-titles { min-width: 0; flex: 1; }
.spec-modal-title { font-weight: 600; font-size: 1rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spec-modal-artist { font-size: 0.85rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spec-modal-body {
    background: #000; border-radius: 10px; padding: 0.5rem;
    min-height: 200px;
    flex: 1;
    min-height: 0;
    display: flex; align-items: center; justify-content: center;
    overflow: auto;
}
.spec-modal-loading { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 2rem; color: var(--text-muted); }
.spec-modal-status { font-size: 0.85rem; text-align: center; }
.spec-modal-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    image-rendering: -webkit-optimize-contrast;
}
.spec-modal-error { color: #ff8888; font-size: 0.9rem; padding: 2rem; text-align: center; }

@media (max-width: 640px) {
    .spec-modal {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        padding: 0.875rem 0.875rem 1rem;
    }
    .spec-modal-title { font-size: 0.95rem; }
    .spec-modal-artist { font-size: 0.8rem; }
    .spec-modal-head { margin-bottom: 0.625rem; }
    .spec-modal-body { padding: 0.25rem; min-height: 160px; }
}

/* ---------- Player audio info popover ---------- */
.audio-info-pop {
    position: fixed;
    z-index: 10051;
    min-width: 210px;
    max-width: 280px;
    padding: 0.7rem 0.85rem;
    background: rgba(24, 24, 24, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-primary);
    pointer-events: auto;
    opacity: 0;
    transform: translate(-50%, calc(-100% - 6px)) scale(0.97);
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}
.audio-info-pop.is-below {
    transform: translate(-50%, 6px) scale(0.97);
}
.audio-info-pop.is-open {
    opacity: 1;
    transform: translate(-50%, -100%) scale(1);
}
.audio-info-pop.is-open.is-below {
    transform: translate(-50%, 0) scale(1);
}
.audio-info-pop.is-closing {
    opacity: 0;
    pointer-events: none;
}
.audio-info-pop.is-closing:not(.is-below) {
    transform: translate(-50%, calc(-100% - 6px)) scale(0.97);
}
.audio-info-pop.is-closing.is-below {
    transform: translate(-50%, 6px) scale(0.97);
}
.aip-body {
    transition: opacity 0.15s ease;
}
.aip-body.is-updating {
    opacity: 0.45;
}
.aip-source {
    font-weight: 600;
    font-size: 0.8rem;
}
.aip-tech {
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    margin-top: 0.1rem;
}
.aip-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.5rem 0;
}
.aip-now {
    color: var(--text-secondary);
    font-size: 0.76rem;
}
.aip-now strong {
    color: var(--text-primary);
    font-weight: 700;
}
.aip-qswitch {
    display: flex;
    margin-top: 0.45rem;
    padding: 3px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    gap: 3px;
}
.aip-qswitch.is-loading {
    opacity: 0.5;
    pointer-events: none;
}
.aip-qbtn {
    flex: 1;
    border: none;
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.aip-qbtn:active {
    transform: scale(0.97);
}
.aip-qbtn:hover {
    color: var(--text-primary);
}
.aip-qbtn.active {
    background: rgba(29, 185, 84, 0.2);
    color: #1ed760;
}
.aip-hint {
    margin: 0.35rem 0 0;
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.35;
}
.aip-spec-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
}
.aip-spec {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    border: none;
    background: none;
    padding: 0.15rem 0;
    color: var(--primary-color);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s;
}
.aip-spec .material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-size: 1rem;
}
.aip-spec:hover { color: #fff; }


/* ======================================================================
   Shared parts (docs/DESIGN.md). One of each for every page; the look is
   the upload page's. Colours come from the tokens in :root and the member's
   accent (--primary-color / --accent-rgb), never from a literal green.
   /admin/styleguide shows every part.
   ====================================================================== */

/* ---------- Page frame and titles ---------- */

.ui-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 2.5rem;
    color: var(--text-primary);
}

.ui-page--narrow { max-width: 720px; }
.ui-page--wide { max-width: 1280px; }

.ui-page [hidden] { display: none !important; }

.ui-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 1.25rem;
    margin-bottom: 1.25rem;
}

.ui-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--primary-color);
}

.ui-sub {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.ui-sub a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 2px; }
.ui-sub a:hover { color: var(--text-primary); }

.ui-cap {
    margin: 0 0 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.ui-text { margin: 0 0 0.75rem; font-size: 0.9rem; line-height: 1.6; color: var(--text-secondary); }
.ui-text strong { color: var(--text-primary); }

.ui-stack { display: flex; flex-direction: column; gap: var(--gap); }
.ui-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }

/* ---------- Buttons ---------- */

.ui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: var(--ctl-h);
    padding: 0 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
}

.ui-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-primary); }
.ui-btn:focus-visible { outline: 2px solid rgba(var(--accent-rgb), 0.6); outline-offset: 2px; }
.ui-btn:disabled, .ui-btn[aria-disabled="true"] { opacity: 0.45; cursor: default; pointer-events: none; }
.ui-btn .material-symbols-outlined { font-size: 1.1rem; }

.ui-btn--primary {
    border-color: transparent;
    background: var(--primary-color);
    color: #0b0b0b;
    padding: 0 1.4rem;
}

.ui-btn--primary:hover { background: var(--primary-color); color: #0b0b0b; filter: brightness(1.08); }
.ui-btn--primary:disabled { opacity: 1; background: rgba(255, 255, 255, 0.1); color: var(--muted); filter: none; }

.ui-btn--ghost { background: transparent; }
.ui-btn--ghost:hover { background: rgba(255, 255, 255, 0.06); }

.ui-btn--danger { border-color: rgba(248, 113, 113, 0.35); background: transparent; color: var(--bad); }
.ui-btn--danger:hover { border-color: var(--bad); background: rgba(248, 113, 113, 0.1); color: var(--bad); }

.ui-btn--sm { min-height: var(--ctl-h-sm); padding: 0 0.7rem; font-size: 0.8rem; }
.ui-btn--sm .material-symbols-outlined { font-size: 1rem; }
.ui-btn--block { display: flex; width: 100%; }

/* Square button holding one icon */
.ui-btn--icon { width: var(--ctl-h); padding: 0; }
.ui-btn--icon.ui-btn--sm { width: var(--ctl-h-sm); }

/* Text that acts as a button */
.ui-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--primary-color);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.ui-link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Fields ---------- */

.ui-field { display: flex; flex-direction: column; min-width: 0; }

.ui-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.ui-req { color: var(--primary-color); }

.ui-input {
    display: block;
    width: 100%;
    min-height: var(--ctl-h);
    padding: 0 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-color: var(--field-bg);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.9rem;
    line-height: 1.3;
    color-scheme: dark;
    transition: border-color 0.15s, background-color 0.15s;
}

textarea.ui-input {
    min-height: 4.5rem;
    padding: 0.55rem 0.7rem;
    line-height: 1.5;
    resize: vertical;
}

select.ui-input {
    appearance: none;
    padding-right: 2rem;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                      linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    cursor: pointer;
}

select.ui-input option { background: #1b1b1f; color: var(--text-primary); }

.ui-input::placeholder { color: rgba(255, 255, 255, 0.28); }

.ui-input:focus {
    outline: none;
    border-color: rgba(var(--accent-rgb), 0.6);
    background-color: var(--field-bg-focus);
}

.ui-input:disabled, .ui-input[readonly] { color: var(--text-secondary); border-style: dashed; cursor: default; }
.ui-input.is-invalid, .ui-input[aria-invalid="true"] { border-color: rgba(248, 113, 113, 0.6); }

.ui-input--sm { min-height: var(--ctl-h-sm); font-size: 0.82rem; }

.ui-hint { margin: 0.35rem 0 0; font-size: 0.76rem; line-height: 1.45; color: var(--muted); }
.ui-error { margin: 0.35rem 0 0; font-size: 0.8rem; line-height: 1.45; color: var(--bad); }

.ui-pair { display: flex; gap: 0.75rem; }
.ui-pair > .ui-field { flex: 1 1 0; }

.ui-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    cursor: pointer;
    user-select: none;
}

.ui-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.ui-check:has(input:disabled) { opacity: 0.55; cursor: default; }

/* ---------- Panel ---------- */

.ui-panel {
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel-bg);
}

.ui-panel > :last-child { margin-bottom: 0; }

/* ---------- Tabs ---------- */

.ui-tabs {
    display: flex;
    gap: 1.35rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
}

.ui-tab {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    margin: 0 0 -1px;
    padding: 0 0 0.7rem;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.ui-tab:hover { color: var(--text-primary); }
.ui-tab.is-active, .ui-tab[aria-selected="true"] { color: var(--text-primary); border-bottom-color: var(--primary-color); }

.ui-tab-count { font-size: 0.75rem; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.38); }

/* ---------- Chip ---------- */

.ui-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: none;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.78rem;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
}

.ui-chip .material-symbols-outlined { font-size: 0.95rem; }
button.ui-chip, a.ui-chip { cursor: pointer; }
button.ui-chip:hover, a.ui-chip:hover { border-color: rgba(var(--accent-rgb), 0.6); color: var(--primary-color); }
.ui-chip.is-active { border-color: rgba(var(--accent-rgb), 0.6); background: rgba(var(--accent-rgb), 0.1); color: var(--primary-color); }
.ui-chip--muted { color: var(--muted); }

/* ---------- Notice ---------- */

.ui-note {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1rem;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius);
    background: rgba(var(--accent-rgb), 0.07);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ui-note > .material-symbols-outlined { font-size: 1.15rem; color: var(--primary-color); }
.ui-note p { flex: 1; margin: 0; line-height: 1.45; }
.ui-note strong { color: var(--text-primary); }
.ui-note a { color: var(--primary-color); font-weight: 600; text-decoration: none; }

.ui-note--bad { background: rgba(248, 113, 113, 0.08); }
.ui-note--bad > .material-symbols-outlined { color: var(--bad); }

/* ---------- Dialog (native <dialog>, opened with showModal()) ---------- */

.ui-dialog {
    width: min(440px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    margin: auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #18181b;
    color: var(--text-primary);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.ui-dialog--wide { width: min(640px, calc(100vw - 2rem)); }

.ui-dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }

.ui-dialog[open] { animation: uiDialogIn 0.16s ease-out; }
@keyframes uiDialogIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.ui-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem 0;
}

.ui-dialog-title { margin: 0; font-size: 1.05rem; font-weight: 700; }

.ui-dialog-close {
    display: inline-flex;
    padding: 0.2rem;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--muted);
    cursor: pointer;
}

.ui-dialog-close:hover { background: rgba(255, 255, 255, 0.06); color: var(--text-primary); }

.ui-dialog-body { padding: 0.75rem 1.1rem 0; font-size: 0.9rem; line-height: 1.55; color: var(--text-secondary); }
.ui-dialog-body > :last-child { margin-bottom: 0; }

.ui-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1.1rem;
}

/* ---------- Empty state, spinner ---------- */

.ui-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--muted);
}

.ui-empty > .material-symbols-outlined { font-size: 2.2rem; color: rgba(255, 255, 255, 0.25); }
.ui-empty-title { margin: 0.25rem 0 0; font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.ui-empty p { margin: 0; max-width: 36ch; font-size: 0.84rem; line-height: 1.5; }
.ui-empty .ui-btn { margin-top: 0.6rem; }

.ui-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: uiSpin 0.8s linear infinite;
    vertical-align: middle;
}

.ui-spinner--lg { width: 28px; height: 28px; border-width: 3px; }

@keyframes uiSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .ui-spinner { animation-duration: 2.4s; }
    .ui-dialog[open] { animation: none; }
}

/* ---------- Breakpoints: 900px tablet, 640px phone ---------- */

@media (max-width: 900px) {
    .ui-page { padding: 1.25rem 1.25rem 2rem; }
}

@media (max-width: 640px) {
    .ui-page { padding: 1rem 1rem 1.75rem; }
    .ui-pair { flex-direction: column; gap: var(--gap); }
    .ui-dialog-actions { flex-direction: column-reverse; align-items: stretch; }
}
