* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Quicksand', 'Space Grotesk', 'Lexend Deca', Arial, sans-serif;
}

/* Default cursor everywhere */
* {
    cursor: url("Elemnts/Cursor/cursor.png"), auto !important;
}


::selection {
    background: #000000;
    color: white;

}

::-moz-selection {
    background: #000000;
    color: white;
}

/* Hand cursor only on clickable elements */
a,
button,
.movie-poster,
.poster,
.sidebar-link,
.genre-box,
.sidebar-genre-box,
.sidebar-director-box,
.sidebar-actor-box,
.sidebar-actress-box {
    cursor: url("Elemnts/Cursor/hand.png"), pointer !important;
}

body {
    background-color: #ffffff;
    color: #000000;

}


main {
    padding-top: 80px;
    /* Adjust this value based on your header height */
}

header {
    background-color: rgba(255, 255, 255, 0.801);
    backdrop-filter: blur(10px);
    /* Ensure a solid background color */
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Ensure header stays above other content */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* Add a subtle shadow for visibility */
}

/* Hide header when scrolling */


.logo {
    font-size: 28px;
    font-weight: bold;
    color: #000000;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    font-family: 'Montez', cursive;
    text-decoration: none;
}

.logo img {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    font-family: 'Orbitron', 'Lexend Deca', Arial, sans-serif;
    font-weight: 800;
}

nav ul li a {
    text-decoration: none;
    color: #000000;
    font-size: 16px;
    transition: color 0.3s ease;
    font-weight: 700;
    opacity: 60%;
    font-family: 'Orbitron', 'Lexend Deca', Arial, sans-serif;
}

nav ul li a:hover {
    color: #000000;
    font-style: bold;
    font-weight: 700;
    opacity: 100%;
}

.search-bar {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 12px;
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: rgb(0, 0, 0);
    padding: 5px;
    width: 150px;
    font-weight: 500;
    font-family: 'Quicksand', 'Lexend Deca', Arial, sans-serif;
    border-radius: 5px;
    transition: border 0.3s, box-shadow 0.3s;
    margin-right: 15px;
}

.search-bar input.active,
.search-bar input:focus {
    border: 1px solid #979d9e;
    background: transparent;
}

.search-bar button {
    background: none;
    border: none;
    color: #66fcf1;
    font-size: 18px;
    cursor: pointer;
}



@media (max-width: 768px) {
    nav ul {
        display: none;
    }

        .search-bar input {
            width: 120px;
        }
}

#headIcon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

#searchIcon {
    width: 15px;
    height: 15px;
    align-items: center;
    margin-top: 5px;
    margin-right: 15px;
}

#menu {
    width: 20px;
    height: 20px;
    align-items: center;
}

#fire {
    width: 20px;
    height: 20px;
    margin-right: -3px;
    margin-top: 5px;
    margin-left: 25px;
}

.movie-poster {
    width: 180px;
    height: 350px;
    aspect-ratio: 2/3;
    border: 2px solid #cdcad9;
    border-radius: 18px 18px 5px 5px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: box-shadow 0.3s cubic-bezier(.25, .8, .25, 1);
    animation: posterFadeIn 0.7s ease;
    margin: 0 auto;
}

.movie-poster:hover {
    /* Only a subtle shadow, no scale or translate */
    box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.922), 0 1.5px 8px 0 rgba(0, 0, 0, 0.10);
    border: 2px solid #989595;
    z-index: 2;
    border-radius: 18px;
}

.movie-poster img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 1px solid #e0e0e0;
    transition: transform 0.3s, opacity 0.3s ease-out;
    /* Performance optimizations */
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* Better image rendering */
    image-rendering: -webkit-optimize-contrast;
    /* Contain layout recalculations */
    contain: layout style paint;
    /* Intrinsic size hint for layout stability */
    aspect-ratio: 2/3;
}

.movie-poster:hover img {
    /* Only a slight zoom effect on the image */
    transform: scale(1.04);
}

@keyframes posterFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.movie-footer {
    padding: 8px;
    background: #f4f7f8;
    text-align: center;
    font-size: 14px;
    color: #222;
    font-family: "Quicksand", "Lexend Deca", Arial, sans-serif;
    border-top: 1px solid #e0e0e0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.movie-title {
    font-family: 'Space Grotesk', 'Lexend Deca', Arial, sans-serif;
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 3px;
    color: #111;
}

