* {
    margin: 0;
    padding: 0;
        text-decoration: none;

    box-sizing: border-box;
}

body {
    background-color: #141414;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;   
    line-height: 1.5;
    overflow-x: hidden;
}


.search {
    position: relative;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
    margin-top: -1px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px;
    color: #e5e5e5;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #2a2a2a;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.selected {
    background-color: #2a2a2a;
}

.search-result-item img {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 3px;
    margin-right: 12px;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-type {
    font-size: 0.8rem;
    color: #999;
}

.search-dropdown::-webkit-scrollbar {
    width: 8px;
}

.search-dropdown::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.search-dropdown::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #444;
}

@media (max-width: 768px) {
    .search-dropdown {
        max-height: 300px;
    }
    
    .search-result-item img {
        width: 50px;
        height: 75px;
    }
    
    .search-result-title {
        font-size: 0.85rem;
    }
    
    .search-result-type {
        font-size: 0.75rem;
    }
}
a {
    text-decoration: none;
    color: inherit; 
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 70%, rgba(0,0,0,0));
    padding: 20px 4%;
    z-index: 1000;
    transition: background-color 0.5s;
}
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}
.logo { width: 90px; cursor: pointer; }
nav ul { display: flex; list-style: none; align-items: center; }
nav ul li { margin: 0 15px; }
nav ul li a { color: #e5e5e5; text-decoration: none; font-size: 0.9rem; transition: color 0.3s; }
nav ul li a:hover { color: #b3b3b3; }
.search {
    position: relative;
    width: 320px;          
    min-width: 240px;      
}

.search input {
    width: 100%;           
    padding: 8px 12px;    
    border: 1px solid #333;
    border-radius: 4px;   
    background-color: #000;
    color: #fff;
    font-size: 0.95rem;
}

.search input:focus {
    outline: none;
    border-color: #fff;
    background-color: #141414;
}
.hamburger { display: none; background: none; border: none; font-size: 1.5rem; color: #fff; cursor: pointer; }
.hero {
    height: 70vh;
    background: linear-gradient(to top, #141414 10%, transparent 90%),
                linear-gradient(to right, #141414 0%, transparent 50%),
                url('https://i.imgur.com/wAg1lxW.png');
    background-size: cover;
    background-position: center top;
    display: flex;
    align-items: center;
    padding-left: 4%;
    margin-bottom: 5px;
}
.hero-content { max-width: 500px; margin-top: 60px; }
.hero-content h1 { font-size: 3rem; font-weight: 800; margin-bottom: 15px; line-height: 1.1; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.hero-content p {
    font-size: 1.2rem;
    color: #b3b3b3;
    margin-bottom: 20px;
}


.recent, .movies, .shows {
    padding: 0 0 20px 0; 
    position: relative;
    z-index: 10;
}

.recent h2, .movies h2, .shows h2 {
    font-size: 1.4rem;
    color: #e5e5e5;
    margin-bottom: 10px;
    margin-left: 4%; 
    font-weight: 600;
}

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

/* The Scrollable Area */
.recent-grid, .movie-grid, .show-grid {
    display: flex;
    overflow-x: scroll;
    overflow-y: hidden;
    gap: 10px;
    padding: 20px 4%; 
    scroll-behavior: smooth;
    
    /* Hide Scrollbars */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.recent-grid::-webkit-scrollbar,
.movie-grid::-webkit-scrollbar, 
.show-grid::-webkit-scrollbar {
    display: none;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Hidden by default until hover */
    transition: opacity 0.3s ease, background-color 0.3s ease, transform 0.2s;
}

.row-container:hover .nav-btn {
    opacity: 1;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Lighter on hover */
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.movie-card, .show-card {
    flex: 0 0 auto;
    width: 200px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
}

.movie-card img, .show-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.movie-card:hover, .show-card:hover {
    transform: scale(1.1);
    z-index: 99;
    box-shadow: 0 10px 20px rgba(0,0,0,0.7);
}

.recent-grid:hover .movie-card:not(:hover),
.movie-grid:hover .movie-card:not(:hover),
.show-grid:hover .show-card:not(:hover) {
    opacity: 0.5;
}

.title {
    font-size: 0.9rem;
    color: #ccc;
    margin-top: 5px;
    text-align: center;
}
@media (max-width: 768px) {
    .navbar { flex-wrap: wrap; padding: 10px; }
    .hamburger { display: block; }
    nav { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; width: 100%; background-color: #141414; }
    nav.open { max-height: 500px; margin-top: 10px; border-top: 1px solid #333; }
    nav ul { flex-direction: column; align-items: flex-start; padding: 10px 0; }
    nav ul li { margin: 10px 0; width: 100%; }
    nav ul li a { display: block; padding: 5px 0; }
    .search {
        width: 100%;       /* Full width on mobile as before */
        margin-top: 10px;
        min-width: unset;
    }
    
    .search input {
        width: 100%;
        padding: 10px 12px; /* A bit more touch-friendly */
    }

    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1rem; }
    
    .movie-card, .show-card { width: 130px; }
    .movie-card img, .show-card img { height: 195px; }
    
    .movie-card:hover, .show-card:hover { transform: none; box-shadow: none; }
    .recent-grid:hover .movie-card:not(:hover),
    .movie-grid:hover .movie-card:not(:hover),
    .show-grid:hover .show-card:not(:hover) { opacity: 1; }

    .nav-btn {
        display: none;
    }
}