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

body {
    background-color: #111;
    color: #fff;
}

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

/* Loading Indicator */
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 9998;
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

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

.loading-indicator p {
    color: #999;
    font-size: 14px;
}

/* Header and Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    padding: 20px 40px;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

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

.header-suggest {
    flex: 1;
    text-align: center;
    font-size: 16px;
    color: #fff;
    padding: 0 20px;
    font-weight: 500;
}

.header-suggest a {
    color: #e50914;
    text-decoration: underline;
    font-weight: bold;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Add this to allow the middle item to grow */
    width: 100%;
}

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

.search-box {
    display: flex;
    align-items: center;
}

.search {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 200px;
}

.search:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.search i {
    margin-right: 10px;
    color: #aaa;
}

.search-text {
    color: #aaa;
    font-size: 14px;
}

.search-input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    width: 100%;
    outline: none;
}

.search-input::placeholder {
    color: #aaa;
}

/* Hero Section */
.hero {
    height: 80vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 0 40px;
    position: relative;
}

.hero::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) 60%),
                linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%);
}

.hero-content {
    position: relative;
    max-width: 500px;
    margin-bottom: 80px;
    z-index: 1;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.5;
    text-shadow: 0 2px 12px rgba(0,0,0,0.7), 0 1px 2px rgba(0,0,0,0.5);
}

.movie-logo {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    max-height: 200px;
}

.buttons {
    display: flex;
    gap: 10px;
}

.play-btn, .more-info-btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.play-btn {
    background-color: #fff;
    color: #000;
    border: none;
    text-decoration: none;
}

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

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

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

/* Content Sections */
.content-section {
    padding: 40px;
    position: relative;
    z-index: 1;
}

.content-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

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

.movie-row {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    padding-top: 10px;
    position: relative;
    scroll-behavior: smooth;
    -ms-overflow-style: none;  /* Hide scrollbar for IE and Edge */
    scrollbar-width: none;     /* Hide scrollbar for Firefox */
    width: 100%;
}

.movie-row::-webkit-scrollbar {
    display: none;  /* Hide scrollbar for Chrome, Safari and Opera */
}

.nav-btn {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;  /* Increased z-index to be higher than movie cards */
    transition: all 0.3s ease;
    opacity: 0;  /* Hide buttons by default */
}

.nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.movie-row-container:hover .nav-btn {
    opacity: 1;  /* Show buttons when hovering over container */
}

.nav-btn-hidden {
    opacity: 0 !important;
    pointer-events: none;
}

.nav-btn-left {
    left: 10px;
}

.nav-btn-right {
    right: 10px;
}

.nav-btn i {
    font-size: 20px;
}

.movie-card {
    flex: 0 0 320px;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    margin: 10px;
    z-index: 1;
}

.movie-card .ribbon {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #e50914;
    color: white;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.movie-card:hover {
    transform: scale(1.08);
    z-index: 10;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.movie-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    aspect-ratio: 16/9;
    background: #222;
    display: block;
    opacity: 1;
}

/* Blur-up placeholder effect */
.movie-card img[data-src] {
    filter: blur(8px);
    opacity: 0.7;
}

/* Image fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.movie-card img:not([data-src]) {
    animation: fadeIn 0.3s ease-in;
}

/* Movie title overlay - shows on hover */
.movie-card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.3));
    color: white;
    padding: 15px 10px 10px 10px;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

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

.coming-soon {
    background-color: #333;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    text-align: center;
}

.placeholder-content i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #e50914;
}

.placeholder-content p {
    font-size: 14px;
    color: #aaa;
}

/* Footer */
footer {
    background-color: #000;
    color: #aaa;
    padding: 40px;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.footer-logo h2 {
    color: #e50914;
    font-size: 20px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 12px;
}

/* Modal */
.movie-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    justify-content: center;
    align-items: flex-start;
}

.movie-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #181818;
    margin: 5% auto;
    width: 80%;
    max-width: 900px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    transform: translateY(-30px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.movie-modal.show .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
    z-index: 2001;
    opacity: 0;
    transform: rotate(-90deg);
    transition: opacity 0.3s ease 0.2s, transform 0.3s ease 0.2s;
}

.movie-modal.show .close-btn {
    opacity: 1;
    transform: rotate(0);
}

.close-btn:hover {
    color: #e50914;
}

.modal-banner {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.modal-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to top, #181818, transparent);
}

.modal-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.modal-info {
    padding: 30px;
}

.modal-info h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.movie-details {
    color: #aaa;
    margin-bottom: 20px;
}

.movie-description {
    line-height: 1.6;
    margin-bottom: 30px;
}

.movie-genres h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #e50914;
}

.movie-genres p {
    color: #aaa;
    margin-bottom: 30px;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.modal-play-btn {
    font-size: 18px;
    padding: 12px 30px;
    background-color: #e50914;
    color: white;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.modal-play-btn:hover {
    background-color: #f40612;
    transform: scale(1.05);
}

/* Collections Row */
.collections-row {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    padding-top: 10px;
    position: relative;
    scroll-behavior: smooth;
    -ms-overflow-style: none;  /* Hide scrollbar for IE and Edge */
    scrollbar-width: none;     /* Hide scrollbar for Firefox */
    width: 100%;
}

.collections-row::-webkit-scrollbar {
    display: none;  /* Hide scrollbar for Chrome, Safari and Opera */
}

/* Collections Grid */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding-bottom: 20px;
}

.collection-card {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    aspect-ratio: 2/3;
    flex-shrink: 0;
    width: 150px;
}

.collection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.5);
}

.collection-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-banner {
        height: 200px;
    }
    
    .movie-logo {
        max-height: 140px;
    }
} 