.movie-details {
    font-family: 'Quicksand', 'Lexend Deca', Arial, sans-serif;
    font-size: 12px;
    color: #555;
}

.movie-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
    padding: 24px;
    justify-content: center;
}

.latest-section {
    display: flex;
    padding: 15px;
    font-size: 15px;
    font-weight: bold;
    color: #000000;
    margin-top: -80px;
    margin-bottom: 0px;
}

.genre-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    /* Position below the button */
    left: 0;
    background-color: rgba(255, 255, 255, 0.951);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: 8px;
    z-index: 1000;
    width: 200px;
    /* Adjust width as needed */
}

.genre-dropdown-column {
    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 18px 10px 18px 10px;

}

.genre-box {
    font-size: 14px;
    color: #222;

    cursor: pointer;
    transition: background-color 0.3s ease;
}

.genre-box:hover {
    background-color: #f0f0f0;
}

/* Pagination Footer Styles */
#paginationFooter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 24px 0 0 0;
    min-height: 60px;
}

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-btn {
    padding: 10px 18px;
    background: #e3f0ff;
    border: none;
    border-radius: 12px;
    color: #222;
    font-family: 'Lexend Deca', sans-serif;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    min-width: 44px;
    box-shadow: 0 2px 8px #0001;
}

.page-btn.active {
    background: #000000;
    color: #fff;
    font-weight: 700;
    pointer-events: none;
    transform: scale(1.08);
    box-shadow: 0 4px 12px #1677ff44;
}

.page-btn:disabled {
    background: #f0f0f0;
    color: #aaa;
    cursor: not-allowed;
    opacity: 0.7;
}

.page-btn:hover:not(.active):not(:disabled) {
    background: #000000a7;
    color: #fff;
    transform: translateY(-2px) scale(1.04);
}

.page-ellipsis,
.pagination span {
    background: transparent;
    color: #000000;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 22px;
    font-weight: 700;
    opacity: 0.7;
    min-width: 44px;
    text-align: center;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 2px;
}

footer#paginationFooter {
    width: 100%;
    background: #111;
    padding: 0;
    margin: 0;
    position: static;
    left: 0;
    bottom: 0;
    z-index: 10;
}

@media (max-width: 600px) {
    .movie-container {
        grid-template-columns: repeat(2, 1fr) !important;
        /* Always 2 per row */
        gap: 10px !important;
        padding: 8px !important;
    }

    .movie-poster {
        max-width: 98%;
        border-radius: 18px 18px 5px 5px;
        margin: 0 auto;
    }
}

/* Brave Browser Popup Styles */
.brave-popup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.brave-popup-content {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px #0003;
    padding: 32px 28px 24px 28px;
    max-width: 95vw;
    min-width: 280px;
    width: 100%;
    max-width: 370px;
    position: relative;
    text-align: center;
    animation: popupFadeIn 0.3s;
}

.brave-popup-content h2 {
    margin-bottom: 18px;
    color: #000000;
}

.brave-popup-content ul {
    text-align: left;
    margin-bottom: 18px;
    color: #222;
    font-size: 1rem;
    line-height: 1.7;
}

.brave-popup-close {
    position: absolute;
    top: 10px;
    right: 16px;
    background: #f5f6fa;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 24px;
    color: #222;
    cursor: pointer;
    box-shadow: 0 2px 8px #0002;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #3f3d3d;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.brave-popup-close:hover {
    background: #000000;
    color: #fff;
    transform: scale(1.05);
}

.brave-download-btn {
    display: inline-block;
    background: #212121b7;
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    font-size: 1.1rem;
    margin-top: 10px;
    transition: background 0.2s;
}

.brave-download-btn:hover {
    background: #000;
    color: #fff;
}




.sidebar-section {}

.sidebar-title {
    font-family: 'Lexend Deca', Arial, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #222;
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 8px;
    transition: background 0.2s;

    flex-direction: column;
    background: none;
    border-radius: 0 0 8px 8px;
    margin-left: 20px;
    margin-right: 20px;
    margin-bottom: 8px;
    padding: 8px 0 8px 8px;
    animation: fadeInGenre 0.3s;
}

.sidebar-title:hover {}

.sidebar-arrow {
    font-size: 1em;
    transition: transform 0.2s;
}

.sidebar-title.active .sidebar-arrow {
    transform: rotate(90deg);
}

.sidebar-links {

    display: flex;
    flex-direction: column;
}

.sidebar-link:hover {
    background: #e6e8f0;
    color: #060606;
}


