:root {
    --primary-color: #ff6b35;
    --primary-hover: #f7931e;
    --background-dark: #0a0a0a;
    --background-light: #1a1a1a;
    --surface-color: #1a1a1a;
    --text-primary: #e0e0e0;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --transition-speed: 0.3s;
    /* Design system tokens (matches tangerine_statistics.css) */
    --st-bg:      #111;
    --st-surf:    #1a1a1a;
    --st-surf2:   #222;
    --st-surf3:   #2a2a2a;
    --st-border:  #2d2d2d;
    --st-border2: #3d3d3d;
    --st-accent:  #e8601c;
    --st-accent-h:#f07030;
    --st-text:    #e0e0e0;
    --st-text2:   #aaa;
    --st-text3:   #555;
    --st-green:   #22c55e;
    --st-yellow:  #f59e0b;
    --st-blue:    #3b82f6;
    --st-teal:    #14b8a6;
    --st-mono:    'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, 'SF Mono', Consolas, 'Liberation Mono', monospace;
}

html, body {
    min-height: 100vh;
    height: auto;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

td#scraper-source {
    font-size: 13px;
    padding: 8px;
}

/* Container for source badges */
td#scraper-source .source-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

/* Style for each badge/tag */
td#scraper-source .source-badge {
    display: block;
    padding: 0px 12px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(247, 147, 30, 0.15) 100%);
    border: 1px solid rgba(255, 107, 53, 0.4);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 12px;
    text-align: center;
    width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

body {
    padding-top: 60px;
}

/* Add class to prevent scrolling when modal is open */
body.modal-open {
    overflow: hidden;
    padding-right: 15px;
}

.loading-message p {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: #fff;
}

/* Loading overlay styles defined in base.css */

#scraper-container {
    display: flex;
    position: relative;
    flex-direction: column;
    align-items: center;
    width: 100%;
    /* margin-bottom: 30px; */
    background-color: #000000;
    z-index: 5;
}

/* Search Form */
form#search-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    /* width: 100%; */
    max-width: 1200px;
    /* margin: 2rem auto; */
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    flex-wrap: wrap;
}

form#search-form input[type="text"] {
    flex: 1;
    min-width: 250px;
    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;
}

form#search-form input[type="text"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 107, 53, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

form#search-form select {
    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;
    cursor: pointer;
    transition: all 0.3s ease;
}

form#search-form select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 107, 53, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

form#search-form button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

form#search-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.checkbox-container label {
    color: #888;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    all: revert !important;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ff6b35;
    cursor: pointer;
}

/* Override autofill styles */
form#search-form input:-webkit-autofill,
form#search-form input:-webkit-autofill:hover,
form#search-form input:-webkit-autofill:focus,
form#search-form input:-webkit-autofill:active {
    -webkit-text-fill-color: #e0e0e0 !important;
    -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.05) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

.movie-list, .show-list, .anime-list {
    position: relative;
    padding: var(--spacing-md) 0;
    margin: 0 calc(-1 * var(--spacing-md));
    overflow: visible;
}

.scroll-container {
    position: relative;
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    min-width: 0;
}

.scroll-container::-webkit-scrollbar {
    height: 8px;
}

.scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.4);
}

#searchResults {
    min-width: 95%;
}
/* Media Cards */
.media-card,
.sresult {
    position: relative;
    cursor: pointer;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* min-width: 200px; */
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.media-card:hover,
.sresult:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 107, 53, 0.3);
}

.media-card::before,
.sresult::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b35, #f7931e);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

 .media-card .poster-container .tester-icon, .sresult .poster-container .tester-icon {
    position: absolute;
    bottom: -6px;
    left: -1px;
    z-index: 10;
    transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1), background-color var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 40px 0 0 40px;
    border-color: transparent transparent transparent var(--primary-color);
    background-color: transparent !important;
    transform-origin: bottom left;
    transform: none !important;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    cursor: pointer;
}

/* Request Icon */
.media-card .poster-container .request-icon, .sresult .poster-container .request-icon {
    position: absolute;
    bottom: -6px;
    right: -1px;
    z-index: 10;
    transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1), background-color var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 40px 40px;
    border-color: transparent transparent var(--primary-color) transparent;
    background-color: transparent !important;
    border-radius: 0 !important;
    transform-origin: bottom right;
    transform: none !important;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

/* Gear icon inside tester-icon triangle */
.tester-icon::after {
    content: "⚙";
    position: absolute;
    bottom: 8px;
    left: -35px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    scale: 0.7;
}

.request-icon::after {
    content: "+";
    position: absolute;
    bottom: -30px; /* Adjusted for larger triangle */
    right: 5px; /* Adjusted for larger triangle */
    color: white;
    font-size: 18px; /* Slightly larger for better visibility */
    font-weight: bold;
    line-height: 1;
}

/* SVG icon inside tester-icon triangle (alternative to ::after) */
.tester-icon svg {
    display: none;
}

.request-icon svg {
    display: none;
}
/* Style specifically for search results to adjust the plus size */
.sresult .poster-container .request-icon::after {
    font-size: 12px; /* Smaller font size to better match trending page */
    bottom: -28px; /* Further adjust vertical position */
    right: 8px;
    scale: 1.2;
}

/* Only scale when directly hovering the icon */
.request-icon:hover {
    transform: scale(1) !important;
    border-color: transparent transparent #2980b9 transparent;
    background-color: transparent !important;
}

/* Hover styles for tester-icon */
.tester-icon:hover {
    transform: none !important;
    border-color: transparent transparent transparent #2980b9;
    background-color: transparent !important;
}

/* Fix for combined hover - override template styles */
.media-poster:hover .request-icon:hover {
    transform: scale(1) !important;
    border-color: transparent transparent #2980b9 transparent;
    background-color: transparent !important;
}

/* Fix for combined hover - tester-icon */
.media-poster:hover .tester-icon:hover {
    transform: none !important;
    border-color: transparent transparent transparent #2980b9;
    background-color: transparent !important;
}

.media-card:hover::before,
.sresult:hover::before {
    opacity: 1;
}

