* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background: var(--bg-default);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.cabecalho {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-default);
    border-bottom: 1px solid transparent;
    z-index: 1000;
    height: 60px;
}

.cabecalho-conteudo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 16px;
    max-width: 100%;
}

.cabecalho-esquerda {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
}

.botao-menu {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: var(--border-radius-full);
    width: 40px;
    height: 40px;
}

.botao-menu:hover {
    background: var(--hover-button);
}

.botao-menu i {
    font-size: var(--icon-size);
    color: var(--black);
}

.logotipo {
    height: 25px;
}

.cabecalho-centro {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 640px;
    margin: 0 40px;
}

.container-pesquisa {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 640px;
    border: 1px solid var(--gray-300);
    border-radius: 40px;
    overflow: hidden;
    background: var(--bg-default);
}

.input-pesquisa {
    flex: 1;
    padding: 12px 16px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
}

.botao-pesquisa {
    background: var(--gray-100);
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    border-left: 1px solid var(--gray-300);
}

.botao-pesquisa:hover {
    background: var(--hover-button);
}

.botao-pesquisa i {
    font-size: var(--icon-size);
    color: var(--black);
}

.cabecalho-direita {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
    margin-right: 15px;
}

.botao-icone {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.botao-icone:hover {
    background: var(--hover-button);
}

.botao-icone i {
    font-size: var(--icon-size);
    color: var(--black);
}

.pesquisa-mobile {
    display: none;
}

.perfil-img {
    border-radius: var(--border-radius-full);
    width: var(--avatar-size);
    object-fit: cover;
    margin-top: 8px;
}

/* Main Content */
.conteudo-principal {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 0 auto;
    padding: 24px 16px;
    gap: 24px;
}

/* Video Section */
.secao-video {
    min-width: 0;
    flex: 2 1 0;
    margin: 0;
    padding: 48px 12px 0 0;
    width: auto;
    max-width: 60%;
}

.video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    margin-bottom: 8px;
}

.video-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Video Metadata */
.metadados-video {
    width: 100%;
}

.metadados-video h1 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.container-video-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
}

.video-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.canal-info {
    display: flex;
    align-items: center;
}

.canal-info img {
    width: calc(var(--avatar-size) + 8px);
    height: calc(var(--avatar-size) + 8px);
    border-radius: var(--border-radius-full);
    object-fit: cover;
}

