/* ===== NETFLIX-STYLE GALERI FILM ===== */

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

:root {
    --netflix-red: #e50914;
    --netflix-black: #141414;
    --netflix-gray: #2f2f2f;
    --netflix-light-gray: #808080;
    --text-white: #ffffff;
    --text-gray: #d2d2d2;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--netflix-black);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    padding: 20px 4%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s ease;
}

.header.scrolled {
    background: var(--netflix-black);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--netflix-red);
    text-decoration: none;
    letter-spacing: 2px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-size: 14px;
    color: var(--text-gray);
}

.logout-btn {
    background: transparent;
    border: 1px solid var(--text-gray);
    color: var(--text-gray);
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    border-color: var(--text-white);
    color: var(--text-white);
}

/* ===== HERO SLIDER ===== */
.hero-slider {
    position: relative;
    height: 75vh;
    margin-top: 60px;
    overflow: hidden;
}

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

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}

.slider-slide.active {
    opacity: 1;
    z-index: 1;
}

.slider-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.8) 100%),
                linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.9) 100%);
}

.slider-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 4%;
    max-width: 1400px;
    margin: 0 auto;
}

.slider-info {
    max-width: 600px;
}

.slider-badge {
    display: inline-block;
    background: var(--netflix-red);
    color: var(--text-white);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.slider-title {
    font-size: 56px;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 12px rgba(0,0,0,0.9);
    line-height: 1.2;
}

.slider-meta {
    display: flex;
    gap: 15px;
    font-size: 16px;
    color: var(--text-gray);
    margin-bottom: 20px;
    align-items: center;
}

.slider-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.slider-description {
    font-size: 18px;
    color: var(--text-gray);
    margin-bottom: 30px;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: var(--text-white);
    color: var(--netflix-black);
}

.btn-primary:hover {
    background: var(--text-gray);
}

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

.btn-secondary:hover {
    background: rgba(109, 109, 110, 0.4);
}

/* ===== SLIDER CONTROLS ===== */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn-prev {
    left: 20px;
}

.slider-btn-next {
    right: 20px;
}

.slider-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.slider-dot.active {
    background: var(--netflix-red);
    width: 30px;
    border-radius: 6px;
}

/* ===== FILTERS ===== */
.filters-section {
    padding: 30px 4%;
    background: var(--netflix-gray);
    position: sticky;
    top: 60px;
    z-index: 999;
}

.filters-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 600;
}

.filter-select {
    background: var(--netflix-black);
    color: var(--text-white);
    border: 1px solid var(--netflix-light-gray);
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
    transition: border-color 0.3s ease;
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--text-white);
    outline: none;
}

.search-box {
    background: var(--netflix-black);
    color: var(--text-white);
    border: 1px solid var(--netflix-light-gray);
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    flex: 1;
    max-width: 300px;
    transition: border-color 0.3s ease;
}

.search-box:focus {
    border-color: var(--text-white);
    outline: none;
}

.reset-btn {
    background: var(--netflix-red);
    color: var(--text-white);
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.reset-btn:hover {
    background: #b20710;
}

/* ===== FILMS GRID ===== */
.films-section {
    padding: 40px 4%;
    min-height: 60vh;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-white);
}

.films-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== FILM CARD ===== */
.film-card {
    background: var(--netflix-gray);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.film-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    z-index: 10;
}

.film-poster {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.film-info {
    padding: 15px;
}

.film-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.film-meta {
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.film-genres {
    font-size: 13px;
    color: var(--netflix-light-gray);
    margin-bottom: 10px;
}

.film-synopsis {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.film-hover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.play-btn {
    background: var(--text-white);
    color: var(--netflix-black);
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease;
}

.play-btn:hover {
    background: var(--text-gray);
}

/* ===== MODAL PLAYER ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--netflix-black);
    border-radius: 8px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.8);
    color: var(--text-white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: var(--netflix-red);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.watermark {
    position: absolute;
    top: 15px;
    right: 60px;
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    pointer-events: none;
    z-index: 5;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.modal-details {
    padding: 30px;
}

.modal-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
}

.modal-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.modal-synopsis {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 30px;
}

.cast-crew-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.cast-list,
.crew-list {
    background: var(--netflix-gray);
    padding: 20px;
    border-radius: 8px;
}

.cast-list h3,
.crew-list h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--netflix-red);
}

.cast-item,
.crew-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
}

.cast-item:last-child,
.crew-item:last-child {
    border-bottom: none;
}

.cast-name,
.crew-name {
    font-weight: 600;
    color: var(--text-white);
}

.cast-role,
.crew-role {
    color: var(--text-gray);
    font-size: 13px;
}

/* ===== NO RESULTS ===== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-gray);
}

.no-results h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* ===== LOADING ===== */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: var(--text-gray);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--netflix-gray);
    padding: 30px 4%;
    text-align: center;
    color: var(--text-gray);
    font-size: 14px;
    margin-top: 60px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .slider-title {
        font-size: 42px;
    }
    
    .slider-description {
        font-size: 16px;
    }
    
    .films-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .cast-crew-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        height: 60vh;
    }
    
    .slider-title {
        font-size: 32px;
    }
    
    .slider-description {
        font-size: 14px;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .slider-btn-prev {
        left: 10px;
    }
    
    .slider-btn-next {
        right: 10px;
    }
    
    .films-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .film-poster {
        height: 250px;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select,
    .search-box {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 50vh;
    }
    
    .slider-title {
        font-size: 24px;
    }
    
    .slider-meta {
        font-size: 14px;
    }
    
    .slider-buttons {
        flex-direction: column;
    }
    
    .slider-btn {
        display: none;
    }
    
    .films-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-title {
        font-size: 24px;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--netflix-black);
}

::-webkit-scrollbar-thumb {
    background: var(--netflix-gray);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--netflix-light-gray);
}
