/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Utility Classes */
.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Filter System Styles */
.filter-container {
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

/* Filter Chips */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.6rem;
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid #555;
    border-radius: 12px;
    color: #e5e5e5;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.filter-chip:hover {
    background: rgba(55, 55, 55, 0.9);
    border-color: #666;
    transform: translateY(-1px);
}

.filter-chip.active {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.filter-chip .chip-remove {
    margin-left: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.filter-chip:hover .chip-remove {
    opacity: 1;
}

.filter-chip .chip-remove:hover {
    color: #ff6b6b;
}

.compact-filter-container {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 1rem;
    backdrop-filter: none;
}

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

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

.filter-search {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-search .search-icon {
    position: absolute;
    left: 0.75rem;
    color: #666;
    font-size: 0.9rem;
    pointer-events: none;
}

.filter-search input {
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid #444;
    border-radius: 6px;
    color: #e5e5e5;
    font-size: 0.9rem;
    width: 200px;
    transition: all 0.3s ease;
}

.filter-search input:focus {
    outline: none;
    border-color: #dc2626;
    background: rgba(45, 45, 45, 1);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
}

.filter-search input::placeholder {
    color: #888;
}

.filter-title h3 {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.filter-count {
    color: #888;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.clear-all-filters {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-all-filters:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.compact-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filter-dropdown {
    position: relative;
    display: inline-block;
}

.filter-dropdown-toggle {
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid #444;
    color: #e5e5e5;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: space-between;
}

.filter-dropdown-toggle:hover {
    background: rgba(55, 55, 55, 0.9);
    border-color: #666;
}

.filter-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(26, 26, 26, 0.98);
    border: 1px solid #444;
    border-radius: 6px;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.filter-dropdown-content.show {
    display: block;
}

.filter-dropdown-content .filter-option {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 0.75rem 1rem;
    background: transparent;
    border-bottom: 1px solid #333;
}

.filter-dropdown-content .filter-option:hover {
    background: rgba(45, 45, 45, 0.8);
}

.filter-dropdown-content .filter-option:last-child {
    border-bottom: none;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #333;
}

.filter-checkbox:hover {
    background: rgba(45, 45, 45, 0.8);
}

.filter-checkbox:last-child {
    border-bottom: none;
}

.filter-checkbox input[type="checkbox"] {
    margin-right: 0.75rem;
    transform: scale(1.1);
}

.filter-checkbox .checkmark {
    margin-left: auto;
    color: #dc2626;
    font-weight: bold;
}

.filter-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
}

.filter-checkbox.selected {
    background: rgba(220, 38, 38, 0.2);
    border-color: #dc2626;
    color: #dc2626;
}

.streaming-region {
    padding: 0.5rem 0;
    border-bottom: 1px solid #444;
}

.streaming-region:last-child {
    border-bottom: none;
}

.streaming-region h4 {
    color: #dc2626;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 0 0.5rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-label-text {
    color: #e5e5e5;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.filter-option {
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid #444;
    color: #e5e5e5;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    margin-bottom: 0.25rem;
}

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

.filter-option.selected {
    background: rgba(0, 123, 255, 0.3);
    border-color: #007bff;
    color: #007bff;
    font-weight: 600;
}

.label-chip.excluded {
    opacity: 0.7;
    position: relative;
}

.label-chip.excluded::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: white;
    transform: translateY(-50%);
    z-index: 1;
}

.filter-option:hover {
    background: rgba(55, 55, 55, 0.9);
    border-color: #666;
    transform: translateY(-1px);
}

.filter-option.active {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.filter-option i {
    font-size: 0.8rem;
}

/* Label filter specific styles */
.filter-labels {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.filter-labels::-webkit-scrollbar {
    width: 4px;
}

.filter-labels::-webkit-scrollbar-track {
    background: rgba(45, 45, 45, 0.3);
    border-radius: 2px;
}

.filter-labels::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 2px;
}

.filter-label {
    position: relative;
    padding-left: 2rem;
}

.filter-label .label-color-dot {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.filter-label.show {
    background: var(--label-color, #dc2626);
    border-color: var(--label-color, #dc2626);
    color: white;
}

.filter-label.hide {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
    opacity: 0.7;
}

.filter-label.hide::after {
    content: '✕';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
}

/* Genres and streaming services specific styles */
.filter-genres,
.filter-streaming-services {
    max-height: 150px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.filter-genres::-webkit-scrollbar,
.filter-streaming-services::-webkit-scrollbar {
    width: 4px;
}

.filter-genres::-webkit-scrollbar-track,
.filter-streaming-services::-webkit-scrollbar-track {
    background: rgba(45, 45, 45, 0.3);
    border-radius: 2px;
}

.filter-genres::-webkit-scrollbar-thumb,
.filter-streaming-services::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 2px;
}

/* Empty state for filtered results */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #888;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #666;
}

.empty-state h3 {
    color: #e5e5e5;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Responsive design for filters */
@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-options {
        flex-wrap: wrap;
    }
    
    .filter-option {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .filter-container {
        padding: 1rem;
    }
    
    .filter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .filter-options {
        flex-direction: column;
    }
    
    .filter-option {
        justify-content: center;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Authentication Styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 2rem;
}

.auth-form {
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-logo i {
    font-size: 2rem;
}

.auth-form h2 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

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

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

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid #444;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #dc2626;
    background: rgba(45, 45, 45, 1);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.auth-btn {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.auth-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

.auth-switch {
    text-align: center;
}

.auth-switch p {
    color: #a3a3a3;
    font-size: 0.9rem;
}

.auth-switch a {
    color: #dc2626;
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Main App Layout */
.main-app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
    border-right: 1px solid #333;
    padding: 1rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    scrollbar-width: thin;
    scrollbar-color: #dc2626 #333;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #333;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
}

.sidebar-header {
    padding: 0 2rem 1rem;
    border-bottom: 1px solid #333;
    margin-bottom: 1rem;
}

.sidebar-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-logo i {
    font-size: 1.6rem;
}

.sidebar-section {
    margin-bottom: 1rem;
}

.sidebar-section-title {
    color: #666;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    padding: 0 2rem;
}

.sidebar-menu {
    list-style: none;
}

.menu-item {
    margin-bottom: 0.1rem;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 2rem;
    color: #e5e5e5;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.menu-item a:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #ffffff;
}

.menu-item.active a {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
    border-right: 3px solid #dc2626;
}

.menu-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.potluck-filter-icon {
    margin-left: auto;
    color: #dc2626;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.potluck-filter-icon:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #ff4444;
}

.notification-badge {
    background: #dc2626;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    margin-left: auto;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    background: #0a0a0a;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.welcome-text {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
}

.search-section {
    flex: 1;
    max-width: 600px;
    margin-left: 2rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid #444;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #dc2626;
    background: rgba(26, 26, 26, 1);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.search-icon:hover {
    color: #dc2626;
}

/* Content Sections */
.content-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.content-section {
    background: rgba(26, 26, 26, 0.5);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #333;
}

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

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.section-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid #555;
    border-radius: 8px;
    color: #e5e5e5;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: #dc2626;
    color: #dc2626;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid #555;
    border-radius: 8px;
    color: #e5e5e5;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: #dc2626;
    color: #dc2626;
}

.filter-btn.active {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

/* Filter Options */
.filter-options {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(45, 45, 45, 0.3);
    border-radius: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e5e5e5;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Movies Row */
.movies-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); /* Reduced from 200px by 20% */
    gap: 1.5rem;
}

.horizontal-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #dc2626 #333;
}

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

.horizontal-scroll::-webkit-scrollbar-track {
    background: #333;
    border-radius: 4px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 4px;
}

.horizontal-scroll::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
}

/* Movie Tile */
.movie-tile {
    position: relative;
    background: rgba(26, 26, 26, 0.8);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #333;
    width: 140px;
    flex-shrink: 0;
}

.movie-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    border-color: #dc2626;
}

/* Movie Poster Container */
.movie-poster-container {
    position: relative;
    width: 100%;
    height: 210px; /* Same as movie-poster height */
}

.movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #333;
}

/* Poster Labels */
.poster-labels {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 5;
}

.poster-labels .label-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    margin: 0;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Don't override the background color - let the label's color show through */
}

.movie-info {
    padding: 0.75rem;
}

.movie-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.35rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #a3a3a3;
}

.movie-year {
    font-weight: 500;
}

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

.movie-rating i {
    font-size: 0.8rem;
}

/* Profile Labels - Removed hardcoded test labels */
/* TODO: Add proper user-based label styles if needed */

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(26, 26, 26, 0.95);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    z-index: 2000;
    border: 1px solid #333;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Overlay Styles */
.overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px); /* Safari/Edge support */
}

.overlay-backdrop.hidden {
    display: none !important;
}

.overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%); /* IE/Edge support */
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #333;
    z-index: 3001;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dc2626 #333;
}

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

