/* === CSS Variables for Consistent Theming === */
:root {
    /* Colors */
    --primary-color: #c40024;
    --primary-hover: #a0001c;
    --primary-light: rgba(196, 0, 36, 0.5);
    --text-color: #fff;
    --text-secondary: #c2c2c2;
    --bg-dark: #12151e;
    --bg-medium: #1f1e24;
    --bg-light: #333;
    --overlay-dark: rgba(0, 0, 0, 0.4);
    --overlay-darker: rgba(0, 0, 0, 0.9);
    --border-color: #fff;
    --success-color: #50C878;
    --warning-color: #F5A623;
    --error-color: #E74C3C;

    /* Sizes */
    --border-radius: 10px;
    --border-radius-sm: 5px;
    --border-radius-lg: 30px;
    --transition: all 0.3s ease;

    /* Shadows */
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-primary: 0 4px 12px rgba(255, 0, 0, 0.5);
}

/* === Model Poster Styles === */
.model-poster {
    position: relative;
    overflow: hidden;
    border: 3px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: transform 0.4s ease, border 0.4s ease;
}

.model-poster img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    aspect-ratio: 2/3;
    transition: transform 0.4s ease;
}

.model-poster:hover img {
    transform: scale(1.1);
}

.model-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    background: var(--overlay-dark);
    backdrop-filter: blur(6px);
    font-size: 16px;
    pointer-events: none;
}

.model-videos {
    font-size: 12px;
    font-weight: 500;
}

/* === Load More Button === */
.load-more .btn {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
}

.load-more .btn:hover {
    background-color: var(--primary-color);
    color: var(--bg-dark);
}

/* === Filter Buttons === */
.btn-filter {
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 5px 15px;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-filter:hover,
.btn-filter.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-color);
}

/* === TV Series Background === */
.tv-series-bg {
    background: url("../img/bg/tv_series_bg.jpg") no-repeat center center fixed;
    background-size: cover !important;
    background-attachment: fixed !important;
    transform: none !important;
}

.movie-details-img img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.movie-details-content h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.banner-meta ul li {
    margin-bottom: 10px;
}

/* Standard Video Card Styles - Use across all pages */
.movie-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.movie-link:hover .movie-poster {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.movie-poster {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 ratio */
    overflow: hidden;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
}

.movie-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.movie-link:hover .movie-poster img {
    filter: brightness(1.1);
}

.movie-poster::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-dark);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-link:hover .movie-poster::after {
    opacity: 1;
}

.movie-content .top .title {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 16px;
    line-height: 1.2;
    max-width: 100%;
}

/* Standard Pagination Styles */
.pagination-wrap ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
}

.pagination-wrap ul li {
    margin: 0 5px;
}

.pagination-wrap ul li a {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 10px 20px;
    border: 1.5px solid var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.pagination-wrap ul li.active a,
.pagination-wrap ul li a:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
    border-color: var(--primary-color);
}

.pagination-wrap ul li.disabled a {
    opacity: 0.5;
    pointer-events: none;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    background-color: var(--bg-medium);
    color: var(--text-color);
    border-color: #444;
    outline: none;
    box-shadow: none;
}

.contact-form .btn-loading {
    pointer-events: none;
    cursor: default;
    max-width: 500px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fully static button (non-clickable, no hover) */
.contact-form .no-hover {
    pointer-events: none;
    cursor: default;
    border: none;
    color: var(--text-color);
    max-width: 500px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Optional: smooth button transitions */
.contact-form .btn {
    transition: var(--transition);
}

/* Spinner alignment */
.contact-form .align-items-center {
    display: inline-flex;
    align-items: center;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary-light);
    border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
}

/* Modal overlay with fade-in animation */
.age-verification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-darker);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.age-verification-container {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(145deg, #1a1a1a, #222);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--primary-color);
    margin: 15px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-20px);
    animation: slideDown 0.5s forwards;
}

@keyframes slideDown {
    to {
        transform: translateY(0);
    }
}

.age-verification-header {
    border-bottom: 1px solid var(--primary-color);
    padding: 18px;
    text-align: center;
}

.age-verification-header h5 {
    color: var(--text-color);
    font-size: 1.6rem;
    margin: 0;
    font-weight: 700;
}

.age-verification-content {
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.age-verification-icon {
    max-width: 90px;
    margin-bottom: 20px;
}

.age-verification-body p {
    color: #ddd;
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 20px;
}

.age-verification-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 300px;
}

.age-confirm-btn,
.age-deny-btn {
    padding: 14px 0;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: var(--transition);
}

