/* Configurações Globais */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    overflow: hidden;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #fff;
}

/* Fundo com efeito de escurecimento para dar leitura no texto */
.fundo-turistico {
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}


/* Container Padrão (Horizontal) */
    #conteudo-player {
        width: 100vw;
        height: 100vh;
        position: absolute;
        top: 0;
        left: 0;
        overflow: hidden;
    }

    /* Container Rotacionado (Vertical em TV Horizontal) */
    #conteudo-player.modo-vertical {
        width: 100vh !important;  /* Usa a altura da TV como largura */
        height: 100vw !important; /* Usa a largura da TV como altura */
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) rotate(90deg) !important;
        transform-origin: center center !important;
    }

    /* Garante que mídias dentro do container obedeçam a rotação */
    #conteudo-player iframe,
    #conteudo-player video,
    #conteudo-player img {
        width: 100% !important;
        height: 100% !important;
        object-fit: fill;
        border: none;
    }

/* ROTAÇÃO VIA CSS PARA TELAS VERTICAIS */
.modo-vertical {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vh !important;  /* Inverte a altura para ser a largura */
    height: 100vw !important; /* Inverte a largura para ser a altura */
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center center;
}


/* Container do Box de Pareamento */
.container-pareamento {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px); /* Efeito borrado de vidro no fundo */
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    display: flex;
    max-width: 900px;
    width: 100%;
    align-items: center;
    gap: 40px;
}

/* Divisões internas */
.topo-pareamento, .conteudo-pareamento {
    flex: 1;
}

.logo-sistema {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #fff;
}

p {
    font-size: 1.1rem;
    color: #ccc;
    line-height: 1.5;
    margin-bottom: 25px;
}

/* O Código de 5 dígitos gigante */
#codigo-display {
    background: #111;
    border: 3px dashed #ff9800; /* Borda chamativa */
    color: #ff9800;
    font-size: 4.5rem;
    font-weight: bold;
    letter-spacing: 8px;
    padding: 15px 20px;
    border-radius: 12px;
    display: inline-block;
    font-family: monospace;
    margin-bottom: 25px;
    text-transform: uppercase;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.instrucao {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 0;
}

/* =======================================================
   MÁGICA DA TELA EM PÉ (VERTICAL / PORTRAIT)
   ======================================================= */
@media (orientation: portrait) {
    .container-pareamento {
        flex-direction: column; /* Coloca a logo em cima e o texto embaixo */
        max-width: 500px;
        padding: 50px 30px;
        gap: 20px;
    }

    .logo-sistema {
        max-height: 150px; /* Diminui um pouco a logo para dar espaço */
        margin-bottom: 10px;
    }

    h2 {
        font-size: 1.8rem;
    }

    p {
        font-size: 1rem;
    }

    #codigo-display {
        font-size: 3.5rem; /* Código ligeiramente menor para não quebrar linha */
        width: 100%;
    }
}

/* =======================================================
   ESTRUTURA DO PLAYER DE MÍDIA (MANTIDA)
   ======================================================= */
.player-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}
.player-container.ativo { opacity: 1; z-index: 2; }
.player-container.oculto { opacity: 0; z-index: 1; }
.slide-imagem { width: 100%; height: 100%; background-size: cover; background-position: center; background-repeat: no-repeat; }
iframe { width: 100%; height: 100%; overflow: hidden; }