/*
Theme Name: BD Anime
Theme URI: https://t.me/saiful24365
Author: Saiful
Author URI: https://t.me/saiful24365
Description: A powerful WordPress theme for anime websites.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bdanimebox
Tags: two-columns, three-columns, one-column, right-sidebar, left-sidebar, footer-widgets, blog, flexible-header, full-width-template, custom-header, custom-background, custom-menu, custom-colors, sticky-post, threaded-comments, translation-ready, rtl-language-support, featured-images, theme-options

bdanimebox, Copyright 2025 Saiful
bdanimebox is distributed under the terms of the GNU GPL

Actual CSS can be found in /assets/css/ folder.
*/

:root {
    --bg-main: #050505;
    --bg-card: #151515;
    --bg-hover: #222222;
    --text-primary: #e5e5e5;
    --text-secondary: #9ca3af;
    --red-primary: #dc2626;
    --red-dark: #991b1b;
    --border-color: rgba(255, 255, 255, 0.05);
    --header-height: 64px;
    --primary-red: #dc2626;
}

html {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

* {
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
    tap-highlight-color: transparent !important;
}

*:focus {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

*:active {
    -webkit-tap-highlight-color: transparent !important;
}

/* Remove tap highlight for all interactive elements */
a,
button,
input,
textarea,
select,
label {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
    tap-highlight-color: transparent !important;
}


body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}

body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

ul {
    list-style: none;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 16px;
    width: 100%;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.text-red {
    color: var(--red-primary);
}

.font-bold {
    font-weight: 700;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    background-color: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateZ(0);
    will-change: transform;
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-btn {
    color: #d1d5db;
    font-size: 1.25rem;
    padding: 8px;
    transition: color 0.2s, transform 0.1s;
    background: none !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.menu-btn:hover {
    color: white;
    background: none !important;
}

.menu-btn:active {
    transform: scale(0.95);
    background: none !important;
    outline: none !important;
}

.menu-btn:focus {
    background: none !important;
    outline: none !important;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--red-primary), var(--red-dark));
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
    transition: box-shadow 0.3s;
}

.logo-link:hover .logo-icon {
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.7);
}

.logo-play {
    font-size: 10px;
    color: white;
    margin-left: 2px;
}

.logo-film {
    position: absolute;
    color: rgba(255, 255, 255, 0.3);
    font-size: 18px;
    transform: rotate(-12deg);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.025em;
}

.search-container {
    display: none !important;
    flex: 1;
    max-width: 32rem;
    margin: 0 1rem;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    transition: color 0.2s;
    z-index: 10;
    pointer-events: none;
}

.search-wrapper:focus-within .search-icon {
    color: var(--red-primary) !important;
}

.search-input {
    width: 100% !important;
    background-color: var(--bg-card) !important;
    border: 1px solid rgba(55, 65, 81, 0.5) !important;
    border-radius: 9999px !important;
    padding: 0.5rem 2.5rem 0.5rem 2.5rem !important;
    font-size: 0.875rem !important;
    color: #e5e5e5 !important;
    transition: all 0.3s !important;
    outline: none !important;
    height: auto !important;
}

.search-input::placeholder {
    color: #6b7280 !important;
}

.search-input:focus {
    border-color: rgba(220, 38, 38, 0.5) !important;
    background-color: #1a1a1a !important;
}

.search-clear-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    cursor: pointer;
    z-index: 10;
    font-size: 16px;
    transition: color 0.2s, transform 0.1s;
    display: none;
    padding: 4px;
}

.search-clear-icon:hover {
    color: var(--red-primary);
    transform: translateY(-50%) scale(1.1);
}

.search-clear-icon:active {
    transform: translateY(-50%) scale(0.95);
}

/* Hide ALL browser default search buttons/icons */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-download,
.btn-telegram {
    height: 36px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    background: linear-gradient(to right, var(--red-primary), var(--red-dark));
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.3);
    border: 1px solid transparent;
    transition: transform 0.2s, background 0.2s, color 0.3s;
}

.btn-download:hover,
.btn-telegram:hover {
    transform: scale(1.05);
    background: linear-gradient(to right, #ef4444, #b91c1c);
}

.btn-download i {
    color: #ffffff;
    transition: color 0.3s;
}

.btn-telegram span {
    display: none;
}

.mobile-search-area {
    display: block;
    padding: 12px 16px;
    width: 100%;
    background-color: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    position: sticky;
    top: var(--header-height);
    transform: translateZ(0);
    will-change: transform;
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    z-index: 49;
    overflow: visible;
}

.overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px;
    background-color: #000;
    z-index: 70;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.3);
    border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.5);
}

.sidebar-menu ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    list-style: none;
}

.sidebar-menu a.menu-item,
.sidebar-menu .menu-item a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 500;
    transition: all 0.2s;
    color: white;
    text-decoration: none;
}

.sidebar-menu li.menu-item {
    border-radius: 12px;
    transition: all 0.2s;
}

.sidebar-menu li.menu-item a {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 12px 16px;
    color: white;
    text-decoration: none;
}

.sidebar-menu li.current-menu-item,
.sidebar-menu li.current_page_item,
.sidebar-menu li.current-page-ancestor,
.sidebar-menu li.current-menu-ancestor,
.sidebar-menu li.current-menu-parent,
.sidebar-menu a.menu-item.active-menu {
    background-color: #1a1a1a;
}

.sidebar-menu li.current-menu-item a,
.sidebar-menu li.current_page_item a,
.sidebar-menu li.current-page-ancestor a,
.sidebar-menu li.current-menu-ancestor a,
.sidebar-menu li.current-menu-parent a,
.sidebar-menu a.menu-item.active-menu {
    color: var(--red-primary);
    font-weight: 700;
}

.sidebar-menu li.current-menu-item i,
.sidebar-menu li.current_page_item i,
.sidebar-menu li.current-page-ancestor i,
.sidebar-menu li.current-menu-ancestor i,
.sidebar-menu li.current-menu-parent i,
.sidebar-menu a.menu-item.active-menu i {
    color: var(--red-primary);
}

.sidebar-menu li.current-menu-item:hover,
.sidebar-menu li.current_page_item:hover,
.sidebar-menu li.current-page-ancestor:hover,
.sidebar-menu li.current-menu-ancestor:hover,
.sidebar-menu li.current-menu-parent:hover,
.sidebar-menu a.menu-item.active-menu:hover {
    background-color: #222;
}

.sidebar-menu li.menu-item:not(.current-menu-item):not(.current_page_item):not(.current-page-ancestor):not(.current-menu-ancestor):not(.current-menu-parent):hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-menu a.menu-item:not(.active-menu):hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-menu li.menu-item:not(.current-menu-item):not(.current_page_item):not(.current-page-ancestor):not(.current-menu-ancestor):not(.current-menu-parent):hover a {
    color: #ef4444;
}

