/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    background-color: #141414;
    color: #fff;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: #fff;
}

button {
    cursor: pointer;
    outline: none;
    border: none;
}

ul {
    list-style: none;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 60px;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    transition: background-color 0.3s;
}

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

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

.left-container {
    display: flex;
    align-items: center;
}

.netflix-logo {
    height: 30px;
    margin-right: 40px;
}

.navigation {
    display: flex;
}

.navigation li {
    margin-right: 20px;
}

.navigation a {
    font-size: 14px;
    transition: color 0.3s;
}

.navigation a:hover, .navigation a.active {
    color: #b3b3b3;
}

.right-container {
    display: flex;
    align-items: center;
}

.right-container i {
    margin-right: 20px;
    font-size: 20px;
    cursor: pointer;
}

.profile-icon {
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
}

/* Hero Section Styles */
.hero {
    position: relative;
    height: 80vh;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('../images/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.hero-content {
    position: relative;
    left: 60px;
    width: 40%;
    z-index: 10;
}

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

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    align-items: center;
}

.play-button, .more-info-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 25px;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-right: 10px;
}

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

.play-button:hover {
    background-color: rgba(255, 255, 255, 0.75);
}

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

.more-info-button:hover {
    background-color: rgba(109, 109, 110, 0.4);
}

.hero-buttons i {
    margin-right: 10px;
}

.hero-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        rgba(20, 20, 20, 1) 0%,
        rgba(20, 20, 20, 0) 60%,
        rgba(20, 20, 20, 0.2) 100%
    );
}

/* Movie Rows Styles */
.movies-container {
    padding: 0 60px;
    margin-top: 20px;
}

.movie-category {
    margin-bottom: 40px;
}

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

.movie-row {
    position: relative;
    display: flex;
    align-items: center;
}

.row-left-arrow, .row-right-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    width: 50px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s, background-color 0.3s;
}

.row-left-arrow {
    left: -50px;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.row-right-arrow {
    right: -50px;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.movie-row:hover .row-left-arrow,
.movie-row:hover .row-right-arrow {
    opacity: 1;
}

.row-left-arrow:hover, .row-right-arrow:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.row-left-arrow i, .row-right-arrow i {
    font-size: 2rem;
}

.movie-slider {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding: 20px 0;
    width: 100%;
}

.movie-card {
    flex: 0 0 auto;
    width: 16.666%;
    padding: 0 5px;
    position: relative;
    transition: transform 0.3s, z-index 0.3s;
    z-index: 1;
}

.movie-card:hover {
    transform: scale(1.5);
    z-index: 10;
}

.movie-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    transition: border-radius 0.3s;
    background-color: #333;
}

.movie-card:hover img {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.movie-info {
    background-color: #181818;
    padding: 15px;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.3s, transform 0.3s;
    position: absolute;
    width: 100%;
    left: 0;
}

.movie-card:hover .movie-info {
    opacity: 1;
    transform: translateY(0);
}

.movie-info h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-controls {
    display: flex;
    margin-bottom: 10px;
}

.movie-controls button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #2a2a2a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    border: 2px solid #636363;
    transition: background-color 0.3s, border-color 0.3s;
}

.movie-controls button:hover {
    background-color: #000;
    border-color: #fff;
}

.movie-controls button:first-child {
    background-color: #fff;
    color: #000;
    border: none;
}

.movie-controls button:first-child:hover {
    background-color: rgba(255, 255, 255, 0.75);
}

.movie-details {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: 0.8rem;
}

.match {
    color: #46d369;
    font-weight: 600;
    margin-right: 10px;
}

.rating {
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 1px 4px;
    margin-right: 10px;
}

.duration {
    margin-right: 10px;
}

.movie-genres {
    display: flex;
    flex-wrap: wrap;
    font-size: 0.8rem;
}

.movie-genres span {
    margin-right: 10px;
    position: relative;
}

.movie-genres span:not(:last-child)::after {
    content: "•";
    position: absolute;
    right: -7px;
}

/* Progress Bar for Continue Watching */
.progress-bar {
    height: 4px;
    background-color: #4d4d4d;
    position: relative;
    margin-top: -4px;
    z-index: 2;
}

.progress {
    height: 100%;
    background-color: #e50914;
}

/* Footer Styles */
.footer {
    padding: 70px 60px 20px;
    color: #808080;
    margin-top: 50px;
}

.footer-container {
    max-width: 980px;
    margin: 0 auto;
}

.social-links {
    display: flex;
    margin-bottom: 20px;
}

.social-links a {
    margin-right: 25px;
    font-size: 1.5rem;
    color: #808080;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #fff;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-links-column {
    width: 25%;
    margin-bottom: 20px;
}

.footer-links-column a {
    display: block;
    margin-bottom: 15px;
    font-size: 0.8rem;
    color: #808080;
    transition: color 0.3s;
}

.footer-links-column a:hover {
    color: #fff;
}

.service-code {
    background: transparent;
    color: #808080;
    border: 1px solid #808080;
    padding: 8px 12px;
    font-size: 0.8rem;
    margin-bottom: 20px;
    transition: color 0.3s, border-color 0.3s;
}

.service-code:hover {
    color: #fff;
    border-color: #fff;
}

.copyright {
    font-size: 0.8rem;
}

/* Movie Modal Styles */
.movie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.movie-modal.show {
    display: flex;
}

.modal-content {
    background-color: #181818;
    width: 850px;
    max-width: 90%;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    margin: 40px 0;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #181818;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-size: 1.5rem;
    transition: background-color 0.3s;
}

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

.modal-hero {
    position: relative;
    height: 500px;
}

.modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-hero-content {
    position: absolute;
    bottom: 30px;
    left: 40px;
    z-index: 5;
}

.modal-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    align-items: center;
}

