/* Watch Page Layout */
.watch-page {
    display: grid;
    grid-template-columns: 1fr 350px;
    height: 100vh;
    overflow: hidden;
    min-height: 100vh;
    background-color: #000;
}

/* Player Area */
.player-container {
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 20px;
}

.navbar-simple {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-simple .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffd700;
    font-family: 'Cinzel', serif;
}

.back-link {
    color: #e0e0e0;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}

#videoContainer {
    width: 100%;
    max-width: 1200px;
    max-height: 80vh;
    aspect-ratio: 16/9;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    background: #000;
}

#video {
    width: 100%;
    height: 100%;
}

.episode-title-display {
    margin-top: 15px;
    font-size: 1.2rem;
    color: #e0e0e0;
    width: 100%;
    max-width: 1200px;
    text-align: center;
    z-index: 5;
    font-family: 'Inter', sans-serif;
}

/* Sidebar Playlist */
.playlist-sidebar {
    background-color: #1a1a1a;
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.playlist-header {
    padding: 20px;
    background-color: #222;
    border-bottom: 1px solid #333;
}

.playlist-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #ffd700;
    font-family: 'Cinzel', serif;
}

.episode-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    list-style: none;
}

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

.episode-list::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.episode-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.episode-list::-webkit-scrollbar-thumb:hover {
    background: #b8860b;
}

.episode-item {
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    /* Context for progress bar */
}

.episode-item:hover {
    background-color: #2a2a2a;
}

.episode-item.active {
    background-color: rgba(255, 215, 0, 0.1);
    border-left: 4px solid #ffd700;
}

.episode-number {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #555;
    font-weight: bold;
    min-width: 40px;
}

.episode-item.active .episode-number {
    color: #ffd700;
}

.episode-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: #e0e0e0;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.episode-item.active .episode-info h4 {
    color: #ffd700;
}

/* Progress Bar Styles */
.progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
}

.progress-bar {
    height: 100%;
    background: #e50914;
    /* Netflix Red */
    width: 0%;
    transition: width 0.3s;
}

/* Responsive */
@media (max-width: 1024px) {
    .watch-page {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: auto;
        min-height: 100vh;
    }

    .playlist-sidebar {
        height: auto;
        max-height: 60vh;
        border-left: none;
        border-top: 1px solid #333;
    }

    .desktop-only-text {
        display: none;
    }
}

@media (max-width: 600px) {
    .navbar-simple {
        padding: 10px 15px;
    }

    .episode-item {
        padding: 15px;
    }
}