*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

.titulo-series {
    font-weight: bold;
}

html,
body{
    width:100%;
    height:100%;
    overflow:hidden;
    background:#000;
    font-family: 'Montserrat', sans-serif;
    color:white;
}

#player-container{
    position:fixed;
    inset:0;
    background:#000;
    z-index: 1;
}

#video{
    width:100%;
    height:100%;
    object-fit:contain;
    background:#000;
    z-index: 2;
}

/* CONTROLES */
#controls{
    position:absolute;
    inset:0;
    opacity:1;
    transition:.25s;
    z-index: 100; 
}

#top-controls{
    pointer-events:none;
}

#bottom-controls{
    pointer-events:auto;
}

#controls.hide{
    opacity:0;
    cursor:none;
}

#controls button{
    pointer-events:auto;
}

#top-controls{
    position:absolute;
    top:30px;
    left:30px;
    right:30px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    z-index: 101;
}

#bottom-controls{
    position:absolute;
    bottom:40px;
    left:0;
    right:0;
    padding-left: 20px;  
    padding-right: 20px; 
    z-index: 101;
}

#player-controls{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:15px;
}

.left-controls,
.right-controls{
    display:flex;
    align-items:center;
    gap:40px;
}

/* BOTÕES */
button{
    border:none;
    background:none;
    color:white;
    cursor:pointer;
    transition: transform .2s, opacity .2s;
}

button:hover{
    transform:scale(1.20);
}

button svg{
    width:39.59px;
    height:39.59px;
}

/* CONTAINER DA TIMELINE */
#progress-container {
    width: 100%;
    display: flex;         
    align-items: center;   
    gap: 15px;             
    margin-bottom: 40px; 
}

#progress {
    flex: 1;               
    appearance: none;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 999px;
    background: #666;
    cursor: pointer;
    display: block;
}

#progress::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0066c5; 
}

#progress::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: #0066c5; 
}

/* NUMERAÇÃO DE TEMPO DA BARRA */
#current-time,
#duration-time {
    display: block;
    font-size: 19px;       
    font-weight: 600;       
    color: white;
    z-index: 105; 
    pointer-events: none;
    white-space: nowrap;
}

/* CENTRALIZAÇÃO DO TÍTULO DO EPISÓDIO */
#episode-title {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
}

/* OUTROS ELEMENTOS COM O AZUL TEMÁTICO */
.classification-line {
    background: #097be5 !important;
}

#skip-button {
    background: #097be5 !important;
}

#volume-fill {
    background: #097be5 !important;
}

/* PAUSE OVERLAY */
#pause-overlay{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.45);
    display:flex;
    align-items:center;
    opacity:0;
    visibility:hidden;
    transition:.3s;
    z-index:50;
    pointer-events: none; 
}

#pause-overlay.show{
    opacity:1;
    visibility:visible;
}

.pause-content{
    width:650px;
    margin-left:120px;
    pointer-events: auto; 
}

.watching-text{
    font-size:18px;
    color:#d9d9d9;
}

.pause-content h1{
    font-size:48px;
    font-weight:700;
    margin-top:10px;
}

.pause-meta{
    display:flex;
    align-items:center;
    gap:15px;
    margin-top:10px;
    margin-bottom:12px;
    font-size:18px;
    line-height:30px;
}

.pause-rating{
    font-weight:bold;
}

.pause-content p{
    font-size:20px;       
    line-height:1.4;
    color:#dbdbdb;        
    max-width: 90%;       
}

/* CLASSIFICAÇÃO */
#classification-popup{
    position:absolute;
    left:50px;
    top:50px;
    z-index:60;
    opacity:0;
    visibility:hidden;
    transition:.4s;
    pointer-events: none;
}

#classification-popup.show{
    opacity:1;
    visibility:visible;
}

.classification-wrapper{
    display:flex;
    align-items:center;
    gap:18px;
}

.classification-line{
    width:5px;
    height:50px;
    background:#0968e5;
}

.classification-label{
    font-size:20px;
    font-weight:500;
}

#classification-image{
    width:45px;
    height:45px;
    object-fit:contain;
}

.classification-info{
    display:flex;
    flex-direction:column;
}

.classification-info h3{ font-size:20px; }
.classification-info p{ font-size:16px; color:#ccc; }

/* SIDEBAR EPISÓDIOS */
#episodes-sidebar{
    position:absolute;
    top:0;
    right:-520px;
    width:520px;
    height:100%;
    background:#111;
    transition:.35s;
    z-index:200;
    overflow-y:auto;
}

#episodes-sidebar.show{
    right:0;
}

#episodes-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:30px;
    border-bottom:1px solid #333;
}

#episodes-header h2{ font-size:28px; }
#close-episodes{ font-size:28px; }
#episodes-list{ padding:20px; }

.episode-card{
    display:flex;
    gap:15px;
    margin-bottom:20px;
    cursor:pointer;
    transition:.2s;
}

