/* CineShelf v2.0 - Netflix-Inspired Styles */
/* Clean, modern design with focus on movie posters */

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    --bg: #0f0f0f;
    --bg-card: #1a1a1a;
    --bg-hover: #2a2a2a;
    --text: #ffffff;
    --text-muted: #a0a0a0;
    --border: #333333;
    
    --spacing: 1rem;
    --radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 1.5rem 2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Tabs */
.tabs {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 1px;
}

.tab {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius) var(--radius) 0 0;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.tab.active {
    background: var(--bg);
    color: white;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 150px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

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

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

.view-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.view-controls select {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
}

.view-switcher {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.view-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.view-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Movie Grid */
.movie-grid {
    display: grid;
    gap: 1.5rem;
}

.movie-grid.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.movie-grid.list-view {
    grid-template-columns: 1fr;
}

.movie-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.movie-poster-container {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: #222;
}

.movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.copy-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.priority-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--warning);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Certification Badge (for movie cards) */
.cert-badge {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.5);
    color: #ffc107;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Copy count styling in movie cards */
.movie-info > div[style*="color: #4caf50"] {
    display: inline-block;
    background: rgba(76, 175, 80, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.movie-info {
    padding: 1rem;
}

.movie-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.movie-format {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}

.movie-actions {
    padding: 0 1rem 1rem;
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text);
    padding: 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s;
    flex: 1;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

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

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-card);
    box-shadow: none;
}

/* Add Movie Section */
.add-movie-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-box input {
    flex: 1;
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 1rem;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-result-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-result-card:hover {
    transform: scale(1.05);
}

.search-result-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.search-result-info {
    padding: 0.75rem;
}

.search-result-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.search-result-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Add Form */
.add-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
}

.add-form h3 {
    margin-bottom: 1rem;
}

.form-poster {
    width: 200px;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

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

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

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

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

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

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

/* Settings */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
}

.settings-group {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.settings-group h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

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

.setting-item label {
    font-weight: 600;
}

.setting-item select,
.setting-item input[type="text"],
.setting-item input[type="range"] {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    min-width: 200px;
}

.setting-item input[type="text"][readonly] {
    background: var(--bg-hover);
    cursor: not-allowed;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 900px;
}

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

.modal-header h3 {
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 2rem;
}

/* Copy Manager */
.copies-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.copy-item {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

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

/* Copy details - used in copy manager for format/edition info */
.copy-item .copy-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.copy-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* ========================================
   MOVIE DETAIL VIEW STYLES
   ======================================== */

.movie-detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

.movie-detail-poster img {
    width: 100%;
    border-radius: var(--radius);
}

/* Enhanced meta row with badges */
.movie-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
}

.movie-detail-meta span {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Certification badge in detail view */
.movie-detail-meta .cert-badge {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.5);
    color: #ffc107;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Genre styling in detail view */
.movie-detail-genre {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-style: italic;
    margin: 0.5rem 0;
}

/* Director styling */
.movie-detail-director {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    margin: 0.75rem 0;
    font-weight: 500;
}

/* Plot/Overview section */
.movie-detail-section {
    margin-top: 1.5rem;
}

.movie-detail-section h3 {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.movie-detail-section h4 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.movie-detail-overview {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* Copies summary */
.copies-summary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Enhanced copy items in detail view */
.copy-summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border-left: 3px solid #4caf50;
}

.copy-number {
    font-weight: 600;
    color: #4caf50;
    font-size: 0.85rem;
}

/* Copy details in summary (different from copy-item .copy-details) */
.copy-summary-item .copy-details {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

/* ========================================
   RESOLVE FEATURE STYLES
   ======================================== */

.resolve-search-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#resolveResults {
    max-height: 500px;
    overflow-y: auto;
}

#resolveResults::-webkit-scrollbar {
    width: 8px;
}

#resolveResults::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

#resolveResults::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

#resolveResults::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.unmatched-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 193, 7, 0.95);
    color: black;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

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

#resolveModal .modal-content {
    max-width: 700px;
}

#resolveModal input[type="text"] {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    transition: all 0.2s;
}

#resolveModal input[type="text"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.4);
}

#emptyUnresolved {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

#emptyUnresolved h3 {
    margin: 1rem 0 0.5rem 0;
    color: rgba(255, 255, 255, 0.9);
}

.btn-resolve {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: black;
    font-weight: 700;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-resolve:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

#unresolvedGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

#unresolvedGrid .movie-card {
    height: auto;
}

#unresolvedGrid .movie-poster-container {
    aspect-ratio: 2/3;
    height: auto;
}

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

#unresolvedGrid .movie-title {
    font-size: 0.9rem;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

#unresolvedGrid .movie-info {
    padding: 0.75rem;
}

