/* --- Global --- */
:root{
    --bg:#0b0b0b;
    --card-bg:#111;
    --muted:#bdbdbd;
    --accent:#e50914; /* Netflix red */
    --accent-hover:#f40612;
}

html, body {
    height:100%;
    background:var(--bg);
    color:#fff;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #222;
}
::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Navbar */
.navbar {
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%);
    transition: background 0.3s ease;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.navbar.scrolled {
    background: rgba(0,0,0,0.95);
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 1.8rem;
    background: linear-gradient(90deg, #e50914, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #fff;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
}

/* Dropdown Menu */
.dropdown-menu {
    background: rgba(0,0,0,0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    padding: 0.5rem 0;
}

.dropdown-item {
    color: rgba(255,255,255,0.8);
    padding: 0.7rem 1.5rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.dropdown-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 0.5rem 0;
}

.dropdown-toggle::after {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu.show {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero */
.hero {
    position: relative;
    min-height: 70vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    padding: 4rem 2rem;
    z-index: 2;
    width: 100%;
}

.hero-title {
    font-size: clamp(1.8rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero-desc {
    color: var(--muted);
    max-width: 65ch;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Rows (carousel) */
.row-title {
    margin: 2rem 0 1rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.row-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent);
}

.films-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    scroll-behavior: smooth;
}

.poster {
    min-width: 180px;
    flex: 0 0 180px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    height: 270px;
    box-shadow: 0 8px 20px rgba(0,0,0,.7);
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.poster::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.poster:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 25px rgba(0,0,0,0.8);
}

.poster:hover::before {
    opacity: 1;
}

.poster .badge {
    position: absolute;
    left: 8px;
    top: 8px;
    background: rgba(0,0,0,0.7);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    z-index: 2;
}

.poster-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    z-index: 2;
}

.poster:hover .poster-info {
    transform: translateY(0);
}

.poster-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.poster-meta {
    font-size: 0.75rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating {
    color: #ffc107;
}

/* Responsive sizes */
@media (min-width: 768px) {
    .poster {
min-width: 200px;
height: 300px;
    }
    
    .hero {
min-height: 80vh;
    }
}

@media (min-width: 1200px) {
    .poster {
min-width: 220px;
height: 330px;
    }
}

/* Buttons */
.btn-accent {
    background: var(--accent);
    border: none;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-accent:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-light:hover {
    transform: translateY(-2px);
}

/* Footer */
footer {
    padding: 3rem 0;
    color: var(--muted);
    font-size: 0.9rem;
    background: rgba(0,0,0,0.5);
    margin-top: 3rem;
}

footer a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #fff;
}

/* Scroll arrows for rows */
.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
}

.scroll-arrow:hover {
    background: rgba(0,0,0,0.9);
}

.films-container {
    position: relative;
}

.films-container:hover .scroll-arrow {
    opacity: 1;
}

.scroll-left {
    left: 10px;
}

.scroll-right {
    right: 10px;
}

/* Modal */
.modal-content {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.modal-header {
    border-bottom: 1px solid #333;
    background: #111;
}

.modal-body {
    background: #111;
    padding: 0;
}

.modal-footer {
    border-top: 1px solid #333;
    background: #111;
}

/* Loading animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }
.delay-5 { animation-delay: 0.5s; opacity: 0; }

.poster iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Search Section --- */
.search-section {
    padding: 2rem 0;
    margin-top: 80px;
}

.search-container {
    max-width: 95%;
    margin: 0 auto;
    padding: 0 1rem;
}

.search-box {
    position: relative;
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    padding: 1rem 1.5rem;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    background: rgba(255,255,255,0.15);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.2);
    outline: none;
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 1.2rem;
}

/* --- Filter Section --- */
.filter-section {
    margin-bottom: 2rem;
}

.filter-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--muted);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
}

/* --- Results Section --- */
.results-section {
    margin-top: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.results-count {
    color: var(--muted);
    font-size: 1rem;
}

.sort-dropdown {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: 5px;
    padding: 0.5rem 1rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.result-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: 1rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.85rem;
}

.card-rating {
    color: #ffc107;
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* --- No Results State --- */
.no-results {
    text-align: center;
    padding: 3rem 0;
}

.no-results-icon {
    font-size: 4rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.no-results-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.no-results-text {
    color: var(--muted);
    max-width: 500px;
    margin: 0 auto;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .card-image {
        height: 200px;
    }

    .filter-buttons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }

    .card-image {
        height: 180px;
    }

    .card-content {
        padding: 0.75rem;
    }

    .card-title {
        font-size: 0.9rem;
    }
}

.no-ul{text-decoration: none;}

/* Message Box */
.message-box {
    width: 90%;
    max-width: 400px;
    padding: 2rem;
    text-align: center;
    background: var(--glass-dark);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.message-title {
    font-size: 1.5rem;
    margin: 0 0 10px;
    color: white;
}

.message-text {
    margin: 0 0 15px;
    color: rgba(248, 249, 255, 0.8);
}

.youtube-lazy {
    position: relative;
    width: 100%;
    cursor: pointer;
    overflow: hidden;
    background: #000;
}

.youtube-lazy img.thumb {
    width: 100%;
    height: 100%;        /* Full available height */
    object-fit: cover;   /* Crop to fill, like poster */
    display: block;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70px;
    height: 70px;
    margin-left: -35px;
    margin-top: -35px;
    background: url('https://img.icons8.com/ios-filled/100/ffffff/play--v1.png') no-repeat center;
    background-size: 70px;
    opacity: 0.8;
}



