/**
 * Tangerine Theme - Discover CSS
 * Matches the Library page styling for consistency
 * Uses tangerine orange (#e17c52) as primary accent
 */

/* ==========================================================================
   Global Styles
   ========================================================================== */

* {
    caret-color: transparent;
}

input, textarea, [contenteditable="true"] {
    caret-color: auto;
}

/* ==========================================================================
   Container & Layout
   ========================================================================== */

.discover-container {
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Prevent horizontal scroll from filter drawer */
html:has(.discover-container),
body:has(.discover-container) {
    overflow-x: hidden;
}

/* ==========================================================================
   Header Section
   ========================================================================== */

.discover-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.discover-title-section {
    flex: 1 1 auto;
    min-width: 250px;
}

.discover-title {
    font-size: 2rem;
    font-weight: bold;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
    color: #e17c52;
}

.discover-subtitle {
    font-size: 0.95rem;
    opacity: 0.7;
    margin: 0;
    line-height: 1.4;
    color: #e0e0e0;
}

body[data-theme="tangerine"] .discover-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #e0e0e0;
    letter-spacing: -0.01em;
    margin: 0 0 2px 0;
    border-left: 3px solid #e8601c;
    padding-left: 10px;
}

body[data-theme="tangerine"] .discover-subtitle {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.82rem;
    color: rgba(232, 232, 232, 0.55);
    opacity: 1;
    margin: 0;
    padding-left: 13px;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.w-4, .h-4 { width: 1rem; height: 1rem; color: #e0e0e0; }
.w-5, .h-5 { width: 1.25rem; height: 1.25rem; color: #e0e0e0; }
.w-6, .h-6 { width: 1.5rem; height: 1.5rem; color: #e0e0e0; }
.w-8, .h-8 { width: 2rem; height: 2rem; }
.w-16, .h-16 { width: 4rem; height: 4rem; }

.hidden { display: none; }
@media (min-width: 640px) {
    .hidden.sm\:inline { display: inline; color: #e0e0e0; }
}

.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 12px; }

/* ==========================================================================
   Action Buttons
   ========================================================================== */

.action-btn {
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #3d3d3d;
    padding: 0.625rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border-radius: 0.375rem;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-btn-sm { padding: 0.5rem 1rem; }

.action-btn-primary {
    background: #e17c52;
    color: white;
    border-color: #e17c52;
}

.action-btn-primary:hover { background: #d66a40; }

.action-btn-ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.2);
}

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

.join {
    display: inline-flex;
    border-radius: 0.375rem;
    overflow: hidden;
}

.join .join-item {
    border-radius: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.join .join-item:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.join .join-item:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
    border-right: none;
}

/* Results Info Bar - Above content grid, right-aligned */
.results-info-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #888;
}

.results-info-bar .results-count {
    color: #e0e0e0;
    font-weight: 500;
}

.results-info-bar .results-page {
    color: #888;
}

.results-info-bar .results-page::before {
    content: '|';
    margin-right: 0.5rem;
    opacity: 0.5;
}

/* ==========================================================================
   Search Section
   ========================================================================== */

.discover-search {
    margin-bottom: 1.5rem;
}

.search-input-wrapper {
    position: relative;
    /* max-width: 500px; */
}

.search-input-wrapper .form-control,
.search-input-wrapper input,
#search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #e0e0e0;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    caret-color: white;
}

.search-input-wrapper .form-control:focus,
.search-input-wrapper input:focus,
#search-input:focus {
    outline: none;
    border-color: #e17c52;
    box-shadow: 0 0 0 2px rgba(225, 124, 82, 0.2);
}

.search-input-wrapper .form-control::placeholder,
.search-input-wrapper input::placeholder,
#search-input::placeholder {
    color: #9ca3af;
}

.search-clear-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.search-clear-btn:hover {
    color: #e17c52;
    background: rgba(225, 124, 82, 0.1);
}

.people-matches {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0 0 1rem;
    margin-bottom: 0.5rem;
}

.person-chip {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 220px;
    max-width: 280px;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    color: inherit;
    overflow: hidden;
}

.person-chip:hover {
    border-color: #e17c52;
    background: rgba(225, 124, 82, 0.08);
}

.person-chip img,
.person-banner-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.person-chip-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.person-chip-name,
.person-banner-name {
    font-weight: 600;
    font-size: 0.92rem;
}

.person-chip-name,
.person-chip-meta {
    display: block;
    max-width: 100%;
}

.person-chip-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.person-chip-meta,
.person-banner-meta {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.person-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.person-banner-photo {
    width: 72px;
    height: 72px;
}

.person-banner-info {
    flex: 1;
    min-width: 180px;
}

.person-role-tabs {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.person-role-tabs button,
.person-banner-actions .action-btn {
    font-size: 0.8rem;
}

.person-role-tabs button {
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: #d1d5db;
    cursor: pointer;
}

.person-role-tabs button.active {
    background: #e17c52;
    border-color: #e17c52;
    color: #fff;
}

.person-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cast-card-link {
    cursor: pointer;
}

.person-credit-link {
    color: #e17c52;
    text-decoration: none;
}

.person-credit-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Tab Navigation
   ========================================================================== */

.discover-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    margin-bottom: -1px;
}

.tab-btn:hover { color: #e0e0e0; }

.tab-btn.active {
    color: #e17c52;
    border-bottom-color: #e17c52;
}

/* ==========================================================================
   Content Type Filter
   ========================================================================== */

.content-type-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.content-type-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e17c52;
}

.type-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.type-btn {
    padding: 0.5rem 1rem;
    background-color: #3d3d3d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.type-btn:hover {
    border-color: #e17c52;
    color: #e0e0e0;
    background-color: rgba(225, 124, 82, 0.1);
}

.type-btn.active {
    background-color: #e17c52;
    border-color: #e17c52;
    color: white;
}

/* ==========================================================================
   Category Sections (Movies, Shows, Anime rows)
   ========================================================================== */

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

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0;
}

.category-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.75rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Visible horizontal scrollbar - matches filter-drawer/filter-content styling */
.category-grid {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(255, 255, 255, 0.1) rgba(255, 255, 255, 0.02);
}

.category-grid::-webkit-scrollbar {
    height: 6px;
}

.category-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.category-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.category-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.3);
}

/* Fixed width for items in horizontal scroll */
.category-grid .result-item {
    flex: 0 0 160px;
    min-width: 160px;
}

.empty-category {
    color: #9ca3af;
    font-style: italic;
    padding: 1rem 0;
}

/* ==========================================================================
   Filter Drawer - Matches Settings Sidebar Style
   ========================================================================== */

.filter-drawer {
    position: fixed;
    top: 50px; /* Below navbar */
    right: -520px;
    width: 500px;
    max-width: 90vw;
    height: calc(100vh - 50px);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(30px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1050;
    transition: right 0.3s ease-in-out;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.filter-drawer.open { right: 0; }

.filter-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3rem 1rem 0.75rem 0rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}

.filter-drawer-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    background: #e0e0e0;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filter-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #888;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-close-btn:hover {
    color: #ff6b35;
    background: rgba(255, 107, 53, 0.2);
}

.filter-close-btn svg {
    width: 18px;
    height: 18px;
}

