/* Netflix-style Movies Page CSS */
/* Responsive and mobile-friendly design */

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

body {
    font-family: 'Arial', sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
}

/* Back to Home Link */
.back-to-home {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    color: #fff;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.back-to-home:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateX(-5px);
}

/* Movies Container */
.movies-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
}

/* Header */
.movies-header {
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, transparent 100%);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.movies-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.movies-logo {
    font-size: 24px;
    font-weight: bold;
    color: #e50914;
}

.movies-nav-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.movies-nav-links a {
    color: #fff;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.movies-nav-links a:hover,
.movies-nav-links a.active {
    background: #e50914;
    color: #fff;
}

/* Hero Section */
.hero-section {
    height: 60vh;
    min-height: 400px;
    background: linear-gradient(135deg, #e50914 0%, #b2070e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 40px;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 20px;
    font-weight: bold;
}

.hero-description {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-btn.primary {
    background: #fff;
    color: #000;
}

.hero-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid #fff;
}

.hero-btn:hover {
    transform: scale(1.05);
}

/* Movies Content */
.movies-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Category Section */
.category-section {
    margin-bottom: 40px;
}

.category-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 20px;
    color: #fff;
    font-weight: bold;
}

/* Movie Grid */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* Movie Card */
.movie-card {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    aspect-ratio: 2/3;
}

.movie-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.movie-poster {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

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

.movie-card:hover .movie-poster img {
    transform: scale(1.1);
}

.movie-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.movie-card:hover .movie-overlay {
    transform: translateY(0);
}

.movie-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #fff;
}

.play-button {
    background: #e50914;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.play-button:hover {
    background: #b2070e;
}

/* Responsive Design */
@media (max-width: 768px) {
    .movies-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .movies-nav-links {
        justify-content: center;
        gap: 10px;
    }
    
    .movies-nav-links a {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .hero-section {
        height: 50vh;
        min-height: 300px;
        padding: 20px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btn {
        width: 200px;
        justify-content: center;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .movie-overlay {
        padding: 15px;
    }
    
    .movie-title {
        font-size: 14px;
    }
    
    .play-button {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .back-to-home {
        top: 10px;
        left: 10px;
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .movies-nav-links {
        gap: 5px;
    }
    
    .movies-nav-links a {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .hero-section {
        height: 40vh;
        min-height: 250px;
        padding: 15px;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .movie-overlay {
        padding: 10px;
    }
    
    .movie-title {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .play-button {
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) {
    .movie-card:hover {
        transform: none;
    }
    
    .movie-card:hover .movie-overlay {
        transform: translateY(0);
    }
    
    .movie-overlay {
        transform: translateY(0);
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    }
}

/* Loading state */
.movie-card.loading {
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Accessibility improvements */
.movie-card:focus {
    outline: 2px solid #e50914;
    outline-offset: 2px;
}

.play-button:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .movie-card {
        border: 2px solid #fff;
    }
    
    .movie-overlay {
        background: rgba(0, 0, 0, 0.95);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .movie-card,
    .movie-poster img,
    .movie-overlay,
    .hero-btn {
        transition: none;
    }
    
    .movie-card:hover {
        transform: none;
    }
    
    .movie-card:hover .movie-poster img {
        transform: none;
    }
    
    .movie-card:hover .movie-overlay {
        transform: translateY(0);
    }
}

/* Mobile-specific improvements for movie player */
@media (max-width: 768px) {
    .movies-nav {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }

    .movies-nav-links {
        gap: 10px;
        justify-content: center;
    }

    .movies-nav-links a {
        padding: 10px 15px;
        font-size: 16px;
        min-width: 80px;
        text-align: center;
    }

    .hero-section {
        height: 50vh;
        min-height: 300px;
        padding: 20px 15px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .hero-btn {
        padding: 15px 30px;
        font-size: 16px;
        min-width: 200px;
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
        padding: 0 15px;
    }

    .movie-overlay {
        opacity: 1;
        background: rgba(0, 0, 0, 0.8);
    }

    .movie-title {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .play-button {
        padding: 12px 20px;
        font-size: 16px;
        min-width: 80px;
        min-height: 44px;
    }

    /* Mobile movie card improvements */
    .movie-card {
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .movie-card:active {
        transform: scale(0.95);
    }

    /* Mobile video player modal improvements */
    #video-player-modal {
        padding: 0 !important;
    }

    #video-player-modal > div {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
    }

    /* Mobile-friendly close button */
    #video-player-modal button {
        min-width: 44px;
        min-height: 44px;
        border-radius: 50%;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }

    /* Mobile video controls */
    .mobile-video-controls {
        opacity: 1 !important;
        pointer-events: auto !important;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    }

    .mobile-video-controls button {
        min-width: 50px;
        min-height: 50px;
        font-size: 20px;
        margin: 0 5px;
    }
}

@media (max-width: 480px) {
    .back-to-home {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
        font-size: 12px;
        background: rgba(0, 0, 0, 0.8);
    }

    .movies-nav-links {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .movies-nav-links a {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 70px;
    }

    .hero-section {
        height: 40vh;
        min-height: 250px;
        padding: 15px 10px;
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
        padding: 0 10px;
    }

    .movie-overlay {
        padding: 10px;
    }

    .movie-title {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .play-button {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 70px;
        min-height: 40px;
    }

    /* Extra small screen optimizations */
    .hero-title {
        font-size: 24px;
    }

    .hero-description {
        font-size: 14px;
        line-height: 1.4;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .movie-card:hover {
        transform: none;
    }

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

    .movie-overlay {
        opacity: 1;
        background: rgba(0, 0, 0, 0.8);
        transition: none;
    }

    /* Touch-friendly movie cards */
    .movie-card {
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
        touch-action: manipulation;
    }

    .movie-card:active {
        transform: scale(0.98);
    }

    /* Touch-friendly buttons */
    .play-button,
    .hero-btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .play-button:active,
    .hero-btn:active {
        transform: scale(0.95);
    }
}

/* Mobile video player specific styles */
.mobile-video-player {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
}

.mobile-video-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mobile-video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-video-controls button {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-video-controls button:active {
    transform: scale(0.9);
}

/* Loading state for mobile */
.movie-card.loading {
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Focus states for accessibility */
.movie-card:focus {
    outline: 2px solid #e50914;
    outline-offset: 2px;
}

.play-button:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .movie-card {
        border: 2px solid #fff;
    }

    .movie-overlay {
        background: rgba(0, 0, 0, 0.9);
        border: 1px solid #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .movie-card,
    .movie-poster img,
    .movie-overlay {
        transition: none;
    }

    .movie-card:hover {
        transform: none;
    }

    .movie-card:hover .movie-poster img {
        transform: none;
    }

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

 