.sidebar-join-btn {
    width: 100%;
    background: #f5f6fa;
    border: none;
    border-radius: 8px;
    font-family: 'Lexend Deca', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.08rem;
    color: #222;
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    transition: background 0.2s;
}

.sidebar-join-btn:hover {
    background: #e6e8f0;
}

.sidebar-join-arrow {
    font-size: 1.1em;
    transition: transform 0.2s;
}

.sidebar-join-btn.active .sidebar-join-arrow {
    transform: rotate(90deg);
}

.sidebar-join-dropdown {
    padding-left: 18px;
    padding-top: 6px;
    padding-bottom: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Join the Show Popup Styles */
#popupModal {
    background: rgba(10, 10, 10, 0.85) !important;
    backdrop-filter: blur(2px);
}

#popupContent {
    background: #ffffff7e !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 32px #000a;
    padding: 36px 28px 28px 28px !important;
    min-width: 270px;
    max-width: 340px;
    color: #000000;
    font-family: 'Lexend Deca', Arial, sans-serif;
}

#popupContent h2 {
    font-family: 'Lexend Deca', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 22px;
    letter-spacing: 0.5px;
}

.join-popup-links {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
    margin-top: 10px;
}

.join-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.13em;
    font-weight: 700;
    border-radius: 10px;
    padding: 12px 18px;
    text-decoration: none;
    background: #ffffffd1;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    box-shadow: 0 2px 12px #0003;
    border: 1.5px solid transparent;
}

.join-link img {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 0 2px #0008);
}

.join-link.whatsapp {
    color: #000000;
    border-color: #25D36633;
}

.join-link.whatsapp:hover {
    color: #1b8308;
    border-color: #25D366;
    box-shadow: 0 0 12px #25D36655;
}

.join-link.discord {
    color: #000000;
    border-color: #5865F233;
}

.join-link.discord:hover {
    color: #0352db;
    border-color: #5865F2;
    box-shadow: 0 0 12px #5865F255;
}

.join-link.email {
    color: #000000;
    border-color: #EA433533;
}

.join-link.email:hover {
    color: rgb(250, 99, 5);
    border-color: #EA4335;
    box-shadow: 0 0 12px #EA433555;
}

/* WhatsApp */
.join-link.whatsapp:hover img {
    filter: brightness(0) saturate(100%) invert(48%) sepia(91%) saturate(749%) hue-rotate(81deg) brightness(95%) contrast(92%);
}

/* Discord */
.join-link.discord:hover img {
    filter: brightness(0) saturate(100%) invert(46%) sepia(60%) saturate(747%) hue-rotate(199deg) brightness(97%) contrast(92%);
}

/* Email (red/orange) */
.join-link.email:hover img {
    filter: brightness(0) saturate(100%) invert(44%) sepia(77%) saturate(749%) hue-rotate(-10deg) brightness(95%) contrast(92%);
}

#popupCloseBtn {
    background: #ffffffbe !important;
    color: #000000 !important;
    border: 1.5px solid #333 !important;
    top: 12px !important;
    right: 18px !important;
    box-shadow: 0 2px 8px #0004 !important;
}

#popupCloseBtn:hover {
    background: #fffdfd !important;
    color: #000000 !important;
}




/* Header Genre Dropdown Glassmorphism */
.genre-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.932);
    /* semi-transparent white */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
    padding: 10px;
    border-radius: 18px;
    z-index: 1000;
    width: 220px;
    border: 1.5px solid rgba(200, 200, 200, 0.25);
    transition: box-shadow 0.2s, background 0.2s;
}

/* Collections Styles */
.collection-card {
    width: 180px;
    height: 350px;
    aspect-ratio: 2/3;
    border: 2px solid #cdcad9;
    border-radius: 18px 18px 5px 5px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: box-shadow 0.3s cubic-bezier(.25, .8, .25, 1), transform 0.3s ease;
    animation: posterFadeIn 0.7s ease;
    margin: 0 auto;
    position: relative;
}

