/* Episode Seasons Styles */

/* Season Dropdown Styles */
.season-dropdown-container {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.season-dropdown-btn {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #333;
    color: #fff;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    min-width: 220px;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.season-dropdown-btn:after {
    display: none;
}

.season-dropdown-btn:hover,
.season-dropdown-btn:focus {
    background: linear-gradient(135deg, #222 0%, #3a3a3a 100%);
    border-color: #e50914;
    color: #fff;
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.3);
    transform: translateY(-2px);
}

.season-dropdown-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(229, 9, 20, 0.2);
}

.season-text {
    flex: 1;
}

.season-arrow {
    color: #e50914;
    font-size: 14px;
    transition: transform 0.3s ease;
    margin-left: 10px;
}

.season-dropdown-btn[aria-expanded="true"] .season-arrow {
    transform: rotate(180deg);
}

.season-dropdown-menu {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #333;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    min-width: 220px;
    padding: 8px 0;
    margin-top: 8px;
    backdrop-filter: blur(10px);
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}

.season-dropdown-item {
    color: #fff;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    white-space: nowrap;
}

.season-dropdown-item:last-child {
    border-bottom: none;
}

.season-dropdown-item:hover {
    background: linear-gradient(135deg, #e50914 0%, #b8070f 100%);
    color: #fff;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.season-dropdown-item.active {
    background: linear-gradient(135deg, #e50914 0%, #b8070f 100%);
    color: #fff;
    position: relative;
}

.season-dropdown-item.active:before {
    content: "✓";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    font-size: 14px;
}

.season-dropdown-item.active:hover {
    background: linear-gradient(135deg, #b8070f 0%, #8b0509 100%);
    color: #fff;
    transform: translateX(5px);
}

/* Dropdown animation */
.dropdown-menu.show {
    animation: dropdownFadeIn 0.3s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Episodes List Styles */
.episode-season {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.tab-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.tab-pane {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.tab-pane.active,
.tab-pane.show,
.tab-pane.active.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.episode-list-container {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: 800px; /* Approximately 10 episodes * 80px height */
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    padding-right: 8px; /* Space for scrollbar */
    scroll-behavior: smooth;
    z-index: 1 !important;
    isolation: auto !important;
}

/* Only show episode containers when their tab pane is active */
.tab-pane:not(.active):not(.show) .episode-list-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Ensure episode containers are visible when their tab pane is active */
.tab-pane.active .episode-list-container,
.tab-pane.show .episode-list-container,
.tab-pane.active.show .episode-list-container {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure episode list appears after dropdown */
.episode-season .tab-content {
    order: 2;
    position: relative;
    z-index: 1;
}

.episode-season .episode-list-container {
    position: relative;
    z-index: 1;
}

/* Custom scrollbar styling for episode list */
.episode-list-container::-webkit-scrollbar {
    width: 8px;
}

.episode-list-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.episode-list-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #e50914 0%, #c4080f 100%);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.episode-list-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #c4080f 0%, #a0070c 100%);
}




/* Episode Item Styles */
.episode-simple-item {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    display: block;
    text-decoration: none;
    color: inherit;
}

.episode-simple-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    color: inherit;
}

/* Current episode highlighting */
.episode-simple-item.current-episode {
    border-color: #e50914;
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.2);
    background: rgba(229, 9, 20, 0.1);
}

.episode-simple-item.current-episode:hover {
    background: rgba(229, 9, 20, 0.15);
    border-color: #e50914;
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.3), 0 4px 15px rgba(0, 0, 0, 0.3);
}

.episode-simple-content {
    display: flex !important;
    align-items: center;
    gap: 20px;
}

.episode-simple-thumbnail {
    flex-shrink: 0;
    width: 240px;
    height: 135px;
}

.episode-simple-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.episode-simple-thumbnail a:hover {
    transform: scale(1.02);
}

.episode-simple-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.episode-placeholder {
    width: 100%;
    height: 100%;
    background: #333;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}

.episode-simple-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.episode-simple-title {
    color: #fff;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.3;
    flex: 1;
}

.episode-simple-actions {
    display: flex;
    align-items: center;
}

.btn-disabled {
    background: #555;
    color: #999;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 400;
    display: inline-block;
    cursor: not-allowed;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .episode-list-container {
        max-height: 600px; /* Smaller height on mobile */
        gap: 15px;
    }
    
    .episode-simple-content {
        gap: 15px;
    }
    
    .episode-simple-title {
        font-size: 16px;
    }
    
    /* Hide play button wrapper on mobile */
    .play-button-wrapper {
        display: none;
    }
    
    /* Show red text instead */
    .episode-simple-actions::after {
        content: "▶";
        color: #e50914;
        font-size: 18px;
        font-weight: bold;
    }
    
    .episode-simple-disabled .episode-simple-actions::after {
        content: "⏸";
        color: #999;
    }
}

@media (max-width: 480px) {
    .episode-list-container {
        max-height: 500px; /* Even smaller on small mobile */
    }
    
    .season-dropdown-btn {
        min-width: 150px;
        font-size: 13px;
        padding: 12px 20px;
    }
    
    .episode-simple-thumbnail {
        width: 180px;
        height: 100px;
    }
    
    .episode-simple-title {
        font-size: 15px;
    }
}