.media-poster {
    position: relative;
    /* width: 100%;
    height: 300px; */
    overflow: hidden;
}

.media-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-card:hover .media-poster img,
.sresult:hover .media-poster img {
    transform: scale(1.05);
}

.media-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8) 20%, rgba(0, 0, 0, 0.95));
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.media-card:hover .media-overlay,
.sresult:hover .media-overlay {
    opacity: 1;
    transform: translateY(0);
}

.media-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    margin: 0;
}

.media-year {
    font-size: 0.85rem;
    color: #e0e0e0;
    opacity: 0.95;
}

/* DB Status Pip */
.db-status-pip {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.5);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.db-status-collected {
    background: linear-gradient(135deg, #10b981, #059669);
}

.db-status-blacklisted {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.db-status-processing {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.db-status-partial {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.poster-container {
    position: relative;
    width: 176px;
    height: 264px;
    transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--border-radius-lg);
    background-color: #000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), 0 0 25px rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

.poster-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.80) 60%, rgba(0, 0, 0, 0.6) 85%, transparent 100%);
    z-index: 2;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    pointer-events: none;
}

.poster-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-md);
    color: var(--text-primary);
    z-index: 3;
    text-align: center;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.poster-overlay h3 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Remove the orange gradient bar from poster-overlay h3 */
.poster-overlay h3::before {
    content: none !important;
    display: none !important;
}

.poster-overlay p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.mediatype-tv, .mediatype-mv {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.75);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.season-info-container {
    display: flex;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    padding-top: 20px;
    padding-bottom: 20px;
    border-radius: 10px;
    height: 300px;
}

.season-poster {
    height: 100%;
    object-fit: cover;
    margin-right: 20px;
    flex-shrink: 0;
    margin-left: 10px;
}

.season-details {
    flex: 1;
    max-width: 950px;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 1rem;
    border-radius: 10px;
    max-height: 300px;
    position: relative;
}

.season-details > p {
    font-style: italic;
    font-size: 0.9rem;
}

.season-details .season-overview p {
    font-style: normal;
}

.season-overview {
    height: 7em;
    overflow: hidden;
    position: relative;
}

.season-controls {
    display: inline-flex;
    gap: var(--spacing-sm);
    align-items: center;
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-md);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    margin-left: 10px;
    z-index: 2;
    position: relative;
}

.season-controls select,
.season-controls button {
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-speed) ease;
    min-width: 120px;
}

.season-controls button {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    cursor: pointer;
}

.season-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
}

.season-controls select:focus {
    outline: none;
    border-color: rgba(255, 107, 53, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}

.season-overview p {
    margin: 0;
    position: absolute;
    width: 100%;
    max-width: 900px;
    max-height: 7em;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.season-bg-image {
    position: absolute;
    top: -200px;
    left: 0;
    width: 100%;
    height: 1200px;
    background-size: cover;
    background-position: left calc((24vw - 170px) - 340px) top;
    z-index: -1;
}

body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%) !important;
}

.season-bg-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.7) 20%,
        rgba(0, 0, 0, 0) 40%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 1) 100%
    );
}
span.show-rating {
    position: absolute;
    right: var(--spacing-md);
    top: var(--spacing-md);
    width: 40px;
    height: 40px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(64, 64, 64, 0.95), rgba(32, 32, 32, 0.85));
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2;
}
#episodeResults > div {
    position: relative;
    width: auto;
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    justify-items: center !important;
    margin-bottom: 170px;
}

.episode {
    width: 100%;
    max-width: 300px;
    transition: transform var(--transition-speed) ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.episode button {
    border-radius: var(--border-radius-md);
    background-color: rgba(22, 21, 21, 0.5);
    padding: 8px;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: transform var(--transition-speed) ease;
}

.episode button:hover {
    transform: scale(1.02);
}

.episode button:disabled {
    cursor: default;
}

.episode button:disabled:hover {
    transform: none;
}

.episode img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 12px;
}

.episode-info {
    flex: 1;
}

p.episode-sub {
    font-size: .888rem;
    line-height: 3rem;
    color: rgb(191 191 190);
}

p.episode-sub img {
    width: 15px;
    height: auto;
    margin-right: 3px;
    vertical-align: bottom;
}

.episode-rating {
    position: absolute;
    margin: 5px;
    width: 27px;
    height: 15px;
    color: rgb(255 255 255 / 80%);
    font-size: 12px;
    font-weight: bold;
    line-height: 16px;
    text-align: center;
    border-radius: 11px;
    background: linear-gradient(to right, rgba(24, 170, 135, 1) 0%, rgba(1, 144, 182, 1) 100%);
    z-index: 1;
}

h2.episode-title {
    font-size: 0.999rem;
    line-height: 1.3rem;
    color: rgb(191 191 190);
    margin-block-end: -10px;
    padding-top: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 280px;
}

/* Overlay/Modal Styles */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 90;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.overlay-content {
    position: relative;
    background: var(--st-surf);
    border: 1px solid var(--st-border);
    /* padding: 0 20px 20px 20px; */
    border-radius: 14px;
    width: 85%;
    max-width: 1200px;
    max-height: 85vh;
    overflow-y: auto;
    overflow-wrap: anywhere;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    flex-direction: column;
}

.overlay-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--st-accent), var(--st-accent-h));
    border-radius: 14px 14px 0 0;
}
/* Legacy button overrides (only apply to non-action-button contexts) */
.overlay-content td button:not(.action-button):not(.folder-icon-btn) {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    width: auto;
    max-width: 200px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--st-surf2);
    border: 1px solid var(--st-border);
    color: var(--st-text);
    margin: 3px 0;
    cursor: pointer;
    transition: background 0.15s;
}

.overlay-content h3 {
    position: sticky;
    top: 0;
    background: var(--st-surf);
    margin-top: 0;
    padding-top: 10px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--st-text);
}



.overlay-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    table-layout: fixed;
}

.overlay-content thead {
    position: sticky;
    top: 55px;
    background: var(--st-surf);
    z-index: 2;
    border-bottom: 1px solid var(--st-border);
}

.overlay-content th {
    padding: 12px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--st-surf);
    color: var(--st-text2);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--st-mono);
}

