/* 🌑 Dark Theme with Red Accents */
body {
    background-color: #0c0c0c;
    color: white;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
}

/* 🔹 Season & Video Container */
.season-video-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* 🌟 Season Selector */
.season-container {
    text-align: left;
    margin-bottom: 20px;
    width: 100%;
}

/* 🔻 Red Line Decoration */
.season-line {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ff0000, #cc0000);
    border-radius: 2px;
    box-shadow: 0px 2px 10px rgba(255, 0, 0, 0.5);
    margin-bottom: 10px;
}

/* 🔴 Red Dropdown Styling */
.season-dropdown {
    padding: 12px 15px;
    background: #1c1c1c;
    color: white;
    border: 2px solid #ff0000;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease-in-out;
    box-shadow: 0px 2px 8px rgba(255, 0, 0, 0.3);
    width: 100%;
    max-width: 140px;
    display: block;
}

/* 🎬 Episode Container (FIXED: Using Flexbox for better control, removed padding) */
.episode-container {
    display: flex; /* Switched to flex */
    flex-wrap: wrap; /* Allows wrapping to the next line */
    justify-content: flex-start; /* Aligns items to the left */
    gap: 12px; /* Gap between cards */
    padding: 0; /* REMOVED excess padding */
    align-items: start;
}

/* 🎬 Episode Card (FIXED: Removed background, padding, and border-radius) */
.episode-card {
    background: none; /* Make card transparent */
    border-radius: 0; /* Remove rounding */
    padding: 0; /* Remove padding around content */

    /* Ensure card takes up 1/8th of the row width minus gap for 9 items per row */
    flex: 0 0 calc(12.5% - 12px); 
    min-width: 100px; /* Prevent cards from becoming too small */

    /* Title Styling & Layout */
    text-align: left; /* FIX: Left-aligned title */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
    font-size: 14px; 
    font-weight: normal; 
    line-height: 1.35; /* FIX: Spacing for multi-line titles */
    padding-top: 5px; 
    padding-bottom: 10px; /* Space below the title */     
}

.episode-card:hover {
    transform: scale(1.05);
    /* Toned down the hover shadow to be less 'card-like' and more subtle */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5); 
}

/* 📛 ADDED: Title Styling (Default is Multi-line, limited to 3 lines for Desktop) */
.episode-title {
    /* Title Styling */
    font-size: 14px; 
    font-weight: normal; 
    line-height: 1.35; 
    
    /* Desktop Multi-line Limit (3 lines) */
    overflow: hidden; 
    display: -webkit-box; /* Enable webkit box model for clamping */
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical; /* Essential for line clamping */
    line-clamp: 3; /* FIX: Added standard line-clamp for compatibility */
    white-space: normal; /* Allow wrapping */
    text-overflow: ellipsis; /* Fallback for when line-clamp is supported */
    display: block; 
}

/* 📸 Thumbnail Styling (FIXED: Removed border-radius) */
.thumbnail-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0; /* Remove rounding */
}
 
.thumbnail-container img { 
    width: 100%; 
    height: auto; 
    display: block; 
    border-radius: 0; /* Remove rounding */ 
}

/* 🎭 Episode Label */

.episode-label {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 6px;
    font-size: 12px;
    border-radius: 3px;
    font-weight: bold;
}

/* 📱 Tablet View (Max 1024px) */
@media (max-width: 1024px) {
    /* --- APPLY SINGLE-LINE TRUNCATION HERE (for Tablet and Mobile) --- */
    .episode-title {
        overflow: hidden; 
        white-space: nowrap; /* Forces text onto a single line */
        text-overflow: ellipsis; /* Displays '...' */
        font-size: 13px; 
        
        /* Disable 3-line clamp for single-line ellipsis on mobile */
        display: block; 
        -webkit-line-clamp: unset; 
        -webkit-box-orient: unset;
        line-clamp: unset; /* Reset standard line-clamp */
    }
    /* ------------------------------------------------------------------- */
    
    .episode-container {
        gap: 10px; /* Reduced gap slightly */
    }
    .episode-card {
        flex: 0 0 calc(14.28% - 10px); 
        border-radius: 10px;
        padding: 10px;
    }
    .episode-label {
        font-size: 14px;
        padding: 4px 8px;
    }
}

/* 📱 Large Mobile (Max 768px) */
@media (max-width: 768px) {
    .episode-container {
        gap: 4px; /* Consistent gap for phones */
    }
    .episode-card {
        flex: 0 0 calc(33.33% - 4px); 
        border-radius: 8px; /* Consistent rounding */
        padding: 6px; /* Consistent padding */
    }
    .episode-title {
        font-size: 11px; /* Increased font size for better readability on larger cards */
    }
    .episode-label {
        font-size: 10px; /* Consistent label size for mobile */
        padding: 2px 4px;
    }
}
