/* --- 1. RESET E ESTRUTURA BASE --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html, body { 
    height: 100%; 
    background-color: var(--bg-black); 
    color: var(--text-white); 
    font-family: 'Segoe UI', Roboto, sans-serif; 
    display: flex;
    flex-direction: column;
    overflow: hidden; 
}

/* --- 2. HEADER E AÇÕES --- */
header { 
    width: 100%;
    background-color: var(--accent-red-header); 
    border-top: 2px solid var(--accent-red);
    border-bottom: 1px solid var(--border-main); 
    flex-shrink: 0;
}

.header-content {
  max-width: 720px; 
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 18px;
  position: relative;
}

.header-content img {
    width: 40px;
  height: 40px; /* Ajustado para auto conforme o íntegro para evitar distorção */
  flex: 0 0 auto;
  padding-right: 5px;
  padding-top: 2px;
}

.header-content h1 {
    flex: 1;
    font-size: 1.1rem;
    margin: 0;
    color: var(--text-header);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    line-height: 1;      /* Ajustado de 1.2 para 1 para centralizar melhor no eixo Y */
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    white-space: nowrap; /* Evita que o título quebre e aumente a altura */
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto; 
    height: 100%;
}

.info-btn {
    width: 25px;
    height: 25px;
    border: 2px solid var(--text-header);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.info-btn span {
    font-family: 'Georgia', serif;
    font-style: italic;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--text-header);
}

.btn-header-back {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    text-decoration: none;
}

.btn-header-back i {
    color: var(--text-header);
    font-size: .9rem;
}

/* --- 3. CONTEÚDO PRINCIPAL (VÍDEO) --- */
main { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 10px 15px;
}

#container-video {
    width: 100%;
    max-width: 720px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #000;
    border: 1px solid #333;
  //  border: 1px solid var(--border-main);
    position: relative;
box-shadow: 0 20px 20px rgba(0,0,0,0.7);
}

#player-externo { 
    border: none;
    width: 100%; 
    height: 70vw; 
    min-height: 300px; 
    flex: 1;
}

.fonte { 
    width: 100%;
    text-align: center; 
    padding: 10px; 
    font-size: 0.9rem;
    color: #fff;
    background: #000;
}
.fonte a { 
    color: #ff4d4d; 
    text-decoration: none;
    font-weight: bold;
}

/* --- 4. CLIMA (TICKER) --- */
.clima-container {
    width: 100%;
    color: #ffffff;
    background: #455A64;
    padding: 10px 0;
    border-top: 1px solid var(--border-main);
    flex-shrink: 0;
}

.clima-wrapper { 
    display: flex; 
    width: max-content; 
    animation: ticker-loop 25s linear infinite; 
}

.clima-item { margin-right: 60px; font-weight: 600; }

@keyframes ticker-loop { 
    0% { transform: translateX(0); } 
    100% { transform: translateX(-50%); } 
}

/* --- SIDE MENU INFO (Renomeado) --- */
.side-menu-info {
    position: fixed;
    top: 0;
    right: -300px; 
    width: 300px; 
    height: 100%;
    background: var(--bg-menu);
    z-index: 2000;
    transition: 0.4s;
    padding: 30px;
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    overflow-y: auto;
}

.side-menu-info.active { right: 0; }

.side-menu-info h2 { 
    color: var(--accent-red-light); 
    border-bottom: 2px solid var(--accent-red); 
    padding-bottom: 10px; 
    margin-bottom: 20px; 
}

.side-menu-info h3 { 
    color: var(--text-white); 
    margin-top: 20px; 
    font-size: 1rem; 
    margin-bottom: 10px;
}

.side-menu-info p { 
    font-size: 0.9rem; 
    color: var(--text-gray); 
    margin-bottom: 10px; 
}

.side-menu-info ul { 
    list-style: none; 
    margin-bottom: 20px; 
}

.side-menu-info ul li { 
    color: var(--text-gray); 
    font-size: 0.85rem; 
    margin-bottom: 10px; 
    line-height: 1.4;
    padding-left: 15px; 
    border-left: 3px solid var(--accent-red); 
}

