/* assets/css/style.css */

/* Google Fonts - আপনি আপনার পছন্দের ফন্ট ব্যবহার করতে পারেন */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* CSS Variables for easy theme management */
:root {
    --primary-color: #e50914; /* Netflix Red */
    --background-color: #141414; /* Dark Background */
    --surface-color: #1d1d1d; /* Slightly lighter surface */
    --text-color: #ffffff;
    --text-muted-color: #a0a0a0;
    --border-color: #303030;
    --border-radius: 8px;
    --font-family: 'Roboto', sans-serif;
}

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff0a16;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header */
.site-header {
    background-color: rgba(20, 20, 20, 0.8);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 28px;
    text-transform: uppercase;
    font-weight: 700;
}

.search-container {
    position: relative;
    width: 40%;
}

#live-search-input {
    width: 100%;
    padding: 10px 15px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 16px;
}

.suggestions-box {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    max-height: 400px;
    overflow-y: auto;
    display: none; /* Hidden by default */
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}
.suggestion-item:last-child {
    border-bottom: none;
}
.suggestion-item:hover {
    background-color: var(--primary-color);
}
.suggestion-item img {
    width: 40px;
    height: 60px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 4px;
}
.suggestion-item span {
    font-size: 14px;
}


/* Main Content */
.main-content {
    padding-top: 100px; /* Space for fixed header */
}

.page-title {
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--primary-color);
}


/* Movie Genre Section (Homepage) */
.movie-genre-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 24px;
}

.see-all-btn {
    background-color: var(--surface-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Swiper Slider */
.movie-slider {
    width: 100%;
    height: auto;
}
.swiper-button-next, .swiper-button-prev {
    color: var(--primary-color);
}

/* Movie Card */
.movie-card {
    display: block;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.movie-card:hover {
    transform: scale(1.05);
}

.movie-card img {
    width: 100%;
    aspect-ratio: 2/3; /* Consistent poster ratio */
    object-fit: cover;
}

.movie-card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: var(--text-color);
    padding: 20px 10px 10px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.movie-card:hover .movie-card-title {
    opacity: 1;
}

/* Movie Grid (Genre/Search Page) */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 columns on desktop */
    gap: 20px;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    padding: 30px 0;
}
#load-more-btn {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s ease;
}
#load-more-btn:hover {
    background-color: #ff0a16;
}

/* Movie Details Page */
.movie-details-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    z-index: -1;
}
.movie-details-backdrop::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}
.movie-details-container {
    padding-top: 120px;
    min-height: 80vh;
}
.movie-details-content {
    display: flex;
    gap: 40px;
}
.movie-poster {
    flex-shrink: 0;
    width: 300px;
}
.movie-poster img {
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.movie-info h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
}
.meta-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    color: var(--text-muted-color);
}
.imdb-rating {
    font-weight: bold;
    color: #f5c518; /* IMDb Yellow */
}
.overview {
    font-size: 16px;
    margin-bottom: 20px;
    max-width: 80%;
}
.movie-info p {
    margin-bottom: 10px;
}
.action-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}
.download-btn {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: bold;
}

/* Video Player */
.page-section {
    padding: 40px 0;
}
.page-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text-color);
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
}
.video-player-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #000;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
}
.video-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.play-button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    transition: background-color 0.3s ease;
}
/* Hover করলে হালকা কালো একটি আস্তরণ পড়বে */
.video-player-wrapper:hover .play-button-overlay {
    background-color: rgba(0, 0, 0, 0.3);
}

.play-button-overlay .player-poster {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* আপনার চাওয়া অনুযায়ী ব্লার এবং ডার্ক ইফেক্ট */
    filter: blur(4px) brightness(0.6); 
    transition: filter 0.3s ease;
}
.video-player-wrapper:hover .player-poster {
    filter: blur(4px) brightness(0.4);
}