.overlay::-webkit-scrollbar {
    width: 8px;
}

.overlay::-webkit-scrollbar-track {
    background: #333;
    border-radius: 4px;
}

.overlay::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 4px;
}

.overlay::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
}

.overlay-content {
    padding: 2rem;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid #555;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e5e5e5;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.overlay-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.overlay-poster img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 8px;
    background: #333;
}

.overlay-info h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.overlay-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #a3a3a3;
    flex-wrap: wrap;
}

.genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.genre-tag {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.overview {
    font-size: 1rem;
    line-height: 1.6;
    color: #e5e5e5;
    margin-top: 1rem;
}

/* Certifications in overlay header */
.overlay-info .certifications-grid {
    margin: 0.5rem 0;
}

.overlay-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-section {
    background: rgba(26, 26, 26, 0.5);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #333;
}

.detail-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 0.5rem;
}

/* Certifications */
.certifications-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.certification-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cert-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    line-height: 0.8;
    text-align: center;
}

/* Consistent certification colors based on content rating */
.cert-circle.g, .cert-circle.u, .cert-circle.e, .cert-circle.everyone {
    background: #22c55e; /* Green for G/U/E ratings */
}

.cert-circle.pg, .cert-circle.pg13, .cert-circle.m, .cert-circle.ma15, .cert-circle.cert15, .cert-circle.tv14, .cert-circle.cert12 {
    background: #f59e0b; /* Amber for PG/PG-13/M/MA15+/15/TV-14/12 ratings */
}

