/* --- SINGLE VIDEO LAYOUT (YouTube Style) --- */
.sv-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

@media (max-width: 768px) {
    .sv-container {
        max-width: 100%;
        padding: 0 15px;
    }
}

.sv-global-wrapper {
    position: relative;
    padding-top: 120px; /* Ajuste para header fixo */
    padding-bottom: 80px;
    min-height: 100vh;
    background-color: var(--light-bg, #F9F9F9);
}

/* Fundo Atmosférico */
.sv-ambient-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    filter: blur(80px); opacity: 0.1;
    z-index: 0; pointer-events: none;
}

/* GRID PRINCIPAL */
.sv-main-grid {
    position: relative; z-index: 2;
    display: grid;
    /* 2.5fr para vídeo, 1fr para sidebar */
    grid-template-columns: 2.5fr 1fr; 
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* --- COLUNA ESQUERDA (VÍDEO) --- */

/* CORREÇÃO DO PLAYER RESPONSIVO (MÉTODO INFALÍVEL) */
.sv-video-container {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin-bottom: 25px;
    position: relative;
    
    /* Garante que o container nunca estoure a tela */
    width: 100%;
    max-width: 100%; 
    
    /* Cria a proporção 16:9 usando padding-bottom */
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}

/* Container interno do Embed */
.sv-player-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

/* REGRA DE OURO: Força o iframe a obedecer o container */
/* Seleciona iframe, object ou embed em qualquer nível dentro do container */
.sv-video-container iframe,
.sv-video-container object,
.sv-video-container embed,
.sv-player-embed iframe {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important; /* Impede estouro */
    border: none;
}

/* Placeholder (Capa) */
.sv-player-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.sv-player-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.play-icon-fallback {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: var(--gold, #E6A55C);
    opacity: 0.8;
}

/* --- BARRA DE INFORMAÇÕES --- */
.sv-info-section {
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 20px;
}

.sv-main-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--text-dark, #333);
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.sv-meta-row {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px;
}

.sv-meta-left { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; }

.sv-tag {
    background: rgba(230, 165, 92, 0.15); color: #B8860B;
    font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 4px; text-transform: uppercase;
    text-decoration: none;
    transition: 0.3s;
}
.sv-tag:hover { background: var(--gold, #E6A55C); color: #fff; }

.sv-time, .sv-views, .sv-likes { 
    font-size: 0.9rem; color: #666; display: flex; align-items: center; gap: 5px; 
}

/* Botões */
.sv-actions-right { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-action {
    border: none; cursor: pointer; padding: 10px 20px; border-radius: 30px;
    font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; transition: 0.3s;
    text-decoration: none;
}

.btn-action.spotify { background: #1DB954; color: #fff; }
.btn-action.spotify:hover { background: #1ed760; box-shadow: 0 5px 15px rgba(29,185,84,0.3); color: #fff; }

.btn-action.share { background: #eee; color: #333; }
.btn-action.share:hover { background: #ddd; }

/* Descrição Box */
.sv-description-box {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    margin-bottom: 40px;
}
.sv-description-box h3 { font-size: 1.2rem; margin-bottom: 15px; color: #333; font-weight: 700; }

/* Correção de Estouro do Texto/Links */
.sv-text-content { 
    color: #555; 
    line-height: 1.8; 
    font-size: 1rem;
    
    /* Quebra palavras longas e URLs */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}
.sv-text-content { color: #555; line-height: 1.8; font-size: 1rem; }
.sv-text-content p { margin-bottom: 15px; }

/* --- SIDEBAR --- */
.promo-widget {
    background: linear-gradient(135deg, #12101F 0%, #0E0C18 100%);
    color: #fff;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 30px;
    margin-top: 20px;
    border: 1px solid rgba(230, 165, 92, 0.2);
}
.promo-header { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; }
.promo-header i { color: var(--gold, #E6A55C); font-size: 1.2rem; }
.promo-header h4 { margin: 0; color: var(--gold, #E6A55C); font-size: 1.1rem; }
.promo-widget p { font-size: 0.9rem; color: #ccc; margin-bottom: 15px; }

.btn-gold-block {
    display: block; width: 100%; padding: 12px;
    background: var(--gold, #E6A55C); color: #000; font-weight: 700; border-radius: 6px;
    text-transform: uppercase; font-size: 0.85rem; transition: 0.3s;
    text-decoration: none;
}
.btn-gold-block:hover { background: #fff; color: #000; }

/* Lista Relacionados */
.widget-title { font-size: 1.1rem; margin-bottom: 20px; color: #333; font-weight: 700; }

.related-list { display: flex; flex-direction: column; gap: 15px; }

.related-item {
    display: flex; gap: 12px; text-decoration: none;
    transition: transform 0.2s;
    align-items: center;
}
.related-item:hover { transform: translateX(5px); }

.r-thumb {
    width: 120px; height: 70px;
    background-size: cover; background-position: center;
    border-radius: 6px; flex-shrink: 0; position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.r-time {
    position: absolute; bottom: 3px; right: 3px;
    background: rgba(0,0,0,0.8); color: #fff;
    font-size: 9px; padding: 2px 4px; border-radius: 3px; font-weight: 600;
}

.r-info h5 {
    margin: 0 0 5px 0; font-size: 0.9rem; color: #333;
    line-height: 1.3; font-weight: 600;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.r-info span { font-size: 0.75rem; color: #888; }

/* --- COMENTÁRIOS DO YOUTUBE --- */
.sv-comments-section {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.yt-comment-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 1px solid #f9f9f9;
    padding-bottom: 20px;
}
.yt-comment-item:last-child { border-bottom: none; }

.yt-avatar img {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
}

.yt-header {
    display: flex; justify-content: space-between; margin-bottom: 5px;
}
.yt-header strong { font-size: 0.9rem; color: #333; }
.yt-date { font-size: 0.8rem; color: #999; }

.yt-body p { font-size: 0.95rem; color: #555; line-height: 1.5; margin-bottom: 8px; }
.yt-likes { font-size: 0.8rem; color: #777; }

/* RESPONSIVO */
@media (max-width: 992px) {
    .sv-main-grid { grid-template-columns: 1fr; gap: 40px; }
    .sv-sidebar-column { margin-top: 20px; }
}

@media (max-width: 768px) {
    .sv-main-grid {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Ajuste para o vídeo no mobile - Assegura largura 100% sem estouro */
    .sv-video-container {
        border-radius: 8px;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .sv-meta-row { flex-direction: column; align-items: flex-start; gap: 20px; }
    .sv-actions-right { width: 100%; justify-content: space-between; }
    .sv-main-title { font-size: 1.3rem; }
    .btn-action { flex: 1; justify-content: center; }
}