/* -------------------------------------------------------------------------
   KidsBible App-Like CSS Framework
   Focado em Android, iOS e Smart TV (Samsung Store/Tizen)
   ------------------------------------------------------------------------- */

:root { 
    --azul-sky: #87CEEB; 
    --amarelo-sol: #FFD700; 
    --lilas-suave: #E6E6FA; 
    --verde-grama: #32CD32; 
    --laranja-alegre: #FF8C00; 
    --texto-cor: #4B0082;
    --nav-height: 75px;
}

body { 
    font-family: 'Quicksand', sans-serif; 
    background: #fdfdfd; 
    padding-bottom: calc(var(--nav-height) + 20px); /* Espaço para a barra inferior */
    -webkit-tap-highlight-color: transparent; /* Remove brilho de clique no mobile */
}

/* Barra de Navegação Inferior (Experiência de App Nativo) */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.08);
    z-index: 2000;
    border-top: 2px solid var(--lilas-suave);
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    padding-bottom: env(safe-area-inset-bottom); /* Suporte para iPhone (Notch inferior) */
}

.nav-item {
    text-align: center;
    color: #b0b0b0;
    text-decoration: none !important;
    font-size: 0.7rem;
    font-weight: 700;
    flex: 1;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none !important;
    outline: none !important;
    background: none !important;
    padding: 0;
    margin: 0;
    box-shadow: none !important;
    cursor: pointer;
}

.nav-item i { 
    font-size: 1.5rem; 
    display: block; 
    margin-bottom: 2px; 
}

.nav-item.active { 
    color: var(--azul-sky); 
}

.nav-item.active i { 
    color: var(--laranja-alegre); 
}

/* Menu "Mais" Estilo Bottom Sheet (Sobe do rodapé) */
.more-menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 3000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.more-menu-sheet {
    position: fixed;
    bottom: -100%; left: 0; width: 100%;
    background: #fff;
    border-top-left-radius: 35px;
    border-top-right-radius: 35px;
    padding: 20px 20px 40px;
    z-index: 3001;
    transition: bottom 0.4s cubic-bezier(0.36, 0, 0.66, -0.56);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
}

.more-menu-overlay.active { display: block; opacity: 1; }
.more-menu-sheet.active { bottom: 0; transition: bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

.more-item {
    display: flex;
    align-items: center;
    padding: 15px;
    text-decoration: none !important;
    color: var(--texto-cor) !important;
    font-weight: 700;
    border-radius: 18px;
    margin-bottom: 8px;
    transition: background 0.2s;
}
.more-item:active { background: #f0f0f0; }
.more-item i { 
    width: 42px; height: 42px; 
    background: #f1f3f5; 
    border-radius: 12px; 
    display: flex; align-items: center; justify-content: center;
    margin-right: 15px;
    font-size: 1.1rem;
    color: var(--azul-sky);
}

.drag-handle {
    width: 50px; height: 6px;
    background: #e0e0e0;
    border-radius: 10px;
    margin: 0 auto 25px;
}

/* Esconder barra inferior em Telas Grandes (Desktop/TV HD) */
@media (min-width: 992px) {
    .bottom-nav, .more-menu-overlay, .more-menu-sheet { display: none !important; }
    body { padding-bottom: 0; }
}

/* Header tipo App */
.app-header {
    background: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #eee;
}

.btn-icon {
    width: 45px; height: 45px;
    border-radius: 12px;
    background: var(--lilas-suave);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--texto-cor);
    font-size: 1.2rem;
    text-decoration: none;
}

/* Grid de Vídeos Estilo Streaming */
.kids-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    padding: 15px;
}

@media (min-width: 768px) {
    .kids-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

.video-thumb-container {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.video-thumb-container img {
    width: 100%; height: 100%; object-fit: cover;
}

/* Efeito de Foco para TVs (Navegação por Controle Remoto) */
.focusable:focus {
    outline: 4px solid var(--amarelo-sol) !important;
    transform: scale(1.05);
    z-index: 10;
}

/* Autoplay Overlay */
#autoplay-overlay {
    background: rgba(0,0,0,0.92);
}

.countdown-bar {
    width: 200px; height: 6px;
    background: #444;
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
}

.countdown-progress {
    height: 100%;
    background: var(--amarelo-sol);
    width: 100%;
    transition: width 1s linear;
}