.overlay-content td {
    padding: 12px;
    text-align: left;
    border-bottom: none;
    width: auto;
    vertical-align: middle;
    color: var(--st-text);
}

.torresult {
    background: var(--st-surf2);
    border: 1px solid var(--st-border);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    padding: 1rem;
    transition: border-color .15s;
}

.torresult:hover {
    border-color: var(--st-border2);
}

.torresult button {
    background: none;
    border: none;
    padding: 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
    color: inherit;
    flex: 1;
}

.torresult-info {
    display: grid;
    /* flex-direction: column; */
    gap: 0.5rem;
    width: 100%;
    text-align: center;
}

p.torresult-title {
    font-size: 0.875rem;
    text-align: center;
    margin: 5px 0;
    word-break: break-word;
    color: var(--st-text);
    font-weight: 500;
}

p.torresult-item {
    font-size: 0.8rem;
    margin: 4px 0;
    color: var(--st-accent);
    word-break: normal;
    overflow-wrap: anywhere;
    white-space: normal;
    hyphens: none;
    font-family: var(--st-mono);
}

.assign-magnet-icon {
    position: static;
    width: 30px;
    height: 30px;
    background: var(--st-surf3);
    border: 1px solid var(--st-border2);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
}

@media (min-width: 1046px) {
    .assign-magnet-icon {
        position: absolute;
        bottom: 10px;
        right: 10px;
    }
    .overlay-content {
        padding: 0 20px 20px 20px;
    }
}

.assign-magnet-icon:hover {
    background: var(--st-accent);
    border-color: var(--st-accent);
    transform: scale(1.05);
}

.assign-magnet-icon svg {
    width: 16px;
    height: 16px;
    color: var(--st-text2);
    pointer-events: none;
}

.assign-magnet-icon:hover svg {
    color: #fff;
}

/* Mobile cache checkmark */
.mobile-cache-check {
    width: 32px;
    height: 32px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--st-green);
    font-weight: bold;
    margin: 6px auto 0;
}

.overlay-content td .torrent-title-wrapper {
    max-height: 4.5em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.5em;
    word-wrap: break-word;
    white-space: normal;
}

/* Cache Status Badges */
.cache-status {
    display: inline-block !important;
    padding: 4px 8px !important;
    border-radius: 5px !important;
    font-size: 11px !important;
    margin: 3px 0 !important;
    text-align: center !important;
    width: auto !important;
    justify-self: center;
    font-family: var(--st-mono);
    border: 1px solid transparent;
}

.cache-status.cached {
    background: rgba(34, 197, 94, 0.15);
    color: var(--st-green);
    border-color: rgba(34, 197, 94, 0.3);
}

.cache-status.not-cached {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.25);
}

.cache-status.not-checked {
    background: rgba(156, 163, 175, 0.1);
    color: var(--st-text2);
    border-color: var(--st-border);
    animation: pulse 1.5s infinite;
}

.cache-status.check-unavailable {
    background: rgba(100, 116, 139, 0.1);
    color: var(--st-text3);
    border-color: var(--st-border);
}

.cache-status.unknown {
    background: rgba(245, 158, 11, 0.1);
    color: var(--st-yellow);
    border-color: rgba(245, 158, 11, 0.25);
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

tr.filtered-out-item {
    background-color: rgba(255, 0, 0, 0.05) !important;
}

.filtered-out-item td:nth-child(4) {
    color: #ff6b6b !important;
    font-style: italic;
    font-size: 0.9em;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
    position: relative;
}

.filtered-out-item td, .torresult.filtered-out-item .torresult-info p {
    color: #ff7b7b !important;
}

/* Search Results Container */
.search-results-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
}

.search-results-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b35, #f7931e);
    opacity: 0.8;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.search-results-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-results-title::before {
    content: '';
    width: 4px;
    height: 28px;
    background: linear-gradient(180deg, #ff6b35 0%, #f7931e 100%);
    border-radius: 2px;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
    gap: 2rem;
    justify-items: center;
}

/* Back Button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.back-button:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.5);
    color: #ff6b35;
    transform: translateX(-4px);
}

/* Version Modal */
.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::before { display: none; }
.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;
}

.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; }

.version-checkbox { display: none; }
.version-modal-buttons { display: none; }

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
        padding-top: 60px;
    }

    #scraper-container {
        width: 100%;
        padding: 0;
        margin: 0;
    }

    form#search-form {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 1rem;
        gap: 0.5rem;
        margin: 0 auto;
    }

    form#search-form input[type="text"] {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        font-size: 16px;
    }

    form#search-form select {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
        font-size: 16px;
    }

    form#search-form button {
        flex: 1 1 100%;
        width: 100%;
        min-height: 44px;
        font-size: 16px;
    }

    .checkbox-container {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
        padding: 0.4rem;
    }

    .checkbox-container label {
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
        padding: 0.5rem;
    }

    /* Overlay Content Styles */
    .overlay {
        padding: 0;
        align-items: flex-end;
    }

    .overlay-content {
        width: 90%;
        max-width: 100%;
        max-height: 90vh;
        border-radius: 14px 14px 0 0;
        border-bottom: none;
        margin: 0;
    }



    #overlayContent > div {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 10px;
    }

    #overlayContent h3 {
        text-align: center;
        width: 100%;
        margin: 10px 0;
        padding: 0 12px;
        box-sizing: border-box;
        font-size: 1rem;
        word-wrap: break-word;
        color: var(--st-text);
        font-family: var(--st-mono);
    }

    /* Better scrolling for overlay */
    .overlay-content::-webkit-scrollbar {
        width: 4px;
    }

    .overlay-content::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
    }

    .overlay-content::-webkit-scrollbar-thumb {
        background: var(--st-accent);
        border-radius: 2px;
    }

    /* Trending sections mobile */
    .trending-container {
        width: 100%;
        padding: 0.5rem;
    }

    .trending-header {
        padding: 0.5rem;
    }

    .trending-title {
        font-size: 1.2rem;
    }

    .trending-nav-button {
        width: 36px;
        height: 36px;
    }

    /* Back button mobile */
    .back-button-container {
        width: 100%;
        margin-top: 0.5rem;
    }

    .back-button {
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
    }

    /* Search results container mobile */
    .search-results-container {
        padding: 1rem;
        margin: 1rem 0;
    }

    .search-results-header {
        margin-bottom: 1rem;
    }

    .search-results-title {
        font-size: 1.2rem;
    }

    /* Season results mobile */
    .season-info-container {
        flex-direction: column;
        padding: 0.5rem;
    }

    .season-poster {
        width: 100%;
        height: auto;
        margin: 0 0 1rem 0;
    }

    .season-details {
        max-width: 100%;
        padding: 0.75rem;
    }

    .season-controls {
        flex-wrap: wrap;
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .season-controls select,
    .season-controls button {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
        font-size: 14px;
    }

    /* Episode grid mobile */
    #episodeResults > div {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0.5rem;
    }

    .episode {
        max-width: 100%;
    }

    h2.episode-title {
        font-size: 0.85rem;
        max-width: 100%;
    }

    /* TMDB info banner mobile */
    .tmdb-info {
        padding: 0.75rem;
        margin: 0.5rem;
        font-size: 0.9rem;
        text-align: center;
    }

    .loading-message p {
        font-size: 1rem;
    }

    /* Container mobile */
    .container {
        padding: 0.5rem;
    }
}

