/* =====================================================
   CSS TV DHALMAR — VERSÃO "NETFLIX"
   VÍDEO PRINCIPAL GRANDE / THUMBS PEQUENAS EMBAIXO
   TOPO METÁLICO / LOGO MAIOR
   ===================================================== */

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

body {
    font-family: 'Poppins', sans-serif;
    background: #05050a;
    color: #fff;
    height: 100vh;
    height: 100dvh; /* altura real da viewport em navegadores mobile (ignora a barra de endereço) */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* =====================================================
   HEADER — FAIXA METÁLICA
   ===================================================== */

header {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 40%),
        linear-gradient(135deg, #cfd2d6 0%, #a9adb3 22%, #e7e9eb 45%, #9a9ea4 68%, #c6c9cd 100%);
    padding: 6px 34px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    height: 66px;
    border-bottom: 2px solid #FDB913;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.6),
        inset 0 -6px 10px -6px rgba(0,0,0,0.25),
        0 2px 12px rgba(0,0,0,0.35);
    z-index: 10;
}

/* leve textura de "escovado" metálico */
header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        100deg,
        rgba(255,255,255,0.10) 0px,
        rgba(255,255,255,0.10) 1px,
        transparent 1px,
        transparent 3px
    );
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* LOGO */
header .logo {
    height: 52px;
    width: auto;
    max-height: 52px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
    position: relative;
    z-index: 1;
}

/* INFO DO VÍDEO NO HEADER (entre logo e relógio) */
.header-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 0 16px;
}

.header-info .categoria {
    display: inline-block;
    background: #FDB913;
    color: #0a0a0f;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 2px 10px;
    border-radius: 3px;
    margin-bottom: 3px;
}

.header-info h1 {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 1px rgba(255,255,255,0.35);
}

/* RELÓGIO */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.header-right .clock {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.35);
    padding: 4px 18px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.8), 0 1px 3px rgba(0,0,0,0.15);
}

.header-right .clock span {
    color: #b5790a;
}

/* =====================================================
   MAIN — PLAYER OCUPA A TELA (ESTILO NETFLIX HERO)
   ===================================================== */

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #000;
    min-height: 0;
}

.player {
    flex: 1 1 82%;
    position: relative;
    background: #000;
    overflow: hidden;
    min-height: 0;
}

.player #video {
    width: 100%;
    height: 100%;
    position: relative;
}

.player #video iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Sombra bem sutil no rodapé, apenas para profundidade (não cobre o vídeo) */
.player .gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10%;
    background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

/* leve vinheta lateral pra dar profundidade ao hero */
.player::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, transparent 25%, transparent 75%, rgba(0,0,0,0.25) 100%);
    pointer-events: none;
    z-index: 1;
}

/* =====================================================
   BOTÕES NAVEGAÇÃO
   ===================================================== */

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.12);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 5;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.nav-btn:hover {
    background: rgba(253, 185, 19, 0.35);
    border-color: #FDB913;
    transform: translateY(-50%) scale(1.08);
}

#anterior { left: 16px; }
#proximo { right: 16px; }

/* =====================================================
   CONTROLE DE VOLUME
   ===================================================== */

.volume-control {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 6px 14px 6px 6px;
    backdrop-filter: blur(6px);
    transition: border-color 0.25s ease, background 0.25s ease;
}

.volume-control:hover {
    border-color: #FDB913;
    background: rgba(0, 0, 0, 0.6);
}

.vol-btn {
    background: transparent;
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.vol-btn:hover {
    background: rgba(253, 185, 19, 0.25);
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 90px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #FDB913;
    box-shadow: 0 0 6px rgba(253, 185, 19, 0.6);
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border: none;
    border-radius: 50%;
    background: #FDB913;
    box-shadow: 0 0 6px rgba(253, 185, 19, 0.6);
    cursor: pointer;
}

.volume-slider::-moz-range-progress {
    background: #FDB913;
    height: 4px;
    border-radius: 4px;
}

/* =====================================================
   INFORMAÇÕES DO VÍDEO — ESTILO HERO
   ===================================================== */

/* =====================================================
   BARRA DE PROGRESSO
   ===================================================== */

.progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    position: relative;
    flex-shrink: 0;
}

.progress #barra {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #FDB913, #ffd35c);
    transition: width 0.5s ease;
    box-shadow: 0 0 8px rgba(253, 185, 19, 0.6);
}

/* =====================================================
   CARROSSEL — FAIXA FINA ESTILO NETFLIX "PRÓXIMOS"
   ===================================================== */

.carrossel {
    position: relative;
    flex: 0 0 auto;
    background: linear-gradient(180deg, rgba(5,5,10,0.99), rgba(5,5,10,1));
    padding: 8px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 15;
}

.carrossel .titulo-linha {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 4px 2px;
    border-radius: 6px;
    transition: background 0.25s ease;
}

.carrossel .titulo-linha:hover {
    background: rgba(255, 255, 255, 0.04);
}

