/* Garantir que os estilos só são aplicados quando a classe code-block-running está presente */
body.code-block-running {
    margin: 0;
    padding: 0;
}

body.code-block-running .overlay {
    position: absolute;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    padding: 1rem;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
    background-color: #ffffff;
    min-height: 100dvh;
}

body.code-block-running .overlay:before {
    content: "";
    position: fixed;
    z-index: -1;
    left: 0;
    top: -20dvh;
    width: 100dvw;
    height: 140dvh;
    background-color: #ffffff;
}

body.code-block-running .overlay h2 {
    text-align: center;
    color: red;
    font-size: 22px;
    margin-bottom: 15px;
}

/* Listagem inicial: 1 coluna */
body.code-block-running .video-list {
    display: grid;
    gap: 15px;
    grid-template-columns: 1fr;
    margin-bottom: 20px;
}

/* Vídeo item */
body.code-block-running .video-item {
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

body.code-block-running .video-item:hover {
    transform: translateY(-3px);
}

body.code-block-running .video-item .video-info {
    padding: 15px;
}

/* Container da thumb com badges */
body.code-block-running .thumb-container {
    position: relative;
    width: 100%;
    /* padding-bottom: 64%; */
    /* Proporção para a thumb */
    /* background-color: #ddd; */
}

body.code-block-running .thumb-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

body.code-block-running .live-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ff0000;
    color: #fff;
    padding: 3px 6px;
    font-size: 12px;
    font-weight: bold;
}

body.code-block-running .quality-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #000;
    color: #fff;
    padding: 3px 6px;
    font-size: 12px;
    font-weight: bold;
}

/* Informações do vídeo */
body.code-block-running .video-info {
    padding: 10px;
}

body.code-block-running .video-list .video-info .video-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0 0 25px 0;
    min-height: 20px;
}

body.code-block-running .video-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: space-between;
}

body.code-block-running .video-meta span.duration {
    background-color: #666;
    color: #fff;
    padding: 1px 3px;
    font-size: 12px;
}

body.code-block-running .channel {
    color: #0073aa;
    text-decoration: underline;
}

/* Área de detalhes (Player) */
body.code-block-running .video-detail {
    display: none;
    margin-top: 15px;
}

body.code-block-running .video-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    margin-bottom: 10px;
    overflow: hidden;
}

body.code-block-running .player-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Estilos do container de carregamento do vídeo */
body.code-block-running .video-loading-container {
    position: relative;
    width: 100%;
    height: 100%;
}

body.code-block-running .video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    filter: brightness(0.7);
}

body.code-block-running .progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.2);
    z-index: 2;
}

body.code-block-running .progress-bar {
    height: 100%;
    width: 0%;
    background-color: #ff0000;
    transition: width 0.1s linear;
}

body.code-block-running .loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

body.code-block-running .spinner {
    border: 4px solid #ff0000;
    border-top: 4px solid #555;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

body.code-block-running .fake-video-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
}

/* Ícone de play centralizado */
body.code-block-running .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    opacity: 0.9;
}

body.code-block-running .watch-now-button {
    display: block;
    width: 100%;
    padding: 10px;
    background: #ff0000;
    border: none;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    margin: 10px 0;
}

/* Vídeos relacionados: grid de 2 colunas */
body.code-block-running .related-videos {
    margin-top: 35px;
}

body.code-block-running .related-videos h3 {
    text-align: center;
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}

body.code-block-running .related-videos-list {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, 1fr);
}

body.code-block-running .related-videos-list .video-title {
    margin: 0 0 25px 0;
    font-size: 14px;
    min-height: 33px;
} 