.sidebar-menu li.menu-item:not(.current-menu-item):not(.current_page_item):not(.current-page-ancestor):not(.current-menu-ancestor):not(.current-menu-parent):hover i {
    color: #ef4444;
}

.sidebar-menu a.menu-item:not(.active-menu):hover,
.sidebar-menu a.menu-item:not(.active-menu):hover i {
    color: #ef4444;
}

.menu-icon-width {
    width: 24px;
    text-align: center;
    font-size: 1.25rem;
    transition: color 0.2s;
}

.sidebar-actions {
    flex-shrink: 0;
    padding: 16px 16px 4px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.sidebar-btn i {
    font-size: 1.125rem;
    transition: transform 0.3s ease;
}

.sidebar-btn-primary {
    background: linear-gradient(135deg, var(--red-primary), var(--red-dark));
    color: white;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.3);
}

.sidebar-btn-primary:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
    transform: translateY(-2px);
}

.sidebar-btn-primary:hover i {
    transform: scale(1.1);
}

.sidebar-btn-primary:active {
    transform: translateY(0);
}

.sidebar-btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.1);
}

.sidebar-btn-secondary:hover {
    background-color: #1f1f1f;
    border-color: rgba(220, 38, 38, 0.4);
    color: white;
    transform: translateY(-2px);
}

.sidebar-btn-secondary:hover i {
    color: var(--red-primary);
    transform: scale(1.1);
}

.sidebar-btn-secondary:active {
    transform: translateY(0);
}

.sidebar-footer {
    flex-shrink: 0;
    padding: 0 24px 24px 24px;
}

.social-row {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    padding-left: 8px;
    padding-right: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-link {
    color: white;
    font-size: 1.25rem;
    transition: color 0.2s;
}

.social-link:hover {
    color: #ef4444;
}

.site-footer {
    width: 100%;
    background-color: #080808;
    border-top: 1px solid var(--border-color);
    padding: 32px 0 40px 0;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.contact-text {
    color: #d1d5db;
    font-size: 0.875rem;
    font-weight: 500;
}

.disclaimer-text {
    color: #6b7280;
    font-size: 0.75rem;
    line-height: 1.6;
    max-width: 1152px;
}

@media (max-width: 425px) {
    .btn-telegram {
        display: none;
    }
}

@media (max-width: 340px) {
    .btn-download i {
        display: none;
    }
}

@media (min-width: 768px) {
    .search-container {
        display: flex !important;
    }

    .mobile-search-area {
        display: none;
    }

    .nav-actions {
        gap: 16px;
    }

    .btn-download {
        font-size: 0.875rem;
    }

    .btn-telegram {
        font-size: 0.875rem;
    }

    .btn-telegram span {
        display: inline;
    }

    .contact-text {
        font-size: 1rem;
    }

    .disclaimer-text {
        font-size: 0.875rem;
    }
}

:root {
    --primary: #dc2626;
    --primary-hover: #b91c1c;
    --text-sub: #a3a3a3;
    --transition-speed: 0.3s;
}

.category-section {
    margin-bottom: 32px;
}

.category-title {
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary);
    padding-left: 12px;
}

.category-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    width: 100%;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
    display: none;
}

.btn-category {
    background-color: #1f0a0a;
    color: #fca5a5;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid rgba(127, 29, 29, 0.4);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.btn-category:hover {
    border-color: var(--primary);
    background-color: rgba(127, 29, 29, 0.2);
}

.btn-category.secondary {
    background-color: var(--bg-card);
    color: var(--text-sub);
    border-color: #1f2937;
}

.btn-category.secondary:hover {
    color: white;
    background-color: #222;
    border-color: #7f1d1d;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), transparent);
    border: 1px solid rgba(220, 38, 38, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.15);
    backdrop-filter: blur(4px);
}

.icon-box i {
    color: #ef4444;
    font-size: 1.125rem;
}

.header-text h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.count-badge {
    font-size: 12px;
    color: #6b7280;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}

.btn-view-all {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 16px;
    border-radius: 9999px;
    background-color: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    transition: all var(--transition-speed);
}

.btn-view-all:hover {
    border-color: rgba(220, 38, 38, 0.3);
    background-color: #222;
}

.btn-view-all span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-sub);
    transition: color var(--transition-speed);
}

.btn-view-all:hover span {
    color: white;
}

.arrow-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed);
}

.btn-view-all:hover .arrow-circle {
    background-color: var(--primary);
}

.arrow-circle i {
    font-size: 10px;
    color: #6b7280;
    transform: rotate(-45deg);
    transition: transform var(--transition-speed), color var(--transition-speed);
}

.btn-view-all:hover .arrow-circle i {
    color: white;
    transform: rotate(0deg);
}

.anime-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 640px) {
    .anime-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .anime-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .anime-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1280px) {
    .anime-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.anime-card {
    cursor: pointer;
    position: relative;
    padding-bottom: 8px;
    min-width: 0;
}

.card-container {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
    background-color: var(--bg-card);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.anime-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.anime-card:hover .anime-poster {
    transform: scale(1.1);
}

.anime-card:hover .card-container {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
}



.badge-dub,
.badge-hd,
.anime-badge {
    position: absolute;
    top: 0rem;
    right: 0rem;
    background-color: var(--red-primary);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-bottom-left-radius: 0.5rem;
    z-index: 30;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.02em;
}

.anime-badge.featu {
    border-radius: 0;
    top: 4px;
    left: 0;
    right: auto;
    background: linear-gradient(to right, #cb0000, #731111);
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    padding: 4px 13px 4px 6px;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 0 100%);
    z-index: 31;
    line-height: 1;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    overflow: hidden;
}

.mb-6 {
    margin-bottom: 24px;
}

.space-y-8>*+* {
    margin-top: 32px;
}

.loader-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 0;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(220, 38, 38, 0.1);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.filter-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.05));
    border-radius: 9999px;
    padding: 0.25rem;
    display: inline-flex;
    max-width: 100%;
    overflow: hidden;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.filter-tab {
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    color: var(--text-sub, var(--color-text-sub));
    white-space: nowrap;
    font-size: 0.85rem;
    user-select: none;
}

.filter-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.filter-tab.active {
    background-color: var(--primary-red, var(--color-primary));
    color: white;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.5);
    font-weight: 600;
}