.collection-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.collection-card img {
    width: 100%;
    height: 70%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.collection-card:hover img {
    transform: scale(1.05);
}

.collection-info {
    padding: 10px;
    height: 30%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.collection-title {
    font-weight: 700;
    font-size: 14px;
    color: #000;
    margin-bottom: 5px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.collection-count {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* CAM Movie Styles */
.cam-movie {
    position: relative;
}

.cam-movie img {
    filter: grayscale(100%) contrast(120%) brightness(0.8);
    transition: filter 0.3s ease;
}

.cam-movie:hover img {
    filter: grayscale(80%) contrast(110%) brightness(0.9);
}

.cam-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 68, 68, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 10;
}

.cam-movie .movie-footer {
    background: rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Make collections and CAM movies clickable */
.collection-card,
.cam-movie {
    cursor: url("Elemnts/Cursor/hand.png"), pointer !important;
}

/* Enhanced Collections Styling */
.enhanced-collection {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    background: #fff;
}

.enhanced-collection:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.collection-poster-wrapper {
    position: relative;
    overflow: hidden;
}

.collection-poster-wrapper img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.enhanced-collection:hover .collection-poster-wrapper img {
    transform: scale(1.05);
}

.collection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.enhanced-collection:hover .collection-overlay {
    opacity: 1;
}

.collection-count {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.3);
}

/* Collection Header Styles */
.collection-header {
    background: #ffffff;
    color: #000000;
    padding: 40px 20px;
    margin-bottom: 0px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.collection-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.collection-main-title {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 15px;
    color: #000000;
    letter-spacing: -1px;
    font-family: 'Orbitron', 'Lexend Deca', Arial, sans-serif;
    text-transform: uppercase;
}

.collection-header-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.collection-header-category {
    background: #000000;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Orbitron', 'Lexend Deca', Arial, sans-serif;
}

.collection-header-count {
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    padding: 8px 18px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Orbitron', 'Lexend Deca', Arial, sans-serif;
}

.collection-header-description {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #333333;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 500;
    font-family: 'Quicksand', Arial, sans-serif;
}

.collection-footer {
    padding: 20px 15px !important;
    background: #fff !important;
}

.collection-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    color: #1a1a1a !important;
}

.collection-category {
    font-size: 10px;
    color: #000000;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Quicksand' sans-serif;
}

.collection-description {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.collection-rating {
    font-size: 12px !important;
    color: #888 !important;
    font-weight: 500 !important;
}

/* Ranking Badge Styles */
.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(45deg, #000000, #2d2b2b);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    z-index: 15;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.collection-movie {
    position: relative;
}

.collection-rank {
    color: #ff6b6b;
    font-weight: 600;
    font-size: 11px;
}

/* Responsive Collections */
@media (max-width: 768px) {
    .enhanced-collection {
        border-radius: 8px;
    }
    
    .collection-poster-wrapper img {
        height: 200px;
    }
    
    .collection-footer {
        padding: 15px 12px !important;
    }
    
    .collection-title {
        font-size: 16px !important;
    }
    
    .collection-description {
        font-size: 12px;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    .rank-badge {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .collection-header {
        padding: 25px 15px;
        margin-bottom: 20px;
        border-radius: 12px;
    }
    
    .collection-main-title {
        font-size: 2rem;
        margin-bottom: 12px;
        font-weight: 900;
    }
    
    .collection-header-meta {
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .collection-header-category,
    .collection-header-count {
        font-size: 12px;
        padding: 8px 14px;
        font-weight: 700;
    }
    
    .collection-header-description {
        font-size: 1rem;
        line-height: 1.5;
        font-weight: 500;
    }
}

/* ========================================
   ENHANCED SEARCH MODAL POPUP
   ======================================== */

/* Search Modal Overlay */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-modal.active {
    display: block;
    opacity: 1;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Modal Content Container */
.search-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #ffffff;
    width: 94%;
    max-width: 720px;
    max-height: 85vh;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35),
                0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    animation: searchModalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.search-modal.active .search-modal-content {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

@keyframes searchModalSlideIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Search Modal Header */
.search-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(to bottom, #ffffff, #fafafa);
    border-bottom: 1px solid #eee;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.25s ease;
    border: 2px solid transparent;
    position: relative;
}

.search-input-wrapper:focus-within {
    background: #fff;
    border-color: #000;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
}

.search-icon-svg {
    color: #999;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.search-input-wrapper:focus-within .search-icon-svg {
    color: #000;
    transform: scale(1.1);
}

.search-modal-header input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    font-family: 'Quicksand', 'Lexend Deca', Arial, sans-serif;
}

.search-modal-header input::placeholder {
    color: #aaa;
    font-weight: 500;
}

.search-kbd-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #999;
    margin-left: auto;
}

.search-kbd-hint kbd {
    padding: 3px 6px;
    background: #e8e8e8;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 10px;
    font-weight: 600;
}

.search-clear-btn {
    background: #eee;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #666;
    display: none;
    transition: all 0.2s ease;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
}

.search-clear-btn:hover {
    background: #ff4444;
    color: #fff;
    transform: rotate(90deg);
}

.search-clear-btn.visible {
    display: flex;
}

.search-modal-close {
    background: #f0f0f0;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #666;
    transition: all 0.25s ease;
    border-radius: 10px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-modal-close:hover {
    background: #ff4444;
    color: #fff;
    transform: rotate(90deg) scale(1.05);
}

/* Filter Tabs */
.search-filter-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    scrollbar-width: none;
}

.search-filter-tabs::-webkit-scrollbar {
    display: none;
}

.search-filter-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'Quicksand', sans-serif;
}

.search-filter-tab:hover {
    background: #f5f5f5;
    border-color: #ccc;
    color: #333;
}

.search-filter-tab.active {
    background: #000;
    border-color: #000;
    color: #fff;
}

.search-filter-tab svg {
    width: 14px;
    height: 14px;
}

/* Search Modal Body */
.search-modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 20px;
    background: #fff;
    scroll-behavior: smooth;
}

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

.search-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.search-modal-body::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 8px;
}

.search-modal-body::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Quick Genre Filters */
.quick-genres-section {
    margin-bottom: 20px;
}

.quick-genres-header {
    margin-bottom: 12px;
}

.quick-genres-header h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.quick-genres-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-genre-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f8f8f8;
    border: 1.5px solid #eee;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Quicksand', sans-serif;
}

.quick-genre-btn svg {
    flex-shrink: 0;
}

.quick-genre-btn:hover {
    background: #000;
    border-color: #000;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quick-genre-btn:hover svg {
    stroke: #fff;
}

/* Recent Searches Section */
.recent-searches-section {
    margin-bottom: 20px;
}

.recent-searches-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.recent-searches-header h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.clear-recent-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: #999;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.clear-recent-btn:hover {
    background: #fee;
    color: #ff4444;
}

.recent-searches-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recent-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: #f8f8f8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.recent-search-item:hover {
    background: #f0f0f0;
    transform: translateX(4px);
    border-color: #ddd;
}

