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

:root {
    --netflix-red: #E50914;
    --netflix-black: #141414;
    --netflix-gray: #2F2F2F;
    --text-primary: #FFFFFF;
    --text-secondary: #B3B3B3;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--netflix-black);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 10%, transparent);
    padding: 20px 4%;
    z-index: 100;
    transition: background 0.3s;
}

.navbar.scrolled {
    background: rgba(20, 20, 20, 0.95);
}

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

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--netflix-red);
    cursor: pointer;
}

.nav-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-box {
    padding: 8px 15px;
    border: 1px solid var(--netflix-gray);
    background: rgba(0,0,0,0.5);
    color: white;
    border-radius: 4px;
    outline: none;
    transition: all 0.3s;
}

.search-box:focus {
    background: rgba(0,0,0,0.8);
    border-color: white;
}

.admin-btn {
    padding: 8px 20px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.admin-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Hero Section */
.hero {
    position: relative;
    height: 70vh;
    background: linear-gradient(to right, rgba(0,0,0,0.8), transparent),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080"><rect fill="%23333" width="1920" height="1080"/></svg>');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 0 4%;
}

.hero-content {
    max-width: 500px;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.4;
}

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

.btn-play, .btn-info {
    padding: 12px 30px;
    font-size: 1.1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-play {
    background: white;
    color: black;
}

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

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

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

.hero-fade {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(transparent, var(--netflix-black));
}

/* Content Sections */
.content {
    position: relative;
    margin-top: -100px;
    z-index: 10;
    padding: 0 4%;
}

.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.video-card {
    background: var(--netflix-gray);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.video-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.play-overlay {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.video-info-card {
    padding: 15px;
}

.video-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-card-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.episode-badge {
    display: inline-block;
    background: var(--netflix-red);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    margin-right: 5px;
}

/* Video Player Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    width: 1200px;
    background: var(--netflix-gray);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1001;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.8);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1002;
    transition: background 0.3s;
}

.close-btn:hover {
    background: rgba(0,0,0,1);
}

.player-container video {
    width: 100%;
    max-height: 70vh;
    background: black;
}

.video-info {
    padding: 25px;
}

.video-info h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.video-info p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
}

.video-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Loading Spinner */
.spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.spinner.active {
    display: flex;
}

.spinner-circle {
    border: 4px solid rgba(255,255,255,0.1);
    border-top: 4px solid var(--netflix-red);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .hero {
        height: 50vh;
    }
}