.cert-circle.r, .cert-circle.nc17, .cert-circle.r18, .cert-circle.tvma {
    background: #dc2626; /* Red for R/NC-17/R18+/TV-MA ratings */
}

.cert-circle.default {
    background: #6b7280; /* Gray for unknown ratings */
}

.cert-region {
    font-size: 0.65rem;
    color: #a3a3a3;
    font-weight: 500;
    white-space: nowrap;
}

.certification-legend {
    margin-top: 0.5rem;
    text-align: center;
}

.certification-legend a {
    color: #dc2626;
    text-decoration: none;
    font-size: 0.85rem;
}

.certification-legend a:hover {
    text-decoration: underline;
}

/* Watch Providers */
.watch-providers-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.provider-type-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.provider-type-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 0.5rem;
}

.watch-providers-simple {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.provider-logo-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.provider-logo-small {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.provider-logo-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.region-abbrev {
    font-size: 0.7rem;
    color: #a3a3a3;
    font-weight: 500;
}

.also-available-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #333;
}

/* Cast Grid */
.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.cast-member {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cast-member:hover {
    transform: translateY(-2px);
}

.cast-member img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
    background: #333;
}

.cast-member h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.cast-member p {
    font-size: 0.75rem;
    color: #a3a3a3;
    line-height: 1.2;
}

/* Production Info */
.production-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.production-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.production-item h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #dc2626;
    margin: 0;
    white-space: nowrap;
}