/* Mobile landscape orientation - make modal scrollable */
@media (max-width: 1015px) and (max-height: 500px) and (orientation: landscape) {
    .version-modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}
@media (max-width: 1045px) {
    .overlay-content {

        margin-top: 90px;
    }
    .overlay-content h3 {

        padding-bottom: 15px;
        margin-bottom: 0px;
    }
}
/* Loading Popup */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

/* Loading overlay styles defined in base.css */

.loading-message {
    color: #e0e0e0;
}

.loading-message p {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: #fff;
}

.loading-details {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.5;
    display: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    overflow-x: hidden;
}

/* Additional utility classes */
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.ms-2 { margin-left: 0.5rem; }

/* Alert styles */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-warning {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
}
#version-select {
    display: none;
}
#skip-cache-check-container {
    display: none !important;
}
/* ==================================================
   DRAG AND DROP SCRAPER PRIORITY STYLES (TANGERINE THEME)
   ================================================== */

/* Drag handle */
.drag-handle {
    cursor: grab;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.4);
    margin-right: 12px;
    padding: 4px 8px;
    user-select: none;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
    line-height: 1;
}

.drag-handle:hover {
    color: #FF9051;
    transform: scale(1.1);
}

.drag-handle:active {
    cursor: grabbing;
    color: #FF6B2C;
}

/* Sortable ghost (element being dragged) */
.sortable-ghost {
    opacity: 0.4;
    background-color: rgba(255, 107, 44, 0.1);
    border: 2px dashed rgba(255, 107, 44, 0.5);
}

/* Sortable chosen (element selected for dragging) */
.sortable-chosen {
    background-color: rgba(255, 107, 44, 0.05);
}

/* Sortable drag (the actual dragging element) */
.sortable-drag {
    opacity: 0.8;
    cursor: grabbing !important;
    transform: rotate(2deg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .drag-handle {
        font-size: 20px;
        padding: 8px 12px;
        margin-right: 8px;
    }

    /* Larger touch target for mobile */
    .drag-handle::before {
        content: '';
        position: absolute;
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
    }
}

/* Touch device specific */
@media (hover: none) and (pointer: coarse) {
    .drag-handle {
        color: rgba(255, 255, 255, 0.6);
    }

    .sortable-ghost {
        opacity: 0.6;
    }
}

/* Ensure drag handle is positioned correctly in header */
.settings-section-header {
    position: relative;
    display: flex;
    align-items: center;
}

.settings-section-header .drag-handle {
    position: relative;
}

/* Fix for ghost box positioning in tangerine theme */
.sortable-ghost {
    position: relative !important;
    transform-origin: center !important;
}

/* Ensure sortable container doesn't have conflicting positioning */
#scraper-sortable-list {
    position: relative;
}

/* Override any conflicting scraper-card styles during drag */
.scraper-card.sortable-drag,
.scraper-item.sortable-drag {
    position: relative !important;
    z-index: 9999 !important;
}

/* Sortable drag-drop styles */
.sortable-ghost {
    opacity: 0.4;
}

.sortable-drag {
    opacity: 1;
}

/* ========================================
   Optimized Torrent Overlay Styles
   ======================================== */

/* Torrent Table Structure */
.torrent-table {
    width: 100%;
    border-collapse: collapse;
}

.torrent-table-header {
    color: rgb(191 191 190);
}

.torrent-name-cell {
    width: 38%;
    font-weight: 600;
    text-transform: uppercase;
    color: rgb(191 191 190);
    word-wrap: break-word;
    white-space: normal;
    padding: 10px;
}

.torrent-name-wrapper {
    display: block;
    line-height: 1.4;
    min-height: fit-content;
}

.torrent-size-cell {
    width: 12%;
    text-align: right;
    color: rgb(191 191 190);
}

.torrent-source-cell {
    width: 10%;
    color: rgb(191 191 190);
}

.torrent-score-cell {
    width: 10%;
    text-align: right;
    color: rgb(191 191 190);
}

.torrent-cache-cell {
    width: 10%;
    text-align: center;
    color: rgb(191 191 190);
}

.torrent-action-cell {
    width: 10%;
    text-align: center;
    color: rgb(191 191 190);
}

/* Mobile Torrent Grid */
.torrent-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

/* Virtualization container */
.torrent-results-container {
    position: relative;
    min-height: 200px;
}

.torrent-results-spacer {
    width: 100%;
}

/* Loading more indicator */
.loading-more-torrents {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}


/* ==========================================================================
   Torrent Results Modal - Modern Redesign (Tangerine Theme)
   Matches Interactive Search styling with Tangerine colors
   ========================================================================== */

/* Modal Header */
.overlay-content .torrent-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 10px 0;
    border-bottom: 1px solid var(--st-border);
    position: sticky;
    top: 0;
    background: var(--st-surf);
    z-index: 10;
    margin-top: 8px;
    gap: 12px;
}