.modal-buttons button {
    margin-right: 10px;
}

.modal-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        #181818 0%,
        transparent 60%,
        rgba(0, 0, 0, 0.4) 100%
    );
}

.modal-info {
    padding: 30px 40px;
    display: flex;
}

.modal-details {
    flex: 2;
    margin-right: 20px;
}

.modal-metadata {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.modal-metadata span {
    margin-right: 10px;
}

.year, .quality {
    font-weight: 600;
}

.modal-description {
    line-height: 1.6;
    font-size: 1.1rem;
}

.modal-cast {
    flex: 1;
    font-size: 0.9rem;
    color: #999;
}

.modal-cast p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.modal-cast span {
    color: #999;
    font-weight: 600;
}

.modal-episodes {
    padding: 20px 40px;
    border-top: 1px solid #333;
}

.modal-episodes h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.season-selector {
    margin-bottom: 20px;
}

.season-selector select {
    background-color: #000;
    color: #fff;
    padding: 10px 20px;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 1rem;
}

.episode-list {
    display: flex;
    flex-direction: column;
}

.episode {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.episode-number {
    font-size: 1.5rem;
    color: #999;
    margin-right: 20px;
    padding-top: 10px;
}

.episode-details {
    display: flex;
    flex: 1;
}

.episode-image {
    position: relative;
    width: 130px;
    height: 80px;
    margin-right: 20px;
    flex-shrink: 0;
}

.episode-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.play-episode {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s, background-color 0.3s;
}

.episode-image:hover .play-episode {
    opacity: 1;
}

.play-episode:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.episode-info {
    flex: 1;
}

.episode-title-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.episode-title-row h4 {
    font-size: 1.1rem;
}

.episode-duration {
    color: #999;
}

.episode-description {
    color: #999;
    line-height: 1.5;
    font-size: 0.9rem;
}

.modal-similar {
    padding: 20px 40px 40px;
    border-top: 1px solid #333;
}

.modal-similar h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.similar-card {
    background-color: #2f2f2f;
    border-radius: 4px;
    overflow: hidden;
}

.similar-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.similar-info {
    padding: 15px;
}

.similar-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.similar-title-row h4 {
    font-size: 1rem;
}

.similar-metadata {
    display: flex;
    margin-bottom: 10px;
}

.similar-metadata span {
    margin-right: 10px;
    font-size: 0.8rem;
}

.similar-description {
    font-size: 0.9rem;
    color: #999;
    line-height: 1.5;
}

/* Video Player Styles */
.video-player-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-player {
    width: 90%;
    max-width: 1200px;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #181818;
}

.video-header h2 {
    color: #fff;
    font-size: 1.5rem;
}

.close-video {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #333;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background-color 0.3s;
}

.close-video:hover {
    background-color: #555;
}

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

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

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent 60%, rgba(0,0,0,0.8) 100%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    pointer-events: none;
}

.video-info h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.video-info p {
    color: #ccc;
    font-size: 1rem;
}

.video-controls-custom {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: #181818;
    gap: 15px;
}

.video-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #333;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.video-btn:hover {
    background-color: #555;
}