.production-item p {
    font-size: 0.85rem;
    color: #e5e5e5;
    line-height: 1.4;
    margin: 0;
}

/* Videos Grid */
.videos-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.video-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.video-item p {
    font-size: 0.8rem;
    color: #a3a3a3;
}

/* Recommendations Grid */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.recommendation-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.recommendation-item:hover {
    transform: translateY(-2px);
}

.recommendation-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    background: #333;
    margin-bottom: 0.5rem;
}

.recommendation-item h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommendation-item p {
    font-size: 0.75rem;
    color: #a3a3a3;
}

/* Filmography Grid */
.filmography-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.filmography-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.filmography-item:hover {
    transform: translateY(-2px);
}

.filmography-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    background: #333;
    margin-bottom: 0.5rem;
}

.filmography-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.filmography-item p {
    font-size: 0.8rem;
    color: #a3a3a3;
}

/* Settings Overlay */
.settings-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.settings-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 0.5rem;
}

.settings-section p {
    color: #a3a3a3;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.region-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(45, 45, 45, 0.5);
    border: 1px solid #555;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.region-option:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: #dc2626;
}

.region-option input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.region-name {
    flex: 1;
    color: #e5e5e5;
    font-weight: 500;
}

.region-code {
    color: #a3a3a3;
    font-size: 0.85rem;
    font-weight: 600;
}

.provider-region {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(45, 45, 45, 0.3);
    border-radius: 8px;
    border: 1px solid #555;
}

.provider-region h4 {
    color: #dc2626;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.provider-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.provider-option:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: #dc2626;
}

.provider-option input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.provider-option span {
    color: #e5e5e5;
    font-size: 0.9rem;
    font-weight: 500;
}

.settings-actions {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
}

.save-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