.overlay-content .torrent-modal-title-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--st-text);
    margin: 0 0 6px 0;
    border: none;
    line-height: 1.2;
    font-family: var(--st-mono);
}

.overlay-content .torrent-stats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.overlay-content .torrent-stats span {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--st-surf2);
    border: 1px solid var(--st-border);
    border-radius: 5px;
    font-size: 11px;
    color: var(--st-text2);
    font-family: var(--st-mono);
    white-space: nowrap;
}

.overlay-content .torrent-modal-actions {
    display: flex;
    align-self: start;
    gap: 0.5rem;
    flex-shrink: 0;
}

.overlay-content .torrent-modal-actions button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 5px 10px;
    background: var(--st-surf2);
    border: 1px solid var(--st-border);
    color: var(--st-text2);
    font-size: 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s;
}

.overlay-content .torrent-modal-actions button:hover {
    background: var(--st-surf3);
    border-color: var(--st-border2);
    color: var(--st-text);
}

.overlay-content .torrent-modal-actions button svg {
    width: 14px;
    height: 14px;
}

.overlay-content .torrent-modal-actions .refresh-btn svg {
    animation: spin 1s linear infinite;
    animation-play-state: paused;
}

.overlay-content .torrent-modal-actions .refresh-btn.refreshing svg {
    animation-play-state: running;
}

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

/* Filter Section */
.overlay-content .torrent-filter-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    padding: 8px 12px;
    background: var(--st-surf2);
    border: 1px solid var(--st-border);
    border-radius: 9px;
}

.overlay-content .torrent-filter-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 180px;
}

.overlay-content .torrent-version-dropdown-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.overlay-content .torrent-version-dropdown-wrapper label {
    color: var(--st-text2);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    font-family: var(--st-mono);
}

.overlay-content .torrent-version-select {
    padding: 5px 10px;
    background: var(--st-surf);
    border: 1px solid var(--st-border);
    border-radius: 6px;
    color: var(--st-text);
    font-size: 12px;
    cursor: pointer;
    min-width: 120px;
    transition: border-color .15s;
    font-family: var(--st-mono);
    height: 30px;
}

.overlay-content .torrent-version-select:hover {
    border-color: var(--st-border2);
}

.overlay-content .torrent-version-select:focus {
    outline: none;
    border-color: var(--st-accent);
}

.overlay-content .torrent-folder-dropdown-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.overlay-content .torrent-folder-dropdown-wrapper label {
    color: var(--st-text2);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    font-family: var(--st-mono);
}

.overlay-content .torrent-folder-select {
    padding: 5px 10px;
    background: var(--st-surf);
    border: 1px solid var(--st-border);
    border-radius: 6px;
    color: var(--st-text);
    font-size: 12px;
    cursor: pointer;
    min-width: 140px;
    transition: border-color .15s;
    font-family: var(--st-mono);
    height: 30px;
}

.overlay-content .torrent-folder-select:hover {
    border-color: var(--st-border2);
}

.overlay-content .torrent-folder-select:focus {
    outline: none;
    border-color: var(--st-accent);
}

.overlay-content .torrent-filter-toggles {
    display: flex;
    gap: 10px;
    align-items: center;
}

.overlay-content .torrent-filter-input-wrapper svg {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--st-accent);
    pointer-events: none;
}

.overlay-content .torrent-filter-input {
    width: 100%;
    padding: 5px 10px 5px 30px;
    background: var(--st-surf);
    border: 1px solid var(--st-border);
    border-radius: 6px;
    color: var(--st-text);
    font-size: 12px;
    height: 30px;
    font-family: var(--st-mono);
    box-sizing: border-box;
}

.overlay-content .torrent-filter-input:focus {
    outline: none;
    border-color: var(--st-accent);
}

.overlay-content .torrent-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--st-text2);
    font-size: 12px;
    cursor: pointer;
    font-family: var(--st-mono);
}

.overlay-content .torrent-filter-checkbox input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--st-accent);
}

/* Table Styling */
.overlay-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    border: none;
    caret-color: transparent;
}

.overlay-content thead {
    position: sticky;
    top: 80px;
    background: var(--st-surf);
    z-index: 8;
}

.overlay-content th {
    padding: 8px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--st-text2);
    border-bottom: 1px solid var(--st-border);
    font-family: var(--st-mono);
}

.overlay-content th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
}

.overlay-content th.sortable:hover {
    color: var(--st-text);
}

.overlay-content th.text-right {
    text-align: right;
}

.overlay-content th.text-center {
    text-align: center;
}

.overlay-content tbody tr {
    transition: background-color 0.15s;
    border-bottom: 1px solid var(--st-border);
}

.overlay-content tbody tr:hover {
    background: var(--st-surf2);
}

.overlay-content tbody tr.filtered-row {
    opacity: 0.5;
}

.overlay-content td {
    padding: 10px 12px;
    font-size: 0.8125rem;
    color: var(--st-text);
    vertical-align: middle;
}

.close-btn:hover {
    color: var(--st-text);
    background: var(--st-surf3);
}

.close-btn {
    position: sticky;
    top: 15px;
    right: 15px;
    width: 28px;
    height: 28px;
    font-size: 20px;
    border: 1px solid var(--st-border);
    background: var(--st-surf2);
    color: var(--st-text2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    z-index: 30;
    margin-left: auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}


.overlay-content td.text-right {
    text-align: right;
}

.overlay-content td.text-center {
    text-align: center;
}

/* Release Name Column with Separate Title and Tags Rows */
.overlay-content .release-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.overlay-content .release-title {
    font-size: 13px;
    color: var(--st-text);
    line-height: 1.8;
    font-weight: 400;
}

.overlay-content .release-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-self: self-start;
}

.overlay-content .quality-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Quality Badge Colors */
.overlay-content .quality-badge.resolution {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.overlay-content .quality-badge.source {
    background: rgba(6, 182, 212, 0.2);
    color: #67e8f9;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.overlay-content .quality-badge.codec {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.overlay-content .quality-badge.audio {
    background: rgba(251, 146, 60, 0.2);
    color: #fdba74;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.overlay-content .quality-badge.hdr {
    background: rgba(234, 179, 8, 0.2);
    color: #fde047;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.overlay-content .quality-badge.group {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.overlay-content .quality-badge.extension {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Usenet/NZB badge */
.quality-badge.usenet-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.35);
    cursor: default;
}