.play-button-overlay .fa-play {
    font-size: 60px; /* আইকনের সাইজ */
    color: rgba(255, 255, 255, 0.8);
    background-color: rgba(0, 0, 0, 0.5); /* আইকনের পিছনে একটি ব্যাকগ্রাউন্ড */
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%; /* বৃত্তাকার আকৃতি */
    border: 3px solid rgba(255, 255, 255, 0.5);
    z-index: 2;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px); /* আইকনের ব্যাকগ্রাউন্ডে ব্লার ইফেক্ট */
}
.video-player-wrapper:hover .fa-play {
    transform: scale(1.1);
    color: #ffffff;
    background-color: rgba(229, 9, 20, 0.7); /* হোভার করলে প্রাইমারি কালার দেখাবে */
    border-color: rgba(255, 255, 255, 0.8);
}

/* Footer */
.site-footer {
    background-color: var(--surface-color);
    padding: 20px 0;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.social-links a {
    margin-right: 15px;
    color: var(--text-muted-color);
}
.copyright {
    color: var(--text-muted-color);
    font-size: 14px;
}
/* Season Tabs and Episode List */
.seasons-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.season-tab-btn {
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}
.season-tab-btn.active, .season-tab-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.episode-list { display: none; }
.episode-list.active { display: block; }
.episode-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: var(--surface-color);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    color: var(--text-color);
}
.episode-item:hover { background-color: var(--border-color); }
.episode-number { font-weight: bold; }
.watch-now-btn {
    margin-left: auto;
    background-color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
}

/* assets/css/style.css */

/* Watch Page Specific Styles */
.watch-page-container {
    padding-top: 100px;
}

.watch-header {
    text-align: center;
    margin-bottom: 30px;
}

.watch-header h1 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.watch-header h2 {
    font-size: 20px;
    color: var(--text-muted-color);
    font-weight: 400;
}

.no-video {
    text-align: center;
    padding: 50px;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    font-size: 18px;
}

.download-section {
    margin-top: 40px;
}

.other-episodes-section {
    margin-top: 20px;
}

.episode-item.current {
    background-color: var(--primary-color);
    color: var(--text-color);
}

.episode-item.current .watch-now-btn {
    background-color: var(--text-color);
    color: var(--primary-color);
}

/* assets/css/style.css */
/* assets/css/style.css */
/* Cast Section on Movie Details Page (New Grid-based Responsive Design) */
.cast-section {
    margin-top: 25px;
    margin-bottom: 25px;
}

.cast-section h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-muted-color);
    font-weight: 500;
}

/* --- মোবাইল ডিজাইন (ডিফল্ট): ৪x২ গ্রিড লেআউট --- */
.cast-list-responsive {
    display: grid; /* Flex থেকে Grid-এ পরিবর্তন */
    grid-template-columns: repeat(4, 1fr); /* এক লাইনে ৪টি কলাম তৈরি করা হলো */
    gap: 15px 10px; /* সারির মধ্যে ১৫ পিক্সেল এবং কলামের মধ্যে ১০ পিক্সেল গ্যাপ */
    /* overflow-x: auto; এবং flex সংক্রান্ত সব প্রপার্টি সরিয়ে দেওয়া হয়েছে */
}

.actor-card-vertical {
    text-align: center;
    /* কার্ডের প্রস্থ এখন গ্রিড দ্বারা নিয়ন্ত্রিত হবে, তাই width নির্দিষ্ট করার প্রয়োজন নেই */
}

.actor-image-vertical {
    width: 60px;  /* মোবাইলের জন্য ছবির সাইজ আরও একটু ছোট এবং কম্প্যাক্ট করা হলো */
    height: 60px;
    margin: 0 auto 8px; /* ছবিকে মাঝখানে আনা */
}

.actor-image-vertical img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.actor-name-vertical {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.actor-card-vertical:hover .actor-image-vertical img {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

/* --- ডেস্কটপ ডিজাইন (768px এর বেশি স্ক্রিনের জন্য) --- */
@media (min-width: 768px) {
    .cast-list-responsive {
        grid-template-columns: repeat(8, 1fr); /* ডেস্কটপে এক লাইনে ৮টি আইটেম */
        gap: 20px 15px; /* ডেস্কটপের জন্য গ্যাপ কিছুটা বাড়ানো হলো */
    }

    .actor-image-vertical {
        width: 80px; /* ডেস্কটপের জন্য ছবির সাইজ আবার বড় করা হলো */
        height: 80px;
    }

    .actor-name-vertical {
        font-size: 13px; /* ডেস্কটপের জন্য ফন্ট সাইজ */
    }
}