@media (min-width: 640px) {
    .filter-container {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .filter-tab {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }
}

.glass-panel {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    font-size: 11px;
}

.meta-label {
    color: #9ca3af;
    font-weight: 500;
    flex-shrink: 0;
    width: 80px;
}

.anime-card-container {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 0.5rem;
    background-color: #1a1a1a;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.anime-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.anime-card:hover .anime-card-container,
.trending-card:hover .anime-card-container {
    border-color: var(--primary-red, #dc2626);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
}

.anime-card:hover .anime-poster,
.trending-card:hover .anime-poster {
    transform: scale(1.1);
}



.anime-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    line-height: 1.375;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    text-align: left;
}

@media (min-width: 768px) {
    .anime-title {
        font-size: 1rem;
    }
}

.anime-card:hover .anime-title,
.trending-card:hover .anime-title {
    color: #ef4444;
}

.video-wrapper {
    width: 100%;
    border: 2px solid var(--primary-red);
    border-radius: 10px;
    overflow: hidden;
    background-color: #111111;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
}

.video-container iframe,
.video-container video {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.server-panel {
    padding: 12px;
    background: #0a0a0a;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.server-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.btn-server {
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
}

.btn-server.active {
    background: rgba(127, 29, 29, 0.1);
    border-color: rgba(127, 29, 29, 0.5);
    color: white;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.1);
    position: relative;
}

.active-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    display: flex;
}

.ping {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #dc2626;
    opacity: 0.75;
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.dot {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #dc2626;
}

.btn-server.inactive {
    background: #151515;
    border-color: rgba(255, 255, 255, 0.08);
    color: #9ca3af;
}

.btn-server.inactive:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

@media (min-width: 768px) {
    .server-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }

    .btn-server {
        padding: 12px 16px;
        font-size: 14px;
    }

    .server-title {
        font-size: 12px;
    }
}

.scroll-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.nav-btns {
    display: none;
    gap: 10px;
}

.nav-btns .nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    padding: 0;
}

.h-scroll-container {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
}

.cast-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.cast-img-box {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #374151;
    margin-bottom: 8px;
}

.cast-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cast-name {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.cast-role {
    font-size: 10px;
    color: #6b7280;
}

@media (min-width: 768px) {
    .nav-btns {
        display: flex;
    }

    .cast-card {
        min-width: 100px;
    }

    .cast-img-box {
        width: 96px;
        height: 96px;
    }

    .cast-name {
        font-size: 14px;
        max-width: 100px;
    }
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
    transition: all 0.3s ease-out;
}

.screen-item {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
    display: block;
}

.screen-item:hover {
    opacity: 0.8;
}

.more-screen {
    opacity: 0;
    transform: translateY(-20px);
    animation: slideIn 0.4s ease-out forwards;
    will-change: opacity, transform;
}

.more-screen.hidden {
    display: none !important;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.more-trigger {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
    width: 100%;
    height: auto;
}

.trigger-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px);
    transition: transform 0.5s;
    display: block;
}

.more-trigger:hover .trigger-img {
    transform: scale(1.05);
}

.trigger-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.plus-text {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

@media (min-width: 768px) {
    .screenshot-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .plus-text {
        font-size: 36px;
    }
}

.anime-title-area {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}

@media (min-width: 768px) {
    .anime-title-area {
        padding-bottom: 16px;
    }
}

.anime-title-text {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.3;
    color: white;
    margin: 0;
}

@media (min-width: 768px) {
    .anime-title-text {
        font-size: 2.25rem;
    }
}

.info-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

@media (min-width: 768px) {
    .info-content {
        gap: 32px;
    }
}

.poster-column {
    flex-shrink: 0;
    width: 110px;
    align-self: flex-start;
}

@media (min-width: 768px) {
    .poster-column {
        width: 220px;
    }
}

.poster-wrapper {
    width: 100%;
    aspect-ratio: 2/3;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.details-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    margin-bottom: 4px;
}

.rating-box {
    display: flex;
    align-items: center;
    gap: 4px;
}

.star-icon {
    width: 36px;
    height: 36px;
    color: black;
    fill: transparent;
    stroke: #facc15;
    stroke-width: 1.5px;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

.rating-score {
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.025em;
}

.rating-total {
    color: #9ca3af;
    font-size: 1.25rem;
    font-weight: 700;
    margin-left: 1px;
}

/* Download Title Icons & Animations */
.dl-title-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dl-title-icon {
    width: 26px;
    height: 26px;
    color: #dc2626;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.dl-title-icon svg {
    width: 25px;
    height: 25px;
}

.dl-title-icon .arrow-group {
    animation: dl-slide-down 1.5s infinite ease-in-out;
}

@keyframes dl-slide-down {
    0% {
        transform: translateY(-10px);
        opacity: 0;
    }

    40% {
        transform: translateY(0);
        opacity: 1;
    }

    60% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(10px);
        opacity: 0;
    }
}

@keyframes dl-arrow-slide {
    0% {
        transform: translateY(-15px);
        opacity: 0;
    }

    50% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(15px);
        opacity: 0;
    }
}

@keyframes dl-arrow-head {
    0% {
        opacity: 0;
    }

    30% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes dl-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes ping {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Single Post Content Styles */
.single article {
    max-width: 1280px;
    margin: 0 auto;
    background-color: #000000;
}

.single .inside-article {
    background-color: #000000;
    padding: 0px;
}

.single .entry-content {
    background-color: #000000;
    color: var(--text-primary);
}

.single .entry-header {
    background-color: #000000;
    color: var(--text-primary);
}

/* Ensure body background is also black for single posts */
body.single {
    background-color: #000000;
}

/* Single Post some contant hide*/
.comments-area {
    display: none;
}

footer.entry-meta {
    display: none;
}

/* ========================================
   Archive Pages Specific Styles
   Applies only to /anime/ and /tv-show/
   ======================================== */

/* Archive Container */
.post-type-archive-anime .archive-container,
.post-type-archive-tv_show .archive-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 16px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Category Section (Browse Genres) */
.post-type-archive-anime .category-section,
.post-type-archive-tv_show .category-section {
    margin-bottom: 0;
}

.post-type-archive-anime .category-title,
.post-type-archive-tv_show .category-title {
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary);
    padding-left: 12px;
}

.post-type-archive-anime .category-list,
.post-type-archive-tv_show .category-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    width: 100%;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.post-type-archive-anime .category-list::-webkit-scrollbar,
.post-type-archive-tv_show .category-list::-webkit-scrollbar {
    display: none;
}

.post-type-archive-anime .btn-category,
.post-type-archive-tv_show .btn-category {
    background-color: #1f0a0a;
    color: #fca5a5;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid rgba(127, 29, 29, 0.4);
    cursor: pointer;
    transition: all var(--transition-speed);
    text-decoration: none;
    display: inline-block;
}

.post-type-archive-anime .btn-category:hover,
.post-type-archive-tv_show .btn-category:hover {
    border-color: var(--primary);
    background-color: rgba(127, 29, 29, 0.2);
    color: white;
}

.post-type-archive-anime .btn-category.secondary,
.post-type-archive-tv_show .btn-category.secondary {
    background-color: var(--bg-card);
    color: var(--text-sub);
    border-color: #1f2937;
}

.post-type-archive-anime .btn-category.secondary:hover,
.post-type-archive-tv_show .btn-category.secondary:hover {
    color: white;
    background-color: #222;
    border-color: #7f1d1d;
}

/* Section Header */
.post-type-archive-anime .section-header,
.post-type-archive-tv_show .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.post-type-archive-anime .header-left,
.post-type-archive-tv_show .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-type-archive-anime .icon-box,
.post-type-archive-tv_show .icon-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), transparent);
    border: 1px solid rgba(220, 38, 38, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.15);
    backdrop-filter: blur(4px);
}