.side-menu-info-links { 
    border-top: 1px solid var(--border-color, #333); 
    padding-top: 20px; 
    margin-top: 20px; 
}

.side-menu-info-links li { 
    position: relative; 
    padding-left: 25px; 
    border-left: none !important; 
    margin-bottom: 5px;
    display: flex;
    align-items: center; 
}

.side-menu-info-links li::before { 
    content: "•"; 
    color: var(--accent-red); 
    position: absolute; 
    left: 0; 
    font-size: 1.8rem; 
    line-height: 1;    
    top: 50%;
    transform: translateY(-55%); 
}

.side-menu-info-links a { 
    color: var(--text-white); 
    text-decoration: none; 
    font-size: 1rem; 
    line-height: 2; 
    display: block;
}

.side-menu-info-social {
  display: flex;
  justify-content: center;
  margin-top: 25px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color, #333);
}

.side-menu-info-social a { 
    color: var(--text-white); 
    opacity: 0.7; 
    transition: 0.3s; 
    margin: 0 10px; 
}

.side-menu-info-social a:hover { 
    opacity: 1; 
    color: var(--accent-red-light); 
}

.side-menu-info-dev { 
    margin-top: 25px; 
    text-align: center; 
    border-top: 1px solid var(--border-color, #333); 
    padding-top: 15px; 
}

.side-menu-info-dev p { 
    font-size: 0.65rem; 
    color: var(--text-gray-light, #e5e4e2); 
    text-transform: uppercase; 
}

.side-menu-info-dev span { 
    color: var(--accent-red); 
    font-weight: bold; 
    display: block; 
    font-size: 0.8rem; 
    margin-top: 5px; 
}

.side-menu-info-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--accent-red-light); 
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    transition: 0.3s;
}

.side-menu-info-close:hover { 
    color: var(--text-white); 
    transform: scale(1.1); 
}

/* --- OVERLAY --- */
.overlay-bg { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.8); 
    display: none; 
    z-index: 1500; 
}

.overlay-bg.active { 
    display: block; 
}

/* Scrollbar para o Menu */
.side-menu-info::-webkit-scrollbar { 
    width: 6px; 
}

.side-menu-info::-webkit-scrollbar-track { 
    background: var(--bg-menu); 
}

.side-menu-info::-webkit-scrollbar-thumb { 
    background: var(--accent-red); 
    border-radius: 10px; 
}

/* --- 6. RESPONSIVIDADE (TV E TELAS GRANDES) --- */
@media (min-width: 1024px) {
    html, body {
        height: 100%; /* Fallback */
        height: 100dvh;
        overflow: hidden;
    }

    body {
        /* Gradiente ajustado para 0.6 (mais claro) conforme solicitado */
        background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
                          url('/thumbs/cassino.png');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
    }

    /* REMOVE BORDAS NA TV PARA NÃO BRIGAR COM O TEMA LIGHT */
    header, #container-video, .clima-container, footer {
       border: none !important;
    }
footer {
        height: 35px;
       }

    main {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 5px;
    }

           #container-video {
        width: 90%; /* Mantido o valor do seu código novo */
        max-width: 1100px; /* Mantido o valor do seu código novo */
        
        /* Linhas de fallback exclusivas para salvar a altura em TVs antigas */
        height: 70vh; /* Fallback 1: Se a TV antiga não entender calc */
        height: calc(100vh - 155px); /* Fallback 2: Se a TV antiga entender calc mas não entender dvh */
        height: calc(100dvh - 155px); /* Original: Para TVs novas e navegadores modernos */
        
        flex: 1 1 auto; /* Substitui o 'none' para forçar o esticamento vertical se o calc falhar */
        box-shadow: 0 20px 50px rgba(0,0,0,0.7);
    }

    #player-externo {
        height: 100% !important;
    }

    .fonte {
        position: absolute;
        bottom: 25px;
        background: rgba(0, 0, 0, 0);
        padding: 6px 0;
        z-index: 10;
    }

    .header-content {
        width: 95%; 
        max-width: 1180px; 
        justify-content: space-between;
    }

    /* Substituição do GAP por Margin para navegadores de TV antigos */
    .header-content img { margin-left: 10px; }
    .header-content h1 { margin: 0 10px; }
    .info-btn { margin-right: 15px; }
}


/* --- 7. AJUSTES MOBILE --- */
@media (max-width: 600px) {
    #container-video { 
        height: 65vh; 
    }
    main { padding: 5px 10px; }
}

/* Paisagem Landscape */
@media (orientation: landscape) and (max-height: 500px) {
    header, footer, .clima-container, .creditos { display: none !important; }
    main { padding: 0 !important; }
    #container-video {
        max-width: none !important;
        height: 100vh !important; 
        width: 100vw !important;  
        border: none !important;
    }
}

