
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: Arial, sans-serif;
  margin: 0;
  overflow: hidden;
}

/* canvas padrÃ£o */
canvas {
  display: block;
}

/* ðŸ“± mobile */
@media (max-width: 100%) {
  canvas {
    width: 100vw;
    height: 100vh;
    /*transform: scale(0.3);*/
    transform-origin: center center;
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%; /* centraliza de verdade */
  }
}

#label {
  position: absolute;
  padding: 6px 10px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 13px;
  border-radius: 4px;
  pointer-events: none;
  display: none;
  z-index: 20;
  white-space: nowrap;
  transform: translate(12px, 12px);
}

#loading {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 30;
  color: #fff;
  font-size: 13px;
  background: rgba(0,0,0,0.55);
  padding: 6px 10px;
  border-radius: 4px;
}

#countryMenu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(480px, 92vw);
  height: 100vh;
  background: rgba(8, 12, 20, 0.97);
  color: #fff;
  z-index: 100;
  box-shadow: -8px 0 24px rgba(0,0,0,0.45);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
}

#countryMenu.open {
  transform: translateX(0);
}

#menuHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

#menuHeaderLeft {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

#menuTitle {
  font-size: 18px;
  font-weight: bold;
  margin: 0;
}

#menuTabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.menu-tab {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.menu-tab:hover {
  background: rgba(255,255,255,0.10);
}

.menu-tab.active {
  background: rgba(84, 145, 255, 0.28);
  border-color: rgba(124, 170, 255, 0.6);
}

#menuClose {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}

#menuContent {
  overflow-y: auto;
  padding: 14px;
  flex: 1;
}

.menu-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8db6ff;
  margin: 18px 0 10px;
}

.feed-item, .ad-item, .stream-item {
  display: block;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  text-decoration: none;
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.feed-item:hover, .ad-item:hover, .stream-item:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-1px);
}

.feed-title {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 4px;
}

.feed-url {
  font-size: 12px;
  color: #9eb8d8;
  word-break: break-all;
}

.ad-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-bottom: 10px;
}

.ad-meta {
  font-size: 12px;
  color: #b9c6d8;
  margin-top: 4px;
}

.menu-message {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 12px;
  border-radius: 10px;
  color: #dbe7ff;
  line-height: 1.4;
}

#menuOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 90;
  display: none;
}

#menuOverlay.open {
  display: block;
}

#contentOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.58);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#contentOverlay.open {
  display: flex;
}

#contentPopup {
  width: min(980px, 96vw);
  height: min(82vh, 820px);
  background: rgba(10, 14, 24, 0.98);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#contentHeader {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  gap: 12px;
}

#contentTitle {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
}

#contentActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
}

.action-btn:hover {
  background: rgba(255,255,255,0.10);
}

#contentBody {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.headline-item {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

.headline-item h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.headline-item h3 a {
  color: #fff;
  text-decoration: none;
}

.headline-item h3 a:hover {
  text-decoration: underline;
}

.headline-meta {
  font-size: 12px;
  color: #99afcc;
  margin-bottom: 8px;
}

.headline-desc {
  font-size: 14px;
  color: #fff;
  line-height: 1.5;
}

.popup-message {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 14px;
  border-radius: 10px;
  color: #dbe7ff;
  line-height: 1.45;
}

.video-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-wrap iframe,
.video-wrap video {
  width: 100%;
  height: min(70vh, 640px);
  border: 0;
  border-radius: 10px;
  background: #000;
}

@media (max-width: 700px) {
  #contentPopup {
    width: 100%;
    height: 100%;
    border-radius: 0;
    left: 0;
    right: 0;
  }
}

@media (max-width: 640px) {
  #menuHeader {
    align-items: flex-start;
  }

  #menuHeaderLeft {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 600px) {
  #contentHeader {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  #contentTitle {
    font-size: 16px;
  }

  #contentActions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 700px) {
  .headline-item {
    padding: 12px;
  }
}