#unresolvedGrid .movie-actions {
    padding: 0 0.75rem 0.75rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    color: var(--text);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 3000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
}

.toast.active {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--error);
}

.toast-info {
    border-left: 4px solid var(--info);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .movie-grid.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .movie-detail-layout {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    
    #unresolvedGrid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }
}

@media (min-width: 1400px) {
    #unresolvedGrid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* ========================================
   NETFLIX-STYLE CARD GRID
   Clean minimal cards with hover overlays
   ======================================== */

/* Clean grid layout */
.movie-grid.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

/* Minimal card styling */
.movie-grid.grid-view .movie-card {
    position: relative;
    background: transparent;
    overflow: visible;
    cursor: pointer;
    transition: transform 0.3s ease, z-index 0s 0.3s;
}

.movie-grid.grid-view .movie-card:hover {
    transform: scale(1.05);
    z-index: 100;
    transition: transform 0.3s ease, z-index 0s 0s;
}

/* Poster container */
.movie-grid.grid-view .movie-poster-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.3s;
}

.movie-grid.grid-view .movie-card:hover .movie-poster-container {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
}

/* Hide movie info by default */
.movie-grid.grid-view .movie-info {
    padding: 0.5rem;
    background: transparent;
}

/* Only show title by default */
.movie-grid.grid-view .movie-title {
    font-size: 0.9rem;
    margin: 0.5rem 0 0 0;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hide all other info by default */
.movie-grid.grid-view .movie-meta,
.movie-grid.grid-view .movie-format,
.movie-grid.grid-view .movie-info > div,
.movie-grid.grid-view .movie-info > p,
.movie-grid.grid-view .movie-actions {
    display: none;
}

/* Hover overlay - FIXED VERSION */
.movie-card .hover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 70%, transparent 100%);
    padding: 1rem 0.75rem 0.75rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;  /* ← Allows clicks through to card */
    z-index: 10;
}

.movie-card:hover .hover-overlay {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;  /* ← CRITICAL: Enable pointer events on hover */
}

/* Hover overlay content */
.hover-overlay .hover-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
    pointer-events: none;  /* ← Title doesn't need clicks */
}

.hover-overlay .hover-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    pointer-events: none;  /* ← Meta doesn't need clicks */
}

.hover-overlay .hover-meta span {
    color: rgba(255, 255, 255, 0.9);
}

.hover-overlay .cert-badge-hover {
    background: var(--cert-color, #666);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 700;
}

.hover-overlay .genre-emojis {
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.hover-overlay .hover-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    pointer-events: auto;  /* ← CRITICAL: Buttons need clicks */
}

.hover-overlay .hover-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.4rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    pointer-events: auto;  /* ← CRITICAL: Enable button clicks */
}

.hover-overlay .hover-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

/* CRITICAL: Make card itself clickable for detail view */
.movie-grid.grid-view .movie-card {
    position: relative;
    background: transparent;
    overflow: visible;
    cursor: pointer;  /* ← Shows it's clickable */
    transition: transform 0.3s ease, z-index 0s 0.3s;
}

.movie-grid.grid-view .movie-card:hover {
    transform: scale(1.05);
    z-index: 100;
    transition: transform 0.3s ease, z-index 0s 0s;
}

/* Ensure poster container doesn't block clicks */
.movie-grid.grid-view .movie-poster-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.3s;
    pointer-events: none;  /* ← Allows clicks through */
}

.movie-grid.grid-view .movie-card:hover .movie-poster-container {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
}

/* Copy count badge should not block clicks */
.copy-count-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(76, 175, 80, 0.95);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 5;
    pointer-events: none;  /* ← Badge doesn't need clicks */
}

/* Title should not block clicks */
.movie-grid.grid-view .movie-title {
    font-size: 0.9rem;
    margin: 0.5rem 0 0 0;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    pointer-events: none;  /* ← Title doesn't need clicks */
}

/* Copy count badge on poster */
.copy-count-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(76, 175, 80, 0.95);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .movie-grid.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }
    
    .hover-overlay {
        padding: 0.75rem 0.5rem 0.5rem;
    }
    
    .hover-overlay .hover-title {
        font-size: 0.9rem;
    }
    
    .hover-overlay .hover-meta {
        font-size: 0.75rem;
        gap: 0.35rem;
    }
}

@media (min-width: 1400px) {
    .movie-grid.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* ========================================
   NETFLIX-STYLE FILTER BAR
   Add this to the END of your styles.css
   ======================================== */

.filter-bar {
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

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

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input[type="number"] {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.6rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

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

.year-range input {
    flex: 1;
}

.year-range span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

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

.filter-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-tag .remove {
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s;
}

.filter-tag .remove:hover {
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .filter-controls {
        grid-template-columns: 1fr;
    }
}