html, body { margin:0; width:100%; height:100%; overflow:hidden; background:#000; font-family:Arial, sans-serif; }
#stage { position:fixed; inset:0; background:#000; display:flex; align-items:center; justify-content:center; color:white; }
.message { text-align:center; font-size:36px; line-height:1.35; padding:40px; max-width:980px; }
.message:before { content:''; display:block; width:88px; height:88px; margin:0 auto 22px; background:url('/assets/app-icon.png') center/contain no-repeat; border-radius:22px; }
video, img, iframe { width:100vw; height:100vh; border:0; object-fit:cover; background:#000; }
iframe { background:white; }
.code { font-size:64px; font-weight:800; margin-top:20px; color:#10eec7; letter-spacing:2px; }
.small { font-size:20px; opacity:.78; margin-top:16px; }

/* RSS / Notícias - layout seguro para TVs Android/WebView
   Usa flexbox em vez de grid para compatibilidade com WebView antigo.
   Prioridade: nunca deixar texto sair da tela. */
.news-screen{
  position:fixed;
  inset:0;
  width:100vw;
  height:100vh;
  display:flex;
  flex-direction:row;
  background:linear-gradient(135deg,#0f48a0 0%,#0a3478 52%,#061d4b 100%);
  color:#fff;
  overflow:hidden;
  box-sizing:border-box;
}
.news-content{
  position:relative;
  flex:0 0 52%;
  width:52%;
  height:100vh;
  min-width:0;
  box-sizing:border-box;
  padding:11vh 4.8vw 5.5vh 5.2vw;
  display:flex;
  flex-direction:column;
  justify-content:center;
  overflow:hidden;
  z-index:2;
}
.news-logo{
  position:absolute;
  top:3.6vh;
  left:3.2vw;
  width:6.2vh;
  height:6.2vh;
  min-width:44px;
  min-height:44px;
  max-width:76px;
  max-height:76px;
  background:rgba(255,255,255,.95) url('/assets/app-icon.png') center/76% auto no-repeat;
  border-radius:14px;
  box-shadow:0 8px 24px rgba(0,0,0,.18);
  z-index:4;
}
.news-meta{
  font-size:2.35vh;
  line-height:1.15;
  color:#10eec7;
  font-weight:900;
  margin:0 0 3vh;
  text-transform:uppercase;
  letter-spacing:.08em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.news-content h1{
  font-size:5.3vh;
  line-height:1.07;
  margin:0 0 2.8vh;
  font-weight:900;
  letter-spacing:-.035em;
  max-height:45vh;
  overflow:hidden;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:5;
  word-break:normal;
  overflow-wrap:break-word;
  text-wrap:balance;
}
.news-content p{
  font-size:2.75vh;
  line-height:1.27;
  margin:0;
  opacity:.94;
  max-height:23vh;
  overflow:hidden;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:4;
  word-break:normal;
  overflow-wrap:break-word;
}
.news-image{
  flex:1 1 auto;
  height:100vh;
  min-width:0;
  background-size:cover;
  background-position:center;
  position:relative;
  overflow:hidden;
}
.news-image:after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,#061d4b 0%,rgba(6,29,75,.22) 32%,rgba(0,0,0,.18) 100%);
}
.news-fallback{
  flex:1 1 auto;
  height:100vh;
  display:grid;
  place-items:center;
  font-size:6vh;
  font-weight:900;
  background:radial-gradient(circle at 30% 30%,rgba(16,238,199,.35),transparent 35%),#0b366f;
  color:#10eec7;
}
.news-content h1.news-title-md{font-size:4.75vh;line-height:1.08;-webkit-line-clamp:5;max-height:45vh}
.news-content h1.news-title-sm{font-size:4.15vh;line-height:1.1;-webkit-line-clamp:6;max-height:47vh}
.news-content h1.news-title-xs{font-size:3.55vh;line-height:1.12;-webkit-line-clamp:7;max-height:49vh}
.news-content h1.news-title-xxs{font-size:3.05vh;line-height:1.14;-webkit-line-clamp:8;max-height:50vh}
.news-content h1.news-title-sm + p{font-size:2.45vh;-webkit-line-clamp:3;max-height:17vh}
.news-content h1.news-title-xs + p,.news-content h1.news-title-xxs + p{font-size:2.25vh;-webkit-line-clamp:2;max-height:12vh}
@media(max-width:900px),(max-height:540px){
  .news-content{padding:10vh 4.5vw 4vh;flex-basis:55%;width:55%}
  .news-meta{font-size:2.1vh;margin-bottom:2.2vh}
  .news-content h1{font-size:4.6vh;-webkit-line-clamp:5}
  .news-content h1.news-title-md{font-size:4.05vh}
  .news-content h1.news-title-sm{font-size:3.55vh}
  .news-content h1.news-title-xs{font-size:3.05vh}
  .news-content h1.news-title-xxs{font-size:2.65vh}
  .news-content p{font-size:2.25vh;-webkit-line-clamp:3}
}
@media(orientation:portrait){
  .news-screen{flex-direction:column}
  .news-content{width:100%;height:60vh;flex:0 0 60vh;padding:9vh 6vw 3vh}
  .news-image,.news-fallback{height:40vh;flex:1 1 auto}
}

.connection-badge{position:fixed;right:14px;bottom:14px;width:34px;height:34px;border-radius:10px;background:rgba(255,255,255,.52) url('/assets/gigatv-tv-mark.png') center/21px 21px no-repeat;box-shadow:0 6px 18px rgba(0,0,0,.20);opacity:.55;z-index:9999;pointer-events:none}
.connection-badge span{position:absolute;right:-3px;bottom:-3px;width:11px;height:11px;border-radius:3px;border:2px solid #fff;background:#10eec7;box-shadow:0 2px 8px rgba(0,0,0,.25)}
.connection-badge.offline{opacity:.48}.connection-badge.offline span{background:#d13b3b}.connection-badge.online span{background:#10eec7}


/* RSS HARD FIT v1 - força tela cheia em WebView/Android TV */
html, body, #stage { min-width:100vw !important; min-height:100vh !important; width:100vw !important; height:100vh !important; position:fixed !important; inset:0 !important; overflow:hidden !important; }
.news-screen.hardfit{position:fixed!important;left:0!important;top:0!important;width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;display:block!important;overflow:hidden!important;background:linear-gradient(135deg,#0f48a0 0%,#0a3478 52%,#061d4b 100%)!important;color:#fff!important;}
.news-screen.hardfit .news-content{position:absolute!important;left:0!important;top:0!important;width:52vw!important;height:100vh!important;padding:0!important;display:block!important;overflow:hidden!important;}
.news-screen.hardfit .news-image,.news-screen.hardfit .news-fallback{position:absolute!important;left:52vw!important;top:0!important;width:48vw!important;height:100vh!important;background-size:cover!important;background-position:center center!important;}
.news-screen.hardfit .news-image:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#061d4b 0%,rgba(6,29,75,.22) 32%,rgba(0,0,0,.18) 100%)}
.news-screen.hardfit .news-logo{position:absolute!important;left:3.2vw!important;top:3.5vh!important;width:6.3vh!important;height:6.3vh!important;min-width:42px!important;min-height:42px!important;max-width:74px!important;max-height:74px!important;background:rgba(255,255,255,.95) url('/assets/app-icon.png') center/76% auto no-repeat!important;border-radius:14px!important;z-index:8!important;}
.news-screen.hardfit .news-meta{position:absolute!important;left:5.3vw!important;top:18.8vh!important;width:43vw!important;margin:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.news-screen.hardfit h1{position:absolute!important;left:5.3vw!important;top:25.3vh!important;width:42vw!important;margin:0!important;max-height:none!important;overflow:hidden!important;display:block!important;}
.news-screen.hardfit p{position:absolute!important;left:5.3vw!important;top:66vh!important;width:42vw!important;margin:0!important;max-height:none!important;overflow:hidden!important;display:block!important;}