/* ===== Tema claro (papel) ===== */
#contentPopup.light-mode {
  background: #f4ecd8; /* bege papel */
  color: #2b2b2b;
}

#contentPopup.light-mode .headline-item {
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.08);
}

#contentPopup.light-mode .headline-desc {
  color: #333;
}

#contentPopup.light-mode .headline-meta {
  color: #fff;
}

#contentPopup.light-mode .action-btn {
  background: rgba(0,0,0,0.05);
  color: #222;
  border: 1px solid rgba(0,0,0,0.15);
}

/* ===== Tema escuro (cinza, não preto) ===== */
#contentPopup.dark-mode {
  background: #1c1f26; /* cinza escuro elegante */
  color: #e8e8e8;
}

#contentPopup.dark-mode .headline-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

/* (opcional) hover visual nos botões ativos */
#lightModeBtn.active,
#darkModeBtn.active {
  outline: 2px solid rgba(120,160,255,0.6);
}

#contentPopup.light-mode .headline-item h3 {
  color: #1a1a1a;
}

#contentPopup.light-mode .headline-item h3 a:hover {
  text-decoration: underline;
  color: #000;
}

/* ===== TÍTULO DAS MANCHETES (comportamento correto por tema) ===== */

/* modo escuro */
#contentPopup.dark-mode .headline-item h3 a {
  color: #f1f1f1;
}

/* modo claro (papel) */
#contentPopup.light-mode .headline-item h3 a {
  color: #1a1a1a;
}

/* hover consistente */
#contentPopup .headline-item h3 a:hover {
  text-decoration: underline;
}




    
/* Container Principal My GNN */
.my-gnn-container {
    position: fixed;
    top: 0;
    left: 0;
    width: min(360px, 85vw);
    height: 100vh;
    background: rgba(10, 14, 22, 0.98);
    z-index: 300;
    transform: translateX(-100%); /* Escondido à esquerda */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    display: flex;
    backdrop-filter: blur(15px);
    border-right: 1px solid rgba(255,255,255,0.1);
}

/* Quando o menu está aberto */
.my-gnn-container.open {
    transform: translateX(0);
}

/* Aba Lateral (Alça) */
#myGnnHandle {
    position: absolute;
    right: -35px; /* Largura da aba */
    top: 100px;
    background: rgba(10, 14, 22, 0.98);
    color: #8db6ff;
    padding: 15px 8px;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
    border: 1px solid rgba(255,255,255,0.1);
    border-left: none;
    writing-mode: vertical-rl; /* Texto na vertical */
    text-orientation: mixed;
    font-weight: bold;
    font-size: 13px;
    letter-spacing: 2px;
    box-shadow: 5px 0 15px rgba(0,0,0,0.3);
}

/* Conteúdo Interno */
.my-gnn-inner {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.my-gnn-main-title {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

/* Accordion (Cortina) */
.gnn-accordion-item {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 5px;
}

.gnn-acc-trigger {
    width: 100%;
    background: none;
    border: none;
    color: #eee;
    text-align: left;
    padding: 15px 5px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.gnn-acc-trigger:hover { color: #8db6ff; }

.gnn-acc-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
}

.gnn-acc-content p {
    padding: 15px;
    margin: 0;
    font-size: 14px;
    color: #ccc;
    line-height: 1.6;
}

/* Formulário de Contato */
.gnn-contact-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
}

.gnn-contact-form input, 
.gnn-contact-form textarea {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    font-family: inherit;
}

/* Seção de textos informativos no final do menu */
.my-gnn-info-section {
    padding: 20px 10px;
    margin-top: 20px;
    border-top: 1px dashed rgba(255,255,255,0.1);
}

.my-gnn-info-section h3 {
    font-size: 14px;
    color: #8db6ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    margin-top: 20px;
}

.my-gnn-info-section p {
    font-size: 13px;
    color: #aaa;
    line-height: 1.5;
    margin-bottom: 15px;
    text-align: justify;
}

.my-gnn-info-section strong {
    color: #fff;
}

#btnRefreshGlobe {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);

    z-index: 9999;

    padding: 10px 20px;
    font-size: 14px;

    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;

    cursor: pointer;
}

#btnRefreshGlobe:hover {
    background: rgba(0, 0, 0, 0.9);
}

