/* LiliTube TV-first navigation: visible focus, generous hit targets and remote guidance. */
html[data-device="tv"] {
  --tv-focus: #ffd17e;
  --tv-focus-outer: rgba(255, 209, 126, .28);
  scroll-behavior: smooth;
}
html[data-device="tv"] body {
  font-size: clamp(17px, 1.05vw, 24px);
  overflow-x: hidden;
}
/* O modo TV é operado por setas e OK: não deve exibir cursor de mouse. */
html[data-device="tv"],
html[data-device="tv"] * {
  cursor: none !important;
}
html[data-device="tv"] a,
html[data-device="tv"] button,
html[data-device="tv"] input,
html[data-device="tv"] select,
html[data-device="tv"] textarea,
html[data-device="tv"] [role="button"],
html[data-device="tv"] [tabindex]:not([tabindex="-1"]) {
  scroll-margin: 12vh 5vw;
}
html[data-device="tv"] :focus { outline: none; }
html[data-device="tv"] :focus-visible,
html[data-device="tv"] .tv-remote-focused {
  outline: 4px solid var(--tv-focus) !important;
  outline-offset: 5px !important;
  box-shadow: 0 0 0 9px var(--tv-focus-outer), 0 10px 30px rgba(0,0,0,.38) !important;
  position: relative;
  z-index: 30;
}
html[data-device="tv"] button:focus-visible,
html[data-device="tv"] a:focus-visible,
html[data-device="tv"] .tv-remote-focused {
  transform: scale(1.035);
  transition: transform .12s ease, outline-color .12s ease, box-shadow .12s ease;
}
html[data-device="tv"] .topbar {
  min-height: clamp(78px, 8vh, 108px);
  height: auto;
  padding-inline: clamp(28px, 4vw, 76px);
  gap: clamp(20px, 3vw, 54px);
}
html[data-device="tv"] .brand { min-width: 180px; }
html[data-device="tv"] .brand-mark { width: 54px; height: 54px; }
html[data-device="tv"] .brand-word { font-size: clamp(23px, 1.55vw, 34px); }
html[data-device="tv"] .main-nav { gap: clamp(12px, 1.5vw, 25px); }
html[data-device="tv"] .main-nav a {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  padding: 12px 15px;
  font-size: clamp(16px, 1.05vw, 23px);
}
html[data-device="tv"] .top-actions { gap: 18px; }
html[data-device="tv"] .top-actions .profile-link,
html[data-device="tv"] .top-actions .icon-link,
html[data-device="tv"] .btn,
html[data-device="tv"] .player-control-button,
html[data-device="tv"] .category-chip {
  min-height: 56px;
  font-size: clamp(16px, 1vw, 22px);
  padding-inline: 22px;
}
html[data-device="tv"] .page-content { width: min(1720px, 92vw); }
html[data-device="tv"] .section-block { margin-block: clamp(34px, 4vh, 62px); }
html[data-device="tv"] .section-heading h2 { font-size: clamp(28px, 2vw, 40px); }
html[data-device="tv"] .video-card { min-width: clamp(260px, 19vw, 370px); }
html[data-device="tv"] .video-open { min-height: 210px; }
html[data-device="tv"] .video-card h3 { font-size: clamp(15px, .98vw, 21px); line-height: 1.3; }
html[data-device="tv"] .channel-card,
html[data-device="tv"] .game-card { min-height: 300px; }
html[data-device="tv"] .game-card { padding: 14px; }
html[data-device="tv"] .game-card-cover { border-radius: 16px; }
html[data-device="tv"] .game-card-body h3 { font-size: clamp(18px, 1.2vw, 25px); }
html[data-device="tv"] .hero-watch,
html[data-device="tv"] #hero-watch { min-height: 62px; padding-inline: 28px; font-size: clamp(18px, 1.1vw, 24px); }
html[data-device="tv"] .video-rail,
html[data-device="tv"] .channel-rail,
html[data-device="tv"] .player-sequence-list {
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
html[data-device="tv"] .video-card,
html[data-device="tv"] .channel-card,
html[data-device="tv"] .player-sequence-item { scroll-snap-align: start; }
html[data-device="tv"] .mobile-bottom-nav { display: none !important; }
/* Reprodução TV: o vídeo usa todo o viewport, sem moldura ou layout mobile. */
html[data-device="tv"] body.modal-open > :not(#player-modal) {
  visibility: hidden !important;
}
html[data-device="tv"] .player-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: 0;
  overflow: hidden;
  align-items: stretch;
  justify-content: stretch;
  background: #000;
}
html[data-device="tv"] .player-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: none;
  max-width: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #000;
}
html[data-device="tv"] .player-topline,
html[data-device="tv"] .player-paused-note,
html[data-device="tv"] .player-utility-controls,
html[data-device="tv"] .player-bottomline {
  display: none !important;
}
html[data-device="tv"] .player-frame {
  position: relative;
  flex: 1 1 auto;
  width: 100vw;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  border-radius: 0;
  overflow: hidden;
  background: #000;
}
html[data-device="tv"] .player-frame > .youtube-player-host,
html[data-device="tv"] .player-frame > iframe,
html[data-device="tv"] .player-frame iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border: 0;
  cursor: none !important;
}
html[data-device="tv"] .player-frame .player-placeholder {
  z-index: 1;
}
html[data-device="tv"] .player-modal.tv-remote-focused,
html[data-device="tv"] .player-modal:focus {
  outline: none !important;
  box-shadow: none !important;
}
html[data-device="tv"] .tv-player-feedback {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: clamp(28px, 5vh, 64px);
  transform: translate(-50%, 8px);
  max-width: min(80vw, 680px);
  padding: 13px 22px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  background: rgba(4, 12, 22, .84);
  color: #fff;
  font-size: clamp(16px, 1.15vw, 23px);
  font-weight: 800;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
html[data-device="tv"] .tv-player-feedback.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}
html[data-device="tv"] .player-error {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  padding: 8vw;
  border: 0;
  background: rgba(0,0,0,.88);
  text-align: center;
}
html[data-device="tv"] .player-error strong { font-size: clamp(22px, 2vw, 36px); }
html[data-device="tv"] .player-error p { font-size: clamp(16px, 1vw, 22px); }
html[data-device="tv"] .player-donation-note {
  position: absolute;
  z-index: 25;
  left: 50%;
  bottom: 5vh;
  transform: translateX(-50%);
  width: min(720px, 88vw);
  padding: 24px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  background: rgba(5,15,28,.94);
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  text-align: center;
}
html[data-device="tv"] .tv-remote-hint[hidden] {
  display: none !important;
}
html[data-device="tv"] .tv-remote-hint {
  position: fixed;
  z-index: 9999;
  right: clamp(18px, 2.5vw, 42px);
  bottom: clamp(14px, 2vh, 28px);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  color: #e5edf5;
  background: rgba(5,15,28,.90);
  box-shadow: 0 8px 28px rgba(0,0,0,.32);
  font-size: clamp(12px, .78vw, 16px);
  font-weight: 800;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
html[data-device="tv"] .tv-remote-hint b {
  display: inline-grid;
  min-width: 34px;
  min-height: 28px;
  place-items: center;
  border-radius: 8px;
  color: #102033;
  background: var(--tv-focus);
  font-size: .9em;
}
html[data-device="tv"] .tv-hint-arrows { color: var(--tv-focus); font-size: 20px; }
html[data-device="tv"] .tv-remote-hint.is-subtle { opacity: .18; transform: translateY(5px); }
html[data-device="tv"] .tv-remote-hint.is-subtle:focus-within,
html[data-device="tv"] body:focus-within .tv-remote-hint { opacity: .78; }
html[data-device="tv"] .device-gateway .device-options { gap: clamp(20px, 2vw, 34px); }
html[data-device="tv"] .device-gateway .device-option { min-height: 560px; border-radius: 28px; }
html[data-device="tv"] .device-gateway .device-art { height: clamp(250px, 24vh, 360px); }
html[data-device="tv"] .device-gateway .device-option-copy { padding: 26px 30px 30px; }
html[data-device="tv"] .device-gateway .device-option h2 { font-size: clamp(27px, 2vw, 38px); }
html[data-device="tv"] .device-gateway .device-option p { font-size: clamp(16px, 1.05vw, 21px); min-height: 88px; }
html[data-device="tv"] .device-gateway .device-cta { font-size: clamp(17px, 1vw, 22px); padding: 17px 22px; }
html[data-device="tv"] .device-gateway .gateway-intro h1 { font-size: clamp(48px, 4vw, 72px); }
html[data-device="tv"] .device-gateway .gateway-intro > p { font-size: clamp(17px, 1.15vw, 23px); }
@media (min-width: 1500px) {
  html[data-device="tv"] .hero { height: min(66vh, 820px); }
  html[data-device="tv"] .hero-copy { width: min(660px, 42%); }
}
@media (prefers-reduced-motion: reduce) {
  html[data-device="tv"] *, html[data-device="tv"] *::before, html[data-device="tv"] *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
