/**
 * StreamVault - Content Requests Page Styles
 * Premium cinematic styling that integrates with color theme system
 */

/* Page-specific header styles */
.requests-header {
    background: linear-gradient(135deg, 
        rgba(var(--primary-rgb), 0.1) 0%, 
        rgba(var(--secondary-rgb), 0.05) 50%, 
        rgba(var(--accent-rgb), 0.1) 100%
    );
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.browse-header {
    background: linear-gradient(135deg, 
        rgba(var(--primary-rgb), 0.1) 0%, 
        rgba(var(--secondary-rgb), 0.05) 50%, 
        rgba(var(--accent-rgb), 0.1) 100%
    );
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-header {
    background: linear-gradient(135deg, 
        rgba(var(--primary-rgb), 0.1) 0%, 
        rgba(var(--secondary-rgb), 0.05) 50%, 
        rgba(var(--accent-rgb), 0.1) 100%
    );
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.2);
}

.featured-header {
    background: linear-gradient(135deg, 
        rgba(var(--primary-rgb), 0.1) 0%, 
        rgba(var(--secondary-rgb), 0.05) 50%, 
        rgba(var(--accent-rgb), 0.1) 100%
    );
    border-bottom: 1px solid rgba(var(--secondary-rgb), 0.2);
}

.trending-header {
    background: linear-gradient(135deg, 
        rgba(var(--primary-rgb), 0.1) 0%, 
        rgba(var(--secondary-rgb), 0.05) 50%, 
        rgba(var(--accent-rgb), 0.1) 100%
    );
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.2);
}

/* Movie cards container */
#movies-grid {
    perspective: 1000px;
}

/* Enhanced movie card styling - Updated to match HTML classes */
.modern-card,
.movie-card {
    transform-style: preserve-3d;
    backdrop-filter: blur(10px);
    border: none !important;
    outline: none !important;
    position: relative;
    overflow: hidden;
}

.modern-card *,
.movie-card * {
    outline: none !important;
}

.modern-card:focus,
.movie-card:focus {
    outline: none !important;
    border: none !important;
}

/* Remove focus outlines from buttons and links */
.modern-card button,
.modern-card a,
.movie-card button,
.movie-card a {
    outline: none !important;
    border: none;
}

.modern-card button:focus,
.modern-card a:focus,
.movie-card button:focus,
.movie-card a:focus {
    outline: none !important;
    box-shadow: none !important;
}

.modern-card::before,
.movie-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(var(--primary-rgb), 0.6),
        rgba(var(--secondary-rgb), 0.6),
        rgba(var(--accent-rgb), 0.6)
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-card:hover::before,
.movie-card:hover::before {
    opacity: 1;
}

.modern-card:hover,
.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(var(--primary-rgb), 0.1);
}

/* Enhanced hover popup styling */
.modern-card .hover-popup-overlay {
    background: rgba(17, 24, 39, 0.95);
    border: none;
    backdrop-filter: blur(20px);
}

.modern-card:hover .hover-popup-overlay {
    box-shadow: 0 25px 50px -12px rgba(var(--primary-rgb), 0.15);
}

/* Button styling with theme colors */
.modern-card .play-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    transition: all 0.3s ease;
}

.modern-card .play-btn:hover {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.3);
}

.modern-card .info-btn:hover {
    background-color: rgba(var(--secondary-rgb), 0.2);
    border-color: rgba(var(--secondary-rgb), 0.3);
}

.modern-card .watchlist-btn {
    background-color: rgba(var(--secondary-rgb), 0.2);
    border: 1px solid rgba(var(--secondary-rgb), 0.3);
}

.modern-card .watchlist-btn:hover {
    background-color: rgba(var(--secondary-rgb), 0.3);
    border-color: var(--secondary);
}

/* Badge styling with theme colors */
.modern-card .rating-badge {
    background: rgba(var(--primary-rgb), 0.2);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
}

.modern-card .runtime-info {
    background: rgba(var(--primary-rgb), 0.8);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
}

.modern-card .type-badge {
    background: rgba(var(--primary-rgb), 0.2);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
}

/* Movie card interactive elements */
.modern-card .type-badge .text-accent,
.modern-card .type-badge .bg-accent {
    color: var(--primary);
    background-color: var(--primary);
}

.modern-card .runtime-info .text-secondary {
    color: var(--primary);
}

.modern-card .rating-badge .text-accent {
    color: var(--primary);
}

/* Hover popup elements */
.modern-card .hover-popup-overlay .text-accent {
    color: var(--primary);
}

.modern-card .hover-popup-overlay .bg-primary\/20 {
    background-color: rgba(var(--primary-rgb), 0.2);
}

.modern-card .hover-popup-overlay .border-primary\/30 {
    border-color: rgba(var(--primary-rgb), 0.3);
}

.modern-card .hover-popup-overlay .text-primary {
    color: var(--primary);
}

/* Button styling */
.modern-card .watchlist-btn.bg-accent\/20 {
    background-color: rgba(var(--primary-rgb), 0.2);
}

.modern-card .watchlist-btn.hover\:bg-accent\/30:hover {
    background-color: rgba(var(--primary-rgb), 0.3);
}

.modern-card .watchlist-btn.border-accent\/30 {
    border-color: rgba(var(--primary-rgb), 0.3);
}

.modern-card .watchlist-btn.hover\:border-accent:hover {
    border-color: var(--primary);
}

.modern-card .watchlist-btn .text-accent {
    color: var(--primary);
}

/* Poster image effects */
.movie-card img {
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.9) contrast(1.1);
}

.movie-card:hover img {
    filter: brightness(1.1) contrast(1.2) saturate(1.1);
}