.recent-search-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.recent-search-icon {
    color: #999;
    flex-shrink: 0;
}

.recent-search-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-search-remove {
    background: transparent;
    border: none;
    color: #ccc;
    padding: 4px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0;
}

.recent-search-item:hover .recent-search-remove {
    opacity: 1;
}

.recent-search-remove:hover {
    background: #fee;
    color: #ff4444;
}

/* Recent Movie Cards */
.recent-movie-card {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    background: #f8f8f8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.recent-movie-card:hover {
    background: #f0f0f0;
    transform: translateX(4px);
    border-color: #ddd;
}

.recent-movie-poster {
    width: 45px;
    height: 65px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e0e0e0;
}

.recent-movie-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.recent-movie-title {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-movie-type {
    display: inline-flex;
    padding: 2px 8px;
    background: #000;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    width: fit-content;
}

.recent-movie-type.series {
    background: #333;
}

/* Search Results */
.search-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Search Placeholder */
.search-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    text-align: center;
}

.search-placeholder-icon {
    margin-bottom: 16px;
    opacity: 0.15;
}

.search-placeholder-icon svg {
    animation: searchPulse 3s ease-in-out infinite;
}

@keyframes searchPulse {
    0%, 100% { transform: scale(1); opacity: 0.15; }
    50% { transform: scale(1.05); opacity: 0.25; }
}

.search-placeholder h3 {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}

