/*
Theme Name: StreamFlix Enhanced
Theme URI: https://streamflix.com
Description: A modern streaming platform theme for WordPress with real-time TMDB integration, YouTube trailers, and YTS download support
Version: 2.0.0
Author: StreamFlix Team
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: streamflix
*/

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Netflix Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #000;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Netflix-like Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Font Awesome Icons */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    transition: all 0.3s ease;
    padding: 0 4%;
}

.site-header.scrolled {
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.main-navigation {
    max-width: 1400px;
    margin: 0 auto;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

/* Logo Styles */
.site-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #e50914;
    font-size: 2rem;
    font-weight: 800;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #e50914 0%, #f40612 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.logo-text {
    color: white;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    font-weight: 600;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #e50914;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Search and Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-trigger {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-trigger:hover {
    background: rgba(229,9,20,0.8);
    transform: scale(1.05);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255,255,255,0.1);
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 85vh;
    overflow: hidden;
    background: #000;
}

.hero-slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.05);
}

.hero-slide-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        rgba(0,0,0,0.8) 0%, 
        rgba(0,0,0,0.5) 40%,
        rgba(0,0,0,0.3) 70%,
        rgba(0,0,0,0.2) 100%
    );
}

.hero-slide-trailer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.active .hero-slide-trailer {
    opacity: 1;
}

.hero-slide-trailer iframe {
    width: 100%;
    height: 100%;
    transform: scale(1.5);
}

.hero-slide-content {
    position: absolute;
    bottom: 120px;
    left: 60px;
    right: 60px;
    z-index: 10;
    color: white;
}

.hero-slide-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.hero-slide-type {
    background: rgba(229,9,20,0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.hero-slide-rating {
    background: rgba(255,193,7,0.2);
    color: #FFC107;
    padding: 8px 12px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-slide-year {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    font-weight: 500;
}

.hero-slide-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.1;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-slide-overview {
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    margin-bottom: 40px;
    line-height: 1.5;
    max-width: 700px;
    color: rgba(255,255,255,0.9);
}

.hero-slide-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-slide-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.hero-slide-btn.primary {
    background: #e50914;
    color: white;
    box-shadow: 0 4px 20px rgba(229,9,20,0.4);
}

.hero-slide-btn.primary:hover {
    background: #f40612;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(229,9,20,0.5);
}

.hero-slide-btn.secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

.hero-slide-btn.secondary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-3px);
}

/* Hero Navigation */
.hero-prev, .hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-prev:hover, .hero-next:hover {
    background: rgba(229,9,20,0.9);
    transform: translateY(-50%) scale(1.1);
}

.hero-prev {
    left: 30px;
}

.hero-next {
    right: 30px;
}

/* Hero Indicators */
.hero-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 20;
}

.hero-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-indicator.active {
    width: 40px;
    border-radius: 5px;
    background: #e50914;
}

.hero-indicator:hover {
    background: rgba(255,255,255,0.7);
}

/* Sound Control */
.hero-sound-control {
    position: absolute;
    bottom: 120px;
    right: 30px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-sound-control:hover {
    background: rgba(229,9,20,0.9);
    transform: scale(1.1);
}

/* Content Rows */
.content-rows {
    position: relative;
    z-index: 10;
    background: #000;
    margin-top: -120px;
    padding-bottom: 80px;
}

.content-section {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 60px;
    margin-bottom: 25px;
}

.section-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.view-all-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
    padding: 10px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
}

.view-all-btn:hover {
    border-color: #e50914;
    color: #e50914;
    transform: translateY(-2px);
}

.media-row {
    display: flex;
    gap: 12px;
    padding: 0 60px;
    overflow-x: auto;
    scroll-behavior: smooth;
}

.media-row::-webkit-scrollbar {
    height: 8px;
}

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

.media-row::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
}

.media-row::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Media Cards */
.media-card {
    flex: 0 0 220px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
}

.media-card:hover {
    transform: scale(1.05);
    z-index: 5;
}

.media-card-image {
    width: 100%;
    height: 330px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-card:hover .media-card-image {
    transform: scale(1.1);
}

.media-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.media-card-title {
    color: white;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

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

.media-card-rating {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.8);
    color: #FFC107;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(10px);
}

.watchlist-indicator {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.8);
    color: #4CAF50;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: rgba(255,255,255,0.6);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top: 4px solid #e50914;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 20px;
}

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

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    display: none;
    backdrop-filter: blur(20px);
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.search-header h2 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
}