.post-type-archive-anime .icon-box i,
.post-type-archive-tv_show .icon-box i {
    color: #ef4444;
    font-size: 1.125rem;
}

.post-type-archive-anime .header-text h2,
.post-type-archive-tv_show .header-text h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin: 0;
}

@media (min-width: 768px) {

    .post-type-archive-anime .header-text h2,
    .post-type-archive-tv_show .header-text h2 {
        font-size: 1.5rem;
    }
}

.post-type-archive-anime .count-badge,
.post-type-archive-tv_show .count-badge {
    font-size: 12px;
    color: #6b7280;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}

/* View All Button */
.post-type-archive-anime .btn-view-all,
.post-type-archive-tv_show .btn-view-all {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 16px;
    border-radius: 9999px;
    background-color: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    transition: all var(--transition-speed);
}

.post-type-archive-anime .btn-view-all:hover,
.post-type-archive-tv_show .btn-view-all:hover {
    border-color: rgba(220, 38, 38, 0.3);
    background-color: #222;
}

.post-type-archive-anime .btn-view-all span,
.post-type-archive-tv_show .btn-view-all span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-sub);
    transition: color var(--transition-speed);
}

.post-type-archive-anime .btn-view-all:hover span,
.post-type-archive-tv_show .btn-view-all:hover span {
    color: white;
}

.post-type-archive-anime .arrow-circle,
.post-type-archive-tv_show .arrow-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed);
}

.post-type-archive-anime .btn-view-all:hover .arrow-circle,
.post-type-archive-tv_show .btn-view-all:hover .arrow-circle {
    background-color: var(--primary);
}

.post-type-archive-anime .arrow-circle i,
.post-type-archive-tv_show .arrow-circle i {
    font-size: 10px;
    color: #6b7280;
    transform: rotate(-45deg);
    transition: transform var(--transition-speed), color var(--transition-speed);
}

.post-type-archive-anime .btn-view-all:hover .arrow-circle i,
.post-type-archive-tv_show .btn-view-all:hover .arrow-circle i {
    color: white;
    transform: rotate(0deg);
}

