﻿:root {
    --primary-color: #e50914;
    --bg-color: #0d0d0d;
    --text-color: #ffffff;
    --text-muted: #b3b3b3;
    --nav-bg: rgba(0, 0, 0, 0.9);
    --card-bg: #1f1f1f;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    padding: 1rem 0;
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: white;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-left: 2rem;
}

.menu-toggle {
    display: none;
}

.search-form {
    display: flex;
    align-items: center;
    background: #333;
    border-radius: 20px;
    padding: 0.3rem 1rem;
    border: 1px solid transparent;
}

.search-form:focus-within {
    border-color: var(--text-muted);
    background: black;
}

.search-form input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    font-family: inherit;
}

.search-form button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

main {
    padding-top: 80px;
    /* Navbar height */
    min-height: 80vh;
}

/* Home Slider (Basic) */
.hero {
    height: 60vh;
    background: linear-gradient(to top, var(--bg-color), transparent), url('https://image.tmdb.org/t/p/original/uDgy6hyPd82kOHh6I95FLtLnj6p.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding-bottom: 4rem;
}

.hero-content {
    max-width: 600px;
}

.hero-content {
    max-width: 600px;
}

/* Backdrop Card & Watch Styles (Moved from watch.php) */
.backdrop-card {
    margin: 0;
    /* Reset figure margin */
    min-width: 250px;
    height: 141px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    scroll-snap-align: start;
    flex-shrink: 0;
}

.backdrop-card figcaption {
    display: none;
    /* SEO only, hide visually */
}

.backdrop-card:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.backdrop-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .backdrop-card {
        flex: 0 0 220px;
        min-width: 220px;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* Carousel Navigation Dots */
.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.nav-dot {
    width: 8px;
    height: 8px;
    background-color: #555;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot.active {
    background-color: #fff;
    width: 24px;
}

.nav-dot:hover {
    background-color: #888;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.lightbox-content {
    margin: auto;
    display: block;
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-weight: 600;
}

.btn-primary:hover {
    background: #bd050e;
    color: white;
}

/* Section */
.section-title {
    margin: 3rem 0 1.5rem;
    font-size: 1.5rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

/* Grid */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 2rem;
}

.movie-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    position: relative;
}

.movie-card:hover {
    transform: translateY(-5px);
    z-index: 10;
}

.poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background: #333;
}

.card-info {
    padding: 1rem;
}

.card-info h3 {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.5rem;
}

.meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.rating {
    color: #ffd700;
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding: 2rem 0;
    background: #111;
    text-align: center;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1000px) {
    .container {
        padding: 0 1rem;
    }

    /* Mobile Navigation */
    .menu-toggle {
        display: block;
        cursor: pointer;
        z-index: 1001;
        order: 3;
        /* Logo is 1 (default), Search is 2, Menu is 3 */
    }

    .menu-toggle .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        -webkit-transition: all 0.3s ease-in-out;
        transition: all 0.3s ease-in-out;
        background-color: white;
    }

    /* Animate Hamburger */
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-content {
        position: fixed;
        left: 0;
        top: 70px;
        /* Adjust based on navbar height */
        gap: 0;
        flex-direction: column;
        justify-content: flex-start;
        background-color: var(--nav-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
        backdrop-filter: blur(10px);
        height: calc(100vh - 70px);
        overflow-y: auto;
        visibility: hidden;
        opacity: 0;
        transform: translateX(-100%);
        z-index: 999;
    }

    .nav-content.active {
        visibility: visible;
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .nav-actions {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    /* Mobile Search Bar Style */
    .search-form {
        display: flex;
        order: 2;
        /* Between logo and menu */
        flex: 1;
        max-width: none;
        margin: 0 15px;
        background: rgba(255, 255, 255, 0.1);
        padding: 5px 10px;
        height: 36px;
    }

    .search-form input {
        font-size: 16px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .watch-container {
        grid-template-columns: 1fr;
    }
}

/* Responsive Utility Classes for Nav */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: flex !important;
}

@media (max-width: 1000px) {
    .mobile-only {
        display: flex !important;
    }

    .desktop-only {
        display: none !important;
    }
}

/* Adjust Desktop Styles */
@media (min-width: 1001px) {
    .nav-content {
        /* Default flex behavior works fine now that actions are moved out */
        flex: 1;
        margin-left: 2rem;
    }

    .nav-links {
        /* No specific order needed if it's the only child */
    }

    .search-form {
        margin-left: 1rem;
        /* Search form is typically ordered by source, but let's be explicit if needed */
        /* Source order: Logo, Search, Content, Actions */
        /* We want: Logo, Content, Search, Actions */
        order: 3;
    }

    .nav-content {
        order: 2;
    }

    .nav-actions.desktop-only {
        order: 4;
        /* Last */
        margin-left: 1rem;
    }

    .logo {
        order: 1;
    }
}

/* === Watch Page Styles === */
.watch-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.5rem;
}

/* Main Column (Left) */
.main-column {
    min-width: 0;
    /* Critical for nested scroll containers in Grid */
}

/* Video Section */
.video-section {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.player-controls {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #111;
    overflow-x: auto;
}

.server-btn {
    background: #222;
    color: #fff;
    border: 1px solid #333;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.8rem;
    white-space: nowrap;
    border-radius: 4px;
    transition: 0.2s;
}

.server-btn:hover,
.server-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Watch Meta */
.watch-header-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.watch-poster {
    width: 200px;
    height: auto;
    flex-shrink: 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.watch-details {
    flex: 1;
}

.watch-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.watch-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    /* Use gap instead of margin-right on children */
    margin-bottom: 1rem;
    align-items: center;
}

.watch-meta span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-quality {
    background: #333;
    color: white;
    border: 1px solid #555;
}

.badge-rating {
    color: #ebdb00;
}

.genre-tags {
    margin: 10px 0;
}

.genre-tag {
    display: inline-block;
    background: #222;
    color: #ccc;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 5px;
}



/* Download Table */
.download-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.download-table th,
.download-table td {
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid #222;
}

.download-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.download-btn {
    background: #d32f2f;
    color: white;
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    display: inline-block;
}

/* Search Results Dropdown - Premium & Responsive */
.search-form {
    position: relative;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 320px;
    /* Slightly wider */
    max-height: 450px;

    /* Glassmorphism Background */
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);

    overflow-y: auto;
    z-index: 2000;
    animation: slideDown 0.2s ease-out;
    padding: 8px 0;
}

/* Custom Scrollbar */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.search-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #fff;
    border-left: 3px solid transparent;
}

