html { height: 100%; scroll-behavior: smooth; }
body { min-height: 100vh !important; overflow-y: scroll !important; overflow-x: hidden; margin: 0; padding: 0; }

/* Ocultar barra de rolagem mas manter funcionamento */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; }

/* CORREÇÃO DAS LETRAS CORTADAS */
.line-clamp-1, .line-clamp-2 {
    line-height: 1.4 !important;
    padding-bottom: 2px !important; /* Dá espaço para a perninha do p, g, j, ç */
}

/* PLAYER DE VÍDEO E PIP */
#playerContainer iframe { width: 100% !important; height: 100% !important; position: absolute; top: 0; left: 0; }
#playerWrapper { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.3s ease; }
#playerWrapper.mini-player {
    position: fixed !important; bottom: 24px; right: 24px; 
    width: 360px !important; height: 202px !important; 
    z-index: 9999 !important; border-radius: 12px !important; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.8); border: 1px solid #333; pointer-events: auto;
}
@media (max-width: 768px) {
    #playerWrapper.mini-player { width: 260px !important; height: 146px !important; bottom: 16px; right: 16px; }
}

input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 12px; width: 12px; border-radius: 50%; background: #dc2626; cursor: pointer; margin-top: -4px; }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 4px; cursor: pointer; background: #555; border-radius: 2px; }

/* EFEITO DE CARREGAMENTO */
@keyframes pulse-skeleton { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.skeleton-box { animation: pulse-skeleton 1.5s ease-in-out infinite; }

/* SHORTS TIKTOK STYLE */
.short-container { height: calc(100vh - 56px); width: 100%; max-width: 450px; scroll-snap-align: start; scroll-snap-stop: always; position: relative; background: #000; margin-bottom: 0; }

/* MODO TEATRO */
.theater-mode-active .watch-layout { flex-direction: column !important; }
.theater-mode-active #playerSpace { max-height: 75vh; }
.theater-mode-active #sidebarArea { width: 100% !important; margin-top: 20px; }
.theater-mode-active #relatedVideos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.theater-mode-active #relatedVideos > div { flex-direction: column; }
.theater-mode-active #relatedVideos img { width: 100%; height: auto; aspect-ratio: 16/9; }

/* === TEMA CLARO - CORREÇÃO DEFINITIVA DAS LETRAS INVISÍVEIS === */
body.light-theme { background-color: #f9f9f9 !important; }

/* Esta linha força o texto do Tailwind a ficar preto em vez de branco! */
body.light-theme.text-white { color: #0f0f0f !important; } 

body.light-theme .navbar, body.light-theme .sidebar, body.light-theme .mobile-menu { background-color: #ffffff !important; border-color: #e5e5e5 !important; }
body.light-theme .search-input { background-color: #f0f0f0 !important; border-color: #d3d3d3 !important; color: #0f0f0f !important; }
body.light-theme .search-btn { background-color: #f8f8f8 !important; border-color: #d3d3d3 !important; color: #0f0f0f !important; }
body.light-theme .hover\:bg-zinc-800:hover { background-color: #f1f1f1 !important; }
body.light-theme .border-zinc-800 { border-color: #e5e5e5 !important; }
body.light-theme .text-zinc-400 { color: #606060 !important; }

body.light-theme .default-filter { background-color: #f0f0f0 !important; color: #0f0f0f !important; }
body.light-theme .default-filter:hover { background-color: #e5e5e5 !important; }
body.light-theme .active-filter { background-color: #0f0f0f !important; color: #ffffff !important; }

body.light-theme #searchSuggestions { background-color: #ffffff !important; border-color: #d3d3d3 !important; color: #0f0f0f !important; }
body.light-theme #searchSuggestions li { border-color: #e5e5e5 !important; }
body.light-theme #searchSuggestions li:hover { background-color: #f1f1f1 !important; }

/* Exceções onde o texto deve continuar branco no tema claro (Botões e Logo) */
body.light-theme .bg-red-600, 
body.light-theme .bg-blue-600, 
body.light-theme .bg-\[\#25D366\] { color: #ffffff !important; }

/* === MÁGICA DO PIP NATIVO (ANDROID WEBVIEW) === */
body.native-pip .navbar,
body.native-pip .sidebar,
body.native-pip #videoInfoArea,
body.native-pip #sidebarArea,
body.native-pip #customControls,
body.native-pip #pipControls,
body.native-pip #mobileMenu,
body.native-pip #installBanner {
    display: none !important;
}

body.native-pip {
    background-color: #000 !important;
    overflow: hidden !important;
}

body.native-pip #watchPage {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

body.native-pip .watch-layout {
    gap: 0 !important;
}

body.native-pip #playerSpace {
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
}

body.native-pip #playerWrapper {
    border-radius: 0 !important;
}