.filter-content {
    padding: 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Collapsible Filter Sections - Settings Nav Style */
.filter-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.filter-section-header:hover {
    background: rgba(255, 255, 255, 0.03);
    border-left-color: rgba(255, 107, 53, 0.3);
}

.filter-section.open .filter-section-header {
    background: rgba(255, 107, 53, 0.1);
    border-left-color: #ff6b35;
}

.filter-section-title {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-section.open .filter-section-title {
    color: #fff;
}

.filter-section-toggle {
    width: 16px;
    height: 16px;
    color: #e0e0e0;
    transition: transform 0.2s ease;
    opacity: 0.6;
}

.filter-section.open .filter-section-toggle {
    transform: rotate(180deg);
    opacity: 1;
    color: #ff6b35;
}

.filter-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(0, 0, 0, 0.1);
}

.filter-section.open .filter-section-content {
    max-height: 1000px;
    overflow: visible;
    transition: max-height 0.3s ease-in;
}

/* Ensure open sections are above closed ones for dropdowns */
.filter-section.open {
    position: relative;
    z-index: 10;
}

.filter-section-inner {
    padding: 0.625rem 1rem;
}

/* 2-column layout for 500px wide drawer on desktop */
@media (min-width: 769px) {
    .filter-section-inner {
        display: grid;
        /* grid-template-columns: repeat(2, 1fr); */
        gap: 0.625rem 1rem;
    }

    /* Ensure filter groups don't overflow their column */
    .filter-section-inner .filter-group {
        min-width: 0;
    }

    /* Chips containers in columns need to fit */
    .filter-section-inner .chips-input-container {
        max-width: 100%;
    }

    /* Full-width items - large dropdowns with many options and sliders */
    .filter-section-inner .filter-group.full-width,
    .filter-section-inner .toggle-options,
    .filter-section-inner .filter-group:has(.rating-slider-container),
    .filter-section-inner .filter-group:has(.votes-slider-container),
    .filter-section-inner .filter-group:has(#genres-container),
    .filter-section-inner .filter-group:has(#keyword-container),
    .filter-section-inner .filter-group:has(#provider-container),
    .filter-section-inner .filter-group:has(#network-container),
    .filter-section-inner .filter-group:has(#company-container),
    .filter-section-inner .filter-group:has(#certification-min-select) {
        grid-column: 1 / -1;
    }

    /* Sort section uses single column */
    .filter-section.sort-section .filter-section-inner {
        display: block;
    }
}

/* Sort section stays open always */
.filter-section.sort-section .filter-section-content {
    max-height: none;
}

.filter-section.sort-section .filter-section-toggle {
    display: none;
}

.filter-section.sort-section .filter-section-header {
    cursor: default;
    border-left-color: transparent;
    background: transparent;
}

.filter-section.sort-section .filter-section-header:hover {
    background: transparent;
    border-left-color: transparent;
}

/* Toggle Switch Options - Tangerine Theme */
.toggle-options {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

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

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

.toggle-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background: #333;
    border-radius: 10px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #666;
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.2s ease;
}

.toggle-option input[type="checkbox"]:checked + .toggle-slider {
    background: #f5a623;
}

.toggle-option input[type="checkbox"]:checked + .toggle-slider::after {
    transform: translateX(16px);
    background: #1a1a1a;
}

.toggle-label {
    font-size: 0.75rem;
    color: #999;
}

.toggle-option:hover .toggle-slider {
    background: #444;
}

.toggle-option input[type="checkbox"]:checked + .toggle-slider:hover {
    background: #d4890f;
}

.filter-group {
    margin-bottom: 0.625rem;
    position: relative;
}

.filter-group:last-child { margin-bottom: 0; }

.filter-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-hint {
    font-weight: 400;
    font-size: 0.65rem;
    color: #888;
    text-transform: none;
    letter-spacing: normal;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.filter-option {
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #888;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-option:hover {
    background: rgba(255, 107, 53, 0.15);
    border-color: rgba(255, 107, 53, 0.3);
    color: #ff8c5a;
}

.filter-option.active {
    background: rgba(255, 107, 53, 0.2);
    border-color: #ff6b35;
    color: #fff;
}

.genres-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.375rem;
}

.rating-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rating-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #3d3d3d;
    -webkit-appearance: none;
}

.rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e17c52;
    cursor: pointer;
    border: 2px solid #2d2d2d;
}

#rating-display {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e17c52;
    min-width: 40px;
}

.year-range {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.year-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    background-color: #3d3d3d;
    color: #e0e0e0;
    font-size: 0.875rem;
}

.year-input:focus {
    outline: none;
    border-color: #e17c52;
}

.year-separator { color: #9ca3af; }

.filter-actions {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 0.5rem;
}

.filter-actions .action-btn {
    flex: 1;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 8px;
    text-wrap-mode: nowrap;
}

.filter-actions .action-btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
}

.filter-actions .action-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.filter-actions .action-btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border: none;
    color: #fff;
}

.filter-actions .action-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.filter-overlay {
    position: fixed;
    top: 60px; /* Below navbar */
    left: 0;
    width: 100vw;
    height: calc(100vh - 60px);
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.filter-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Results Section
   ========================================================================== */

.discover-results {
    min-height: 400px;
    position: relative;
}

/* Loading state - hidden by default, shown with .active class */
.loading-state {
    display: none !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: #9ca3af;
    /* Position loading state as overlay so it doesn't cause layout shifts */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: rgba(26, 26, 26, 0.9);
    border-radius: 12px;
    min-width: 150px;
}

/* Loading state is disabled - page loads fast enough without it */
.loading-state.active {
    display: none !important;
}

/* Hidden state for results grid (used when showing empty/error) */
.results-grid.hidden-state {
    display: none !important;
}

/* Dim results while loading new content */
.results-grid.loading-dim {
    opacity: 0.3;
    pointer-events: none;
}

/* Category grids loading state */
.category-grid.loading-dim {
    opacity: 0.3;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #3d3d3d;
    border-top-color: #e17c52;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty and error states - hidden by default, shown with .active */
.empty-state,
.error-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: #9ca3af;
}

.empty-state.active,
.error-state.active {
    display: flex;
}

.tmdb-not-configured {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: #9ca3af;
}

.empty-state svg,
.error-state svg,
.tmdb-not-configured svg {
    margin-bottom: 1rem;
    opacity: 0.5;
    color: #9ca3af;
}

.empty-state h3,
.error-state h3,
.tmdb-not-configured h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0 0 0.5rem 0;
}

.empty-state p,
.error-state p,
.tmdb-not-configured p {
    font-size: 0.9rem;
    margin: 0 0 1.5rem 0;
}

/* ==========================================================================
   Results Grid
   ========================================================================== */

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
    padding-bottom: 2rem;
    justify-content: start;
}

.result-item {
    background-color: #3d3d3d;
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    border-radius: 8px;
    overflow: visible;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    /* border-color: #e17c52; */
}

.result-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #2d2d2d;
    border-radius: 8px;
    overflow: hidden;
}

.result-poster-placeholder {
    width: 100%;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2d2d2d;
    color: #9ca3af;
}

/* Bottom bar - always visible on poster */
.result-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
    display: flex;
    align-items: center;
    z-index: 5;
    transition: opacity 0.3s ease;
    justify-content: center;
    border-radius: 7px;
}

/* Compact info text - "2025 • Jan 15 ⭐ 7.9" */
.result-info {
    font-size: 0.75rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    word-spacing: 0.15em;
    letter-spacing: 0.02em;
}

/* Legacy support - keeping these for hover overlay */
.result-bottom-bar .result-year {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.result-bottom-bar .result-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fbbf24;
}

.result-bottom-bar .result-rating svg {
    width: 14px;
    height: 14px;
}

/* Hover overlay - full details */
.result-hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.85) 50%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 6;
    border-radius: 8px;
}

.result-item:hover .result-hover-overlay {
    opacity: 1;
}

.result-item:hover .result-bottom-bar {
    opacity: 0;
}