#globeViz {
    width: 100%;
    height: 100vh; /* Ocupa 100% da altura da visão do navegador */
    background-color: #000; /* Fundo preto enquanto carrega */
    display: block;
}

    
#gnnSearchBox {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    gap: 10px;

    z-index: 9999;
    pointer-events: auto;
}

/* INPUTS no desktop (mantém como está funcionando) */
#gnnSearchBox input {
    width: 120px;
    padding: 10px;

    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);

    background: rgba(0, 0, 0, 0.7);
    color: #fff;

    outline: none;
}

/* placeholder */
#gnnSearchBox input::placeholder {
    color: rgba(255,255,255,0.6);
}

/* focus */
#gnnSearchBox input:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 6px rgba(0,212,255,0.5);
}

/* =========================
   📱 MOBILE (reduz 40%)
========================= */
@media (max-width: 768px) {

    #gnnSearchBox {
        top: 50px;
        left: 50%;
        transform: translateX(-50%);

        display: flex;
        flex-direction: column;
        gap: 8px;

        z-index: 9999;
    }

    /* 🔥 AQUI está o que você queria: 40% menor */
    #gnnSearchBox input {
        width: 72px !important; /* 120px - 40% = ~72px */
        padding: 8px;
        font-size: 12px;
    }
}

/* Estilo Base para as Sidebars Esquerdas */
.my-left-container {
    position: fixed;
    top: 0;
    left: 0;
    width: min(360px, 85vw);
    height: 100vh;
    background: rgba(10, 14, 22, 0.98);
    z-index: 300;
    transform: translateX(-100%); /* Escondido */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    display: flex;
    backdrop-filter: blur(15px);
    border-right: 1px solid rgba(255,255,255,0.1);
}

.my-left-container.open {
    transform: translateX(0);
}

/* Reutilizando o estilo das alças (handles) */
#myGnnHandle, #myLeftHandle {
    position: absolute;
    right: -25px;
    width: 25px;
    background: rgba(10, 14, 22, 0.98);
    color: #8db6ff;
    padding: 15px 0;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
    border: 1px solid rgba(255,255,255,0.1);
    border-left: none;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: normal;
    font-size: 13px;
    letter-spacing: 2px;
    box-shadow: 5px 0 15px rgba(0,0,0,0.3);
    text-align: center;
    transform: rotate(180deg);
}

/* POSICIONAMENTO DAS ABAS (Empilhadas) */
#myGnnHandle {
    top: 100px; /* Primeira aba */
}

#myLeftHandle {
    top: 200px; /* Segunda aba (abaixo da primeira) */
}

/* Estilo do conteúdo interno para a nova aba */
.my-left-inner {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    color: #fff;
}

.my-left-inner h2 {
    font-size: 1.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    margin-bottom: 20px;
}



    
/* Garante que qualquer aba aberta fique acima de tudo */
.my-gnn-container.open, 
.my-left-container.open {
    z-index: 400 !important;
}

/* Garante que quando fechadas, elas fiquem no mesmo nível */
.my-gnn-container, 
.my-left-container {
    z-index: 300;
}

/* Ajuste opcional: se quiser que a alça da aba de busca 
   fique levemente transparente quando a outra estiver aberta */
.my-gnn-container.open ~ #myLeftSidebar #myLeftHandle {
    opacity: 0.3;
    pointer-events: none; /* Evita clicar na alça errada por acidente */
}
    

