/* --- Global Styles & Variables --- */
:root {
    --primary: #e50914;
    --primary-dark: #b20710;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e5e5e5;
    --text-muted: #888;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; outline: none; border: none; font-family: inherit; }

/* --- Scrollbar Design --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #1e1e1e; }
::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* --- Header / Navbar --- */
.navbar {
    background: linear-gradient(to bottom, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 100%);
    height: 70px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
    backdrop-filter: blur(10px);
}

.nav-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--white);
    display: flex;
    align-items: center;
}

.logo-x { color: var(--primary); }

.counter-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #444;
    color: #ccc;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    margin-left: 15px;
    font-weight: 600;
}

/* Desktop Search */
.nav-search form {
    display: flex;
    background: #0f0f0f;
    border: 1px solid #333;
    border-radius: 30px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.nav-search form:focus-within { border-color: var(--white); }

.nav-search input {
    background: transparent;
    border: none;
    padding: 10px 15px;
    color: var(--white);
    width: 250px;
    font-size: 14px;
}

.nav-search input::placeholder { color: #777; }

.nav-search button {
    background: var(--primary);
    color: var(--white);
    padding: 10px 20px;
    font-size: 14px;
    transition: background 0.3s;
}

.nav-search button:hover { background: var(--primary-dark); }

/* Nav Links & Mobile Trigger */
.nav-links { display: flex; align-items: center; gap: 15px; }
.upload-btn {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--white);
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: 0.3s;
}
.upload-btn:hover { background: var(--primary); }

.mobile-search-trigger {
    display: none;
    background: transparent;
    color: var(--white);
    font-size: 18px;
}

/* Mobile Search Container */
.mobile-search-container {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: #000;
    padding: 15px;
    border-bottom: 1px solid #333;
    z-index: 999;
}

.mobile-search-container.open { display: block; }

.mobile-search-container form {
    display: flex;
    width: 100%;
    background: #222;
    border-radius: 5px;
    overflow: hidden;
}

.mobile-search-container input {
    flex: 1;
    padding: 12px 15px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
}

.mobile-search-container button {
    background: var(--primary);
    color: #fff;
    padding: 0 25px;
    font-weight: bold;
}

/* --- Slider Section --- */
.slider-section {
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    position: relative;
    padding: 0 20px;
}

.slideshow-container { 
    position: relative; 
    max-width: 1400px; 
    margin: 0 auto; 
    border-radius: 20px;
    overflow: hidden;
}

.mySlides { display: none; animation: fadeIn 0.8s ease-in-out; }
@keyframes fadeIn { from { opacity: 0.4; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }

.slider-content-wrapper {
    display: flex;
    align-items: center;
    padding: 40px 60px;
    gap: 50px;
    min-height: 420px;
    background: radial-gradient(circle at 30% 20%, rgba(229,9,20,0.15), rgba(0,0,0,0.8));
}

/* --- Slider Navigation Buttons --- */
.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.slider-nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 18px rgba(229,9,20,0.4);
}

.prev-btn { left: 20px; }
.next-btn { right: 20px; }

.poster-container { flex: 0 0 220px; text-align: center; transition: transform 0.3s; }
.full-poster {
    width: 100%;
    max-width: 220px;
    border-radius: 16px;
    box-shadow: 0 20px 35px rgba(0,0,0,0.6);
    transition: transform 0.3s;
    border: 2px solid rgba(255,255,255,0.1);
}
.full-poster:hover { transform: scale(1.02); }

.details-container { flex: 1; }

.movie-title {
    font-size: 38px;
    margin-bottom: 12px;
    color: var(--white);
    text-shadow: 3px 3px 6px rgba(0,0,0,0.6);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.slider-content-wrapper .meta {
    color: #ddd;
    margin-bottom: 18px;
    font-size: 15px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.slider-content-wrapper .overview {
    font-size: 16px;
    color: #e0e0e0;
    margin-bottom: 28px;
    line-height: 1.6;
    max-width: 650px;
}

.slider-btns { display: flex; gap: 18px; flex-wrap: wrap; }

.btn-download {
    background: var(--white);
    color: #000;
    padding: 12px 30px;
    border-radius: 40px;
    font-weight: 800;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s;
    box-shadow: 0 5px 12px rgba(0,0,0,0.3);
}
.btn-download:hover { transform: translateY(-3px); background: #f0f0f0; box-shadow: 0 10px 20px rgba(0,0,0,0.4); }

.btn-copy {
    background: rgba(255,255,255,0.12);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 15px;
    border: 1px solid rgba(255,255,255,0.4);
    transition: all 0.25s;
    backdrop-filter: blur(4px);
}
.btn-copy:hover { background: rgba(255,255,255,0.25); transform: translateY(-2px); }

/* --- Categories Nav --- */
.categories {
    text-align: center;
    padding: 18px 10px;
    background: #0a0a0a;
    border-bottom: 1px solid #222;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.categories a {
    display: inline-block;
    padding: 8px 24px;
    margin: 5px;
    background: #1e1e1e;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
    color: #ccc;
    transition: 0.2s;
    border: 1px solid transparent;
}

.categories a:hover { border-color: var(--primary); color: var(--white); background: #2a2a2a; }
.categories a.active {
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(229,9,20,0.4);
}

/* --- Movie Gallery --- */
.gallery-section { padding: 40px 20px; max-width: 1400px; margin: 0 auto; }

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 24px;
}

/* --- Movie Card --- */
.movie-card {
    position: relative;
    background-color: var(--card-bg);
    border-radius: 14px;
    overflow: hidden;
    transition: 0.35s ease;
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.movie-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 30px rgba(0,0,0,0.6);
    z-index: 10;
}

.movie-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    transition: 0.4s;
}

.movie-card:hover img { opacity: 0.65; transform: scale(1.02); }

/* Tags */
.hindi-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #007bff, #00d2ff);
    color: #fff;
    padding: 5px 12px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 30px;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(2px);
}

.latest-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--primary), #ff416c);
    color: #fff;
    padding: 5px 12px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 30px;
    z-index: 5;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Hover Overlay Buttons */
.card-actions-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 14px;
    opacity: 0;
    transition: 0.25s;
    z-index: 12;
}