.result-hover-overlay .result-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-hover-overlay .result-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.result-hover-overlay .result-year {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.result-hover-overlay .result-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #fbbf24;
}

.result-hover-overlay .result-rating svg {
    width: 14px;
    height: 14px;
}

.result-hover-overlay .result-overview {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.result-hover-overlay .result-reason {
    font-size: 0.7rem;
    color: #fbbf24;
    line-height: 1.3;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Legacy classes kept for compatibility */
.result-content { display: none; }

.result-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.result-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #fbbf24;
}

.result-rating svg { width: 14px; height: 14px; }

.result-overview {
    font-size: 0.8rem;
    color: #9ca3af;
    line-height: 1.4;
}

/* Status badge - top left with icon */
.db-status-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.db-status-badge svg {
    width: 16px;
    height: 16px;
}

.db-status-badge.present,
.db-status-badge.collected {
    background-color: rgba(16, 185, 129, 0.5);
    color: white;
}

.db-status-badge.missing {
    background-color: rgba(239, 68, 68, 0.5);
    color: white;
}

.db-status-badge.wanted,
.db-status-badge.partial {
    background-color: rgba(234, 179, 8, 0.5);
    color: white;
}

.db-status-badge.upgrading {
    background-color: rgba(59, 130, 246, 0.5);
    color: white;
}

.db-status-badge.blacklisted {
    background-color: rgba(30, 30, 30, 0.5);
    color: white;
}

.db-status-badge.unreleased {
    background-color: rgba(249, 115, 22, 0.5);
    color: white;
}

/* Release date color-coding */
.release-digital {
    color: #06b6d4 !important;
    font-weight: 600;
}

.release-theatrical {
    color: #fb923c !important;
    font-weight: 600;
}

/* Media type badge - top right with icon */
.media-type-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.media-type-badge svg {
    width: 16px;
    height: 16px;
}

.media-type-badge.badge-movie {
    background-color: rgba(139, 92, 246, 0.5);
    color: white;
}

.media-type-badge.badge-tv {
    background-color: rgba(59, 130, 246, 0.5);
    color: white;
}

/* Rank overlay - top center for Top 10 lists */
.rank-overlay {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 34px;
    font-weight: 900;
    color: #e0e0e0;
    text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.9), 1px -1px 0 rgba(0, 0, 0, 0.9), -1px 1px 0 rgba(0, 0, 0, 0.9), 1px 1px 0 rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 1);
    z-index: 20;
    line-height: 1;
    pointer-events: none;
}

/* Split badges for mixed states - 50/50 gradient backgrounds */
.db-status-badge.split-badge {
    overflow: hidden;
}

/* Priority order: Wanted > Unreleased > Collected > Blacklisted */
/* Primary state is on the left (50%), secondary on the right (50%) */

/* Wanted + Unreleased */
.db-status-badge.split-wanted-unreleased {
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.5) 50%, rgba(249, 115, 22, 0.5) 50%) !important;
}

/* Wanted + Collected */
.db-status-badge.split-wanted-collected {
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.5) 50%, rgba(16, 185, 129, 0.5) 50%) !important;
}

/* Wanted + Blacklisted */
.db-status-badge.split-wanted-blacklisted {
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.5) 50%, rgba(30, 30, 30, 0.5) 50%) !important;
}

/* Unreleased + Collected */
.db-status-badge.split-unreleased-collected {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.5) 50%, rgba(16, 185, 129, 0.5) 50%) !important;
}

/* Unreleased + Blacklisted */
.db-status-badge.split-unreleased-blacklisted {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.5) 50%, rgba(30, 30, 30, 0.5) 50%) !important;
}

/* Collected + Blacklisted */
.db-status-badge.split-collected-blacklisted {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.5) 50%, rgba(30, 30, 30, 0.5) 50%) !important;
}

.pagination {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

/* Infinite Scroll Loading Indicator */
.infinite-scroll-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    color: #9ca3af;
    font-size: 0.9rem;
}

.loading-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid #3d3d3d;
    border-top-color: #e17c52;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.end-of-results {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    color: #6b7280;
    font-size: 0.9rem;
    font-style: italic;
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.modal.show { opacity: 1; visibility: visible; }

.modal-content {
    background-color: #2d2d2d;
    border-radius: 12px;
    max-width: 700px;
    max-height: 90vh;
    width: 90%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #e0e0e0;
}

.modal-close-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
}

.modal-close-btn:hover {
    color: #e17c52;
    background: rgba(225, 124, 82, 0.1);
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
    display: block;
    /* gap: 1.5rem; */
}

.modal-poster { flex-shrink: 0; width: 180px; }
.modal-poster img { width: 100%; border-radius: 8px; }

.modal-details { flex: 1; }
.modal-details p { color: #e0e0e0; line-height: 1.6; margin: 0 0 1rem 0; }

.modal-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #9ca3af;
}