.search-placeholder p {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

.search-tips {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.search-tip {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #aaa;
}

.search-tip kbd {
    padding: 2px 5px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: monospace;
    font-size: 10px;
}

/* Search Result Item */
.search-result-item {
    display: flex;
    gap: 14px;
    padding: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.search-result-item:hover {
    background: #fafafa;
    border-color: #ddd;
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.search-result-item.selected {
    background: #f5f5f5;
    border-color: #000;
}

.search-result-poster {
    width: 70px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, #e8e8e8, #f5f5f5);
    transition: transform 0.2s ease;
}

.search-result-item:hover .search-result-poster {
    transform: scale(1.05);
}

.search-result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}

.search-result-title {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.search-result-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: #000;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 5px;
    text-transform: uppercase;
    width: fit-content;
}

.search-result-type.series {
    background: #1a1a1a;
}

.search-result-type.cam {
    background: #dc3545;
}

.search-result-meta {
    font-size: 12px;
    color: #777;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-result-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.search-result-genres {
    font-size: 12px;
    color: #999;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* No Results */
.search-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    text-align: center;
}

.search-no-results svg {
    margin-bottom: 16px;
    opacity: 0.2;
    color: #999;
}

.search-no-results h3 {
    font-size: 17px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}

.search-no-results p {
    font-size: 14px;
    color: #999;
}

/* Loading State */
.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    gap: 14px;
}

.search-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #eee;
    border-top-color: #000;
    border-radius: 50%;
    animation: searchSpin 0.7s linear infinite;
}

@keyframes searchSpin {
    to { transform: rotate(360deg); }
}

.search-loading-text {
    font-size: 14px;
    color: #777;
    font-weight: 500;
}

/* Results Count */
.search-results-count {
    padding: 10px 14px;
    font-size: 13px;
    color: #555;
    font-weight: 600;
    background: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Search Modal Footer */
.search-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #fafafa;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #999;
}

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

.search-powered {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #888;
}

.search-results-info {
    font-weight: 600;
}

/* Hide search modal on mobile and tablet devices */
@media (max-width: 1024px) {
    /* Hide all search modal elements completely */
    .search-modal,
    .search-modal.active,
    #searchModal,
    #searchModal.active,
    [id="searchModal"],
    .search-modal-content,
    .search-modal-overlay,
    #searchModalOverlay,
    [id="searchModalOverlay"],
    .search-modal-header,
    .search-modal-body,
    .search-modal-footer,
    .search-filter-tabs,
    .quick-genres-section,
    .recent-searches-section,
    .search-results,
    .search-input-wrapper,
    .search-placeholder,
    .genre-chip,
    .quick-genres-list,
    .filter-tab,
    .keyboard-hints {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    /* Also hide search bar button */
    .search-bar,
    .search-bar button,
    .desktop-only {
        display: none !important;
    }
}

@media (min-width: 1200px) {
    .search-modal-content {
        max-width: 800px;
    }
    
    .search-result-poster {
        width: 80px;
        height: 115px;
    }
}

.search-result-title {
    font-size: 17px;
    font-weight: 700;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    text-align: left;
}

/* Desktop only utility class */
.desktop-only {
    display: block;
}

/* Mobile only utility class */
.mobile-only {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-only {
        display: flex !important;
    }
}

/* Mobile Search Button */
.mobile-search-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (max-width: 1024px) {
    .mobile-search-btn {
        display: flex !important;
    }
}

.mobile-search-btn:hover,
.mobile-search-btn:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.mobile-search-btn svg {
    color: #000;
    stroke: #000;
}

/* Mobile Search Overlay */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 10000;
    display: none;
    flex-direction: column;
}

.mobile-search-overlay.active {
    display: flex;
}

.mobile-search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-search-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.mobile-search-back:hover {
    background: #f0f0f0;
}

.mobile-search-back svg {
    color: #333;
}

.mobile-search-input-wrapper {
    flex: 1;
    position: relative;
}

.mobile-search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
    background: #f8f8f8;
}

.mobile-search-input:focus {
    border-color: #007bff;
    background: #fff;
}

.mobile-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    padding: 4px;
    display: none;
}

.mobile-search-clear.visible {
    display: block;
}

.mobile-search-clear svg {
    color: #999;
}

.mobile-search-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.mobile-search-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-search-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.mobile-search-item:hover,
.mobile-search-item:active {
    background: #f0f0f0;
}

.mobile-search-poster {
    width: 60px;
    height: 85px;
    border-radius: 8px;
    object-fit: cover;
    background: #ddd;
    flex-shrink: 0;
}

.mobile-search-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.mobile-search-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mobile-search-meta {
    font-size: 13px;
    color: #666;
}

.mobile-search-type {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-search-type.movie {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
}

.mobile-search-type.series {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    color: #7b1fa2;
}

.mobile-search-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.mobile-search-placeholder svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.mobile-search-placeholder h3 {
    font-size: 18px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.mobile-search-placeholder p {
    font-size: 14px;
}

.mobile-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.mobile-no-results svg {
    margin-bottom: 12px;
    opacity: 0.5;
}

.mobile-no-results h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.mobile-no-results p {
    font-size: 14px;
    color: #999;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}