/* Modern Pages CSS - Movies & TV Shows */
/* Clean, sleek design matching webapp theme */

/* Global Styles */
:root {
    --navbar-height: 70px;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-hover: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
}

/* Custom Scrollbar - Clean & Universal (NO ARROWS) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c8ef7 0%, #8b5fc2 100%);
}

/* Remove scrollbar arrows/buttons */
::-webkit-scrollbar-button {
    display: none;
    height: 0;
    width: 0;
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #667eea rgba(0, 0, 0, 0.2);
}

/* Fix double scrollbar issue - ONLY ONE SCROLLBAR */
/* Make HTML the only scrollable element */
/* Override app.css body scrolling - ONLY html should scroll */
html {
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    height: auto !important; /* Override app.css height: 100% */
}

body {
    overflow: hidden !important; /* Override app.css overflow-y: auto - NO body scroll! */
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important; /* Override app.css height: 100% */
}

/* Page Container - Fixed navbar issue */
.modern-page-wrapper {
    min-height: 100vh !important;
    padding-top: var(--navbar-height) !important;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e) !important;
    overflow-x: hidden !important;
}

.modern-page-container {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Page Header */
.modern-page-header {
    margin-bottom: 2rem;
}

.modern-page-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.modern-page-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Filter Section */
.modern-filters {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.modern-filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modern-filter-label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.modern-select {
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 180px;
}

.modern-select:hover,
.modern-select:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: #667eea;
    outline: none;
}

.modern-filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.modern-filter-btn:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    transform: translateY(-2px);
}

.modern-filter-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
}

/* Grid Layout - Responsive */
.modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 640px) {
    .modern-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .modern-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .modern-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (min-width: 1441px) {
    .modern-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

/* Card Design */
.modern-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
    background: var(--card-hover);
}

/* Card Image Container */
.modern-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.modern-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.modern-card:hover .modern-card-image img {
    transform: scale(1.05);
}

/* Card Link */
.modern-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.modern-card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}

.modern-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modern-card:hover .modern-card-overlay {
    opacity: 1;
}

.modern-view-details {
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.modern-card:hover .modern-view-details {
    background: rgba(102, 126, 234, 1);
    transform: scale(1.05);
}

.modern-card-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #fbbf24;
}

/* Card Content */
.modern-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.modern-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.modern-card-year {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.modern-card-info {
    padding: 1rem;
}

.modern-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    flex: 1;
}

.modern-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.modern-card-title a:hover {
    color: #667eea;
}

/* User Rating Display */
.modern-user-rating {
    display: block;
    color: #fbbf24;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Runtime Display */
.modern-runtime {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.modern-runtime ion-icon {
    font-size: 1rem;
}

/* Card Footer */
.modern-card-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

/* Badge Styling */
.modern-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-badge-tv {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modern-badge-movie {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

/* Rating Display */
.modern-rating {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #fbbf24;
    font-weight: 700;
    font-size: 0.9rem;
}

.modern-rating ion-icon {
    font-size: 1.1rem;
}

.modern-rating span {
    color: var(--text-primary);
}

/* Watchlist Button */
.modern-watchlist-btn {
    margin-left: auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.modern-watchlist-btn:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
    transform: scale(1.1);
}

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

.modern-watchlist-btn ion-icon {
    font-size: 1.25rem;
}

/* Favorite Button (for movies) */
.modern-favorite-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.modern-favorite-btn:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: scale(1.1);
}

.modern-favorite-btn ion-icon {
    font-size: 1.25rem;
}

.modern-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.modern-card-year {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.modern-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.modern-card-btn {
    flex: 1;
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.modern-card-btn:hover {
    background: var(--primary-gradient);
    border-color: transparent;
}

.modern-card-btn.in-watchlist {
    background: var(--primary-gradient);
    border-color: transparent;
}

/* Loading Indicator */
.modern-loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.modern-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(102, 126, 234, 0.3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Empty State */
.modern-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

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

.modern-empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Load More Indicator */
.modern-load-more {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* User Rating Badge */
.modern-user-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid #667eea;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #a5b4fc;
}

/* Badge Styles */
.modern-badge {
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-badge-tv {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.modern-badge-movie {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .modern-page-container {
        padding: 1rem;
    }
    
    .modern-page-title {
        font-size: 2rem;
    }
    
    .modern-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modern-filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modern-select {
        width: 100%;
    }
}

/* CSS Override Protection - Prevent conflicts with old styles */
.modern-card {
    list-style: none !important;
    margin: 0 !important;
}

.modern-card * {
    box-sizing: border-box;
}

.modern-card a {
    text-decoration: none !important;
    color: inherit !important;
}

.modern-card img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Fix navbar overlap issue globally */
body:has(.modern-page-wrapper) {
    padding-top: 0 !important;
}