/* Anime Grid System */
.post-type-archive-anime .anime-grid,
.post-type-archive-tv_show .anime-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 640px) {

    .post-type-archive-anime .anime-grid,
    .post-type-archive-tv_show .anime-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {

    .post-type-archive-anime .anime-grid,
    .post-type-archive-tv_show .anime-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {

    .post-type-archive-anime .anime-grid,
    .post-type-archive-tv_show .anime-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1280px) {

    .post-type-archive-anime .anime-grid,
    .post-type-archive-tv_show .anime-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Anime Card */
.post-type-archive-anime .anime-card,
.post-type-archive-tv_show .anime-card {
    cursor: pointer;
    position: relative;
    text-decoration: none;
    display: block;
}

.post-type-archive-anime .card-container,
.post-type-archive-tv_show .card-container {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
    background-color: var(--bg-card);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.post-type-archive-anime .anime-poster,
.post-type-archive-tv_show .anime-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.post-type-archive-anime .anime-card:hover .anime-poster,
.post-type-archive-tv_show .anime-card:hover .anime-poster {
    transform: scale(1.1);
}

.post-type-archive-anime .anime-card:hover .card-container,
.post-type-archive-tv_show .anime-card:hover .card-container {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
}

/* Card Typography */
.post-type-archive-anime .anime-title,
.post-type-archive-tv_show .anime-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    line-height: 1.375;
    transition: color var(--transition-speed);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

@media (min-width: 768px) {

    .post-type-archive-anime .anime-title,
    .post-type-archive-tv_show .anime-title {
        font-size: 1rem;
    }
}

.post-type-archive-anime .anime-card:hover .anime-title,
.post-type-archive-tv_show .anime-card:hover .anime-title {
    color: #ef4444;
}

/* Pagination */
.post-type-archive-anime .pagination-area .nav-links,
.post-type-archive-tv_show .pagination-area .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.post-type-archive-anime .pagination-area .page-numbers,
.post-type-archive-tv_show .pagination-area .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #151515;
    color: #a3a3a3;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.3s;
    text-decoration: none;
}

.post-type-archive-anime .pagination-area .page-numbers.current,
.post-type-archive-anime .pagination-area .page-numbers:hover,
.post-type-archive-tv_show .pagination-area .page-numbers.current,
.post-type-archive-tv_show .pagination-area .page-numbers:hover {
    background: #dc2626;
    color: white;
}

/* ===================================================================
   TAXONOMY MOVIE GENRE PAGE STYLES (taxonomy-anime_genre.php)
   =================================================================== */

/* Scoped styles for taxonomy-anime_genre.php only */
body.tax-anime_genre {
    background-color: #050505;
    color: #e5e5e5;
    font-family: 'Roboto', sans-serif;
}

/* Main Container Layout */
body.tax-anime_genre .main-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 80vh;
}

body.tax-anime_genre .section-wrapper {
    margin-bottom: 2rem;
}

/* Filter Section Styles */
body.tax-anime_genre .filter-section {
    display: flex;
    justify-content: center;
    padding-bottom: 0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Grid Layout for Genre Pages */
body.tax-anime_genre .animes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

/* Responsive Breakpoints for Genre Grid */
@media (min-width: 768px) {
    body.tax-anime_genre .animes-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 1024px) {
    body.tax-anime_genre .animes-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1280px) {
    body.tax-anime_genre .animes-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Anime Card Styles for Genre Pages */
body.tax-anime_genre .anime-card {
    cursor: pointer;
    position: relative;
    display: block;
    text-decoration: none;
}

/* Loader for Genre Pages */
body.tax-anime_genre .loader-container.active {
    display: flex;
}

/* ===================================================================
   TAXONOMY TV GENRE PAGE STYLES (taxonomy-tv_genre.php)
   =================================================================== */

/* Scoped styles for taxonomy-tv_genre.php only */
body.tax-tv_genre {
    background-color: #050505;
    color: #e5e5e5;
    font-family: 'Roboto', sans-serif;
}

/* Main Container Layout */
body.tax-tv_genre .main-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 80vh;
}

body.tax-tv_genre .section-wrapper {
    margin-bottom: 2rem;
}

/* Filter Section Styles */
body.tax-tv_genre .filter-section {
    display: flex;
    justify-content: center;
    padding-bottom: 0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Grid Layout for TV Genre Pages */
body.tax-tv_genre .animes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

/* Responsive Breakpoints for TV Genre Grid */
@media (min-width: 768px) {
    body.tax-tv_genre .animes-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 1024px) {
    body.tax-tv_genre .animes-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1280px) {
    body.tax-tv_genre .animes-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* TV Show Card Styles for Genre Pages */
body.tax-tv_genre .anime-card {
    cursor: pointer;
    position: relative;
    display: block;
    text-decoration: none;
}

/* Loader for TV Genre Pages */
body.tax-tv_genre .loader-container.active {
    display: flex;
}

/* ===================================================================
   SEARCH PAGE STYLES (search.php)
   =================================================================== */

/* Layout Overrides for Search Page */
@media (min-width: 1024px) {
    body.search .main-content-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Scoped styles for search.php only */
body.search {
    background-color: #050505;
}

/* Page specific container override */
body.search .search-page-wrapper {
    color: #e5e5e5;
    font-family: 'Roboto', sans-serif;
    min-height: 80vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Utilities for Search Page */
body.search .container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

body.search .scroll-smooth {
    scroll-behavior: smooth;
}

/* Page Header Styles */
body.search .search-header {
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(31, 41, 55, 0.5);
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

body.search .search-header .container {
    margin: 0 auto;
}

body.search .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

body.search .logo-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.search .header-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

body.search .result-count-area {
    color: #9ca3af;
    font-size: 0.875rem;
}

body.search .count-number {
    color: #dc2626;
    font-weight: 700;
}

/* Filter Section */
body.search .filter-section {
    display: flex;
    justify-content: center;
    width: 100%;
}

body.search .btn-download-custom {
    background: linear-gradient(to right, #b91c1c, #7f1d1d);
    color: white;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    font-weight: 700;
    flex: 1;
}

/* Grid Layout for Search Results */
body.search .results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
    width: 100%;
}

/* Tablet */
@media (min-width: 640px) {
    body.search .results-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    body.search .results-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Large Desktop */
@media (min-width: 1280px) {
    body.search .results-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Anime Card Styles */
body.search .anime-card {
    cursor: pointer;
    position: relative;
    display: block;
    text-decoration: none;
}

body.search .anime-card-inner {
    position: relative;
    aspect-ratio: 2 / 3;
    background-color: #1a1a1a;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

body.search .anime-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Hover Effects */
body.search .anime-card:hover .anime-poster {
    transform: scale(1.1);
}

body.search .anime-card:hover .anime-card-inner {
    border-color: #dc2626;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
}

body.search .anime-card:hover h3 {
    color: #ef4444;
}

/* Typography inside Card */
body.search .anime-title {
    font-size: 11px;
    font-weight: 500;
    color: white;
    line-height: 1.375;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    width: 100%;
    max-width: 100%;
    transition: color 0.2s;
    margin-top: 0.5rem;
    text-align: left;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (min-width: 768px) {
    body.search .anime-title {
        font-size: 1rem;
    }
}

/* Animations */
@keyframes pulse-search {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

body.search .animate-pulse {
    animation: pulse-search 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Loader for Search Page */
body.search .loader-container.active {
    display: flex;
}

@keyframes fadeIn-search {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.search .fade-in {
    animation: fadeIn-search 0.5s ease-out forwards;
}

/* ===================================================================
   FRONT PAGE (HOMEPAGE) STYLES (front-page.php)
   =================================================================== */

/* Homepage Wrapper */
body.home .home-page-wrapper {
    background-color: #050505;
    color: #e5e5e5;
    font-family: 'Roboto', sans-serif;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
}

body.home .home-page-wrapper * {
    box-sizing: border-box;
}

/* Scrollbar Hiding Utilities */
body.home .no-scrollbar::-webkit-scrollbar {
    display: none;
}

body.home .no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Layout Utilities */
body.home .feature-container {
    flex: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    display: flex;
    flex-direction: column;
}

body.home #content {
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

body.home .feature-container section {
    margin-bottom: 0.7rem;
}

body.home .flex-center-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

body.home .flex-center-gap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Carousel Styles */
body.home .carousel {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: #000;
    margin-bottom: 5px;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
}

body.home .carousel:active {
    cursor: grabbing;
}

@media (max-width: 640px) {
    body.home .carousel {
        height: 250px;
    }
}

body.home .carousel-inner {
    display: flex;
    height: 100%;
}

body.home .swiper-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    flex-shrink: 0;
}

body.home .swiper-slide img.banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

body.home .side-shadow-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

body.home .side-shadow {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(0deg, #050505 5%, transparent 100%);
    z-index: 1;
}

body.home .carousel-pagination {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    z-index: 10;
    overflow: visible;
    pointer-events: none;
}

body.home .pagination-track {
    display: flex;
    gap: 15px;
    padding-left: 15px;
    width: 100%;
    pointer-events: auto;
}

body.home .smooth-transition {
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Info Card Styles */
body.home .info-card {
    flex: 0 0 280px;
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    padding: 12px;
    height: 75px;
    opacity: 0.6;
    transform: scale(0.96);
    transition: opacity 0.4s ease, transform 0.4s ease;
    overflow: visible !important;
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

@media (max-width: 640px) {
    body.home .info-card {
        flex: 0 0 70%;
    }
}

body.home .info-card.active {
    background: rgba(40, 40, 40, 0.9);
    opacity: 1;
    transform: scale(1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: default;
}

body.home .poster-container {
    width: 45px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 14px;
    background-color: #333;
    margin-top: -30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 20;
    transition: transform 0.3s ease;
}

body.home .info-card.active .poster-container {
    transform: translateY(-5px);
}

body.home .poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.home .info-content-right {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
}

body.home .work-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

body.home .work-name {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.home .work-desc {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

body.home .split-line {
    width: 1px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.4);
}

body.home .play-btn-container {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-left: 8px;
    cursor: pointer;
}

/* Button Section */
body.home .buttons-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    body.home .buttons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

body.home .custom-gradient-btn {
    background: linear-gradient(to right, #dc2626, #991b1b);
    border-radius: 4px;
    width: 100%;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    transition: opacity 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

body.home .custom-gradient-btn:hover {
    opacity: 0.9;
    box-shadow: 0 10px 15px -3px rgba(185, 28, 28, 0.2);
}

body.home .btn-content-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

body.home .btn-text {
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1;
}

/* Section Headers */
body.home .section-icon-box {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(to bottom right, rgba(220, 38, 38, 0.2), transparent);
    border: 1px solid rgba(220, 38, 38, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.15);
    backdrop-filter: blur(4px);
}

body.home .section-icon-box i {
    color: #ef4444;
    font-size: 1.125rem;
}

body.home .section-title {
    display: flex;
    flex-direction: column;
}

body.home .section-title h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    letter-spacing: -0.025em;
}

@media (min-width: 768px) {
    body.home .section-title h2 {
        font-size: 1.5rem;
    }
}

body.home .view-all-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 6px 6px 6px 16px;
    border-radius: 9999px;
    background-color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
    text-decoration: none;
}

body.home .view-all-btn:hover {
    border-color: rgba(220, 38, 38, 0.3);
    background-color: #222;
}

body.home .view-all-btn span {
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
    transition: color 0.3s;
}

body.home .view-all-btn:hover span {
    color: white;
}

body.home .arrow-circle {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

body.home .view-all-btn:hover .arrow-circle {
    background-color: #dc2626;
}

body.home .arrow-circle i {
    font-size: 10px;
    color: #6b7280;
    transform: rotate(-45deg);
    transition: transform 0.3s, color 0.3s;
}

body.home .view-all-btn:hover .arrow-circle i {
    color: white;
    transform: rotate(0deg);
}

/* Anime Card & Scroll */
body.home .horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 0.75rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
}

@media (min-width: 768px) {
    body.home .horizontal-scroll-container {
        gap: 1.25rem;
    }
}

body.home .trending-card {
    flex: 0 0 160px;
    width: 160px;
    scroll-snap-align: start;
    cursor: pointer;
    text-decoration: none;
}

@media (min-width: 768px) {
    body.home .trending-card {
        flex: 0 0 180px;
        width: 180px;
    }
}

@media (max-width: 640px) {
    body.home .trending-card {
        flex: 0 0 calc((100% - 1.5rem) / 3);
        width: calc((100% - 1.5rem) / 3);
    }
}

/* Latest Upload Grid */
body.home #latest-uploads-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding-bottom: 2rem;
}

@media (max-width: 640px) {
    body.home #latest-uploads-grid {
        display: flex;
        flex-wrap: wrap;
    }

    body.home #latest-uploads-grid .anime-card {
        width: calc((100% - 1.5rem) / 3);
    }
}

@media (min-width: 640px) {
    body.home #latest-uploads-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 768px) {
    body.home #latest-uploads-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    body.home #latest-uploads-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1280px) {
    body.home #latest-uploads-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Animations */
@keyframes fadeIn-home {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.home .fade-in {
    animation: fadeIn-home 0.5s ease-out forwards;
}

/* Loader */
body.home .loader-container.active {
    display: flex;
}

/* Navigation Arrows for Trending */
body.home .trending-nav-arrows {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

body.home .nav-arrow-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background-color: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.home .nav-arrow-btn:hover {
    background-color: #dc2626;
    border-color: #dc2626;
    color: white;
    transform: scale(1.05);
}

body.home .nav-arrow-btn:active {
    transform: scale(0.95);
}

body.home .nav-arrow-btn i {
    font-size: 0.875rem;
}

/* Heading Margin Fix */
body.home h3,
body.home h2 {
    margin-bottom: 0;
}

/* ===================================================================
   SINGLE TV SHOW PAGE STYLES (single-tv_show.php)
   =================================================================== */

/* Scoped for Single TV Show Pages */
body.single-tv_show {
    font-family: 'Roboto', sans-serif;
    background-color: #050505;
    color: #e5e5e5;
}

/* Utilities */
body.single-tv_show .hidden {
    display: none !important;
}

body.single-tv_show .no-scrollbar::-webkit-scrollbar {
    display: none;
}

body.single-tv_show .no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body.single-tv_show .rotate-180 {
    transform: rotate(180deg);
}

body.single-tv_show .chevron {
    transition: transform 0.3s ease;
}

/* Custom Scrollbar for Dropdown */
body.single-tv_show .dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

body.single-tv_show .dropdown-menu::-webkit-scrollbar-track {
    background: #151515;
    border-radius: 3px;
}

body.single-tv_show .dropdown-menu::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
}

body.single-tv_show .dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

body.single-tv_show .dropdown-menu {
    scrollbar-width: thin;
    scrollbar-color: #4b5563 #151515;
}

/* Container */
body.single-tv_show .anime-container {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

@media (min-width: 768px) {
    body.single-tv_show .anime-container {
        padding: 32px;
        gap: 5px;
    }
}

/* Info Section */
body.single-tv_show .info-section {
    position: relative;
    margin: 10px 0;
}

body.single-tv_show .bg-glow {
    position: absolute;
    inset: -4px;
    background: linear-gradient(to right, #dc2626, #9333ea);
    border-radius: 16px;
    filter: blur(8px);
    opacity: 0.2;
    z-index: 0;
}

/* Glass panel responsive padding */
@media (min-width: 768px) {
    body.single-tv_show .glass-panel {
        padding: 32px;
    }
}

/* Info Grid responsive font size */
@media (min-width: 768px) {
    body.single-tv_show .info-grid {
        font-size: 20px;
        gap: 6px;
    }
}

body.single-tv_show .info-grid>div {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Meta label responsive width */
@media (min-width: 768px) {
    body.single-tv_show .meta-label {
        width: 96px;
    }
}

body.single-tv_show .meta-value {
    font-weight: 500;
    color: #d1d5db;
}

body.single-tv_show .meta-value.highlight {
    color: #d1d5db;
}

/* Storyline & Audio Section */
body.single-tv_show .story-audio-section {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

body.single-tv_show .story-box {
    display: none;
}

body.single-tv_show .section-header {
    display: none;
}

body.single-tv_show .story-text {
    display: none;
}

/* Audio/Language Tags */
body.single-tv_show .audio-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.single-tv_show .lang-tag {
    padding: 2px 8px;
    background-color: #1a1a1a;
    color: #d1d5db;
    font-size: 10px;
    border-radius: 4px;
    border: 1px solid #374151;
    font-weight: 600;
    letter-spacing: 0.02em;
}

@media (min-width: 768px) {
    body.single-tv_show .lang-tag {
        font-size: 11px;
    }
}

/* Content Panels */
body.single-tv_show .content-panel {
    background-color: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
}

body.single-tv_show .section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 12px 0;
}

@media (min-width: 768px) {
    body.single-tv_show .content-panel {
        padding: 20px;
    }

    body.single-tv_show .section-title {
        font-size: 20px;
        margin: 16px 0;
    }
}

/* Episodes Section */
body.single-tv_show .ep-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

body.single-tv_show .ep-title h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.single-tv_show .ep-sub {
    font-size: 10px;
    color: #6b7280;
    margin-top: 2px;
}

body.single-tv_show .dropdown-container {
    position: relative;
}

body.single-tv_show .dropdown-btn {
    background: #151515;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

body.single-tv_show .dropdown-btn:hover {
    background: #222222;
}

body.single-tv_show .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin-top: 4px;
    min-width: 150px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.single-tv_show .dropdown-menu.hidden {
    display: none;
}

body.single-tv_show .season-option {
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

body.single-tv_show .season-option:hover {
    background: #222222;
}

body.single-tv_show .season-option.active {
    background: rgba(127, 29, 29, 0.2);
    color: #dc2626;
}

body.single-tv_show .ep-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.single-tv_show .ep-list {
    flex: 1;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0;
    scroll-behavior: smooth;
}

body.single-tv_show .ep-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #151515;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
}

body.single-tv_show .ep-btn:hover {
    border-color: #dc2626;
}

body.single-tv_show .ep-btn.active {
    background: #dc2626;
    border-color: #dc2626;
}

body.single-tv_show .btn-all {
    width: 48px;
    height: 40px;
    border-radius: 4px;
    background: #151515;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.single-tv_show .btn-all:hover {
    background: #dc2626;
    border-color: #dc2626;
}

/* Anime Card Styles */
body.single-tv_show .anime-card {
    min-width: 140px;
    max-width: 160px;
    cursor: pointer;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    body.single-tv_show .anime-card {
        min-width: 160px;
        max-width: 180px;
    }
}

/* Modals */
body.single-tv_show .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

body.single-tv_show .modal-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

body.single-tv_show .lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid #1f2937;
}

body.single-tv_show .close-lightbox {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 36px;
    cursor: pointer;
}

body.single-tv_show .close-lightbox:hover {
    color: white;
}

/* Episodes Modal */
body.single-tv_show .episodes-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

body.single-tv_show .episodes-modal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

body.single-tv_show .modal-content {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

body.single-tv_show .modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.single-tv_show .modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.single-tv_show .close-modal {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

body.single-tv_show .close-modal:hover {
    color: white;
}

body.single-tv_show .modal-season-selector {
    padding: 15px 20px;
    background: #151515;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.single-tv_show .modal-episodes-grid {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    align-content: start;
}

body.single-tv_show .modal-ep-btn {
    min-width: 80px;
    width: 100%;
    height: auto;
    padding: 10px 6px;
    border-radius: 8px;
    background: #151515;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
    text-align: center;
    line-height: 1.3;
}

body.single-tv_show .modal-ep-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-2px);
}

body.single-tv_show .modal-ep-btn.active {
    background: #dc2626;
    border-color: #dc2626;
}

@media (min-width: 480px) {
    body.single-tv_show .modal-episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    body.single-tv_show .modal-ep-btn {
        min-width: 90px;
        padding: 12px 8px;
        font-size: 14px;
    }
}

@media (min-width: 768px) {
    body.single-tv_show .modal-episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }

    body.single-tv_show .modal-ep-btn {
        min-width: 100px;
        padding: 14px 10px;
        font-size: 15px;
    }
}

@media (min-width: 1024px) {
    body.single-tv_show .modal-episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }

    body.single-tv_show .modal-ep-btn {
        min-width: 110px;
        font-size: 16px;
    }
}

/* Animation Keyframes */
@keyframes ping-tvshow {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* ===================================================================
   SINGLE MOVIE PAGE STYLES (single-anime.php)
   =================================================================== */

/* Scoped for Single Anime Pages */
body.single-anime {
    font-family: 'Roboto', sans-serif;
    background-color: #050505;
    color: #e5e5e5;
}

/* Utilities */
body.single-anime .hidden {
    display: none !important;
}

body.single-anime .no-scrollbar::-webkit-scrollbar {
    display: none;
}

body.single-anime .no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body.single-anime .rotate-180 {
    transform: rotate(180deg);
}

body.single-anime .chevron {
    transition: transform 0.3s ease;
}

/* Container */
body.single-anime .anime-container {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 10px;
}

@media (min-width: 768px) {
    body.single-anime .anime-container {
        padding: 32px;
        gap: 40px;
    }
}

/* Info Section */
body.single-anime .info-section {
    position: relative;
}

body.single-anime .bg-glow {
    position: absolute;
    inset: -4px;
    background: linear-gradient(to right, #dc2626, #9333ea);
    border-radius: 16px;
    filter: blur(8px);
    opacity: 0.2;
    z-index: 0;
}

/* Glass panel responsive padding */
@media (min-width: 768px) {
    body.single-anime .glass-panel {
        padding: 32px;
    }
}

/* Info Grid responsive font size */
@media (min-width: 768px) {
    body.single-anime .info-grid {
        font-size: 20px;
        gap: 6px;
    }
}

body.single-anime .info-grid>div {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Meta label responsive width */
@media (min-width: 768px) {
    body.single-anime .meta-label {
        width: 96px;
    }
}

body.single-anime .meta-value {
    font-weight: 500;
    color: #d1d5db;
}

body.single-anime .meta-value.highlight {
    color: #d1d5db;
}

/* Storyline & Audio Section */
body.single-anime .story-audio-section {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

body.single-anime .story-box {
    display: none;
}

body.single-anime .section-header {
    display: none;
}

body.single-anime .story-text {
    display: none;
}

/* Audio/Language Tags */
body.single-anime .audio-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.single-anime .lang-tag {
    padding: 2px 8px;
    background-color: #1a1a1a;
    color: #d1d5db;
    font-size: 10px;
    border-radius: 4px;
    border: 1px solid #374151;
    font-weight: 600;
    letter-spacing: 0.02em;
}

@media (min-width: 768px) {
    body.single-anime .lang-tag {
        font-size: 11px;
    }
}

/* Content Panels */
body.single-anime .content-panel {
    background-color: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    overflow: hidden;
}

body.single-anime .section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    body.single-anime .content-panel {
        padding: 20px;
    }

    body.single-anime .section-title {
        font-size: 20px;
        margin-bottom: 16px;
    }
}

/* Anime Card Styles */
body.single-anime .anime-card {
    min-width: 140px;
    max-width: 160px;
    cursor: pointer;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    body.single-anime .anime-card {
        min-width: 160px;
        max-width: 180px;
    }
}

/* Modals */
body.single-anime .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

body.single-anime .modal-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

body.single-anime .lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid #1f2937;
}

body.single-anime .close-lightbox {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 36px;
    cursor: pointer;
}

body.single-anime .close-lightbox:hover {
    color: white;
}

/* Animation Keyframes */
@keyframes ping-anime {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Pagination Styles */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0 20px;
    flex-wrap: wrap;
}

.pagination-wrapper .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    background-color: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.pagination-wrapper .page-numbers:hover {
    background-color: var(--bg-hover);
    color: white;
    border-color: var(--red-primary);
}

.pagination-wrapper .page-numbers.current {
    background: linear-gradient(135deg, var(--red-primary), var(--red-dark));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.pagination-wrapper .page-numbers.dots {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .pagination-wrapper {
        gap: 5px;
        margin: 30px 0 15px;
    }

    .pagination-wrapper .page-numbers {
        min-width: 34px;
        height: 34px;
        padding: 0 10px;
        font-size: 14px;
    }
}

/* Pagination - Always Single Line */
.pagination-wrapper {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0;
}

.pagination-wrapper::-webkit-scrollbar {
    display: none;
}

.pagination-wrapper .page-numbers {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
    border-radius: 6px;
}

.pagination-wrapper .page-numbers.current {
    background: linear-gradient(135deg, var(--red-primary), var(--red-dark)) !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4) !important;
}

@media (max-width: 360px) {
    #loadMoreCount {
        display: none;
    }
}

/* --- TV Show Player Controls --- */
.tv-nav-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tv-control-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease, opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tv-control-btn:disabled,
.tv-control-btn[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-btn {
    color: #ffffff;
    font-size: 20px;
}

.nav-btn:hover:not(:disabled),
.nav-btn.btn-clicked-active:not(:disabled) {
    color: #ea3333;
}

.nav-btn:active:not(:disabled) {
    color: #ff0000;
    transform: scale(1.2);
    transition: transform 0.1s ease;
}

.fullscreen-btn {
    color: #ffffff;
    font-size: 24px;
    transition: all 0.2s ease;
}

.fullscreen-btn:hover:not(:disabled),
.fullscreen-btn.btn-clicked-active:not(:disabled) {
    color: #ea3333;
}

.fullscreen-btn:active:not(:disabled) {
    color: #ff0000;
    transform: scale(1.2);
    transition: transform 0.1s ease;
}

#totalEpCount {
    color: var(--primary-red, #dc2626);
    font-size: 1.2em;
    font-weight: 800;
}

/* ==========================================================================
   Dynamic Download Section Styles
   ========================================================================== */

.dl-toggle-bar {
    display: flex;
    justify-content: center;
}
.dl-toggle-container {
    background-color: #121212;
    border: 1px solid #1f2937;
    border-radius: 10px;
    padding: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}
.dl-toggle-btn {
    flex: 1;
    border-radius: 5px;
    padding: 8px 0;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-align: center;
}
.dl-toggle-btn.active {
    background-color: var(--primary-red, #ea3333);
    color: white;
    box-shadow: 0 2px 8px rgba(234, 51, 51, 0.3);
}
.dl-toggle-btn:not(.active) {
    background: transparent;
    color: #9ca3af;
}

.dl-wrapper {
    margin-top: 20px;
}
.dl-set-title {
    text-align: center;
    color: white;
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.dl-lists-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc((53px * 8) + (8px * 7)); /* 8 items + 7 gaps */
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-right: 4px;
}

/* Scrollbar for dl-lists-container */
.dl-lists-container::-webkit-scrollbar {
    width: 4px;
}

.dl-lists-container::-webkit-scrollbar-track {
    background: #111;
    border-radius: 4px;
}

.dl-lists-container::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.5);
    border-radius: 4px;
}

.dl-lists-container::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.8);
}


/* Accordion Component — Matches dl-group design */
.new-accordion-item {
    background: #111;
    border: 1px solid #1f2937;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    transition: border-color 0.3s;
}
.new-accordion-item:hover {
    border-color: rgba(153, 27, 27, 0.5);
}

.new-accordion-trigger {
    width: 100%;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #1a1a1a, #222);
    border: none;
    outline: none;
    cursor: pointer;
    color: white;
    transition: background 0.3s;
}
.new-accordion-trigger:hover {
    background: linear-gradient(to right, #222, #2a2a2a);
}

.new-accordion-trigger-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.new-dl-icon {
    background-color: #dc2626;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, color 0.3s;
    flex-shrink: 0;
}
.new-dl-icon i {
    color: white;
    font-size: 12px;
    transition: color 0.3s;
}
.new-accordion-trigger:hover .new-dl-icon {
    background: rgba(220, 38, 38, 0.12);
}
.new-accordion-trigger:hover .new-dl-icon i {
    color: #dc2626;
}

.new-dl-title-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}
.new-dl-button-name {
    color: #e5e7eb;
    font-weight: 700;
    font-size: 14px;
}
.new-dl-meta-parts {
    font-size: 10px;
    color: #6b7280;
    margin-top: 2px;
    font-weight: 500;
}

.new-chevron-icon {
    color: #6b7280;
    font-size: 12px;
    transition: transform 0.3s ease;
}

/* Collapsible Panel */
.new-accordion-content {
    background: #0a0a0a;
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.new-accordion-item.active .new-accordion-content {
    grid-template-rows: 1fr;
    opacity: 1;
}
.new-accordion-item.active .new-chevron-icon {
    transform: rotate(180deg);
}

/* Server Grid */
.new-server-grid {
    overflow: hidden;
    padding: 0 12px;
    border-top: 1px solid transparent;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    transition: padding 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.new-accordion-item.active .new-server-grid {
    padding: 12px;
    border-top: 1px solid #1f2937;
}

.new-server-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #1f2937;
    color: #d1d5db;
    padding: 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #374151;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    box-sizing: border-box;
    width: 100%;
    text-align: center;
}
.new-server-btn i {
    color: #6b7280;
    font-size: 13px;
    transition: color 0.3s;
}
.new-server-btn:hover i {
    color: white;
}
.new-server-btn:hover {
    background: #dc2626;
    color: white;
    border-color: #ef4444;
    text-decoration: none;
}

/* Responsive Accordion — Tablet/Desktop */
@media (min-width: 768px) {
    .new-accordion-trigger {
        padding: 16px;
    }
    .new-dl-icon {
        width: 40px;
        height: 40px;
    }
    .new-dl-icon i {
        font-size: 16px;
    }
    .new-dl-button-name {
        font-size: 15px;
    }
    .new-dl-meta-parts {
        font-size: 11px;
    }
    .new-server-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 0 16px;
    }
    .new-accordion-item.active .new-server-grid {
        padding: 16px;
    }
    .new-server-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}

.new-dl-hidden {
    display: none !important;
}

/* ================================================
   SEASON TOGGLE BAR
   ================================================ */
.season-toggle-bar {
    display: flex;
    justify-content: center;
    width: 100%;
}

.season-toggle-container {
    background-color: #121212;
    border: 1px solid #1f2937;
    padding: 4px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    max-width: 100%;
    overflow-x: auto;
}

.season-toggle-container::-webkit-scrollbar {
    display: none;
}

.season-toggle-btn {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    text-align: center;
}

.season-toggle-btn:hover:not(.active) {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.season-toggle-btn.active {
    background-color: var(--primary-red, #ea3333);
    color: white;
    box-shadow: 0 2px 8px rgba(234, 51, 51, 0.3);
}

/* ================================================
   TV CONTROL BAR
   ================================================ */
.tv-control-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background-color: #111111 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
}

.current-ep-number {
    position: static !important;
    transform: none !important;
    background-color: #2a1717 !important;
    padding: 4px 12px !important;
    border-radius: 6px !important;
    border: 1px solid #4a1c1c !important;
    color: #fecaca !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    min-width: auto !important;
}

/* =============================================
   Movie Title Text Section (single-tv_show.php)
   ============================================= */
h2.movie-title-text {
    margin: 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.movie-title-text > span:not(.dl-title-icon-wrapper) {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

.dl-title-icon-wrapper .dl-title-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary-red);
}