/* Source Badge (Indexer) - Simpler inline style */
.overlay-content .source-badge {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 4px;
    color: var(--st-teal);
    font-size: 11px;
    font-weight: 500;
    margin-right: 3px;
    margin-bottom: 3px;
    text-align: center;
    font-family: var(--st-mono);
    white-space: nowrap;
}

/* Score Column */
.overlay-content .score-value {
    font-weight: 600;
    font-size: 12px;
    font-family: var(--st-mono);
}

.overlay-content .score-value.high {
    color: var(--st-green);
}

.overlay-content .score-value.medium {
    color: var(--st-yellow);
}

.overlay-content .score-value.low {
    color: #f87171;
}

/* Cache Status Icons */
.overlay-content .cache-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
}

.overlay-content .cache-status-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.overlay-content .cache-status-icon.cached {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.overlay-content .cache-status-icon.not-cached {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.overlay-content .cache-status-icon.unknown {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

/* Action Buttons */
.overlay-content .action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    font-family: var(--st-mono);
    letter-spacing: 0.03em;
}

.overlay-content .action-button.add-button {
    background: var(--st-accent);
    color: #fff;
    border: 1px solid var(--st-accent);
}

.overlay-content .action-button.add-button:hover {
    background: var(--st-accent-h);
    border-color: var(--st-accent-h);
}

.overlay-content .action-button.assign-button {
    background: transparent;
    color: var(--st-text2);
    border: 1px solid var(--st-border);
}

.overlay-content .action-button.assign-button:hover {
    background: var(--st-surf3);
    border-color: var(--st-border2);
    color: var(--st-text);
}

.overlay-content .action-button svg {
    width: 12px;
    height: 12px;
}

/* Close Button at Bottom - REMOVED */
/*
.overlay-content .modal-footer {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0 1rem;
    border-top: 1px solid #404040;
    margin-top: 1.5rem;
}

.overlay-content .modal-footer .close-modal-btn {
    padding: 0.75rem 2rem;
    background: transparent;
    border: 1px solid #404040;
    color: #a3a3a3;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.overlay-content .modal-footer .close-modal-btn:hover {
    background: #333333;
    color: #fafafa;
    border-color: #525252;
}
*/

/* Empty State */
.overlay-content .torrent-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #a3a3a3;
}

.overlay-content .torrent-empty-state svg {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.overlay-content .torrent-empty-state h4 {
    font-size: 1.125rem;
    margin: 0 0 0.5rem;
    color: #fafafa;
}

.overlay-content .torrent-empty-state p {
    font-size: 0.875rem;
    margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    /* Reset sticky positioning for mobile */
    .overlay-content .torrent-modal-header {
        position: relative;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .overlay-content .torrent-filter-section {
        position: relative;
        flex-direction: column;
        align-items: stretch;
    }

    .overlay-content .torrent-version-dropdown-wrapper {
        width: 100%;
    }

    .overlay-content .torrent-version-select {
        flex: 1;
        width: 100%;
    }

    .overlay-content .torrent-folder-dropdown-wrapper {
        width: 100%;
    }

    .overlay-content .torrent-folder-select {
        flex: 1;
        width: 100%;
    }

    .overlay-content thead {
        position: relative;
        top: auto;
    }
    
    .overlay-content table {
        font-size: 0.8125rem;
    }
    
    .overlay-content th,
    .overlay-content td {
        padding: 0.75rem 0.5rem;
    }

    /* Mobile Torrent Controls */
    .mobile-torrent-controls {
        width: 100%;
        padding: 12px;
        background: var(--st-surf2);
        border: 1px solid var(--st-border);
        border-radius: 9px;
        margin-bottom: 14px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        box-sizing: border-box;
    }

    .mobile-torrent-controls .torrent-version-dropdown-wrapper,
    .mobile-torrent-controls .torrent-folder-dropdown-wrapper {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .mobile-torrent-controls label {
        font-size: 12px;
        font-weight: 500;
        color: var(--st-text2);
        white-space: nowrap;
        font-family: var(--st-mono);
    }

    .mobile-torrent-controls select {
        flex: 1;
        padding: 8px 12px;
        min-height: 36px;
        background: var(--st-surf);
        border: 1px solid var(--st-border);
        border-radius: 6px;
        color: var(--st-text);
        font-size: 13px;
        cursor: pointer;
        transition: border-color .15s;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23aaa' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
        font-family: var(--st-mono);
    }

    .mobile-torrent-controls select:focus {
        outline: none;
        border-color: var(--st-accent);
    }

    .mobile-torrent-controls .torrent-version-dropdown-wrapper:last-child {
        padding-bottom: 2px;
    }

    .mobile-torrent-controls .torrent-folder-dropdown-wrapper {
        padding-bottom: 2px;
    }
}

@media (max-width: 768px) {
    .close-btn {
        display: none !important;
    }

    .close-btn:hover {
        display: none !important;
    }
}

/* Season and Episode Info Styling */
.season-info {
    color: #3b82f6;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.15);
}

.ds-episode-info {
    color: #10b981;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.15);
}

.season-count {
    color: #8b5cf6;
    font-weight: 500;
    font-size: 0.9em;
}

/* ========================================
   FOLDER ICON - Desktop Only, Tangerine Only
   ======================================== */

/* Size cell wrapper for flex layout */
.size-cell-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.size-value {
    font-size: 13px;
    font-family: var(--st-mono);
    color: var(--st-text2);
}

/* Folder icon button - only visible on desktop in Tangerine theme */
.folder-icon-btn {
    background: transparent !important;
    border: 1px solid var(--st-border) !important;
    border-radius: 5px !important;
    padding: 3px 4px !important;
    cursor: pointer;
    color: var(--st-text2) !important;
    transition: all 0.15s ease;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 22px !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    text-transform: none !important;
    font-weight: normal !important;
}

.folder-icon-btn:hover {
    background: rgba(232, 96, 28, 0.1) !important;
    border-color: var(--st-accent) !important;
    color: var(--st-accent) !important;
}

.folder-icon-btn svg {
    width: 16px;
    height: 16px;
}

/* Hide folder icon on mobile */
@media (max-width: 768px) {
    .folder-icon-btn.desktop-only {
        display: none !important;
    }
}

/* ========================================
   FILE LIST MODAL
   ======================================== */

.file-list-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.file-list-modal {
    background: var(--st-surf);
    border: 1px solid var(--st-border);
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--st-border);
}

.file-list-header h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--st-text);
    font-family: var(--st-mono);
}

.file-list-close {
    background: var(--st-surf2);
    border: 1px solid var(--st-border);
    font-size: 16px;
    color: var(--st-text2);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: all 0.15s ease;
}

.file-list-close:hover {
    background: var(--st-surf3);
    border-color: var(--st-border2);
    color: var(--st-text);
}

.file-list-torrent-title {
    padding: 8px 20px;
    font-size: 0.8rem;
    color: var(--st-text2);
    border-bottom: 1px solid var(--st-border);
    word-wrap: break-word;
    font-family: var(--st-mono);
}

.file-list-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 20px;
    font-size: 12px;
    border-bottom: 1px solid var(--st-border);
    background: var(--st-surf2);
}