.modal-meta strong { color: #e17c52; }

.modal-footer {
    padding: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #353535;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .filter-drawer { width: 100%; right: -100%; }
    .modal-body { flex-direction: column; }
    .modal-poster { width: 100%; max-width: 200px; margin: 0 auto; }
    .results-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ==========================================================================
   Advanced Filter Styles - Compact Settings-like
   ========================================================================== */

/* Custom Dropdown Styling */
.ui.dropdown,
.sort-dropdown,
.sort-order-dropdown,
.genres-dropdown,
.companies-dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.5rem 2rem 0.5rem 0.625rem;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.ui.dropdown:hover,
.sort-dropdown:hover,
.genres-dropdown:hover,
.companies-dropdown:hover {
    border-color: rgba(255, 107, 53, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.ui.dropdown:focus,
.ui.dropdown:focus-within {
    border-color: rgba(255, 107, 53, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.ui.dropdown .text,
.ui.dropdown .default.text {
    color: #e0e0e0;
}

.ui.dropdown .default.text {
    color: #666;
}

.ui.dropdown .dropdown.icon,
.ui.dropdown i.dropdown {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.ui.dropdown .menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(30, 30, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-top: 0.25rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.ui.dropdown .menu.hidden {
    display: none;
}

.ui.dropdown .menu .item {
    padding: 0.5rem 0.625rem;
    color: #888;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.8rem;
}

.ui.dropdown .menu .item:last-child {
    border-bottom: none;
}

.ui.dropdown .menu .item:hover {
    background: rgba(255, 107, 53, 0.15);
    color: #ff8c5a;
}

.ui.dropdown .menu .item.active,
.ui.dropdown .menu .item.selected {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
    font-weight: 500;
}

/* Sort Controls */
.sort-controls {
    display: flex;
    gap: 0.375rem;
}

.sort-controls .sort-dropdown {
    flex: 1;
}

.sort-controls .sort-order-dropdown {
    width: auto;
    min-width: 80px;
}

/* Filter drawer select elements */
.filter-drawer select {
    width: 100%;
    padding: 0.375rem 0.625rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border-radius: 6px;
    font-size: 0.75rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
    padding-right: 2rem;
}

.filter-drawer select:focus {
    border-color: rgba(255, 107, 53, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    outline: none;
}

.filter-drawer select option {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* Range Controls (Year, Runtime) */
.year-range-controls,
.runtime-range-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.range-separator {
    color: #666;
    font-size: 0.75rem;
    font-weight: 500;
}

.ui.input,
.ui.input input {
    width: 100%;
}

.ui.input input,
.year-range-controls input,
.runtime-range-controls input {
    width: 100%;
    padding: 0.5rem 0.625rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.ui.input input:focus,
.year-range-controls input:focus,
.runtime-range-controls input:focus {
    outline: none;
    border-color: rgba(255, 107, 53, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.ui.input input::placeholder {
    color: #666;
}

/* Rating Slider Container */
.rating-slider-container,
.votes-slider-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Range Slider Styling */
.ui.range.slider,
.ui.slider {
    position: relative;
    width: 100%;
    height: 16px;
    cursor: pointer;
    margin-bottom: 0.625rem;
    padding: 0 9px;
}

.ui.slider .inner {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 6px;
}

.ui.slider .track,
.ui.range .track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0px;
    right: 0px;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ui.slider .track-fill,
.ui.range .track-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #ff6b35 0%, #f7931e 100%);
    border-radius: 2px;
}

.ui.slider .thumb,
.ui.range .thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 2;
}

.ui.slider .thumb:hover,
.ui.range .thumb:hover {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.4);
}

.ui.slider .thumb:active,
.ui.range .thumb:active {
    cursor: grabbing;
}

.ui.range .thumb.second {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
}

/* Hide slider labels */
.ui.slider .labels,
.ui.range .labels {
    display: none;
}

/* Rating Inputs (Between X and Y) */
.rating-inputs,
.votes-input {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.rating-inputs .ui.label,
.votes-input .ui.label {
    background: transparent;
    color: #e0e0e0;
    padding: 0;
    border: none;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.rating-input,
.votes-input-field {
    width: 55px !important;
    padding: 0.375rem 0.5rem !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    color: #e0e0e0 !important;
    font-size: 0.75rem !important;
    text-align: center !important;
}

.rating-input:focus,
.votes-input-field:focus {
    outline: none !important;
    border-color: rgba(255, 107, 53, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1) !important;
}

/* Selected Genres Container (Chips) */
.selected-genres-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.genre-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid rgba(255, 107, 53, 0.3);
    color: #ff8c5a;
    padding: 0.25rem 0.5rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 500;
}

.genre-chip .remove-genre {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: none;
    border: none;
    color: #ff8c5a;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.genre-chip .remove-genre:hover {
    background: rgba(255, 107, 53, 0.3);
    color: #fff;
}

.genre-chip .remove-genre svg {
    width: 10px;
    height: 10px;
}

/* Active Filters Section */
.active-filters-section {
    padding: 0.625rem 1rem;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 8px;
    margin-bottom: 0.625rem;
}

.active-filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(255, 107, 53, 0.5);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.active-filter-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}

.active-filter-chip .remove-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.active-filter-chip .remove-filter:hover {
    background: rgba(255, 255, 255, 0.2);
}

.active-filter-chip .remove-filter svg {
    width: 10px;
    height: 10px;
}

/* Multi-select dropdown selected items */
.ui.multiple.dropdown .menu .item.selected {
    background: rgba(255, 107, 53, 0.2) !important;
}

.ui.multiple.dropdown .menu .item.selected::before {
    content: '✓';
    margin-right: 0.375rem;
    color: #ff6b35;
    font-weight: bold;
}

/* Compact dropdown for sort order */
.ui.compact.dropdown {
    min-width: auto;
    padding-right: 1.5rem;
}

/* Calendar icon for year inputs */
.ui.calendar .ui.input.left.icon {
    position: relative;
}

.ui.calendar .ui.input.left.icon i.calendar.icon {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

.ui.calendar .ui.input.left.icon input {
    padding-left: 2rem;
}

/* Filter drawer scrollbar - Settings style */
.filter-drawer::-webkit-scrollbar,
.filter-content::-webkit-scrollbar {
    width: 6px;
}

.filter-drawer::-webkit-scrollbar-track,
.filter-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.filter-drawer::-webkit-scrollbar-thumb,
.filter-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.filter-drawer::-webkit-scrollbar-thumb:hover,
.filter-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.3);
}

/* Dropdown menu scrollbar */
.ui.dropdown .menu::-webkit-scrollbar {
    width: 6px;
}

.ui.dropdown .menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.ui.dropdown .menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.ui.dropdown .menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 500px) {
    .filter-drawer {
        width: 100%;
        right: -100%;
    }

    .rating-inputs,
    .votes-input {
        flex-direction: column;
        align-items: flex-start;
    }

    .rating-input,
    .votes-input-field {
        width: 100% !important;
    }
}

/* ==========================================================================
   MDBlist-Style Chips Input Components
   ========================================================================== */

/* Sort Select Dropdown - Compact */
.sort-dropdown-wrapper {
    flex: 1;
    position: relative;
}

.sort-select {
    width: 100%;
    padding: 0.5rem 1.75rem 0.5rem 0.625rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.8rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.375rem center;
    background-size: 1rem;
    transition: all 0.2s ease;
}

.sort-select:hover {
    border-color: rgba(255, 107, 53, 0.5);
    background-color: rgba(255, 255, 255, 0.08);
}

.sort-select:focus {
    outline: none;
    border-color: rgba(255, 107, 53, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.sort-select option {
    background: rgba(30, 30, 30, 0.98);
    color: #e0e0e0;
    padding: 0.375rem;
}

/* Sort Order Toggle Button - Compact */
.sort-order-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sort-order-btn:hover {
    border-color: rgba(255, 107, 53, 0.5);
    color: #ff8c5a;
    background: rgba(255, 107, 53, 0.1);
}

.sort-order-btn[data-order="asc"] {
    background: rgba(255, 107, 53, 0.15);
    border-color: rgba(255, 107, 53, 0.3);
    color: #ff6b35;
}

.sort-order-btn svg {
    width: 16px;
    height: 16px;
}

.sort-order-btn .sort-icon-asc,
.sort-order-btn .sort-icon-desc {
    display: none;
}

.sort-order-btn[data-order="desc"] .sort-icon-desc {
    display: block;
}

.sort-order-btn[data-order="asc"] .sort-icon-asc {
    display: block;
}

/* =============================================================================
   FILTER PRESETS - Tangerine Theme
   ============================================================================= */

/* .preset-section {
    background: rgba(255, 107, 53, 0.03);
    border-bottom: 1px solid rgba(255, 107, 53, 0.15);
}

.preset-section .filter-section-title {
    color: #ff6b35;
} */

.preset-controls {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.preset-select {
    flex: 1;
    padding: 0.5rem 1.75rem 0.5rem 0.625rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.8rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.375rem center;
    background-size: 1rem;
    transition: all 0.2s ease;
}

.preset-select:hover {
    border-color: rgba(255, 107, 53, 0.5);
    background-color: rgba(255, 255, 255, 0.08);
}

.preset-select:focus {
    outline: none;
    border-color: rgba(255, 107, 53, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.preset-select option {
    background: rgba(30, 30, 30, 0.98);
    color: #e0e0e0;
    padding: 0.375rem;
}

.preset-delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.preset-delete-btn:hover:not(:disabled) {
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.preset-delete-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.preset-delete-btn svg {
    width: 16px;
    height: 16px;
}

/* Preset Modal Styling */
.preset-modal-content {
    max-width: 500px;
}

.preset-filter-summary {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.preset-filter-summary h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
}

/* Chips Input Container - Compact */
.chips-input-container {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    min-height: 34px;
    padding: 0.25rem 2rem 0.25rem 0.375rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: text;
    transition: all 0.2s ease;
}

.chips-input-container:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.chips-input-container:focus-within {
    border-color: rgba(255, 107, 53, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Chips Wrapper */
.chips-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* Individual Chip - Compact */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.125rem 0.375rem;
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid rgba(255, 107, 53, 0.25);
    border-radius: 4px;
    color: #ff8c5a;
    font-size: 0.7rem;
    white-space: nowrap;
}

.chip .chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    padding: 0;
    background: none;
    border: none;
    color: #ff8c5a;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.chip .chip-remove:hover {
    color: #e17c52;
    background-color: rgba(225, 124, 82, 0.2);
}

.chip .chip-remove svg {
    width: 10px;
    height: 10px;
}

/* Chips Search Input */
.chips-search-input {
    flex: 1;
    min-width: 80px;
    padding: 0.25rem;
    background: transparent;
    border: none;
    color: #e0e0e0;
    font-size: 0.875rem;
    outline: none;
}

.chips-search-input::placeholder {
    color: #6b7280;
}

/* Chips Dropdown Toggle */
.chips-dropdown-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.15s ease;
}

.chips-dropdown-toggle:hover {
    color: #e17c52;
}

.chips-dropdown-toggle svg {
    width: 16px;
    height: 16px;
}

/* Chips Dropdown Menu */
.chips-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    max-height: 250px;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #2d2d2d;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.375rem;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    display: none;
}

.chips-dropdown.show {
    display: block;
}

/* Dropdown opens upward (for items near bottom of drawer) */
.chips-dropdown.dropdown-up {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 4px;
}

/* Production company dropdown opens upward (near bottom of drawer) */
#company-container .chips-dropdown {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 4px;
}

/* Lists dropdown opens upward */
#lists-container .chips-dropdown {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 4px;
    max-height: 350px;
}

/* Category/Section headers in dropdown */
.chips-dropdown-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #e17c52;
    background-color: rgb(23 23 23);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1;
}

/* List icon in dropdown items */
.list-icon {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

/* Chips Dropdown Item */
.chips-dropdown-item {
    padding: 0.625rem 0.875rem;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.chips-dropdown-item:hover {
    background-color: rgba(225, 124, 82, 0.15);
    color: #e17c52;
}

.chips-dropdown-item.selected {
    background-color: rgba(225, 124, 82, 0.2);
    color: #e17c52;
}

.chips-dropdown-item.hidden {
    display: none;
}

/* Empty dropdown state */
.chips-dropdown-empty {
    padding: 0.75rem 1rem;
    color: #666;
    font-style: italic;
    text-align: center;
    font-size: 0.875rem;
}

/* Match All option styling */
.chips-dropdown-item[data-value="match_all"] {
    font-style: italic;
    color: #9ca3af;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chips-dropdown-item[data-value="match_all"]:hover {
    color: #e17c52;
}

/* Chips Dropdown Scrollbar */
.chips-dropdown::-webkit-scrollbar {
    width: 6px;
}

.chips-dropdown::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.chips-dropdown::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 3px;
}

.chips-dropdown::-webkit-scrollbar-thumb:hover {
    background-color: #777;
}

/* ==========================================================================
   Include/Exclude Chips System
   ========================================================================== */

/* Dropdown item with +/- buttons */
.chips-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.625rem;
}

.chips-item-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chips-item-actions {
    display: flex;
    gap: 0.25rem;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.chips-include-btn,
.chips-exclude-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #9ca3af;
}

.chips-include-btn:hover {
    background: rgba(74, 222, 128, 0.2);
    border-color: rgba(74, 222, 128, 0.5);
    color: #4ade80;
}

.chips-exclude-btn:hover {
    background: rgba(248, 113, 113, 0.2);
    border-color: rgba(248, 113, 113, 0.5);
    color: #f87171;
}

.chips-include-btn svg,
.chips-exclude-btn svg {
    width: 12px;
    height: 12px;
}

/* Include-only containers hide the exclude button */
.chips-input-container.include-only .chips-exclude-btn {
    display: none !important;
}

/* Dropdown item states */
.chips-dropdown-item.included {
    background-color: rgba(74, 222, 128, 0.1);
    border-left: 3px solid #4ade80;
}

.chips-dropdown-item.included .chips-include-btn {
    background: rgba(74, 222, 128, 0.3);
    border-color: #4ade80;
    color: #4ade80;
}

.chips-dropdown-item.excluded {
    background-color: rgba(248, 113, 113, 0.1);
    border-left: 3px solid #f87171;
}

.chips-dropdown-item.excluded .chips-exclude-btn {
    background: rgba(248, 113, 113, 0.3);
    border-color: #f87171;
    color: #f87171;
}

/* Color-coded chips */
.chip-include {
    background: rgba(74, 222, 128, 0.15) !important;
    border-color: rgba(74, 222, 128, 0.4) !important;
    color: #4ade80 !important;
}

.chip-include .chip-icon {
    font-weight: bold;
    margin-right: 0.125rem;
}

.chip-include .chip-remove {
    color: #4ade80 !important;
}

.chip-include .chip-remove:hover {
    background-color: rgba(74, 222, 128, 0.3) !important;
    color: #22c55e !important;
}

.chip-exclude {
    background: rgba(248, 113, 113, 0.15) !important;
    border-color: rgba(248, 113, 113, 0.4) !important;
    color: #f87171 !important;
}

.chip-exclude .chip-icon {
    font-weight: bold;
    margin-right: 0.125rem;
}

.chip-exclude .chip-remove {
    color: #f87171 !important;
}

.chip-exclude .chip-remove:hover {
    background-color: rgba(248, 113, 113, 0.3) !important;
    color: #ef4444 !important;
}

/* Sort Controls Layout Fix */
.sort-controls {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

/* =============================================================================
   ADAPTIVE LIST MODAL - Tangerine Theme
   ============================================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: #1e1e1e;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
}

.adaptive-list-modal-content {
    max-width: 550px;
    width: 90vw;
}

/* Ensure modal body displays as single column */
.adaptive-list-modal-content .modal-body {
    display: block;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #333;
    background: #252525;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
}

.modal-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #888;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: #fff;
}

.modal-close-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.modal-description {
    margin: 0 0 1rem 0;
    color: #888;
    font-size: 0.875rem;
    line-height: 1.5;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #fff;
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #333;
    border-radius: 6px;
    background: #161616;
    color: #fff;
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.form-input::placeholder {
    color: #666;
}

.adaptive-list-filter-summary {
    background: #161616;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 0.875rem;
    margin-bottom: 1rem;
}

.adaptive-list-filter-summary h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-preview-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.preview-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: #252525;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #fff;
}

.preview-chip.type {
    background: #f97316;
    border-color: #f97316;
    color: #fff;
}

.preview-chip.time {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.preview-chip.warning {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.adaptive-list-info {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #888;
    line-height: 1.4;
}

.adaptive-list-info svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: #f97316;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #333;
    background: #252525;
}

/* Secondary button style for Save as Adaptive List button */
.action-btn-secondary {
    background: #252525;
    color: #fff;
    border: 1px solid #333;
    display: inline-flex;
    align-items: center;
}

.action-btn-secondary:hover {
    background: #333;
    border-color: #f97316;
}

/* Mobile responsive for modal */
@media (max-width: 480px) {
    .modal-content {
        max-height: 95vh;
        margin: 0.5rem;
    }

    .modal-header {
        padding: 0.875rem 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 0.875rem 1rem;
        flex-direction: column;
    }

    .modal-footer .action-btn {
        width: 100%;
    }
}

/* ==========================================================================
   Discover Details - Action Buttons (Tangerine Theme)
   Matches tangerine_library_show.css styles exactly
   ========================================================================== */

.show-actions .action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 0.375rem;
    background: rgba(255, 107, 53, 0.05);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.show-actions .action-btn:hover {
    background: rgba(255, 107, 53, 0.15);
    transform: translateY(-1px);
}

.show-actions .action-btn svg {
    flex-shrink: 0;
}

.show-actions .action-text {
    display: none;
}

@media (min-width: 1024px) {
    .show-actions .action-text {
        display: inline;
    }
}

.show-actions .primary-btn {
    background: rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.4);
    color: #ff9166;
}

.show-actions .primary-btn:hover {
    background: rgba(255, 107, 53, 0.3);
}

.show-actions .ghost-btn {
    background: rgba(255, 107, 53, 0.05);
    border-color: rgba(255, 107, 53, 0.3);
    color: #ffffff;
}

.show-actions .ghost-btn:hover {
    background: rgba(255, 107, 53, 0.15);
}

/* ==========================================================================
   Discover Details - Episode Row Styles (Tangerine Theme)
   Matches tangerine_library_show.css styles exactly
   ========================================================================== */

.discover-episode-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: #2d3035a3;
    border: 1px solid #ff916638;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.discover-episode-row:last-child {
    margin-bottom: 0;
}

.discover-episode-row:hover {
    background: #191e24;
    border-color: rgba(255, 107, 53, 0.4);
}

.discover-episode-number {
    width: 2.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    color: #ff9166;
    flex-shrink: 0;
}

.discover-episode-info {
    flex: 1;
    min-width: 0;
}

.discover-episode-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 0.95);
}

.discover-episode-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.8125rem;
    opacity: 0.6;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, 0.7);
}

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

/* Search Episode Button - Tangerine Style */
/* .search-episode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 0.375rem;
    color: #ff9166;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.search-episode-btn:hover {
    background: rgba(255, 107, 53, 0.15);
    border-color: rgba(255, 107, 53, 0.5);
}

.search-episode-btn svg {
    width: 18px;
    height: 18px;
} */

/* Season Header - Tangerine Style */
.discover-season-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    margin-bottom: 0.75rem;
}

.discover-season-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.magnet-assign-btn,
.magnet-assign-episode-btn {
    border-color: rgba(255, 145, 102, 0.35) !important;
    color: #ff9166 !important;
}

.magnet-assign-btn:hover,
.magnet-assign-episode-btn:hover {
    background: rgba(255, 145, 102, 0.15) !important;
    border-color: rgba(255, 145, 102, 0.6) !important;
}

/* ==========================================================================
   MDBList Dropdown - Tangerine Theme
   ========================================================================== */

.mdblist-tabs-container {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.mdblist-dropdown-wrapper {
    position: relative;
}

.mdblist-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    margin-bottom: -1px;
}

.mdblist-dropdown-trigger:hover {
    color: #e0e0e0;
}

.mdblist-dropdown-trigger.active {
    color: #ff6b35;
    border-bottom-color: #ff6b35;
}

.mdblist-dropdown-trigger svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.mdblist-dropdown-trigger.open svg {
    transform: rotate(180deg);
}

.mdblist-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 220px;
    max-height: 400px;
    overflow-y: auto;
    background: rgba(30, 30, 30, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.mdblist-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mdblist-dropdown-header {
    padding: 0.5rem 0.875rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ff6b35;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 107, 53, 0.05);
}

.mdblist-dropdown-header:not(:first-child) {
    margin-top: 0.5rem;
}

.mdblist-dropdown-item {
    padding: 0.625rem 0.875rem;
    font-size: 0.85rem;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.mdblist-dropdown-item:hover {
    background: rgba(255, 107, 53, 0.15);
    color: #ff8c5a;
}

.mdblist-dropdown-item.selected {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
    font-weight: 500;
}

.mdblist-dropdown-item.selected::before {
    content: '✓ ';
    font-weight: bold;
}

/* MDBList dropdown scrollbar */
.mdblist-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.mdblist-dropdown-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.mdblist-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.mdblist-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.3);
}

/* Mobile responsive for MDBList dropdown */
@media (max-width: 768px) {
    .discover-tabs-scroll-wrap {
        position: relative;
        z-index: 100;
    }

    .discover-tabs {
        overflow-x: auto;
        overflow-y: clip;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #e17c52 rgba(255,255,255,0.08);
        padding-bottom: 8px;
        border-bottom: none;
    }

    .discover-tabs::-webkit-scrollbar {
        height: 3px;
    }
    .discover-tabs::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.06);
        border-radius: 2px;
    }
    .discover-tabs::-webkit-scrollbar-thumb {
        background: #e17c52;
        border-radius: 2px;
    }

    .discover-tabs .tab-btn {
        margin-bottom: 0;
        border-bottom-width: 2px;
        padding-bottom: 10px;
    }

    .mdblist-dropdown-menu,
    .flixpatrol-dropdown-menu {
        position: fixed !important;
        top: 200px;
        left: 16px;
        z-index: 9999;
    }

    .discover-tabs > .tab-btn,
    .discover-tabs > #flixpatrol-tabs,
    .discover-tabs > #recommendations-tabs,
    .mdblist-tabs-container {
        flex-shrink: 0;
    }

    .mdblist-tabs-container {
        margin-left: auto;
    }

    .tab-btn {
        white-space: nowrap;
        padding: 0.75rem 1rem;
    }

    .mdblist-dropdown-menu {
        right: auto;
        left: 0;
    }
}

