:root {
    /* Color Palette - Deep Indigo Theme */
    --bg: #030712;
    --bg-alt: #161616;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --secondary: #a5b4fc;
    --text-primary: #c8c8c8;
    --text-secondary: #e7e7e7;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(8px);

    /* Spacing & Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 10px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #131313;
    color: var(--text-primary);
    font-family: system-ui;
    letter-spacing: 0.05rem;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Typography */
.badge-quality {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.badge-votes {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.gradient-text {
    background: #EDEDED;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.icon-white {
    filter: brightness(0) invert(1);
}

.error-skull {
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
    opacity: 0.9;
}

h1,
h2,
h3,
h4 {
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* Header & Navigation (Reconstructed) */
.main-header {
    width: 100%;
    margin: 0 auto;
    padding: 1rem 8%;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 3rem 8%;
    min-height: 100%;
    padding-top: 2rem;
}

@media (max-width: 988px) {
    .container {
        padding: 2rem 0.5rem;
    }
}

@media (max-width: 750px) {
    .main-header {
        padding: 0% 0%;
    }
}

/* Glassmorphism Components */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
}



.header-container {
    display: flex !important;
    flex-direction: column !important;
    padding: 1rem 1.5rem;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    gap: 1rem;
    width: 100% !important;
}

.header-row-top,
.header-row-bottom {
    width: 100%;
    flex-shrink: 0;
}

/* Row 1: Top (Logo - Nav - Search - Toggle) */
.header-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    /* Added to allow search to drop to new line on mobile */
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    flex-shrink: 0;
}

.logo-img {
    height: 75px;
    width: auto;
}

.logo-box {
    background: var(--accent);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.25rem;
}

/* Desktop Nav */
.desktop-nav {
    display: none;
    /* Hidden on Mobile/Tablet */
    gap: 1rem;
    align-items: center;
    flex: 1;
    justify-content: right;
}

.nav-link {
    font-weight: 500;
    color: white;
    transition: var(--transition);
    font-size: 1rem;
}



/* Search Bar */
.header-search-wrapper {
    display: block;
    /* Show on mobile */
    width: 100%;
    /* Full width on mobile */
    order: 3;
    /* Below logo and toggle */
    margin-top: 0.5rem;
}

.search-form {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 5px;
    padding: 0.75rem 1.25rem 0.75rem 2.75rem;
    color: white;
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.search-btn {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon {
    width: 22px;
    height: 22px;
    color: #b9b9b9;
}

/* Mobile Toggle */
.mobile-toggle {
    display: block;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Row 2: Header Buttons */
.header-row-bottom {
    width: 100%;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    display: block;
    /* Control layout via children */
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
    width: 100%;
}


@media (min-width: 768px) {
    .button-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.header-btn {
    background: rgb(255 255 255);
    padding: 0.4rem;
    border-radius: 5px;
    color: #010101;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
}




.btn-admin-link {
    background: var(--accent);
    color: white;
}


/* DESKTOP BREAKPOINT (1024px) */
@media (min-width: 1100px) {
    .desktop-nav {
        display: flex;
    }

    .header-search-wrapper {
        display: block;
        width: 180px;
        order: initial;
        /* Reset order for desktop */
        margin-top: 0;
        /* Reset margin for desktop */
    }

    .mobile-toggle {
        display: none;
    }

    /* Reset Buttons to Flex Row on Desktop */
    .button-grid {
        display: grid;
        justify-content: center;
        grid-template-columns: repeat(6, 1fr);
        width: 100%;
        gap: 1rem;
    }

    .header-btn {
        padding: 0.4rem 0.75rem;
    }
}


@media (min-width: 1200px) {

    /* Reset Buttons to Flex Row on Desktop */
    .button-grid {
        display: grid;
        justify-content: center;
        grid-template-columns: repeat(8, 1fr);
        width: 100%;
        gap: 1rem;
    }

}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.mobile-menu-content {
    padding: 1rem;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #030712;
}

.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.mobile-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    padding: 0.6rem 0.6rem;
    border-radius: 5px;
    color: white;
    font-size: 0.9rem;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
}

.w-full {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 4rem 0 6rem;
}

.hero-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    font-weight: 400;
}

/* Movie Grid */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    row-gap: 3rem;
}

@media (min-width: 768px) {
    .movie-grid {
        grid-template-columns: repeat(4, 1fr);
    }

}

@media (min-width: 1024px) {
    .movie-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1280px) {
    .movie-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Movie Card */
.movie-card {
    position: relative;
    display: block;
    contain-intrinsic-size: 210px 350px;
    contain: layout style;
    background: #000000;
    padding: 0.2rem;
    border-radius: 5px;
    height: 100%;
}

.movie-poster-container {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 5px;
    overflow: hidden;
    transition: var(--transition);
    /* Performance Optimization: Remove blur */
    background: rgba(255, 255, 255, 0.05);
    contain-intrinsic-size: 210px 300px;
    /* Rough estimate of poster height */
}



.movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}



.movie-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 60%);
    opacity: 1;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0.5rem;
}



.movie-badges {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
}

.badge {
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.badge-imdb {
    background: #f5c518;
    color: #000;
}

.badge-tmdb {
    background: var(--accent);
    color: #fff;
}

.badge-quality {
    background: rgba(30, 41, 59, 0.8);
}

.badge-votes {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--glass-border);
}

/* Rating Badge Links */
.movie-badges object,
.movie-badges a {
    display: inline-block;
    transition: var(--transition);
}

.movie-badges a:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.movie-badges a .badge-imdb:hover {
    background: #ffd700;
}

.metric-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.metric-link:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
}