.detalhes-canal {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nome-canal {
    font-weight: 600;
    font-size: var(--font-size-md);
    color: var(--text-primary);
}

.inscritos-canal {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.botao-inscrever {
    background: var(--black);
    color: var(--white);
    width: 122px;
    height: 40px;
    border: none;
    border-radius: var(--border-radius-lg);
    font-weight: 500;
    font-size: var(--font-size-sm);
    cursor: pointer;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.botao-inscrever:hover {
    background: var(--gray-900);
}

.botoes-engajamento {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.botao-engajamento {
    height: 40px;
    background: none;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm);
    color: var(--black);
    font-weight: 500;
}

.botao-engajamento:hover {
    background: var(--hover-button);
}

.separador {
    width: 1px;
    height: 24px;
    background: var(--separator);
}

.curtir-descurtir,
.botao-compartilhar {
    display: flex;
    align-items: center;
    background: var(--gray-100);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.botao-mais {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border-radius: var(--border-radius-full);
    overflow: hidden;
    border: none;
}

.video-descricao {
    background: var(--gray-100);
    border-radius: var(--border-radius-md);
    padding: 12px;
    margin-top: 12px;
}

.video-estatisticas {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--black);
    margin-bottom: 12px;
    font-weight: 600;
}

.video-texto {
    width: 100%;
    max-width: 510px;
    font-size: var(--font-size-sm);
    line-height: 1.5;
    color: var(--text-secondary);
}

/* Sidebar */
.barra-lateral {
    flex: 1 1 300px;
    max-width: 432px;
    width: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 44px 24px 0 8px;
}

.video-recomendado {
    display: flex;
    gap: 10px;
    margin: 4px 0 8px;
    cursor: pointer;
    position: relative;
}

.miniatura-video {
    width: 100%;
    max-width: 176px;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
}

.info-video-lateral {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    position: relative;
    padding-right: 48px;
    width: calc(100% - 48px);
}

.titulo-video-lateral {
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: 1.2;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 2px 0 0;
}

.nome-canal-lateral {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin: 2px 0 2px;
}

.stats-video-lateral {
    width: 172px;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

/* Botão de opções */
.botao-opcoes {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
}

.botao-opcoes:hover {
    background: var(--hover-button);
}

.botao-opcoes i {
    font-size: var(--icon-size);
    color: var(--black);
}

/* Responsive Design */
/* === Desktop grande === */
@media (min-width: 1440px) {
    .conteudo-principal {
        padding: 20px;
        justify-content: center;
        margin: 0 auto;
    }
}

/* === Desktop médio === */
@media (min-width: 1024px) and (max-width: 1439px) {
    .conteudo-principal {
        padding: 20px;
    }

    .secao-video {
        margin: 0;
        padding: 48px 0 0 0;
        max-width: 100%;
    }

    .video-player {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .video-recomendado {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .miniatura-video {
        width: 176px;
        height: 99px;
        aspect-ratio: 16 / 9;
    }

    .info-video-lateral {
        min-width: 0;
        width: 100%;
        padding-inline-end: 40px;
    }

    .video-texto {
        width: 100%;
    }

    .titulo-video-lateral {
        max-width: 100%;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* === Tablet e mobile grande === */
@media (min-width: 768px) and (max-width: 1023px) {
    .conteudo-principal {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 60px 5px 5px 5px;
        margin: 0;
        width: 100%;
        max-width: none;
    }

    .secao-video {
        max-width: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .video-player {
        width: 100%;
        max-width: none;
        margin: 0 0 15px 0;
        aspect-ratio: 16 / 9;
        position: relative;
    }

    .video-player iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: none;
    }

    .video-texto {
        max-width: 100%;
    }

    .barra-lateral {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        flex-direction: row;
        padding: 20px 0;
    }

    .video-recomendado {
        display: flex;
        align-items: flex-start;
        flex-direction: row;
        margin: 8px;
        flex: 1 1 calc(50% - 16px);
        max-width: calc(50% - 16px);
    }

    .miniatura-video {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .cabecalho-centro {
        margin: 0 20px;
    }

    .botoes-engajamento {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
    }
}

/* === Mobile === */
@media (max-width: 767px) {
    .conteudo-principal {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 60px 12px 0 12px;
        margin: auto;
        width: 100%;
        max-width: none;
    }

    .secao-video {
        max-width: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .video-player {
        width: 100%;
        aspect-ratio: 16 / 9;
        position: relative;
    }

    .video-player iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: none;
        display: block;
    }

    .video-texto {
        max-width: 100%;
    }

    .barra-lateral {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .cabecalho-centro {
        display: none;
    }

    .pesquisa-mobile {
        display: block;
    }

    .container-video-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .botoes-engajamento {
        width: 100%;
        justify-content: flex-start;
    }

    .video-recomendado {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
    }

    .miniatura-video {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }

    .info-video-lateral {
        display: flex;
        flex-direction: column;
        position: relative;
        width: 60%;
        padding: 0;
    }

    .stats-video-lateral {
        width: 100%;
        padding-bottom: 8px;
    }

    .texto-video {
        flex-grow: 1;
        min-width: 0;
        max-width: calc(100% - 40px);
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .botao-opcoes {
        position: absolute;
        top: 0;
        right: 0;
        flex-shrink: 0;
        margin-left: 8px;
    }

    .titulo-video-lateral {
        word-break: break-word;
        overflow-wrap: break-word;
        padding-right: 40px;
    }
}