.age-confirm-btn {
    background: linear-gradient(90deg, var(--primary-color), #ff5555);
    color: var(--text-color);
    box-shadow: var(--shadow-primary);
}

.age-confirm-btn:hover {
    background: linear-gradient(90deg, var(--primary-hover), #ff2222);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.6);
}

.age-deny-btn {
    background-color: var(--bg-light);
    color: var(--text-color);
    margin-top: 12px;
}

.age-deny-btn:hover {
    background-color: #555;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 576px) {
    .age-verification-container {
        max-width: 95%;
    }

    .age-verification-header h5 {
        font-size: 1.4rem;
    }

    .age-verification-body p {
        font-size: 0.85rem;
    }

    .age-confirm-btn,
    .age-deny-btn {
        padding: 12px;
        font-size: 0.95rem;
    }

    .age-verification-icon {
        max-width: 70px;
    }
}

body.age-verification-active {
    overflow: hidden;
    height: 100vh;
}

.responsive-logo {
    max-width: 100%;
    height: auto;
    max-height: 80px;
}

/* Responsive logo adjustments */
@media (max-width: 768px) {
    .responsive-logo {
        max-height: 50px;
    }
}

@media (max-width: 480px) {
    .responsive-logo {
        max-height: 50px;
    }
}

/* Update your existing CSS to use class selectors instead of ID selectors */
.search-dropdown {
    display: none;
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    background-color: var(--bg-dark);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    font-size: 0.85rem;
    z-index: 1000;
    padding: 0;
    margin: 0;
    list-style: none;
}

.search-dropdown li {
    color: var(--text-color);
    padding: 8px 20px 8px 40px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: block;
    box-sizing: border-box;
    position: relative;
}

.search-dropdown li:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.search-dropdown li:first-child:hover {
    border-top-left-radius: var(--border-radius-lg);
    border-top-right-radius: var(--border-radius-lg);
}

.search-dropdown li:last-child:hover {
    border-bottom-left-radius: var(--border-radius-lg);
    border-bottom-right-radius: var(--border-radius-lg);
}

.search-dropdown li::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    text-align: center;
}

.search-dropdown li.model-item::before {
    content: "\f007";
    color: var(--error-color);
}

.search-dropdown li.tag-item::before {
    content: "\f02b";
    color: var(--success-color);
}

.search-dropdown li.category-item::before {
    content: "\f07b";
    color: var(--warning-color);
}

/* Mobile-specific adjustments */
@media (max-width: 991px) {
    .mobile-search .search-dropdown {
        position: absolute;
        /* keep it on top of content */
        top: calc(100% + 8px);
        /* slightly below input */
        left: 0;
        transform: none;
        width: 100%;
        max-height: 300px;
        /* adjust as needed */
        overflow-y: auto;
        /* allow scrolling */
        z-index: 1050;
        /* higher than other elements */
        margin: 0;
        border-radius: var(--border-radius-lg);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    }
}


/* Custom Dropdown */
.custom-dropdown {
    position: relative;
    width: 100px;
    font-family: Arial, sans-serif;
    z-index: 1001;
}

/* Dropdown button */
.dropdown-btn {
    width: 100%;
    padding: 5px 10px;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    display: flex;
    justify-content: space-between;
    background-color: transparent;
    align-items: center;
    color: var(--text-color);
}

/* Flags inside button */
.dropdown-btn .flag {
    width: 20px;
    height: auto;
    margin-right: 5px;
}

/* Dropdown list */
.dropdown-list {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-dark);
    display: none;
    z-index: 1002;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Show dropdown */
.dropdown-list.show {
    display: block !important;
}

/* Dropdown items */
.dropdown-list li {
    padding: 5px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--text-color);
}

.dropdown-list li:hover {
    background-color: #3d566e;
}

.dropdown-list li .flag {
    width: 20px;
    height: auto;
    margin-right: 8px;
}

.dropdown-list li.active {
    background-color: #2c3e50;
}

/* Slim scrollbar */
.dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.dropdown-list::-webkit-scrollbar-track {
    background: #2c3e50;
    border-radius: 3px;
}

.dropdown-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.dropdown-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Additional fixes and improvements */
.model-poster,
.movie-poster {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Fix for Firefox background attachment issue */
.tv-series-bg {
    background-attachment: scroll;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #ff0000;
        --text-color: #ffffff;
        --bg-dark: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    .model-poster,
    .movie-poster,
    .model-poster img,
    .movie-poster img,
    .btn,
    .btn-filter,
    .age-confirm-btn,
    .age-deny-btn {
        transition: none;
    }

    .age-verification-modal,
    .age-verification-container {
        animation: none;
    }
}