.movie-card:hover .card-actions-overlay { opacity: 1; }

.circle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.2);
}

.circle-btn:hover { background: var(--primary); transform: scale(1.12); color: white; }

.card-info {
    padding: 14px 12px;
    text-align: center;
    background: #1a1a1a;
}

.card-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-info p { margin: 0; color: #aaa; font-size: 11px; }

.mini-btn.dl {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--primary);
    padding: 12px 0;
    font-weight: bold;
    font-size: 13px;
    text-decoration: none;
    color: #fff;
    transition: 0.25s;
    letter-spacing: 0.5px;
}

.mini-btn.dl:hover { background: var(--primary-dark); }

.no-movies {
    grid-column: 1 / -1;
    text-align: center;
    padding: 70px;
    color: #888;
    font-size: 20px;
}

/* --- Pagination Styles --- */
.pagination-section {
    padding: 20px 20px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.page-btn, .page-num {
    background: #1e1e1e;
    color: #fff;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #333;
    transition: 0.25s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.page-btn:hover, .page-num:hover {
    background: #333;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.page-num.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    pointer-events: none;
    box-shadow: 0 2px 12px rgba(229,9,20,0.5);
}

.page-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.dots {
    color: #777;
    font-size: 14px;
    padding: 0 8px;
}

/* --- Footer --- */
.main-footer {
    text-align: center;
    padding: 45px 20px;
    background: #050505;
    border-top: 1px solid #222;
    margin-top: 40px;
}

.logo-m { font-size: 28px; font-weight: 800; color: var(--white); margin-bottom: 12px; }
.main-footer p { color: #555; font-size: 13px; }

/* --- Toast Notification --- */
.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: #1f1f1f;
    color: #fff;
    padding: 14px 28px;
    border-radius: 60px;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    display: none;
    z-index: 3000;
    font-size: 14px;
    backdrop-filter: blur(12px);
    border-left: 4px solid var(--primary);
    letter-spacing: 0.3px;
}

/* --- Responsive Design --- */
@media (max-width: 900px) {
    .slider-content-wrapper { flex-direction: column; text-align: center; gap: 25px; padding: 30px 20px; }
    .slider-nav-btn { width: 42px; height: 42px; font-size: 18px; }
    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
    .movie-title { font-size: 28px; }
    .poster-container { flex: none; }
    .overview { max-width: 100%; margin: 0 auto 20px; }
    .slider-btns { justify-content: center; }
    .movie-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
    .movie-card img { height: 230px; }
}

@media (max-width: 600px) {
    .nav-search { display: none; }
    .mobile-search-trigger { display: block; }
    .counter-badge { padding: 3px 10px; font-size: 9px; margin-left: 8px; }
    .movie-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .movie-card img { height: 200px; }
    .card-info h4 { font-size: 12px; }
    .mini-btn.dl { padding: 10px 0; font-size: 11px; }
    .circle-btn { width: 38px; height: 38px; font-size: 14px; }
    .slider-nav-btn { width: 36px; height: 36px; font-size: 16px; }
}

@media (max-width: 450px) {
    .movie-grid { grid-template-columns: repeat(2, 1fr); }
    .movie-title { font-size: 22px; }
}