/* UI Button Styles */
.ui-button {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.ui-button:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.ui-button i {
    font-size: 12px;
    color: #ffffff;
    transition: all 0.3s ease;
}

/* Vertical UI Button Container for Film Tiles */
.tile-ui-container {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.movie-tile:hover .tile-ui-container {
    opacity: 1;
    pointer-events: all;
}

/* Watchlist Button */
.watchlist-btn {
    position: static;
}

.watchlist-btn.active {
    background: rgba(220, 38, 38, 0.9);
    border-color: #dc2626;
}

.watchlist-btn.active i {
    color: #ffffff;
}

/* Follow Button (Bookmark) */
.follow-btn {
    position: static;
}

.follow-btn.active {
    background: rgba(251, 191, 36, 0.9);
    border-color: #fbbf24;
}

.follow-btn.active i {
    color: #000000;
}

/* Like Button */
.like-btn {
    position: static;
}

.like-btn.active {
    background: rgba(239, 68, 68, 0.9);
    border-color: #ef4444;
}

.like-btn.active i {
    color: #ffffff;
}

/* Watch Status Button */
.watch-status-btn {
    position: static;
}

.watch-status-btn.active {
    background: rgba(99, 102, 241, 0.9);
    border-color: #6366f1;
}

.watch-status-btn.active i {
    color: #ffffff;
}

/* Watch Status States */
.watch-status-btn.not-watched {
    background: transparent;
    border-color: #555;
}

.watch-status-btn.not-watched i {
    color: #a3a3a3;
}

.watch-status-btn.watching {
    background: rgba(251, 191, 36, 0.9);
    border-color: #fbbf24;
}

.watch-status-btn.watching i {
    color: #000000;
}

.watch-status-btn.watched {
    background: rgba(34, 197, 94, 0.9);
    border-color: #22c55e;
}

.watch-status-btn.watched i {
    color: #ffffff;
}

.watch-status-btn.watch-again {
    background: rgba(168, 85, 247, 0.9);
    border-color: #a855f7;
}

.watch-status-btn.watch-again i {
    color: #ffffff;
}

/* Labels Button */
.labels-btn {
    position: static;
}

.labels-btn.active {
    background: rgba(168, 85, 247, 0.9);
    border-color: #a855f7;
}

.labels-btn.active i {
    color: #ffffff;
}

/* Thumbs Button */
.thumbs-btn {
    position: static;
}

.thumbs-btn:hover {
    background: rgba(45, 45, 45, 1);
    border-color: #666;
}

.thumbs-btn.thumbs-up {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #22c55e;
}

.thumbs-btn.thumbs-down {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}

.thumbs-btn i {
    font-size: 12px;
    transition: all 0.3s ease;
}


/* Overlay UI Button Container */
.overlay-ui-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.overlay-poster:hover .overlay-ui-container {
    opacity: 1;
    pointer-events: all;
}

/* Inline overlay buttons after star rating */
.overlay-buttons-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    height: 32px;
}

.overlay-buttons-inline .ui-button {
    position: static;
    width: 32px;
    height: 32px;
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid #555;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 1;
    pointer-events: all;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.overlay-buttons-inline .ui-button:hover {
    background: rgba(45, 45, 45, 1);
    border-color: #666;
    transform: scale(1.1);
}

.overlay-buttons-inline .ui-button i {
    font-size: 12px;
    color: #e5e5e5;
}

.overlay-buttons-inline .ui-button.active {
    background: rgba(220, 38, 38, 0.9);
    border-color: #dc2626;
}

.overlay-buttons-inline .ui-button.active i {
    color: #ffffff;
}

.overlay-buttons-inline .follow-btn.active {
    background: rgba(251, 191, 36, 0.9);
    border-color: #fbbf24;
}

.overlay-buttons-inline .follow-btn.active i {
    color: #000000;
}

.overlay-buttons-inline .like-btn.active {
    background: rgba(239, 68, 68, 0.9);
    border-color: #ef4444;
}

.overlay-buttons-inline .watch-status-btn.active {
    background: rgba(99, 102, 241, 0.9);
    border-color: #6366f1;
}

.overlay-buttons-inline .watch-status-btn.not-watched {
    background: transparent;
    border-color: #555;
}

.overlay-buttons-inline .watch-status-btn.not-watched i {
    color: #a3a3a3;
}

.overlay-buttons-inline .watch-status-btn.watching {
    background: rgba(251, 191, 36, 0.9);
    border-color: #fbbf24;
}

.overlay-buttons-inline .watch-status-btn.watching i {
    color: #000000;
}

.overlay-buttons-inline .watch-status-btn.watched {
    background: rgba(34, 197, 94, 0.9);
    border-color: #22c55e;
}

.overlay-buttons-inline .watch-status-btn.watch-again {
    background: rgba(168, 85, 247, 0.9);
    border-color: #a855f7;
}

.overlay-buttons-inline .thumbs-btn.active {
    background: rgba(34, 197, 94, 0.9);
    border-color: #22c55e;
}

.overlay-buttons-inline .thumbs-btn.thumbs-down.active {
    background: rgba(239, 68, 68, 0.9);
    border-color: #ef4444;
}

.overlay-buttons-inline .labels-btn.active {
    background: rgba(168, 85, 247, 0.9);
    border-color: #a855f7;
}

/* Ensure thumbs button has same alignment as other buttons */
.overlay-buttons-inline .thumbs-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
}

/* Tile thumbs positioning */
.movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #a3a3a3;
    margin-bottom: 0.5rem;
}

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

.movie-rating i {
    font-size: 0.8rem;
}


.movie-labels {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.overlay-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.overlay-labels .label-tag {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    margin: 0;
}

/* Trailer Button */
.trailer-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1rem 0;
}

.trailer-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

.trailer-btn i {
    font-size: 1.1rem;
}

/* Trailer Modal (from Old App) */
.trailer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 0;
    backdrop-filter: blur(10px);
}

.trailer-modal-content {
    background-color: #000000;
    border-radius: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.trailer-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.trailer-modal-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.trailer-modal-close {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.trailer-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.trailer-video {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
}

.trailer-video iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
}

/* Trailer Playlist Modal */
.trailer-playlist-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 0;
    backdrop-filter: blur(10px);
}