.movie-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.movie-title {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: 400;
    letter-spacing: normal;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
}

@media (max-width: 768px) {
    .movie-title {
        font-size: 00.9375rem !important;
    }
}


.movie-card:hover .movie-title {
    color: var(--accent);
}

/* Pagination */
.pagination-container {
    margin-top: 5rem;
    display: flex;
    justify-content: center;
}

.pagination-list {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    min-width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: #b9b9b9;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 4px;
    transition: var(--transition);
    text-decoration: none;
}

.pagination-link.prev,
.pagination-link.next {
    padding: 0 1.25rem;
}

.pagination-link:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.pagination-link.active {
    background: #4f46e5;
    color: white;
    font-weight: 700;
}

.pagination-link.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 640px) {
    .pagination-list {
        gap: 0.35rem;
    }

    .pagination-link {
        height: 36px;
        min-width: 36px;
        padding: 0 0.75rem;
        font-size: 0.8rem;
    }

    .pagination-link.prev,
    .pagination-link.next {
        width: 100%;
        order: 10;
    }
}

/* Footer Styles */
.footer {
    margin-top: 8rem;
    padding-bottom: 3rem;
}


.footer-logo {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 1.5rem;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    max-width: 500px;
    margin: 0 auto 2.5rem;
    font-weight: 300;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.copyright {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #334155;
}

/* Movie Details Page Specific */
.movie-hero {
    position: relative;
    background-size: cover;
    background-position: center;
}

@media (max-width: 768px) {
    .movie-hero {
        padding-top: 10%;
    }
}

.movie-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(3, 7, 18, 0.4), var(--bg));
}

.movie-hero .container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.movie-page-views-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (min-width: 1024px) {
    .movie-hero .container {
        flex-direction: row;
        align-items: flex-start;
    }
}

.details-poster {
    width: 220px;
    height: auto;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
}

.details-content {
    flex: 1;
    text-align: center;
}

@media (min-width: 1024px) {
    .details-content {
        text-align: left;
    }
}

.details-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (min-width: 1024px) {
    .details-metrics {
        justify-content: flex-start;
    }
}