.search-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--primary-color);
    padding-left: 19px;
    /* Subtle shift */
}

.search-item img {
    width: 45px;
    height: 68px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.search-info {
    flex: 1;
    min-width: 0;
    /* Prevent flex overflow */
}

.search-info h4 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: capitalize;
    display: block;
}

/* Right alignment for desktop if needed, currently left aligned to form */

@media (max-width: 1000px) {
    .search-results {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        max-height: 400px;
        border-radius: 0 0 8px 8px;
        margin-top: 5px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(13, 13, 13, 0.98);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    }

    .search-item {
        padding: 15px 20px;
    }

    .search-item img {
        width: 50px;
        height: 75px;
    }

    .search-info h4 {
        font-size: 1rem;
    }
}

/* Sidebar */
.related-card {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    background: #1a1a1a;
    padding: 10px;
    border-radius: 8px;
    transition: 0.2s;
}

.sidebar {
    position: sticky;
    bottom: 20px;
    /* Stick to bottom so last item is visible */
    align-self: start;
}

.related-card:hover {
    background: #252525;
}

.related-card img {
    width: 70px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.related-info {
    flex: 1;
    min-width: 0;
    /* Crucial for text-overflow in flex children */
}

.related-info h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-info span {
    font-size: 0.8rem;
    color: #888;
}

.related-info span {
    font-size: 0.8rem;
    color: #888;
}

/* Overview Section */
.overview-section {
    background: linear-gradient(145deg, #1a1a1a, #151515);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.overview-section h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: #fff;
    border-left: 3px solid var(--primary-color);
    padding-left: 10px;
}

.overview-section p {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Horizontal Scroller Section */
.scroller-section {
    margin-top: 1rem;
}

.scroller-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #333;
}

.scroller-header h3 {
    font-size: 1.3rem;
    color: white;
    margin: 0;
}

.scroller-container {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    /* Space for scrollbar */
    scroll-behavior: smooth;
    width: 100%;
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}

/* Cast Card (Horizontal) */
.cast-card {
    min-width: 140px;
    width: 140px;
    flex-shrink: 0;
    text-align: center;
    background: #151515;
    padding: 1rem 0.5rem;
    border-radius: 8px;
    transition: transform 0.2s, background 0.2s;
    border: 1px solid transparent;
}

.cast-card:hover {
    transform: translateY(-5px);
    background: #222;
    border-color: #333;
}

.cast-card img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid #333;
}

.cast-card h4 {
    font-size: 0.9rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 5px;
}

.cast-card p {
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 5px;
}

/* Crew Item (Horizontal) */
.crew-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: #151515;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #222;
    min-width: 250px;
    width: 250px;
    flex-shrink: 0;
    transition: transform 0.2s, background 0.2s;
}

.crew-item:hover {
    background: #222;
    border-color: #333;
    transform: translateY(-2px);
}

.crew-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.crew-info {
    flex: 1;
    overflow: hidden;
}

