/* Netflix-style Media Player CSS */

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

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #141414;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    display: flex;
    align-items: center;
    padding: 0 4%;
    z-index: 100;
    transition: background-color 0.3s ease;
}

.header.scrolled {
    background-color: #141414;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #e50914;
    letter-spacing: -1px;
}

/* Main Content */
.main-content {
    padding-top: 68px;
}

/* Featured Hero Section */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    background: linear-gradient(to bottom, transparent 0%, #141414 100%);
    overflow: hidden;
}

.hero-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.hero-content {
    position: absolute;
    bottom: 20%;
    left: 4%;
    max-width: 500px;
    z-index: 10;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-play:hover {
    background-color: rgba(255,255,255,0.8);
}

.btn-info {
    background-color: rgba(109,109,110,0.7);
    color: #fff;
}

.btn-info:hover {
    background-color: rgba(109,109,110,0.5);
}

.btn svg {
    width: 24px;
    height: 24px;
}

/* Video Rows */
.video-section {
    padding: 0 4%;
    margin-top: -100px;
    position: relative;
    z-index: 20;
}

.row {
    margin-bottom: 3rem;
}

.row-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.row-content {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 10px;
}

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

.row-content::-webkit-scrollbar-track {
    background: transparent;
}

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

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

/* Video Cards */
.video-card {
    flex: 0 0 auto;
    width: 250px;
    cursor: pointer;
    transition: transform 0.3s ease, z-index 0s 0.3s;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.video-card:hover {
    transform: scale(1.3);
    z-index: 50;
    transition: transform 0.3s ease, z-index 0s;
}

.video-card-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background-color: #333;
}

.video-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .video-card-info {
    opacity: 1;
}

.video-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.video-card-meta {
    font-size: 0.75rem;
    color: #46d369;
}

.video-card-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.video-card-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background: rgba(0,0,0,0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-card-btn:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.1);
}

.video-card-btn.play-btn {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.video-card-btn svg {
    width: 16px;
    height: 16px;
}

/* Modal Player */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 90%;
    max-width: 1200px;
    background: #181818;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #181818;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: #333;
}

.modal-close svg {
    width: 24px;
    height: 24px;
}

.player-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

.player-container video {
    width: 100%;
    height: 100%;
}

.modal-info {
    padding: 2rem;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.modal-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.modal-meta .match {
    color: #46d369;
    font-weight: 600;
}

.modal-meta .year,
.modal-meta .duration,
.modal-meta .quality {
    color: #aaa;
}

.modal-meta .quality {
    border: 1px solid #aaa;
    padding: 0 0.4rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

.modal-description {
    font-size: 1rem;
    line-height: 1.5;
    color: #ddd;
}

/* Loading Spinner */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #e50914;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 1200px) {
    .video-card {
        width: 200px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero-content {
        bottom: 15%;
        left: 5%;
        right: 5%;
        max-width: none;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .video-card {
        width: 150px;
    }
    
    .video-card:hover {
        transform: scale(1.1);
    }
    
    .row-title {
        font-size: 1.1rem;
    }
    
    .modal-content {
        width: 95%;
    }
}

/* Video.js Override Styles */
.video-js {
    width: 100%;
    height: 100%;
}

.video-js .vjs-big-play-button {
    background-color: rgba(229, 9, 20, 0.9);
    border: none;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    line-height: 80px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.video-js:hover .vjs-big-play-button {
    background-color: #e50914;
}

.video-js .vjs-control-bar {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    height: 50px;
}

.video-js .vjs-play-progress {
    background-color: #e50914;
}

.video-js .vjs-slider {
    background: rgba(255,255,255,0.3);
}