.trailer-playlist-content {
    background-color: #000000;
    border-radius: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.trailer-playlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.playlist-info h3 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.playlist-progress {
    font-size: 14px;
    color: #cccccc;
    margin: 0;
}

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

.playlist-control-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.playlist-control-btn:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.playlist-control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.trailer-playlist-video {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
}

.trailer-playlist-video iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
}

/* Trailer Error Display */
.trailer-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.error-content {
    text-align: center;
    color: #ffffff;
    padding: 40px;
    max-width: 500px;
}

.error-content i {
    font-size: 48px;
    color: #ff6b6b;
    margin-bottom: 20px;
}

.error-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #ffffff;
}

.error-content p {
    font-size: 16px;
    margin: 0 0 20px 0;
    color: #cccccc;
    line-height: 1.5;
}

.error-content ul {
    text-align: left;
    margin: 0 0 30px 0;
    padding-left: 20px;
    color: #cccccc;
}

.error-content li {
    margin: 8px 0;
    font-size: 14px;
}

.youtube-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ff0000;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.youtube-link:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.youtube-link i {
    font-size: 20px;
    margin: 0;
}

.trailer-playlist-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 40px 32px 20px;
    color: #ffffff;
}

.trailer-playlist-info h4 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.trailer-description {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Responsive trailer modal design */
@media (max-width: 768px) {
    .trailer-modal-header,
    .trailer-playlist-header {
        padding: 16px 20px;
    }
    
    .trailer-modal-header h3,
    .playlist-info h3 {
        font-size: 18px;
    }
    
    .trailer-modal-close,
    .playlist-control-btn {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .trailer-playlist-info {
        padding: 30px 20px 16px;
    }
    
    .trailer-playlist-info h4 {
        font-size: 18px;
    }
    
    /* Fix trailer modal content overflow */
    .trailer-modal-content,
    .trailer-playlist-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        margin: 0;
        max-width: none;
        max-height: none;
    }
    
    .trailer-video,
    .trailer-playlist-video {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }
    
    .trailer-video iframe,
    .trailer-playlist-video iframe {
        width: 100%;
        height: 100%;
        border: none;
    }
    
    /* Error display responsive */
    .error-content {
        padding: 20px;
        max-width: 90%;
    }
    
    .error-content i {
        font-size: 36px;
        margin-bottom: 16px;
    }
    
    .error-content h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .error-content p {
        font-size: 14px;
        margin-bottom: 16px;
    }
    
    .error-content ul {
        margin-bottom: 20px;
    }
    
    .error-content li {
        font-size: 13px;
        margin: 6px 0;
    }
    
    .youtube-link {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .trailer-modal-header,
    .trailer-playlist-header {
        padding: 12px 16px;
    }
    
    .trailer-modal-header h3,
    .playlist-info h3 {
        font-size: 16px;
    }
    
    .trailer-modal-close,
    .playlist-control-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .trailer-playlist-info {
        padding: 24px 16px 12px;
    }
    
    .trailer-playlist-info h4 {
        font-size: 16px;
    }
    
    /* Ensure trailer modals work properly on small screens */
    .trailer-modal,
    .trailer-playlist-modal {
        padding: 0;
    }
    
    .trailer-modal-content,
    .trailer-playlist-content {
        border-radius: 0;
    }
}

/* Labels Styles */
.labels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.label-card {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.label-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: #dc2626;
}

.label-color {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.label-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.label-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

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

.label-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #555;
    background: rgba(45, 45, 45, 0.8);
    color: #e5e5e5;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.label-action-btn:hover {
    background: rgba(45, 45, 45, 1);
    border-color: #666;
    transform: scale(1.1);
}

.label-action-btn.edit-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #3b82f6;
}

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

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #a3a3a3;
}