/* ==========================================================================
   FlixPatrol Dropdown (Top 10 Charts) - Tangerine Theme
   ========================================================================== */

.flixpatrol-tabs-container {
    display: flex;
    align-items: center;
}

.flixpatrol-dropdown-wrapper {
    position: relative;
}

.flixpatrol-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    margin-bottom: -1px;
}

.flixpatrol-dropdown-trigger:hover {
    color: #e0e0e0;
}

.flixpatrol-dropdown-trigger.active {
    color: #ff6b35;
    border-bottom-color: #ff6b35;
}

.flixpatrol-dropdown-trigger svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.flixpatrol-dropdown-trigger.open svg {
    transform: rotate(180deg);
}

.flixpatrol-dropdown-trigger.selected {
    color: #ff6b35;
    border-bottom-color: #ff6b35;
}

.flixpatrol-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    background: rgba(30, 30, 30, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.flixpatrol-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.flixpatrol-dropdown-header {
    padding: 0.5rem 0.875rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ff6b35;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 107, 53, 0.05);
}

.flixpatrol-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.85rem;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.flixpatrol-dropdown-item:hover {
    background: rgba(255, 107, 53, 0.15);
    color: #ff8c5a;
}

.flixpatrol-dropdown-item.selected {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
    font-weight: 500;
}