.crew-info h4 {
    font-size: 0.9rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crew-info p {
    font-size: 0.8rem;
    color: var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



/* Mobile Response for Watch */
@media (max-width: 1000px) {
    .watch-container {
        grid-template-columns: 100%;
        display: block;
        padding: 0;
    }

    /* Edge-to-edge video */
    .video-section {
        border-radius: 0;
        margin-bottom: 1rem;
        background: #000;
        width: 100%;
    }

    /* Restore padding for other content */
    .watch-header,
    .overview-section,
    .scroller-section,
    .sidebar {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .video-wrapper {
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
    }

    .sidebar {
        position: static;
    }

    /* Keep nav-actions visible but adjust size if needed */
    .search-form input {
        width: 100px;
    }

    .watch-header-row {
        flex-direction: row;
        /* Keep side-by-side */
        align-items: flex-start;
        text-align: left;
        gap: 1rem;
    }

    .watch-poster {
        width: 100px;
        /* Smaller poster for mobile */
    }

    .watch-header h1 {
        font-size: 1.2rem;
        /* Smaller title */
        margin-bottom: 0.2rem;
    }

    .watch-meta {
        justify-content: flex-start;
        gap: 8px;
        margin-bottom: 0.5rem;
    }

    .watch-meta span,
    .watch-meta i {
        font-size: 0.75rem;
        /* Smaller meta text */
    }

    .badge {
        font-size: 0.7rem;
        padding: 1px 6px;
    }

    .genre-tag {
        padding: 2px 8px;
        font-size: 0.7rem;
    }

    .watch-details p {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.8rem !important;
    }

    /* Mobile Scroller Adjustments */
    .scroller-container {
        gap: 1rem;
    }

    .cast-card {
        min-width: 120px;
        width: 120px;
    }
}

/* Nav Actions (Search + Profile) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.detail-item strong {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

.tagline {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-left: 3px solid var(--primary-color);
    padding-left: 10px;
}


/* IMDb Badge */
/* IMDb Badge */
.badge-imdb {
    background-color: transparent;
    color: var(--text-muted);
    /* Color for the rating number */
    padding: 0;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.imdb-logo {
    background-color: #f5c518;
    color: #000 !important;
    /* Force black text on yellow background */
    font-weight: 900;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.8rem;
    line-height: normal;
}


.auth-buttons a {
    color: var(--text-muted);
    font-weight: 500;
}

.auth-buttons a:hover {
    color: white;
}

/* Profile Dropdown */
.profile-menu {
    position: relative;
    cursor: pointer;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 50px;
    background-color: #1a1a1a;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    z-index: 1000;
    border: 1px solid #333;
}

.dropdown-content a {
    color: #eee;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: 0.2s;
}

.dropdown-content a:hover {
    background-color: #333;
    color: var(--primary-color);
}

.profile-menu.active .dropdown-content {
    display: block;
}

/* Subtitles Section */
.subtitles-section {
    margin-bottom: 30px;
    background: #111;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #222;
}

.subtitles-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subtitles-section h3 i {
    color: var(--primary-color);
}

.subtitle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.subtitle-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s, border-color 0.2s;
}

.subtitle-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    background: #222;
}

.sub-icon {
    font-size: 1.8rem;
    color: #ffd700;
    /* Gold/Zip color */
    background: rgba(255, 215, 0, 0.1);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.sub-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sub-lang {
    font-weight: bold;
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.sub-name {
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-download {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
}

.btn-download:hover {
    background: #c40812;
    /* Darker red */
    color: white;
}

@media (max-width: 768px) {
    .subtitle-grid {
        grid-template-columns: 1fr;
    }
}

/* Actor Page Header */
.actor-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.actor-img {
    flex-shrink: 0;
}

.actor-img img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
}

.actor-info h1 {
    margin: 0;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    word-break: break-word;
    /* Prevent long names from overflowing */
}

/* Mobile Response for Actor Page */
@media (max-width: 768px) {
    .actor-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
        margin-top: 2rem;
    }

    .actor-img img {
        width: 120px;
        height: 120px;
    }

    .actor-info h1 {
        font-size: 1.8rem;
    }
}

/* Downloads Section */
.downloads-section {
    margin-bottom: 30px;
    background: #111;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #222;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.download-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px;
    align-items: center;
    transition: all 0.2s ease;
}

.download-card:hover {
    border-color: var(--primary-color);
    background: #222;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 9, 20, 0.1);
}

.dl-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dl-label {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dl-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.badge-dl {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge-quality {
    background: var(--primary-color);
    color: white;
}

.badge-format {
    background: #007bff;
    color: white;
}

.badge-size {
    color: #aaa;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.badge-size i {
    font-size: 0.8rem;
}

.btn-get-link {
    background: #fff;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-get-link:hover {
    background: #e5e5e5;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Pagination Adjustments for Mobile */
@media (max-width: 768px) {
    .pagination-hide-mobile {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .download-card {
        grid-template-columns: 1fr;
    }

    /* Keep side-by-side on mobile, just smaller button */
    .download-card {
        grid-template-columns: 1fr auto;
    }

    .btn-get-link {
        padding: 6px 10px;
        font-size: 1rem;
        /* Maintain icon size */
    }

    .btn-get-link span {
        display: none;
    }
}