.progress-container {
    flex: 1;
    height: 6px;
    background-color: #333;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress-bar-video {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #e50914;
    width: 0%;
    transition: width 0.1s;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background-color: #181818;
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    border-left: 4px solid #46d369;
}

.notification.info {
    border-left: 4px solid #0099ff;
}

.notification i {
    font-size: 1.2rem;
}

.notification.success i {
    color: #46d369;
}

.notification.info i {
    color: #0099ff;
}

/* Button States */
.movie-controls button.liked {
    background-color: #46d369;
    border-color: #46d369;
}

.movie-controls button.in-list {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

.modal-buttons button.liked {
    background-color: #46d369;
    border-color: #46d369;
}

/* Improved Movie Card Hover */
.movie-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.movie-card:hover {
    transform: scale(1.5);
    z-index: 10;
}

.movie-slider {
    transition: transform 0.3s ease;
}

/* Mobile Video Player */
@media (max-width: 768px) {
    .video-player {
        width: 95%;
        margin: 20px;
    }
    
    .video-header {
        padding: 15px;
    }
    
    .video-header h2 {
        font-size: 1.2rem;
    }
    
    .video-controls-custom {
        padding: 10px 15px;
        gap: 10px;
    }
    
    .video-btn {
        width: 35px;
        height: 35px;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .movie-card {
        width: 20%;
    }
    
    .similar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .header {
        padding: 15px 30px;
    }
    
    .movies-container {
        padding: 0 30px;
    }
    
    .hero-content {
        left: 30px;
        width: 60%;
    }
    
    .movie-card {
        width: 25%;
    }
    
    .footer {
        padding: 50px 30px 20px;
    }
    
    .footer-links-column {
        width: 33.333%;
    }
    
    .modal-hero {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .netflix-logo {
        margin-right: 20px;
    }
    
    .navigation li {
        margin-right: 15px;
    }
    
    .navigation a {
        font-size: 12px;
    }
    
    .hero-content {
        width: 80%;
        bottom: 30%;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .movie-card {
        width: 33.333%;
    }
    
    .footer-links-column {
        width: 50%;
    }
    
    .similar-grid {
        grid-template-columns: 1fr;
    }
    
    .episode-details {
        flex-direction: column;
    }
    
    .episode-image {
        width: 100%;
        height: 150px;
        margin-right: 0;
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .header {
        padding: 10px 20px;
    }
    
    .netflix-logo {
        height: 24px;
    }
    
    .navigation {
        display: none;
    }
    
    .movies-container {
        padding: 0 20px;
    }
    
    .hero {
        height: 60vh;
    }
    
    .hero-content {
        left: 20px;
        bottom: 25%;
        width: 90%;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .play-button, .more-info-button {
        width: 100%;
        margin-bottom: 10px;
        justify-content: center;
    }
    
    .movie-card {
        width: 50%;
    }
    
    .movie-card:hover {
        transform: scale(1.2);
    }
    
    .footer {
        padding: 40px 20px 20px;
    }
    
    .footer-links-column {
        width: 100%;
    }
    
    .modal-info {
        flex-direction: column;
    }
    
    .modal-details {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .modal-hero {
        height: 300px;
    }
    
    .modal-title {
        font-size: 2rem;
    }
}