/* Platform icons */
.platform-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.platform-netflix { background: #E50914; }
.platform-disney { background: linear-gradient(135deg, #113CCF, #0057B8); }
.platform-amazon { background: #00A8E1; }
.platform-hbo { background: #5822B4; }
.platform-apple { background: linear-gradient(135deg, #1C1C1E, #3A3A3C); }
.platform-paramount { background: #0064FF; }
.platform-hulu { background: #1CE783; }
.platform-peacock { background: linear-gradient(135deg, #000000, #FFD54F); }

/* Platform icons with initials */
.platform-netflix::before { content: 'N'; }
.platform-disney::before { content: 'D+'; font-size: 0.6rem; }
.platform-amazon::before { content: 'P'; }
.platform-hbo::before { content: 'M'; }
.platform-apple::before { content: 'A+'; font-size: 0.6rem; }
.platform-paramount::before { content: 'P+'; font-size: 0.6rem; }
.platform-hulu::before { content: 'H'; }
.platform-peacock::before { content: 'P'; }

.platform-name {
    flex: 1;
}

/* FlixPatrol dropdown scrollbar */
.flixpatrol-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.flixpatrol-dropdown-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.flixpatrol-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.flixpatrol-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.3);
}

/* Mobile responsive for FlixPatrol dropdown */
@media (max-width: 768px) {
    .flixpatrol-tabs-container {
        margin-top: 0.5rem;
    }
}

/* ==========================================================================
   Request and Tester Icons (Hover Only) - Tangerine Theme
   ========================================================================== */

/* Request Icon - Bottom Right Corner Triangle */
/* Action button bar — tangerine theme (inherits discover.css base, accent override) */
.hover-action-btn.request-icon {
    color: #ff6b35 !important;
    border-color: rgba(255, 107, 53, 0.3) !important;
}
.hover-action-btn.request-icon:hover {
    background: rgba(255, 107, 53, 0.2) !important;
    border-color: #ff6b35 !important;
    box-shadow: 0 0 12px rgba(255, 107, 53, 0.4) !important;
}

/* ==========================================================================
   Version Selection Modals - Tangerine Theme
   ========================================================================== */

/* Version Modal */
/* ==========================================================================
   Version Request Modal — Tangerine Theme
   ========================================================================== */

.version-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.version-modal-content {
    background: #1a1a1a;
    border: 1px solid #3d3d3d;
    border-top: 3px solid #e8601c;
    border-radius: 10px;
    width: 320px;
    max-width: calc(100vw - 32px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    font-family: 'Inter', system-ui, sans-serif;
}

.version-modal-content h3 { display: none; }

.dialog-body { padding: 20px; }

.dialog-title {
    font-size: 17px;
    font-weight: 700;
    color: #e0e0e0;
    border-left: 3px solid #e8601c;
    padding-left: 10px;
    margin-bottom: 14px;
    line-height: 1.3;
    font-family: 'Inter', system-ui, sans-serif;
}

.dialog-sub {
    font-size: 11px;
    color: #e8601c;
    font-weight: 500;
    margin-bottom: 14px;
    padding: 5px 9px;
    background: rgba(232, 96, 28, 0.08);
    border: 1px solid rgba(232, 96, 28, 0.25);
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', system-ui, sans-serif;
}

.dialog-sub i { font-size: 10px; }

.section-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 8px;
    font-family: 'Inter', system-ui, sans-serif;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 6px;
    border: 1px solid #333;
    background: #222;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    margin-bottom: 6px;
    user-select: none;
}

.option-row:last-child { margin-bottom: 0; }
.option-row:hover { border-color: #3d3d3d; background: #2a2a2a; }

.option-row.checked,
.option-row.selected {
    border-color: rgba(232, 96, 28, 0.25);
    background: rgba(232, 96, 28, 0.08);
}

.custom-radio {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid #3d3d3d;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
}

.option-row.selected .custom-radio { border-color: #e8601c; background: #e8601c; }

.custom-radio-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    transition: opacity 0.15s;
}

.option-row.selected .custom-radio-dot { opacity: 1; }

.custom-cb {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid #3d3d3d;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
}

.option-row.checked .custom-cb { border-color: #e8601c; background: #e8601c; }
.custom-cb i { font-size: 9px; color: #fff; opacity: 0; transition: opacity 0.15s; }
.option-row.checked .custom-cb i { opacity: 1; }

.option-label {
    font-size: 13px;
    color: #aaa;
    font-weight: 500;
    transition: color 0.15s;
    font-family: 'Inter', system-ui, sans-serif;
}

.option-row.checked .option-label,
.option-row.selected .option-label { color: #e0e0e0; }

.vm-divider { height: 1px; background: #333; margin: 14px 0; }

.season-selection-container {
    margin: 8px 0 0;
    max-height: 180px;
    overflow-y: auto;
    padding: 8px;
    background: rgba(232, 96, 28, 0.04);
    border: 1px solid rgba(232, 96, 28, 0.15);
    border-radius: 6px;
}

div#season-selection-container {
    margin: 8px 0 0;
    max-height: 180px;
    overflow-y: auto;
    padding: 8px;
    background: rgba(232, 96, 28, 0.04);
    border: 1px solid rgba(232, 96, 28, 0.15);
    border-radius: 6px;
}

* 

.seasons-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dialog-footer {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vm-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
    flex: 1;
    justify-content: center;
    border: none;
}

.vm-btn i { font-size: 11px; }
.vm-btn-accent { background: #e8601c; border: 1px solid #e8601c; color: #fff; }
.vm-btn-accent:hover { background: #f07030; border-color: #f07030; }
.vm-btn-ghost { background: #222; border: 1px solid #3d3d3d; color: #aaa; }
.vm-btn-ghost:hover { background: #2a2a2a; border-color: #555; color: #e0e0e0; }

/* Hide trailer text on mobile, show only play icon */
@media (max-width: 768px) {
    .trailer-text {
        display: none;
    }
}

@keyframes cal-ep-pulse {
    0%   { background-color: rgba(225, 124, 82, 0.3); }
    50%  { background-color: rgba(225, 124, 82, 0.05); }
    100% { background-color: rgba(225, 124, 82, 0.3); }
}
.cal-episode-highlight {
    animation: cal-ep-pulse 1s ease-in-out infinite;
}

/* ==========================================================================
   Discover Details — Tangerine Typography Formula
   ========================================================================== */

body[data-theme="tangerine"] .season-tab {
    border-radius: 6px;
}

body[data-theme="tangerine"] .season-tab-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(232, 232, 232, 0.55);
}

body[data-theme="tangerine"] .season-tab.active .season-tab-title {
    color: #e0e0e0;
}

body[data-theme="tangerine"] .season-tab-stats {
    font-size: 0.75rem;
    font-weight: 400;
    color: #aaa;
    letter-spacing: 0;
}

body[data-theme="tangerine"] .season-tab.active .season-tab-stats {
    color: #e0e0e0;
}

body[data-theme="tangerine"] .discover-season-header h3 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #e0e0e0;
}

body[data-theme="tangerine"] .discover-episode-row,
body[data-theme="tangerine"] .episode-row {
    background: #1e1e1e;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
}

body[data-theme="tangerine"] .discover-episode-row:hover,
body[data-theme="tangerine"] .episode-row:hover {
    background: #252525;
    border-color: rgba(255, 107, 53, 0.4);
}

body[data-theme="tangerine"] .discover-episode-number,
body[data-theme="tangerine"] .episode-number {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    color: #e8601c;
    opacity: 1;
}

body[data-theme="tangerine"] .discover-episode-title,
body[data-theme="tangerine"] .episode-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #e0e0e0;
}

body[data-theme="tangerine"] .discover-episode-meta,
body[data-theme="tangerine"] .episode-meta {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    color: #aaa;
    opacity: 1;
    gap: 6px;
}

body[data-theme="tangerine"] .discover-episode-meta span,
body[data-theme="tangerine"] .episode-meta span {
    color: #aaa;
}

body[data-theme="tangerine"] .episode-version {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 11px;
    font-weight: 500;
    font-variant: normal;
    background: #252525;
    border: 1px solid #3a3a3a;
    color: #aaa;
    border-radius: 4px;
    padding: 1px 6px;
}

body[data-theme="tangerine"] .files-count {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ==========================================================================
   Discover Details — Movie/Show Header Typography
   ========================================================================== */

/* Title — matches .show-title on library page */
body[data-theme="tangerine"] #movie-title,
body[data-theme="tangerine"] .movie-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #e0e0e0;
    margin-bottom: 6px;
    display: block;
}

/* "NOT IN LIBRARY" badge wrapper — strip badge styling, show as block */
body[data-theme="tangerine"] .status-badge.missing {
    display: block;
    background: none;
    border: none;
    padding: 0;
}

/* The "Not in Library" text + icon inside the badge */
body[data-theme="tangerine"] .status-badge.missing svg,
body[data-theme="tangerine"] .status-badge.missing:not(h1) {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #ef4444;
}

/* Meta row — matches .show-meta on library page */
body[data-theme="tangerine"] .movie-meta {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    color: #aaa;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
    display: flex;
    flex-wrap: wrap;
}

body[data-theme="tangerine"] .movie-meta .separator {
    color: #666;
    opacity: 1;
    font-size: 11px;
}

body[data-theme="tangerine"] #show-rating-text {
    color: #f59e0b;
    font-weight: 600;
    font-size: 12px;
}

body[data-theme="tangerine"] #show-status-badge {
    font-family: 'Inter', system-ui, sans-serif;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

body[data-theme="tangerine"] #show-status-badge.status-released,
body[data-theme="tangerine"] #show-status-badge.status-in-production,
body[data-theme="tangerine"] #show-status-badge.status-post-production {
    background: rgba(30, 64, 175, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(30, 64, 175, 0.35);
}

body[data-theme="tangerine"] #show-status-badge.status-returning-series,
body[data-theme="tangerine"] #show-status-badge.status-airing {
    background: rgba(20, 83, 45, 0.13);
    color: #4ade80;
    border: 1px solid rgba(20, 83, 45, 0.33);
}

body[data-theme="tangerine"] #show-status-badge.status-ended,
body[data-theme="tangerine"] #show-status-badge.status-canceled,
body[data-theme="tangerine"] #show-status-badge.status-cancelled {
    background: rgba(127, 29, 29, 0.13);
    color: #fca5a5;
    border: 1px solid rgba(127, 29, 29, 0.33);
}

body[data-theme="tangerine"] #show-status-badge.status-planned,
body[data-theme="tangerine"] #show-status-badge.status-rumored {
    background: rgba(92, 46, 145, 0.13);
    color: #c4b5fd;
    border: 1px solid rgba(92, 46, 145, 0.33);
}

body[data-theme="tangerine"] .movie-tagline {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-style: italic;
    color: #666;
    margin-top: 6px;
    margin-bottom: 0;
}

/* ==========================================================================
   Discover Page — Tangerine Formula (search, tabs, buttons, categories)
   ========================================================================== */

body[data-theme="tangerine"] {
    --td-surf:    #161616;
    --td-surf2:   #1e1e1e;
    --td-surf3:   #252525;
    --td-border:  #2e2e2e;
    --td-border2: #3a3a3a;
    --td-accent:  #e8601c;
    --td-accent-h:#f07030;
    --td-text:    #e8e8e8;
    --td-muted:   #888;
    --td-font:    'Inter', system-ui, sans-serif;
    --td-mono:    'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    --td-radius:  6px;
}

/* ── header margin ───────────────────────────────────────── */
body[data-theme="tangerine"] .discover-header {
    margin-bottom: 1rem;
    gap: 0.75rem;
    align-items: center;
}

/* ── action buttons ──────────────────────────────────────── */
body[data-theme="tangerine"] .action-btn {
    font-family: var(--td-font);
    font-size: 0.82rem;
    font-weight: 500;
    background: var(--td-surf2);
    border: 1px solid var(--td-border2);
    color: var(--td-text);
    border-radius: var(--td-radius);
    padding: 0 12px;
    height: 30px;
    gap: 5px;
    transition: background 0.15s, border-color 0.15s;
    transform: none;
    box-shadow: none;
}

body[data-theme="tangerine"] .action-btn:hover {
    background: #2a2a2a;
    border-color: #4a4a4a;
    transform: none;
    box-shadow: none;
}

body[data-theme="tangerine"] .action-btn svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

body[data-theme="tangerine"] .action-btn span,
body[data-theme="tangerine"] .hidden.sm\:inline {
    color: inherit;
}

body[data-theme="tangerine"] .action-btn-primary {
    background: var(--td-accent);
    border-color: var(--td-accent);
    color: #fff;
}
body[data-theme="tangerine"] .action-btn-primary:hover {
    background: var(--td-accent-h);
    border-color: var(--td-accent-h);
}

body[data-theme="tangerine"] .action-btn-ghost {
    background: transparent;
    border-color: var(--td-border2);
}
body[data-theme="tangerine"] .action-btn-ghost:hover {
    background: rgba(232,96,28,.08);
    border-color: var(--td-accent);
}

/* ── search input ────────────────────────────────────────── */
body[data-theme="tangerine"] .discover-search {
    margin-bottom: 1rem;
}

body[data-theme="tangerine"] .search-input-wrapper .form-control,
body[data-theme="tangerine"] .search-input-wrapper input,
body[data-theme="tangerine"] #search-input {
    background: #1a1a1a !important;
    border: 1px solid var(--td-border2) !important;
    color: var(--td-text) !important;
    border-radius: var(--td-radius) !important;
    font-family: var(--td-font) !important;
    font-size: 0.85rem !important;
    height: 36px;
    padding: 0 36px 0 12px !important;
    box-shadow: none !important;
    transition: border-color 0.15s !important;
}

body[data-theme="tangerine"] #search-input:focus {
    border-color: var(--td-accent) !important;
    outline: none !important;
    box-shadow: none !important;
}

body[data-theme="tangerine"] #search-input::placeholder {
    color: var(--td-muted);
    font-family: var(--td-font);
}

body[data-theme="tangerine"] .search-clear-btn {
    color: var(--td-muted);
}
body[data-theme="tangerine"] .search-clear-btn:hover {
    color: var(--td-accent);
    background: rgba(232,96,28,.1);
}

/* ── tab navigation ──────────────────────────────────────── */
body[data-theme="tangerine"] .discover-tabs {
    border-bottom: 1px solid var(--td-border2);
    margin-bottom: 1rem;
    gap: 0;
    align-items: flex-end;
}

body[data-theme="tangerine"] .tab-btn {
    font-family: var(--td-font);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--td-muted);
    padding: 0.5rem 1.1rem;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: none;
    transition: color 0.15s, border-color 0.15s;
}

body[data-theme="tangerine"] .tab-btn:hover {
    color: var(--td-text);
    background: none;
}

body[data-theme="tangerine"] .tab-btn.active {
    color: var(--td-accent);
    border-bottom-color: var(--td-accent);
}

/* ── category section headers ────────────────────────────── */
body[data-theme="tangerine"] .category-title {
    font-family: var(--td-font);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(232, 232, 232, 0.55);
}

body[data-theme="tangerine"] .category-header {
    margin-bottom: 0.75rem;
}

/* ── results info bar ────────────────────────────────────── */
body[data-theme="tangerine"] .results-info-bar {
    font-family: var(--td-font);
    font-size: 0.78rem;
    color: var(--td-muted);
}

body[data-theme="tangerine"] .results-info-bar .results-count {
    font-family: var(--td-mono);
    color: var(--td-text);
}

body[data-theme="tangerine"] .results-info-bar .results-page {
    font-family: var(--td-mono);
    color: var(--td-muted);
}

/* ── content type filter buttons ─────────────────────────── */
body[data-theme="tangerine"] .type-btn {
    font-family: var(--td-font);
    font-size: 0.82rem;
    font-weight: 500;
    background: var(--td-surf2);
    border: 1px solid var(--td-border2);
    color: var(--td-muted);
    border-radius: var(--td-radius);
    padding: 0 12px;
    height: 28px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

body[data-theme="tangerine"] .type-btn:hover {
    border-color: var(--td-accent);
    color: var(--td-text);
    background: rgba(232,96,28,.08);
}

body[data-theme="tangerine"] .type-btn.active {
    background: var(--td-accent);
    border-color: var(--td-accent);
    color: #fff;
}

body[data-theme="tangerine"] .content-type-label {
    font-family: var(--td-font);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--td-muted);
}
