/* Interactive Watched List - Beautiful Dark Theme */

.iwl-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background: #1a1a2e !important;
    background: linear-gradient(135deg, #1a1a2e, #16213e) !important;
    background-color: #1a1a2e !important;
    border-radius: 16px !important;
    color: #ffffff !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
}

.iwl-empty {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 16px;
    color: #ffffff;
    font-size: 1.2em;
    max-width: 500px;
    margin: 0 auto;
}

/* Controls Section */
.iwl-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.iwl-search {
    flex: 1;
    min-width: 300px;
}

.iwl-search input {
    width: 95%;
    padding: 12px 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.iwl-search input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.iwl-search input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.iwl-filters {
    display: flex;
    gap: 20px;
}

.iwl-filters select {
    padding: 10px 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    margin-right: 10px;
}

.iwl-filters select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.3);
}

.iwl-filters select option {
    background: #2c3e50;
    color: #ffffff;
    padding: 8px;
}

/* Stats Section */
.iwl-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.iwl-stat-total {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1em;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    animation: pulse-glow 3s ease-in-out infinite;
}

.iwl-stat-movies, .iwl-stat-tv, .iwl-stat-games {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 15px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 8px 35px rgba(102, 126, 234, 0.5); }
}

/* Grid Layout */
.iwl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.iwl-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    position: relative;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.iwl-item:nth-child(even) {
    animation-delay: 0.1s;
}

.iwl-item:nth-child(3n) {
    animation-delay: 0.2s;
}

.iwl-item:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(102, 126, 234, 0.5) !important;
}

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

/* Poster Section */
.iwl-poster {
    height: 400px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    position: relative;
    overflow: hidden;
}

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

.iwl-item:hover .iwl-poster img {
    transform: scale(1.05) !important;
}

.iwl-poster-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 4em;
    color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #34495e, #2c3e50);
}

.iwl-poster-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #667eea;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

/* Info Overlay */
.iwl-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 30px 20px 20px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.iwl-item:hover .iwl-info {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

.iwl-container .iwl-item .iwl-info .iwl-title {
    margin: 0 0 8px 0 !important;
    font-size: 1.3em !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    line-height: 1.3 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.iwl-year {
    color: #667eea;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.iwl-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.iwl-note {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
    color: #ffffff;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.9em;
    line-height: 1.3;
    margin: 8px 0 12px 0;
    border-left: 3px solid #f39c12;
    backdrop-filter: blur(5px);
    font-style: italic;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Action Buttons */
.iwl-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.iwl-container .iwl-item .iwl-info .iwl-actions .iwl-details-btn, 
.iwl-container .iwl-item .iwl-info .iwl-actions .iwl-watch-btn {
    padding: 8px 16px !important;
    border: none !important;
    border-radius: 15px !important;
    font-size: 0.9em !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: inline-block !important;
    text-align: center !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.iwl-details-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    flex: 1;
}

.iwl-details-btn:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.iwl-watch-btn {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #ffffff;
    flex: 1;
}

.iwl-watch-btn:hover {
    background: linear-gradient(135deg, #f5576c, #f093fb);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 87, 108, 0.4);
    text-decoration: none;
    color: #ffffff;
}

.iwl-watch-btn-disabled {
    background: linear-gradient(135deg, #6c757d, #495057) !important;
    color: #ffffff !important;
    opacity: 0.7;
    cursor: not-allowed !important;
    flex: 1;
}

.iwl-watch-btn-disabled:hover {
    background: linear-gradient(135deg, #6c757d, #495057) !important;
    transform: none !important;
    box-shadow: none !important;
    text-decoration: none;
    color: #ffffff !important;
}

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

.iwl-modal-content {
    position: relative;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    animation: slideInDown 0.4s ease;
}

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

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

.iwl-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.iwl-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.iwl-modal-body {
    padding: 30px;
    color: #ffffff;
    max-height: 70vh;
    overflow-y: auto;
}

.iwl-modal-loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.4em;
    color: #667eea;
}

/* Modal Content Styles */
.iwl-modal-details {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: start;
}

.iwl-modal-poster {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.iwl-modal-info h2 {
    margin: 0 0 15px 0;
    font-size: 2.2em;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.iwl-modal-info p {
    margin: 10px 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
}

.iwl-modal-info strong {
    color: #667eea;
}

.iwl-modal-rating {
    display: inline-block;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #ffffff;
    padding: 5px 15px;
    border-radius: 15px;
    font-weight: 600;
    margin: 10px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .iwl-container {
        padding: 15px;
        border-radius: 12px;
    }
    
    .iwl-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .iwl-search {
        min-width: auto;
    }
    
    .iwl-filters {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .iwl-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .iwl-stats {
        justify-content: center;
        gap: 10px;
    }
    
    .iwl-stat-total, .iwl-stat-movies, .iwl-stat-tv, .iwl-stat-games {
        font-size: 0.9em;
        padding: 8px 16px;
    }
    
    .iwl-info {
        position: static;
        opacity: 1;
        transform: none;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7));
        padding: 20px 15px 15px;
    }
    
    .iwl-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .iwl-modal-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .iwl-modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .iwl-grid {
        grid-template-columns: 1fr;
    }
    
    .iwl-poster {
        height: 300px;
    }
    
    .iwl-actions {
        flex-direction: column;
    }
    
    .iwl-modal-content {
        width: 98%;
        margin: 5% auto;
    }
}

/* Hidden items for filtering */
.iwl-item.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Ensure visible items are shown */
.iwl-item:not(.hidden) {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Scrollbar Styling */
.iwl-modal-body::-webkit-scrollbar {
    width: 8px;
}

.iwl-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.iwl-modal-body::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 4px;
}

.iwl-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
} 