.episode-card:hover{ transform:scale(1.02); }
.episode-banner{ width:170px; height:95px; object-fit:cover; border-radius:8px; }
.episode-info{ flex:1; }
.episode-info h3{ font-size:20px; margin-bottom:8px; }
.episode-info p{ color:#ccc; font-size:14px; line-height:1.4; }
.episode-time{ margin-top:8px; color:#999; font-size:13px; }

/* LEGENDAS STYLING */
#subtitle-container {
    position: absolute;
    left: 50%;
    bottom: 120px; 
    transform: translateX(-50%);
    text-align: center;
    font-size: 26px;
    font-weight: 600;
    text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 0px 4px 10px rgba(0,0,0,1);
    max-width: 80%;
    z-index: 190; 
    pointer-events: none;
    line-height: 1.4;
    transition: bottom 0.25s ease;
}

#controls.hide ~ #subtitle-container {
    bottom: 50px;
}

video::-webkit-media-text-track-container {
    opacity: 0 !important;
    display: none !important;
}
video::cue {
    background: transparent !important;
    color: transparent !important;
}

.series-only{ display:none !important; }
.series-mode .series-only{ display:flex !important; }

/* TOOLTIP PROGRESSO */
#progress-tooltip{
    position:absolute;
    bottom:115px;
    background:#111;
    color:white;
    padding:6px 10px;
    border-radius:4px;
    font-size:13px;
    pointer-events:none;
    opacity:0;
    transition:.2s;
    z-index: 110;
}

#current-title{ font-size:22px; font-weight:500; }
#volume-container{ position:relative; }

#volume-popup{
    position:absolute;
    bottom:55px;
    left:50%;
    transform:translateX(-50%);
    width:50px;
    height:180px;
    display:none;
    justify-content:center;
    align-items:center;
    background: rgba(17, 17, 17, 0.9);
    border-radius: 8px;
    z-index: 210;
}

#volume-popup.show{ display:flex; }
#volume-track{ width:8px; height:140px; background:#555; border-radius:999px; position:relative; cursor: pointer; }
#volume-fill{ position:absolute; bottom:0; width:100%; height:100%; background:#0968e5; border-radius:999px; pointer-events: none; }
#volume-thumb{ position:absolute; left:50%; transform:translateX(-50%); width:18px; height:18px; background:white; border-radius:50%; bottom:100%; margin-bottom:-9px; pointer-events: none; }

#skip-button{
    position:absolute;
    right:30px;
    bottom:140px;
    background:#0968e5;
    color:white;
    border:none;
    padding:14px 22px;
    border-radius:10px;
    font-size:16px;
    font-weight:600;
    display:none;
    z-index:105;
}

#skip-button.show{ display:block; }

/* ICONE CENTRAL PLAY */
.center-play{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: .2s;
    pointer-events: none;
    color: white;
    z-index: 120;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.center-play.show{ transform: translate(-50%, -50%) scale(1); opacity: 1; }

/* PRÓXIMO EPISÓDIO */
.next-episode-overlay{
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: .3s;
    z-index: 250;
}

.next-episode-overlay.show{ opacity: 1; pointer-events: all; }
.next-episode-box{ text-align: center; color: white; }
.next-title{ font-size: 20px; margin-bottom: 20px; }
.next-episode-box button{ display: block; margin: 10px auto; padding: 10px 20px; border: none; cursor: pointer; border-radius: 6px; font-weight: 600; }
#next-now-btn{ background: #097be5; color: white; }
#cancel-next-btn{ background: #333; color: white; }

#subtitle-btn, #fullscreen-btn, #play-pause, #rewind, #forward, #volume-btn, #next-episode-btn, #episodes-btn{
    display:flex;
    align-items:center;
    justify-content:center;
}

html{ font-size: 14px; }

@media (min-width:1900px){ #episode-title{ font-size:42px; } button svg{ width:48px; height:48px; } }
@media (max-width:900px){ #episode-title{ display:none; } .pause-content{ width:auto; margin:40px; } .pause-content h1{ font-size:46px; } .pause-content p{ font-size:18px; } #episodes-sidebar{ width:100%; } }

/* Ajuste do Título em Imagem no Pause */
.pause-title-container {
    margin-top: 10px;
    margin-bottom: 15px;
}

#pause-title-image {
    max-width: 600px;  
    max-height: 220px; 
    height: auto;
    display: block;
    object-fit: contain;
}

#pause-rating-image {
    width: 30px;       
    height: 30px;
    object-fit: contain;
    vertical-align: middle;
}

/* CONTAINER DO SPINNER DE CARREGAMENTO */
#loading-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    display: none; 
    z-index: 40;   
    pointer-events: none;
}

#loading-container.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ESTILIZAÇÃO DO ITEM DE EPISÓDIO COMPLETO */
.episode-item {
    display: flex;
    gap: 15px;
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.episode-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.01);
}

.episode-item.active {
    background: rgba(9, 123, 229, 0.3);
    border-left: 4px solid #097be5;
}

/* Caixa da miniatura */
.ep-thumbnail-box {
    position: relative;
    width: 130px;
    height: 75px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #111;
}

.ep-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Tag de duração em cima da imagem */
.ep-duration-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 2px 5px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
}

/* Caixa de textos */
.ep-info-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.ep-title-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ep-description-text {
    font-size: 12px;
    color: #cccccc;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limita em até duas linhas para não quebrar a barra */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}