.carrossel .titulo-linha h2 {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.carrossel .titulo-linha h2::after {
    content: '';
    display: block;
    width: 25px;
    height: 2px;
    background: #FDB913;
    margin-top: 3px;
    border-radius: 2px;
}

.carrossel .seta-toggle {
    color: #FDB913;
    font-size: 12px;
    transition: transform 0.35s ease;
    transform: rotate(-90deg);
}

.carrossel.aberto .seta-toggle {
    transform: rotate(0deg);
}

.carrossel .lista {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-end;
    gap: 8px;
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding: 16px 30px 20px;
    background: linear-gradient(180deg, rgba(5,5,10,0.35) 0%, rgba(5,5,10,0.88) 22%, rgba(5,5,10,0.98) 60%, #05050a 100%);
    backdrop-filter: blur(3px);
    box-shadow: 0 -12px 34px rgba(0,0,0,0.55);
    transform: translateY(16px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.28s ease, visibility 0s linear 0.3s;
}

.carrossel.aberto .lista {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition: transform 0.3s ease, opacity 0.28s ease, visibility 0s linear 0s;
}

.carrossel .lista::-webkit-scrollbar {
    height: 3px;
}

.carrossel .lista::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
}

.carrossel .lista::-webkit-scrollbar-thumb {
    background: #FDB913;
    border-radius: 4px;
}

/* =====================================================
   ITEM DO CARROSSEL — CARDS PEQUENOS ESTILO NETFLIX
   ===================================================== */

.video-item {
    min-width: 140px;
    max-width: 140px;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid transparent;
    flex-shrink: 0;
    transform-origin: center bottom;
}

.video-item:hover {
    transform: translateY(-4px) scale(1.08);
    border-color: rgba(253, 185, 19, 0.35);
    box-shadow: 0 10px 24px rgba(0,0,0,0.55);
    z-index: 4;
    position: relative;
}

.video-item.ativo {
    border-color: #FDB913;
    box-shadow: 0 0 0 1px rgba(253, 185, 19, 0.4), 0 0 15px rgba(253, 185, 19, 0.15);
}

.video-item .thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #1a1a1a;
    border-radius: 4px 4px 0 0;
}

.video-item .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-item:hover .thumb img {
    transform: scale(1.06);
}

.video-item .thumb .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 34px;
    height: 34px;
    background: rgba(253, 185, 19, 0.88);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #0a0a0f;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-item:hover .thumb .play-icon {
    opacity: 1;
}

.video-item .thumb .duration {
    position: absolute;
    bottom: 4px;
    right: 5px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 2px;
}

.video-item .info {
    padding: 6px 9px 8px;
}

.video-item .info .cat {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    color: #FDB913;
    letter-spacing: 0.5px;
}

.video-item .info h4 {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    line-height: 1.25;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =====================================================
   RESPONSIVO
   ===================================================== */

@media (max-width: 1024px) {
    header { padding: 5px 20px; height: 58px; }
    header .logo { height: 42px; max-height: 42px; }
    .header-info h1 { font-size: 13px; }
    .header-info .categoria { font-size: 8px; padding: 2px 8px; }
    .header-right .clock { font-size: 20px; padding: 3px 14px; }
    .player { flex: 1 1 78%; }
    .nav-btn { width: 38px; height: 38px; font-size: 14px; }
    #anterior { left: 10px; }
    #proximo { right: 10px; }
    .volume-control { bottom: 14px; right: 14px; padding: 4px 10px 4px 4px; gap: 6px; }
    .vol-btn { width: 28px; height: 28px; font-size: 13px; }
    .volume-slider { width: 64px; }
    .carrossel { padding: 6px 20px 8px; }
    .video-item { min-width: 110px; max-width: 110px; }
}

@media (max-width: 768px) {
    header { padding: 4px 12px; height: 48px; }
    header .logo { height: 32px; max-height: 32px; }
    .header-info { display: none; }
    .header-right .clock { font-size: 16px; padding: 2px 10px; }
    .player { flex: 1 1 68%; }
    .nav-btn { width: 30px; height: 30px; font-size: 10px; }
    #anterior { left: 6px; }
    #proximo { right: 6px; }
    .volume-control { bottom: 10px; right: 10px; padding: 3px 8px 3px 3px; gap: 5px; border-radius: 18px; }
    .vol-btn { width: 24px; height: 24px; font-size: 11px; }
    .volume-slider { width: 48px; height: 3px; }
    .carrossel { padding: 5px 12px 6px; min-height: 44px; flex-shrink: 0; }
    .carrossel .titulo-linha h2 { font-size: 9px; }
    .video-item { min-width: 90px; max-width: 90px; }
    .video-item .info h4 { font-size: 10px; }
    .video-item .info { padding: 4px 6px 5px; }
    .video-item .info .cat { font-size: 7px; }
    .video-item .thumb .play-icon { width: 26px; height: 26px; font-size: 10px; }
}

@media (max-width: 480px) {
    header .logo { height: 26px; max-height: 26px; }
    .header-right .clock { font-size: 12px; padding: 1px 6px; }
    .video-item { min-width: 76px; max-width: 76px; }
    .video-item .info h4 { font-size: 9px; }
}