.search-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 2rem;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-close:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.search-input-container {
    position: relative;
    margin-bottom: 30px;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 1.4rem;
}

.search-input {
    width: 100%;
    padding: 20px 20px 20px 60px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    color: white;
    font-size: 1.2rem;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-input:focus {
    border-color: #e50914;
    background: rgba(255,255,255,0.15);
}

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

.search-clear {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-clear:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.search-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.filter-btn:hover,
.filter-btn.active {
    background: #e50914;
    border-color: #e50914;
    color: white;
    transform: translateY(-2px);
}

.search-results {
    max-height: 60vh;
    overflow-y: auto;
}

.trending-suggestions {
    margin-bottom: 40px;
}

.trending-suggestions h3 {
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.trending-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 12px;
}

.search-result-item:hover {
    background: rgba(255,255,255,0.05);
}

.search-result-image {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.search-result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-result-title {
    color: white;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.search-result-meta {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #e50914;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    z-index: 3000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 20px rgba(229,9,20,0.4);
    font-weight: 500;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    background: rgba(0,0,0,0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu .nav-link {
    display: block;
    padding: 20px 25px;
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 1.5rem;
    }
    
    .section-header {
        padding: 0 40px;
    }
    
    .media-row {
        padding: 0 40px;
    }
    
    .media-card {
        flex: 0 0 200px;
    }
    
    .media-card-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu {
        display: none;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .site-header {
        padding: 0 20px;
    }
    
    .nav-container {
        padding: 1rem 0;
    }
    
    .site-logo a {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
    
    .hero-slide-content {
        left: 30px;
        right: 30px;
        bottom: 80px;
    }
    
    .hero-slide-title {
        font-size: 2.5rem;
    }
    
    .hero-slide-overview {
        font-size: 1rem;
    }
    
    .section-header {
        padding: 0 30px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .media-row {
        padding: 0 30px;
    }
    
    .media-card {
        flex: 0 0 150px;
    }
    
    .media-card-image {
        height: 225px;
    }
    
    .hero-prev, .hero-next {
        width: 45px;
        height: 45px;
        font-size: 1.4rem;
    }
    
    .hero-prev {
        left: 15px;
    }
    
    .hero-next {
        right: 15px;
    }
    
    .hero-sound-control {
        width: 45px;
        height: 45px;
        right: 15px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.8rem 0;
    }
    
    .site-logo a {
        font-size: 1.3rem;
    }
    
    .logo-icon {
        width: 30px;
        height: 30px;
    }
    
    .hero-slide-content {
        left: 20px;
        right: 20px;
    }
    
    .hero-slide-title {
        font-size: 2rem;
    }
    
    .hero-slide-actions {
        gap: 10px;
    }
    
    .hero-slide-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .section-header {
        padding: 0 20px;
    }
    
    .media-row {
        padding: 0 20px;
    }
    
    .media-card {
        flex: 0 0 120px;
    }
    
    .media-card-image {
        height: 180px;
    }
    
    .search-container {
        padding: 40px 15px;
    }
    
    .search-header h2 {
        font-size: 2rem;
    }
    
    .search-input {
        font-size: 1rem;
        padding: 15px 15px 15px 50px;
    }
}

/* High DPI Optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-icon {
        box-shadow: 0 2px 8px rgba(229, 9, 20, 0.2);
    }
    
    .hero-slide-btn.primary {
        box-shadow: 0 2px 12px rgba(229, 9, 20, 0.3);
    }
}

/* Print Styles */
@media print {
    .site-header,
    .hero-slider,
    .search-overlay,
    .mobile-menu {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .content-rows {
        margin-top: 0;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-slide-image {
        transform: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #000;
        --text-primary: #fff;
        --accent: #e50914;
    }
}

/* Focus States for Accessibility */
.nav-link:focus,
.search-trigger:focus,
.hero-slide-btn:focus,
.media-card:focus {
    outline: 2px solid #e50914;
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Selection Color */
::selection {
    background: #e50914;
    color: white;
}

::-moz-selection {
    background: #e50914;
    color: white;
}