/* Enhanced hover overlay */
.movie-card .absolute.inset-0 {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.7) 30%,
        rgba(0, 0, 0, 0.3) 60%,
        transparent 100%
    );
}

/* Watch Now button enhancements */
.movie-card .bg-gradient-to-r {
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.movie-card .bg-gradient-to-r::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.movie-card .bg-gradient-to-r:hover::before {
    left: 100%;
}

/* Badge styling enhancements */
.movie-card .bg-gradient-to-r.from-yellow-500,
.movie-card .bg-gradient-to-r.from-red-500,
.movie-card .bg-gradient-to-r.from-green-500 {
    animation: pulse 2s infinite;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
}

.movie-card .bg-gradient-to-r.from-red-500 {
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.movie-card .bg-gradient-to-r.from-green-500 {
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
}

/* Quality badge styling */
.movie-card .bg-black\/70 {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Navigation tabs styling */
.group.relative.px-6 {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.group.relative.px-6::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(var(--primary-rgb), 0.1),
        rgba(var(--secondary-rgb), 0.1),
        rgba(var(--accent-rgb), 0.1)
    );
    transition: width 0.3s ease;
}

.group.relative.px-6:hover::before {
    width: 100%;
}

/* Page title gradient text */
.bg-gradient-to-r.from-white {
    background-size: 200% 200%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .movie-card:hover {
        transform: translateY(-4px);
    }
    
    .movie-card {
        backdrop-filter: blur(5px);
    }
}

@media (max-width: 640px) {
    #movies-grid {
        gap: 0.75rem;
    }
    
    .movie-card:hover {
        transform: none;
        box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.2);
    }
}

/* Loading states */
.movie-card.loading {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.1) 25%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Enhanced scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg, 
        rgba(var(--primary-rgb), 0.6),
        rgba(var(--secondary-rgb), 0.6)
    );
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg, 
        rgba(var(--primary-rgb), 0.8),
        rgba(var(--secondary-rgb), 0.8)
    );
}

/* Focus states for accessibility - removed square outlines */
.modern-card:focus-within,
.movie-card:focus-within {
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.6);
}

.group.relative.px-6:focus {
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.6);
}

/* Action Buttons Styling with Theme Support */
.modern-card .watchlist-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.2s ease;
}

.modern-card .watchlist-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--primary);
}

.modern-card .watchlist-btn svg {
    color: var(--primary);
}

/* Rating Badge Theme Support */
.modern-card .rating-badge svg {
    color: var(--primary);
}

/* Type Badge Theme Support */  
.modern-card .type-badge {
    background: var(--primary);
    color: white;
}

.modern-card .type-badge .w-2 {
    background-color: var(--accent);
}

/* Runtime Info Theme Support */

/* Header Stats Cards - Compact version for right side */
.header-stat-card {
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(26,26,46,0.6) 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 1.5rem;
    min-width: 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 
        0 4px 20px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.header-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(var(--primary-rgb), 0.6),
        rgba(var(--secondary-rgb), 0.6),
        rgba(var(--accent-rgb), 0.6)
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.header-stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(var(--primary-rgb), 0.3);
    box-shadow: 
        0 8px 30px rgba(0,0,0,0.15),
        0 0 20px rgba(var(--primary-rgb), 0.1);
}

.header-stat-card:hover::before {
    opacity: 1;
}

.header-stat-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, 
        rgba(var(--primary-rgb), 0.2), 
        rgba(var(--secondary-rgb), 0.1)
    );
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: rgba(var(--primary-rgb), 1);
    transition: all 0.3s ease;
}

.header-stat-card:hover .header-stat-icon {
    background: linear-gradient(135deg, 
        rgba(var(--primary-rgb), 0.3), 
        rgba(var(--secondary-rgb), 0.2)
    );
    border-color: rgba(var(--primary-rgb), 0.5);
    color: #fff;
}

.header-stat-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    background: linear-gradient(135deg, #fff 0%, rgba(var(--primary-rgb), 1) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

.header-stat-content p {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-stat-card:hover .header-stat-content p {
    color: rgba(255,255,255,0.9);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-overlay.hidden {
    display: none;
}

.modal-container {
    background: linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(26,26,46,0.8) 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

.modal-header {
    padding: 2rem 2rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.modal-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 1rem;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(var(--primary-rgb), 0.5);
    background: rgba(0,0,0,0.7);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.4);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 1), rgba(var(--secondary-rgb), 1));
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.3);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
}

/* Request-specific styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-movie {
    background: rgba(99, 102, 241, 0.2);
    color: rgb(165, 180, 252);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-tv_show {
    background: rgba(16, 185, 129, 0.2);
    color: rgb(110, 231, 183);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-anime {
    background: rgba(251, 146, 60, 0.2);
    color: rgb(253, 186, 116);
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.badge-primary {
    background: rgba(var(--primary-rgb), 0.2);
    color: rgba(var(--primary-rgb), 1);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: rgb(252, 211, 77);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: rgb(110, 231, 183);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: rgb(252, 165, 165);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-secondary {
    background: rgba(156, 163, 175, 0.2);
    color: rgb(209, 213, 219);
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.vote-btn:hover {
    transform: scale(1.05);
}

/* Responsive adjustments for header stats */
@media (max-width: 768px) {
    .header-stat-card {
        min-width: 100px;
        padding: 1rem;
    }
    
    .header-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .header-stat-content h3 {
        font-size: 1.25rem;
    }
}
.modern-card .runtime-info {
    background: rgba(var(--primary-rgb), 0.8);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.modern-card .runtime-info svg {
    color: var(--accent);
}