.metric-pill {
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pill-label {
    font-size: 0.8rem;
    font-weight: 900;
}

.language-pill {
    padding: 0.3rem 0.7rem;
    background: linear-gradient(90deg, #0f6c4b, #0d9d6e);
    border: 1px solid rgba(255, 255, 255, .03);
    color: white !important;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(13, 157, 110, 0.2);
    text-decoration: none;
    cursor: pointer;
}



.details-title {
    font-size: clamp(2rem, 2.3vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-align: left;
}

.meta-list-container {
    text-align: left;
}

.details-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.meta-row {
    font-size: 0.95rem;
}

.special-poster {
    border-radius: 10px;
}

.story-line {
    font-weight: 500;
    font-size: 1rem;
}

@media (min-width: 1024px) {
    .details-info {
        justify-content: flex-start;
    }
}

.details-plot {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.8;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 4rem;
}

@media (min-width: 768px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    padding: 2.5rem;
    border-radius: var(--radius-xl);
}

.feature-header {
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1.5rem;
}

.feature-item {
    margin-bottom: 1.25rem;
}

.item-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.badge-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tax-badge {
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tax-badge:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.tax-badge:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* Archive Page Specific */
.archive-header-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    text-align: left;
    padding: 2rem;
    align-items: start;
    /* Prevent image stretching */
}

.archive-image-box {
    width: 120px;
    height: auto;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.archive-image-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
}

.social-link:hover {
    color: var(--accent);
}

.term-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-weight: 400;
    color: var(--text-muted);
    font-size: 1rem;
}

.bio-texomonies {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.4rem;
    text-align: left;
    font-size: 0.9rem;
}

.term-stats {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9eacc5;
    display: grid;
    gap: 0rem;
    text-align: left;
}

@media (max-width: 768px) {
    .archive-header-grid {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .term-meta {
        gap: 0.3rem;
        margin-bottom: 0.3rem;
    }

    .archive-image-box {
        margin-top: 0.7rem;
        width: 140px;
    }

    .bio-texomonies {
        font-size: 1rem;
    }

    .archive-header-grid {
        gap: 1rem;
    }

}

.cast-section {
    margin-top: 6rem;
}

.cast-scroll {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding-bottom: 2rem;
    scrollbar-width: none;
}

.cast-scroll::-webkit-scrollbar {
    display: none;
}

.actor-card {
    flex-shrink: 0;
    width: 100%;
    text-align: center;
}

.actor-img-container {
    width: 130px;
    height: 130px;
    border-radius: var(--radius-full);
    margin: 0 auto 1rem;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.actor-card:hover .actor-img-container {
    border-color: var(--accent);
    transform: scale(1.05);
}

.actor-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: var(--transition);
}

.actor-card:hover .actor-img {
    filter: grayscale(0);
    opacity: 1;
}

.actor-name {
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.actor-bio {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Screenshots */
.screenshot-grid {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .screenshot-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .screenshot-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.screenshot-item {
    aspect-ratio: 16/9;
    overflow: hidden;
    contain-intrinsic-size: 300px 200px;
    contain: layout style;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--glass-border);
}



.screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Lightbox Modal Styles */
.lightbox-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

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

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

.lightbox-close svg {
    width: 20px;
    height: 20px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}



.lightbox-nav svg {
    width: 20px;
    height: 20px;
}

.lightbox-nav.prev {
    left: 2rem;
}

.lightbox-nav.next {
    right: 2rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    padding: 0.3rem 0.7rem;
    border-radius: 5px;
    color: white;
    font-size: 0.7rem;
    font-weight: 400;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 35px;
        height: 35px;
        background: rgba(0, 0, 0, 0.5);
    }

    .lightbox-nav.prev {
        left: 1rem;
    }

    .lightbox-nav.next {
        right: 1rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
    }
}

/* Global Lazy Loading Animation */
img.lazy {
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.4s ease;
}

img.lazy.loaded {
    opacity: 1;
}

.screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Comment Section Styles --- */
#comments-section {
    position: relative;
    z-index: 10;
    margin-top: 2rem;
    padding-right: 2%;
    padding-left: 2%;
}

#comments-section textarea,
#comments-section input {
    color: #e5e7eb;
    /* text-gray-200 */
}

#comments-section textarea::placeholder,
#comments-section input::placeholder {
    color: #9ca3af;
    /* text-gray-400 */
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.comment-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.comment-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.comment-body {
    flex: 1;
    min-width: 0;
    /* Text truncation fix */
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 700;
    color: #f3f4f6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-author.admin {
    color: #818cf8;
    /* Indigo-400 */
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    font-size: 0.65rem;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    font-weight: 800;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.comment-date {
    font-size: 0.75rem;
    color: #9ca3af;
}

.comment-text {
    font-size: 0.95rem;
    color: #d1d5db;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 600;
    transition: color 0.2s;
}

.action-btn:hover {
    color: white;
}

.action-btn .icon {
    width: 1rem;
    height: 1rem;
}

.like-btn:hover {
    color: #34d399;
}

/* Emerald */
.dislike-btn:hover {
    color: #f87171;
}

/* Red */

.comment-replies-box-wrapper {
    margin-top: 1.25rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.comment-nested-reply {
    display: flex;
    gap: 0.875rem;
    padding-top: 0.5rem;
}

.comment-nested-reply .comment-avatar {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
}

.comment-nested-reply .comment-text {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}



/* Trailer */
.trailer-section {
    margin-top: 6rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.trailer-container {
    padding: 1rem;
    border-radius: var(--radius-xl);
}

.video-wrapper {
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Archive Header */
.archive-header {
    padding: 2%;
    text-align: center;
    margin-bottom: 3rem;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .archive-header {
        padding: 3%;
        margin-bottom: 2rem;
    }
}

.archive-thumb {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    border: 2px solid var(--accent);
    margin: 0 auto 1.5rem;
    object-fit: cover;
}

.archive-type {
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.4em;
    margin-bottom: 1rem;
}

/* Dynamic Download Section */
.download-section {
    width: 100%;
    margin-top: 4rem;
}

.download-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.download-card {
    flex: 0 1 100%;
    max-width: 350px;
    padding: 2rem 1.5rem;
    border-radius: 5px;
    text-align: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 640px) {
    .download-card {
        flex: 0 1 calc(50% - 1.5rem);
    }
}

@media (min-width: 1024px) {
    .download-card {
        flex: 0 1 calc(33% - 1.5rem);
        max-width: 350px;
    }
}

.download-card:hover {
    transform: translateY(-2px);
    border-color: #f7c23b;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.quality-header {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quality-icon {
    height: 100%;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.15));
}

.audio-info {
    width: 100%;
}

.audio-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: #ffb84d;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.audio-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
}

.audio-tag {
    background: linear-gradient(90deg, #0f6c4b, #0d9d6e);
    border: 1px solid rgba(255, 255, 255, .03);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 700;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.download-btn-dynamic {
    width: 100%;
    margin-top: auto;
    background: #4f46e5;
    color: white;
    padding: 0.8rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-decoration: none;
}



.download-btn-dynamic.uploading {
    background: #ef4444;
    cursor: wait;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.15);
}

.download-btn-dynamic.uploading:hover {
    background: #dc2626;
    transform: none;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.2);
}

.download-btn-dynamic.uploading .dl-icon {
    animation: uploading-pulse 1.5s infinite ease-in-out;
}

@keyframes uploading-pulse {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateY(-3px);
        opacity: 0.7;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.download-card {
    position: relative;
}

.zip-info-trigger {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 30;
    color: var(--text-muted);
    cursor: help;
    transition: var(--transition);
    opacity: 0.8;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.zip-info-trigger:hover {
    color: var(--accent);
    opacity: 1;
    transform: scale(1.1);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 15px rgba(247, 194, 59, 0.2);
}

.zip-info-trigger::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    background: #0f172a;
    color: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.75rem;
    line-height: 1.5;
    font-weight: 500;
    width: 260px;
    max-width: 80vw;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    z-index: 110;
    text-align: left;
}

.zip-info-trigger:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* Tooltip adjustment for mobile to prevent overflow */
@media (max-width: 640px) {
    .zip-info-trigger::after {
        left: 0;
        width: 220px;
        font-size: 0.7rem;
    }
}

.dl-icon {
    width: 16px;
    height: 16px;
}

.archive-title {
    font-size: 1.5rem !important;
    font-weight: 800;
    line-height: 1.1;
    text-align: left;
}

.archive-count {
    margin-top: 2rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --- Comment Section Layout & Form --- */
.comment-section-wrapper {
    margin: 2rem;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

.archive-heading-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .comment-section-wrapper {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    .archive-header {
        justify-content: center;
    }

    .archive-heading-container {
        justify-content: center;
    }

    .header-container {
        padding: 1rem 0.5rem;
    }

}

.comment-section-header {
    font-size: 1.5rem !important;
    justify-content: center;
    font-weight: 700;
    color: white;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.comment-form-container {
    padding: 0.5rem;
    border-radius: 0.75rem;
    /* rounded-xl */
    margin-bottom: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .comment-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.comment-input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    /* rounded-lg */
    padding: 0.75rem 1rem;
    color: white;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
    font-family: inherit;
}

.comment-input:focus {
    border-color: #6366f1;
    /* indigo-500 */
    background-color: rgba(255, 255, 255, 0.08);
}

.comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.captcha-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.captcha-label {
    color: #9ca3af;
    /* text-gray-400 */
    font-size: 0.875rem;
    font-weight: 700;
    user-select: none;
}

.captcha-input {
    width: 4rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid #6b7280;
    /* gray-500 */
    text-align: center;
    color: white;
    outline: none;
}

.captcha-input:focus {
    border-color: #6366f1;
}

.comment-submit-btn {
    background-color: #4f46e5;
    font-size: 1rem;
    color: white;
    font-weight: 700;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-submit-btn:hover {
    background-color: #4338ca;
    /* indigo-700 */
}

.comment-submit-btn:active {
    transform: scale(0.95);
}

.comment-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-message {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.form-message.text-green-400 {
    color: #4ade80;
    text-align: center;
    margin: 1rem;
    font-size: 15px;
}

.form-message.text-red-400 {
    color: #f87171;
}

.comments-list-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.load-more-comments-btn {
    background-color: rgba(255, 255, 255, 0.05);
    color: #d1d5db;
    /* gray-300 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    /* full */
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-comments-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.load-more-comments-btn.hidden {
    display: none;
}

/* --- Mobile Comment Responsiveness --- */
@media (max-width: 480px) {
    .comment-item {
        gap: 0.75rem;
        padding: 0.7rem;
    }

    .comment-avatar {
        width: 2rem;
        height: 2rem;
        font-size: 0.8rem;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .comment-author {
        font-size: 0.85rem;
    }

    .comment-date {
        font-size: 0.65rem;
    }

    .comment-text {
        font-size: 0.85rem;
    }

    .comment-actions {
        gap: 0.75rem;
    }

    .action-btn {
        font-size: 0.7rem;
    }

    .action-btn .icon {
        width: 0.875rem;
        height: 0.875rem;
    }

    .comment-replies-box-wrapper {
        margin-top: 1rem;
        padding-left: 0.5rem;
    }

    .comment-nested-reply {
        gap: 0.5rem;
    }

    .comment-nested-reply .comment-avatar {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.65rem;
    }

    .comment-nested-reply .comment-text {
        font-size: 0.8rem;
    }
}

/* Pulse Animation for On-Going Status */
@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }

    70% {
        box-shadow: 0 0 0 7px rgba(76, 175, 80, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}


.badge-ongoing {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 3px;
    background: rgba(76, 175, 80, 0.18);
    color: #4CAF50;
    border: 1px solid #4CAF50;
    padding: 3px 5px;
    border-radius: 5px;
    font-size: 8px;
    font-weight: 400;
    animation: pulse-border 2s infinite;
    line-height: 1;
    width: fit-content;
    margin-bottom: 8px;
}

.badge-ongoing::before {
    content: '';
    width: 5px;
    height: 5px;
    background: #4CAF50;
    border-radius: 50%;
    display: inline-block;
    display: none;
}