/* ============================================================ */
/* ESTRUTURA DO MODAL (Copiado do Layout para funcionar no Cassino) */
/* ============================================================ */

.help-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,.7);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
}

.help-box {
  background: var(--bg-container, #1a1a1a); /* Fallback caso a variável falhe */
  border: 1px solid var(--border-light, #333);
  border-left: 4px solid var(--accent-red, #e74c3c);
  border-radius: var(--radius-large, 10px);
  width: 90%;
  max-width: 280px; /* Padronizado conforme conversamos */
  padding: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,.6);
  text-align: center;
}

.help-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  color: var(--text-white, #fff);
  margin-bottom: 15px;
}

.help-close {
  cursor: pointer;
  color: var(--text-gray, #888);
  font-size: 1.5rem;
  line-height: 1;
}

.help-close:hover { 
  color: var(--text-white); 
}

.help-content {
  font-size: .9rem;
  line-height: 1.5;
  color: var(--text-gray, #ccc);
}

/* Garante que a imagem do QR Code não estoure o tamanho */
.help-content img {
    width: 100%;
    max-width: 200px;
    border-radius: 8px;
    margin: 10px 0;
}

/* ========================= */
/* BUG REPORT MODAL          */
/* ========================= */

.br-modal{
    display:none;
    position:fixed;
    z-index:9999;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.7);
    justify-content:center;
    align-items:center;
}

.br-box{
    background:var(--bg-container);

    border-radius:var(--radius-large);

    overflow:hidden;

    border:1px solid var(--border-main);

    box-shadow:0 4px 20px rgba(0,0,0,0.4);

    width:90%;
    max-width:450px;

    border-left:4px solid var(--primary-color);
}

.br-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:12px 15px;
    background:var(--bg-menu);
    border-bottom:1px solid var(--border-main);
    font-weight:bold;
    color:var(--text-white);
}

.br-close{
    cursor:pointer;
    font-size:1.4rem;
    color:var(--text-gray);
}

.br-content{
    padding:4px 18px 20px 18px;
}

/* ========================= */
/* TEXTO / TIPOGRAFIA        */
/* ========================= */
.br-header-title{

    font-size:1rem;
    font-weight:bold;

    color:var(--primary-color);

    text-transform:uppercase;
}

.br-title{

    font-size:1.1rem;

    color:var(--h2-tmon-color);

    text-align:center;

    font-weight:bold;

    text-shadow:0 2px 8px rgba(0,0,0,0.25);

    margin-bottom:10px;
text-transform:uppercase;
}

.br-text{

    font-size:0.82rem;

    line-height:1.6;

    color:var(--text-gray);
}

/* ========================= */
/* BOTÃO                     */
/* ========================= */

.br-button{

    width:100%;

    margin-top:12px;

    padding:14px;

    border:none;

    border-radius:10px;

    background:var(--primary-color);
color:var(--text-dark);

    font-size:1rem;

    font-weight:bold;
}

.br-button:hover{
    opacity:0.9;
}

/* ========================= */
/* INFO BOX                  */
/* ========================= */

.br-highlight{
    margin-top:15px;
    padding:10px;
    background:var(--bg-highlight);
    border-left:4px solid var(--accent-red);
    border-radius:var(--radius-main);
    color:var(--text-gray);
    font-size:0.82rem;
    line-height:1.5;
}

.br-group{
    margin-bottom:10px;
}

.br-field-wrap{
    position:relative;
}

.br-label{

    position:absolute;

    left:10px;
    top:6px;

    font-size:0.7rem;
    font-weight:bold;

    color:var(--text-gray);

    text-transform:uppercase;

    pointer-events:none;
}

/* ========================= */
/* CAMPOS                    */
/* ========================= */

.br-input,
.br-select,
.br-textarea{

    width:100%;

    padding:20px 10px 8px 10px;

    background:var(--bg-input);
color:var(--text-white);
border:1px solid var(--border-light);

    border-radius:var(--radius-main);

    font-size:1rem;

    box-sizing:border-box;
}

.br-textarea{

    height:90px;

    resize:none;

    font-family:inherit;
}

.br-input:focus,
.br-select:focus,
.br-textarea:focus{

    outline:none;

    border-color:var(--accent-red);
}