
/* VOD & Series Layout */
.screen.active.vod-layout {
    flex-direction: row;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.content-area {
    flex: 1;
    background: rgba(0, 0, 0, 0.6);
    overflow-y: auto;
    padding: 30px;
    height: 100vh;
}

.content-area h3 {
    margin-top: 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 24px;
    color: #00d2ff;
}

/* Grid & Cards */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    padding-bottom: 100px; /* Space for overscan */
}

.card {
    background: rgba(30, 30, 30, 0.8);
    border-radius: 8px;
    border: 3px solid transparent;
    aspect-ratio: 2/3; /* Poster shape */
    position: relative;
    overflow: hidden;
    /* transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; */
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card .placeholder-text {
    padding: 20px;
    text-align: center;
    color: #666;
}

.card:focus, .card.focused {
    transform: scale(1.1);
    border-color: #00d2ff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    z-index: 10;
    outline: none;
}

/* Title Overlay - Hidden by default, shown on hover/focus */
.title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    white-space: normal; /* Allow wrap */
    opacity: 0;
    /* transition: opacity 0.2s; */
    pointer-events: none;
}

.card:hover .title-overlay,
.card:focus .title-overlay,
.card.focused .title-overlay {
    opacity: 1;
}

.card-title {
    /* Legacy class support or removal */
    display: none;
}

/* Details Screen */
.screen.details-layout {
    display: none; /* Controlled by JS */
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.screen.active.details-layout {
    display: flex;
}

.details-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    /* transition: opacity 0.5s; */
    opacity: 0.4; /* Dim background by default */
}

.details-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* More translucent gradient to show background */
    background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 2;
}

.details-container {
    position: relative;
    z-index: 3;
    display: flex;
    width: 100%;
    height: 100%;
    padding: 60px 80px;
    gap: 0; /* Removed gap since poster is gone */
    align-items: center;
}

.details-poster-wrapper {
    display: none; /* Hide poster as requested */
}

.details-poster-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.details-info-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 100%; /* Expand to full width */
    padding-right: 40px;
}

#detail-title {
    font-size: 64px;
    margin: 0 0 20px 0;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    background: linear-gradient(45deg, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.detail-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    font-size: 20px;
    color: #ddd;
    align-items: center;
}

.meta-tag {
    background: rgba(255,255,255,0.15);
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: bold;
}

.meta-tag.rating {
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

#detail-overview {
    font-size: 24px; /* Larger font for better readability */
    line-height: 1.6;
    color: #fff; /* Brighter text */
    margin-bottom: 40px;
    max-height: 400px; /* Increased height for synopsis */
    overflow-y: auto;
    padding-right: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8); /* Ensure readability against background */
}

/* Details Screen Actions */
.detail-actions {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.action-btn {
    padding: 15px 35px;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    /* transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s; */
    text-transform: uppercase;
}

.action-btn.hidden {
    display: none !important;
}

.action-btn.primary {
    background-color: #e50914; /* Netflix Red */
    color: white;
}

.action-btn.secondary {
    background-color: rgba(109, 109, 110, 0.7);
    color: white;
}

.action-btn:focus, .action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    outline: 3px solid white;
}

.action-btn.secondary:focus, .action-btn.secondary:hover {
    background-color: rgba(109, 109, 110, 1);
}

/* Video Player Styles */
.video-player-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.video-player-container video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Mantém a proporção do vídeo */
    background: #000;
    outline: none !important; /* Remove yellow outline */
    border: none !important;
}

.video-player-container video:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Ensure container also has no outline */
.video-player-container:focus,
.video-player-container:focus-within {
    outline: none !important;
    border: none !important;
}

.video-overlay-title {
    position: absolute;
    top: 40px;
    left: 40px;
    font-size: 32px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    pointer-events: none;
    z-index: 10000;
    display: none;
}

.player-hint {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    pointer-events: none;
    opacity: 1; /* Was 0 with animation */
    /* animation: fadeHint 5s forwards; */
}

/*
@keyframes fadeHint {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}
*/

/* Series Details Layout */
#series-content-area {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    height: 400px; /* Fixed height for scrolling lists */
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
}

#series-content-area.hidden {
    display: none;
}

.seasons-column {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
}

.episodes-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Specific Overlay Styles for Movies/Series Player to remove yellow border */
#video-player-overlay,
.screen.player-layout {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    background: #000;
    z-index: 99999; /* Higher than everything */
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    border: none !important;
    outline: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

#video-player-overlay.active {
    display: flex !important;
}

#main-video-player {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    background: #000;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

#main-video-player:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Ensure no parent container adds borders */
.video-container {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.seasons-column h3, .episodes-column h3 {
    margin-top: 0;
    color: #00d2ff;
    border-bottom: 1px solid rgba(0, 210, 255, 0.3);
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}


.seasons-column .list-container, .episodes-column .list-container {
    flex: 1;
    overflow-y: auto;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 10px;
}

.seasons-column .list-item, .episodes-column .list-item {
    padding: 12px 15px;
    margin-bottom: 5px;
    background: rgba(255,255,255,0.05);
    border-radius: 5px;
    cursor: pointer;
    /* transition: all 0.2s; */
    font-size: 1rem;
    color: #ddd;
}

.seasons-column .list-item:hover, .episodes-column .list-item:hover {
    background: rgba(255,255,255,0.1);
}

.seasons-column .list-item.focused, .episodes-column .list-item.focused,
.seasons-column .list-item:focus, .episodes-column .list-item:focus {
    background: #00d2ff;
    color: #000;
    font-weight: bold;
    outline: none;
    transform: scale(1.02);
}

.seasons-column .list-item.active {
    border-left: 4px solid #e50914;
    background: rgba(229, 9, 20, 0.2);
}

/* Player Episode Selector (Overlay) */
#player-episode-selector {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%; /* Bottom 40% of screen */
    background: rgba(0, 0, 0, 0.9);
    z-index: 10002; /* Above controls */
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    transform: translateY(0);
    /* transition: transform 0.3s ease; */
    border-top: 2px solid #00d2ff;
}

#player-episode-selector.hidden {
    display: none;
}

#player-episode-selector h3 {
    color: white;
    margin: 0 0 15px 0;
    font-size: 1.5rem;
}

#player-episodes-list {
    display: flex; /* Horizontal list */
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    flex-wrap: nowrap;
}

#player-episodes-list .list-item {
    flex: 0 0 250px;
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 2px solid transparent;
}

#player-episodes-list .list-item.focused,
#player-episodes-list .list-item:focus {
    background: #00d2ff;
    color: black;
    border-color: white;
    transform: scale(1.05);
    outline: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}