.metadata-item {
    display: flex;
    gap: 5px;
    align-items: center;
}

.metadata-label {
    color: var(--st-text2);
    font-weight: 600;
    font-family: var(--st-mono);
}

.metadata-value {
    color: var(--st-text);
    font-family: var(--st-mono);
}

.file-list-count {
    padding: 6px 20px;
    font-size: 11px;
    color: var(--st-text2);
    border-bottom: 1px solid var(--st-border);
    font-family: var(--st-mono);
}

.file-list-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    max-height: 400px;
}

/* File list table */
.file-list-table {
    width: 100%;
    border-collapse: collapse;
}

.file-list-table thead {
    position: sticky;
    top: 0;
    background: var(--st-surf);
    z-index: 1;
}

.file-list-table th {
    padding: 8px 20px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--st-text2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--st-border);
    font-family: var(--st-mono);
}

.file-list-table tbody tr {
    border-bottom: 1px solid var(--st-border);
    transition: background 0.15s ease;
}

.file-list-table tbody tr:hover {
    background: var(--st-surf2);
}

.file-list-table td {
    padding: 8px 20px;
    font-size: 12px;
    color: var(--st-text);
    font-family: var(--st-mono);
}

.file-list-table .file-name {
    word-wrap: break-word;
    word-break: break-all;
    max-width: 0;
}

.file-list-table .file-size {
    white-space: nowrap;
    font-weight: 500;
    text-align: right;
    color: var(--st-text2);
}

/* Scrollbar styling for file list */
.file-list-content::-webkit-scrollbar {
    width: 6px;
}

.file-list-content::-webkit-scrollbar-track {
    background: var(--st-surf2);
}

.file-list-content::-webkit-scrollbar-thumb {
    background: var(--st-accent);
    border-radius: 3px;
}

.file-list-content::-webkit-scrollbar-thumb:hover {
    background: var(--st-accent-h);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .file-list-modal {
        max-width: 95%;
        max-height: 85vh;
    }

    .file-list-table th,
    .file-list-table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .file-list-header h3 {
        font-size: 1.2rem;
    }
}

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