.empty-state i {
    font-size: 4rem;
    color: #666;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Notifications Styles */
.notifications-section {
    max-width: 100%;
}

.notifications-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.notification-item:hover {
    background: rgba(26, 26, 26, 1);
    border-color: #444;
}

.notification-item.unread {
    border-left: 3px solid #dc2626;
    background: rgba(220, 38, 38, 0.05);
}

.notification-item.read {
    opacity: 0.7;
}

.notification-poster {
    flex-shrink: 0;
    width: 80px;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    background: #1a1a1a;
}

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

.notification-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification-message {
    color: #e5e5e5;
    font-size: 1rem;
    line-height: 1.5;
}

.notification-time {
    color: #888;
    font-size: 0.85rem;
}

.notification-delete {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #888;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.notification-delete:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

.notification-delete i {
    font-size: 1rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

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

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

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #333;
}

.btn-primary {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: rgba(45, 45, 45, 0.8);
    color: #e5e5e5;
    border: 1px solid #555;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(45, 45, 45, 1);
    border-color: #666;
}

/* Color Picker Styles */
.color-picker {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.color-picker input[type="color"] {
    width: 60px;
    height: 40px;
    border: 1px solid #555;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.color-presets {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.5rem;
}

.color-preset {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-preset:hover {
    border-color: #ffffff;
    transform: scale(1.1);
}

/* Label Display Styles */
.label-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.15rem 0.45rem;
    background: rgba(220, 38, 38, 0.8);
    color: white;
    border: 1px solid rgba(220, 38, 38, 0.9);
    border-radius: 12px;
    font-size: 0.48rem;
    font-weight: 500;
    margin: 0.15rem;
}

.label-tag .label-name {
    font-size: 0.48rem;
    font-weight: 500;
}

/* Label Manager Modal Styles */
.label-manager-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.available-labels h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 1rem;
}

.labels-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dc2626 #333;
}

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

.labels-list::-webkit-scrollbar-track {
    background: #333;
    border-radius: 3px;
}

.labels-list::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 3px;
}

.label-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(45, 45, 45, 0.5);
    border: 1px solid #555;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.label-option:hover {
    background: rgba(45, 45, 45, 0.8);
    border-color: #666;
}

.label-option.selected {
    background: rgba(168, 85, 247, 0.2);
    border-color: #a855f7;
}

.label-color-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.label-name {
    flex: 1;
    color: #e5e5e5;
    font-weight: 500;
}

.label-check {
    color: #a855f7;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.label-check.visible {
    opacity: 1;
}

.label-manager-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

@media (max-width: 480px) {
    .label-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .label-info {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .color-presets {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Utility Classes */

/* Responsive Design */
@media (max-width: 1200px) {
    .overlay-header {
        grid-template-columns: 250px 1fr;
    }
    
    .overlay-poster img {
        height: 375px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .search-section {
        margin-left: 0;
    }
    
    .overlay {
        width: 95%;
        max-height: 95vh;
    }
    
    .overlay-header {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .overlay-poster img {
        height: 300px;
    }
    
    .overlay-info h1 {
        font-size: 2rem;
    }
    
    .overlay-details {
        grid-template-columns: 1fr;
    }
    
    .movies-row {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); /* Reduced from 150px by 20% */
        gap: 1rem;
    }
    
    .movie-tile {
        min-width: 120px; /* Reduced from 150px by 20% */
    }
    
    .movie-poster {
        height: 180px; /* Reduced from 225px by 20% - maintains 2:3 ratio (120:180) */
    }
    
    .region-grid {
        grid-template-columns: 1fr;
    }
    
    .provider-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .auth-form {
        padding: 2rem;
        margin: 1rem;
    }
    
    .overlay-content {
        padding: 1rem;
    }
    
    .overlay-info h1 {
        font-size: 1.5rem;
    }
    
    .movies-row {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); /* Reduced from 120px by 20% */
    }
    
    .movie-tile {
        min-width: 96px; /* Reduced from 120px by 20% */
    }
    
    .movie-poster {
        height: 144px; /* Reduced from 180px by 20% - maintains 2:3 ratio (96:144) */
    }
}