* { box-sizing: border-box; }
body {
  margin: 0;
  background: #0b0f1a;
  color: #fff;
  font-family: system-ui, Arial, sans-serif;
}

.app { display: flex; height: 100vh; }

.sidebar {
  width: 320px;
  padding: 24px;
  background: #0f1526;
  border-right: 1px solid rgba(255,255,255,.08);
}

.brand { margin: 0 0 18px; font-size: 22px; letter-spacing: .4px; }

.menu { display: grid; gap: 12px; }

.menu-item {
  padding: 16px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 18px;
  text-align: left;
}

.main { flex: 1; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.title { font-size: 22px; font-weight: 700; }
.search {
  margin-left: auto;
  width: 420px;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 16px;
  outline: none;
}

.grid {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  overflow: auto;
}

.card {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  padding: 14px;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card .name { font-size: 16px; line-height: 1.2; opacity: .95; }
.card .meta { font-size: 13px; opacity: .7; }

.focus {
  outline: 3px solid #7c5cff;
  transform: scale(1.03);
}
/* LOGIN */
.login{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(900px 500px at 30% 20%, rgba(124,92,255,.25), transparent),
              #0b0f1a;
  z-index: 999;
}

.login-card{
  width: 520px;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}

.login-title{
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 18px;
}

.login-label{
  display: block;
  margin: 10px 0 6px;
  opacity: .85;
  font-size: 14px;
}

.login-input{
  width: 100%;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 16px;
  outline: none;
}

.login-actions{
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.login-btn{
  flex: 1;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 16px;
}
/* ========================================= */
/* FOCO NATIVO (Teclado/Controle da TV)      */
/* ========================================= */
.login-input:focus,
.login-btn:focus {
  border: 2px solid #8e6944; /* Borda destacada */
  background: rgba(255, 255, 255, 0.15); /* Fundo um pouco mais claro */
  outline: none;
  transform: scale(1.02); /* Dá um leve zoom no elemento selecionado */
  transition: all 0.2s ease; /* Deixa a animação suave */
}
.login-hint{
  margin-top: 12px;
  opacity: .7;
  font-size: 13px;
}

.login-error{
  margin-top: 10px;
  color: #ff6b6b;
  font-size: 14px;
  min-height: 18px;
}
.card {
  position: relative;
  overflow: hidden;
}

.card .poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(.65);
}

.card .overlay {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
}

.card .name {
  font-size: 16px;
  font-weight: 700;
}

.card .meta {
  font-size: 13px;
  opacity: .85;
}
.player{
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 2000;
  display: flex;
  flex-direction: column;
}

.player video{
  width: 100%;
  height: 100%;
}

.player-hint{
  position: absolute;
  bottom: 16px;
  left: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 14px;
}
.player{
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 2000;
}

.player video{
  width: 100%;
  height: 100%;
  background: #000;
}

.player-top{
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  gap: 12px;
  pointer-events: none;
}

.player-title{
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 16px;
  font-weight: 700;
  max-width: 75%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-center{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: radial-gradient(600px 400px at 50% 50%, rgba(255,255,255,.08), transparent);
  pointer-events: none;
}

.player-bottom{
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: flex-start;
  pointer-events: none;
}

.player-hint{
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 14px;
}
/* ========================================= */
/* TELA DE DETALHES DO FILME/SÉRIE           */
/* ========================================= */
.details {
  position: fixed;
  inset: 0;
  background: #0b0f1a; /* Mesmo fundo escuro do app */
  z-index: 1000; /* Fica por cima do grid */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.details-card {
  display: flex;
  gap: 40px;
  background: rgba(255, 255, 255, 0.04);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 1000px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.details-poster {
  width: 280px;
  height: 420px;
  background-size: cover;
  background-position: center;
  border-radius: 14px;
  flex-shrink: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.details-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.details-title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}

.details-desc {
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.7;
  margin-bottom: 32px;
  max-height: 200px;
  overflow: hidden;
}

.details-actions {
  display: flex;
  gap: 16px;
}

.details-btn {
  padding: 14px 28px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid transparent;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  transition: all 0.2s;
}

/* Foco nativo do controle remoto nos botões */
.details-btn.focus {
  border: 2px solid #7c5cff;
  background: rgba(124, 92, 255, 0.15);
  transform: scale(1.05);
}
/* ========================================= */
/* ETIQUETAS DOS FAVORITOS                   */
/* ========================================= */
.fav-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
/* Cores separadas para cada tipo */
.fav-badge.live { background: #e50914; border: 1px solid #ff4d4d; }
.fav-badge.series { background: #7c5cff; border: 1px solid #9d84ff; }
.fav-badge.movie { background: #0078d7; border: 1px solid #4da6ff; }