/* ── Mobile torresult cards (max-width: 1045px) ── */
@media (max-width: 1045px) {
    .overlay-content {
        border-top: 2px solid #e8601c !important;
        border-radius: 10px 10px 0 0 !important;
        overflow-y: auto !important;
        padding-bottom: 30px !important;
    }
    .close-btn { display: none !important; }

    .tr-dlg-hdr {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 10px !important;
        width: 100% !important;
        padding: 14px 16px 12px !important;
        box-sizing: border-box !important;
        flex-shrink: 0 !important;
        background-color: #1a1a1a !important;
    }
    .tr-dlg-title {
        border-left: 3px solid #e8601c !important;
        padding-left: 9px !important;
    }
    .tr-dlg-h {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #e0e0e0 !important;
        line-height: 1.3 !important;
        font-family: 'Inter', sans-serif !important;
    }
    .tr-dlg-sub {
        font-size: 12px !important;
        color: #555 !important;
        margin-top: 2px !important;
        font-family: 'Inter', sans-serif !important;
    }
    .tr-close-btn {
        width: 26px !important;
        height: 26px !important;
        border-radius: 5px !important;
        border: 1px solid #3d3d3d !important;
        background: #222 !important;
        color: #555 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        font-size: 11px !important;
        flex-shrink: 0 !important;
        transition: all .15s !important;
        line-height: 1 !important;
    }
    .tr-close-btn:hover { background: #2a2a2a !important; color: #e0e0e0 !important; }

    /* ── Filter bar ── */
    .tr-dlg-filters {
        flex-shrink: 0 !important;
        padding: 10px 16px !important;
        border-bottom: 1px solid #2d2d2d !important;
        background: #111 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 7px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .tr-filter-row {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        width: 100% !important;
    }
    .tr-filter-label {
        font-size: 11px !important;
        color: #555 !important;
        font-weight: 500 !important;
        width: 52px !important;
        flex-shrink: 0 !important;
        font-family: 'Inter', sans-serif !important;
    }
    .tr-fsel {
        flex: 1 !important;
        background: #222 !important;
        border: 1px solid #3d3d3d !important;
        color: #aaa !important;
        border-radius: 5px !important;
        padding: 6px 28px 6px 9px !important;
        font-size: 12px !important;
        font-family: 'Inter', sans-serif !important;
        outline: none !important;
        cursor: pointer !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: right 9px center !important;
        transition: border-color .15s !important;
        min-height: unset !important;
        height: auto !important;
    }
    .tr-fsel:hover, .tr-fsel:focus { border-color: #555 !important; color: #e0e0e0 !important; }
    .tr-result-count {
        font-size: 10px !important;
        color: #555 !important;
        font-family: 'JetBrains Mono', monospace !important;
        background: #222 !important;
        border: 1px solid #2d2d2d !important;
        border-radius: 3px !important;
        padding: 2px 7px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    /* ── Results scroll area ── */
    #overlayContent .tr-dlg-filters ~ div {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        justify-content: flex-start !important;
        width: 100% !important;
        padding: 10px !important;
        background-color: #1a1a1a !important;
    }

    /* ── Card ── */
    .torresult {
        display: block !important;
        width: 100% !important;
        position: static !important;
        margin: 0 0 8px 0 !important;
        padding: 11px 12px !important;
        box-sizing: border-box !important;
        background: #222 !important;
        border: 1px solid #2d2d2d !important;
        border-radius: 7px !important;
        overflow: hidden !important;
        cursor: pointer !important;
        transition: border-color .15s, background .12s !important;
        text-align: left !important;
        font-family: 'Inter', sans-serif !important;
    }
    .torresult:last-child { margin-bottom: 0 !important; }
    .torresult:hover { border-color: #3d3d3d !important; background: #2a2a2a !important; }
    .torresult:active { background: #2e2e2e !important; }
    .torresult.filtered-out-item { border-color: rgba(239,68,68,.33) !important; opacity: .72 !important; }
    .torresult.filtered-out-item:hover { border-color: #ef4444 !important; opacity: .88 !important; }

    /* card-filename */
    .torresult .card-filename {
        font-size: 11px !important;
        font-weight: 600 !important;
        font-family: 'JetBrains Mono', monospace !important;
        color: #e0e0e0 !important;
        margin-bottom: 7px !important;
        word-break: break-all !important;
        line-height: 1.55 !important;
    }
    .torresult.filtered-out-item .card-filename { color: #555 !important; }

    /* card-stats */
    .torresult .card-stats {
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
        margin-bottom: 6px !important;
        flex-wrap: wrap !important;
    }
    .torresult .stat {
        display: inline-flex !important;
        align-items: center !important;
        gap: 3px !important;
        font-size: 11px !important;
        font-family: 'JetBrains Mono', monospace !important;
    }
    .torresult .stat i { font-size: 9px !important; }
    .torresult .s-size   { color: #3b82f6 !important; }
    .torresult .s-speed  { color: #f59e0b !important; }
    .torresult .s-seeds  { color: #22c55e !important; }
    .torresult .vdiv {
        display: inline-block !important;
        width: 1px !important;
        height: 11px !important;
        background: #3d3d3d !important;
        flex-shrink: 0 !important;
    }

    /* card-sources */
    .torresult .card-sources {
        font-size: 10px !important;
        color: #555 !important;
        font-family: 'JetBrains Mono', monospace !important;
        margin-bottom: 10px !important;
        line-height: 1.5 !important;
    }

    /* card-blocked-reason */
    .torresult .card-blocked-reason {
        font-size: 10px !important;
        color: #ef4444 !important;
        font-family: 'JetBrains Mono', monospace !important;
        background: rgba(239,68,68,.08) !important;
        border: 1px solid rgba(239,68,68,.2) !important;
        border-radius: 4px !important;
        padding: 5px 8px !important;
        margin-bottom: 10px !important;
        display: flex !important;
        align-items: flex-start !important;
        gap: 5px !important;
        line-height: 1.5 !important;
    }
    .torresult .card-blocked-reason i { margin-top: 1px !important; flex-shrink: 0 !important; font-size: 10px !important; }

    /* card-footer */
    .torresult .card-footer {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
    }

    /* badge */
    .torresult .badge {
        display: inline-flex !important;
        align-items: center !important;
        gap: 5px !important;
        padding: 4px 10px !important;
        border-radius: 5px !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        font-family: 'JetBrains Mono', monospace !important;
        pointer-events: none !important;
        width: auto !important;
        margin: 0 !important;
        animation: none !important;
    }
    .torresult .badge i { font-size: 10px !important; }
    .torresult .cache-status.badge-cached  { background: #22c55e14 !important; border: 1px solid #22c55e33 !important; color: #22c55e !important; animation: none !important; }
    .torresult .cache-status.badge-na      { background: #ef444414 !important; border: 1px solid #ef444433 !important; color: #ef4444 !important; animation: none !important; }
    .torresult .cache-status.badge-pending { background: #2a2a2a !important; border: 1px solid #3d3d3d !important; color: #555 !important; animation: none !important; }

    /* assign button (btn-link) */
    .assign-magnet-icon {
        position: static !important;
        flex-shrink: 0 !important;
        width: 30px !important;
        height: 30px !important;
        padding: 0 !important;
        background: rgba(232,96,28,.08) !important;
        border: 1px solid rgba(232,96,28,.4) !important;
        border-radius: 5px !important;
        color: #e8601c !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        font-size: 11px !important;
        z-index: auto !important;
        transform: none !important;
        transition: all .15s !important;
        box-shadow: none !important;
    }
    .assign-magnet-icon:hover { background: #e8601c !important; border-color: #e8601c !important; color: #fff !important; transform: none !important; }
    .assign-magnet-icon:active { transform: scale(.92) !important; }
    .assign-magnet-icon svg, .assign-magnet-icon i { color: inherit !important; pointer-events: none !important; }
}

/* Multi-provider cache badges */
.cp-badges { display: inline-flex; gap: 3px; align-items: center; }
.cp-badge {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 2px 5px; border-radius: 4px;
    font-size: 10px; font-weight: 700; font-family: 'JetBrains Mono', monospace;
    border: 1px solid; line-height: 1;
}
.cp-cached     { background: rgba(74,222,128,0.15);  color: #4ade80; border-color: rgba(74,222,128,0.4); }
.cp-uncached   { background: rgba(248,113,113,0.1);  color: #f87171; border-color: rgba(248,113,113,0.3); }
.cp-na         { background: rgba(100,116,139,0.15); color: #94a3b8; border-color: rgba(100,116,139,0.4); }
.cp-not-checked{ background: rgba(156,163,175,0.1);  color: #6b7280; border-color: rgba(156,163,175,0.3); }
.cache-providers-wrap { display: flex; gap: 3px; align-items: center; }
