/* ==========================================================
   style.css — Tema FK TV, layout de telas e componentes gerais
   Paleta extraída do logo: facetas em azul aço (#3e8fe0 → #7ec8f5),
   facetas prateadas/cromadas (#ced4e0 → #f1f4f9) e contorno navy quase preto.
   Tipografia: Sora (marca/títulos) + Inter (interface/corpo)
   ========================================================== */

:root {
  --bg: #05070c;
  --bg-elevated: #0b0f18;
  --panel: #10141f;
  --panel-alt: #171c29;
  --panel-glass: rgba(16, 20, 31, 0.74);
  --border: #232a3a;
  --border-soft: rgba(255, 255, 255, 0.06);
  --text: #eef1f6;
  --text-dim: #8b93a4;
  --text-faint: #545c6e;

  /* Azul “faceta” do logo */
  --blue: #3e8fe0;
  --blue-bright: #7ec8f5;
  --blue-deep: #163f6e;

  /* Prata/cromado do logo */
  --silver: #ced4e0;
  --silver-bright: #f1f4f9;
  --silver-dim: #9aa1b0;

  --danger: #ff5c5c;
  --success: #4fd48a;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  --grad-brand: linear-gradient(135deg, var(--blue-bright) 0%, var(--blue) 55%, var(--blue-deep) 100%);
  --grad-brand-soft: linear-gradient(135deg, rgba(126, 200, 245, 0.18), rgba(22, 63, 110, 0.1));
  --grad-chrome: linear-gradient(135deg, var(--silver-bright) 0%, var(--silver) 35%, var(--blue) 75%, var(--blue-deep) 100%);
  --grad-bg: radial-gradient(circle at 50% -12%, #0e1726 0%, var(--bg) 55%);

  --shadow-card: 0 10px 28px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 18px 44px rgba(0, 0, 0, 0.6);
  --glow-blue: 0 0 0 3px rgba(62, 143, 224, 0.22);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .primary-btn, .tab-btn, .mode-tab, .brand-text {
  font-family: 'Sora', 'Inter', sans-serif;
}

button {
  font-family: inherit;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 2px;
}

img { max-width: 100%; display: block; }

.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Scrollbars discretos */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #262d3d; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #38415a; }

/* ---------- Animações reutilizáveis ---------- */

@keyframes screen-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes soft-glow {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(62, 143, 224, 0.35)); }
  50% { filter: drop-shadow(0 0 22px rgba(126, 200, 245, 0.55)); }
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(255, 92, 92, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(255, 92, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 92, 92, 0); }
}

/* ---------- Telas (perfis / login / app) ---------- */

.screen {
  display: none;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
}

.screen.active { display: flex; animation: screen-in 0.35s var(--ease); }

/* ---------- Tela de perfis ---------- */

#screen-profiles {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  background: var(--grad-bg);
  padding: 24px;
}

.brand-lockup { display: flex; flex-direction: column; align-items: center; gap: 12px; animation: rise-in 0.5s var(--ease); }
.brand-lockup img {
  height: 62px;
  animation: soft-glow 3.4s ease-in-out infinite;
}
.brand-lockup h1 {
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--text-faint);
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
}

.profile-grid {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 720px;
  animation: rise-in 0.55s var(--ease) 0.05s backwards;
}

.profile-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-select, .profile-card.add-card {
  background: none;
  border: none;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}

.profile-select:hover, .profile-card.add-card:hover { transform: translateY(-6px); color: var(--text); }

.profile-avatar {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--profile-color, var(--blue)), var(--blue-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  color: #fff;
  border: 2px solid transparent;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.profile-select:hover .profile-avatar,
.profile-card.add-card:hover .profile-avatar {
  border-color: var(--blue-bright);
  box-shadow: var(--shadow-card), var(--glow-blue);
  transform: scale(1.04);
}

.profile-avatar.add {
  background: var(--panel-alt);
  border: 2px dashed var(--border);
  color: var(--text-faint);
  box-shadow: none;
}

.profile-delete {
  position: absolute;
  top: -6px;
  right: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.profile-card:hover .profile-delete { opacity: 1; }
.profile-delete:hover { color: var(--danger); border-color: var(--danger); transform: scale(1.08); }

@media (hover: none) {
  .profile-delete { opacity: 0.6; }
}

/* ---------- Tela de login ---------- */

#screen-login {
  align-items: center;
  justify-content: center;
  background: var(--grad-bg);
  padding: 24px;
}

.login-card {
  width: 380px;
  max-width: 92vw;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-pop);
  animation: pop-in 0.3s var(--ease);
}

.login-card h2 { margin: 0 0 20px; font-size: 18px; font-weight: 700; }

.login-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: var(--panel-alt);
  padding: 4px;
  border-radius: 24px;
  border: 1px solid var(--border);
}

.mode-tab {
  flex: 1;
  padding: 9px 0;
  background: transparent;
  border: none;
  color: var(--text-dim);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.mode-tab.active {
  background: var(--grad-brand);
  color: #051019;
}

.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }

.form-field label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-faint);
}

input[type="text"], input[type="password"], input[type="search"], input[type="url"] {
  padding: 12px 13px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder { color: var(--text-faint); }

input:focus {
  border-color: var(--blue);
  box-shadow: var(--glow-blue);
}

input[readonly] { opacity: 0.6; }

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.checkbox-field input { accent-color: var(--blue); width: 15px; height: 15px; }

.primary-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 13px;
  background: var(--grad-brand);
  color: #06121e;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2px;
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 20px rgba(62, 143, 224, 0.28);
}

.primary-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease);
}

.primary-btn:hover::after { transform: translateX(120%); }
.primary-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.primary-btn:active { transform: translateY(0); }

.text-btn {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 12px;
  padding: 10px 0 0;
  width: 100%;
  transition: color 0.15s ease;
}

.text-btn:hover { color: var(--text); }

.form-error {
  color: var(--danger);
  font-size: 12px;
  margin: 4px 0 12px;
  min-height: 16px;
}

/* ---------- Cartão de download do APK ---------- */

.apk-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(126, 200, 245, 0.1), rgba(22, 63, 110, 0.14));
  border: 1px solid rgba(126, 200, 245, 0.28);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  animation: rise-in 0.6s var(--ease) 0.1s backwards;
}

.apk-card:hover {
  border-color: var(--blue-bright);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(62, 143, 224, 0.25);
}

.apk-card-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad-chrome);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(62, 143, 224, 0.35);
}

.apk-card-icon svg { width: 19px; height: 19px; }

.apk-card-text { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.apk-card-text strong { font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 700; color: var(--text); }
.apk-card-text small { font-size: 11px; color: var(--text-dim); }

.apk-card--block { width: 100%; margin-top: 14px; justify-content: flex-start; }

.apk-card--compact {
  padding: 6px 12px 6px 6px;
  gap: 8px;
  border-radius: 20px;
  background: var(--panel-alt);
  border-color: var(--border);
}
.apk-card--compact:hover { border-color: var(--blue); }
.apk-card--compact .apk-card-icon { width: 26px; height: 26px; border-radius: 50%; }
.apk-card--compact .apk-card-icon svg { width: 13px; height: 13px; }
.apk-card--compact .apk-card-text strong { font-size: 11px; }
.apk-card--compact .apk-card-text small { display: none; }

/* ---------- App shell ---------- */

#screen-app { flex-direction: column; }

.app-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg));
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.app-topbar img.logo { height: 28px; }
.app-topbar .brand-text { font-weight: 700; font-size: 14px; color: var(--silver); letter-spacing: 0.4px; }

.search-wrap { position: relative; flex: 1; max-width: 360px; margin-left: 12px; }
.search-wrap input {
  padding-left: 36px;
  background: var(--panel-alt);
  border-radius: 24px;
  border-color: var(--border);
}
.search-wrap::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  border: 2px solid var(--text-faint);
  border-radius: 50%;
  pointer-events: none;
}
.search-clear {
  display: none;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 14px;
}
.search-clear.visible { display: block; animation: pop-in 0.15s var(--ease); }

.install-btn {
  display: none;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.install-btn.visible { display: inline-flex; align-items: center; gap: 6px; animation: pop-in 0.2s var(--ease); }

.profile-pill {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

#active-profile-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--panel-alt);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
}

.icon-text-btn {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.icon-text-btn:hover { border-color: var(--blue); color: var(--text); }

/* ---------- Tabs (topo no desktop / navegação inferior no mobile) ---------- */

.tab-bar {
  display: flex;
  gap: 6px;
  padding: 10px 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
}

.tab-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 9px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.25s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.15s var(--ease);
}

.tab-btn:hover { color: var(--text); border-color: #333e58; transform: translateY(-1px); }

.tab-btn.active {
  background: var(--grad-brand);
  color: #051019;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(62, 143, 224, 0.35);
  animation: pop-in 0.25s var(--ease);
}

.tab-icon { font-size: 14px; line-height: 1; position: relative; }
.tab-label { line-height: 1; }

/* Indicador de "ao vivo" na aba de Canais */
.tab-btn[data-tab="live"] .tab-icon::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  animation: pulse-dot 1.8s ease-out infinite;
}

/* ---------- Área de conteúdo ---------- */

#content-area {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  scroll-behavior: smooth;
}

.empty-state {
  color: var(--text-faint);
  text-align: center;
  margin-top: 60px;
  font-size: 13px;
}
.empty-state.error { color: var(--danger); }

.back-bar {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  padding: 0 0 16px;
  transition: color 0.15s ease;
}
.back-bar:hover { color: var(--blue-bright); }

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  animation: rise-in 0.35s var(--ease);
}

.category-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.15s var(--ease);
}

.category-card::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-brand);
  opacity: 0.6;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.category-card:hover { border-color: var(--blue); background: #1a2231; transform: translateY(-2px); }
.category-card:hover::before { opacity: 1; transform: scale(1.3); }

.category-card.all-card {
  border-color: var(--blue);
  background: var(--grad-brand-soft);
  font-weight: 700;
  color: var(--blue-bright);
}
.category-card.all-card::before { background: var(--grad-chrome); opacity: 1; }
.category-card.all-card:hover { background: linear-gradient(135deg, rgba(126,200,245,0.28), rgba(22,63,110,0.2)); }

.load-sentinel { height: 40px; }

.item-grid { display: grid; gap: 16px; }
.item-grid.poster-mode { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.item-grid.list-mode { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.media-card {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  animation: rise-in 0.4s var(--ease) backwards;
}

/* Efeito cascata para as primeiras fileiras visíveis */
.item-grid > .media-card:nth-child(1) { animation-delay: 0.02s; }
.item-grid > .media-card:nth-child(2) { animation-delay: 0.05s; }
.item-grid > .media-card:nth-child(3) { animation-delay: 0.08s; }
.item-grid > .media-card:nth-child(4) { animation-delay: 0.11s; }
.item-grid > .media-card:nth-child(5) { animation-delay: 0.14s; }
.item-grid > .media-card:nth-child(6) { animation-delay: 0.17s; }
.item-grid > .media-card:nth-child(n+7) { animation-delay: 0.2s; }

.media-card:hover {
  border-color: var(--blue);
  transform: translateY(-4px) scale(1.015);
  box-shadow: var(--shadow-card);
  z-index: 1;
}

.media-card.poster .media-thumb { aspect-ratio: 2/3; position: relative; }
.media-card.poster .media-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.68) 0%, rgba(0,0,0,0) 45%);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.media-card.poster:hover .media-thumb::after { opacity: 1; }

.media-card.list .media-thumb {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: linear-gradient(135deg, #f4f6fa, #e4e8f0);
}
.media-card.list .media-thumb img { max-height: 74%; max-width: 82%; width: auto; object-fit: contain; }

.media-thumb img { width: 100%; height: 100%; object-fit: cover; }

.poster-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  color: var(--text-faint);
  background: var(--panel);
}

.media-info { padding: 9px 10px; }
.media-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.media-actions {
  position: absolute;
  top: 7px;
  right: 7px;
  display: flex;
  gap: 5px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.media-card:hover .media-actions { opacity: 1; transform: translateY(0); }

@media (hover: none) {
  .media-actions { opacity: 1; transform: none; }
}

.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(5, 7, 12, 0.75);
  backdrop-filter: blur(4px);
  color: var(--text-dim);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, transform 0.15s ease;
}
.icon-btn.fav-btn.active { color: var(--danger); animation: pop-in 0.25s var(--ease); }
.icon-btn:hover { color: var(--text); transform: scale(1.08); }

.continue-progress, .ep-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.5);
}
.continue-progress span, .ep-progress span {
  display: block;
  height: 100%;
  background: var(--grad-brand);
}
.ep-progress { position: static; margin-top: 6px; width: 100%; border-radius: 3px; overflow: hidden; }

.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.skeleton-card { aspect-ratio: 2/3; border-radius: var(--radius-sm); background: linear-gradient(100deg, var(--panel-alt) 30%, #232b3d 50%, var(--panel-alt) 70%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- Série: detalhe ---------- */

.series-detail { max-width: 900px; margin: 0 auto; animation: rise-in 0.35s var(--ease); }
.series-header { display: flex; gap: 22px; margin-bottom: 26px; }
.series-cover { width: 150px; border-radius: var(--radius-sm); flex-shrink: 0; box-shadow: var(--shadow-card); }
.series-header h2 { margin: 0 0 8px; font-size: 21px; font-weight: 700; }
.series-plot { color: var(--text-dim); font-size: 13px; line-height: 1.7; }

.season-title {
  font-size: 12px;
  color: var(--blue-bright);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 22px 0 10px;
}
.episode-list { display: flex; flex-direction: column; gap: 8px; }

.episode-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-size: 13px;
  text-align: left;
  flex-wrap: wrap;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.episode-row:hover { border-color: var(--blue); background: #1a2130; }
.ep-num { color: var(--text-faint); font-size: 12px; width: 20px; font-weight: 600; }
.ep-title { flex: 1; font-weight: 500; }

/* ---------- Modais ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 8, 0.78);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 20px;
}
.modal-backdrop.open { display: flex; animation: fade-in 0.2s var(--ease); }

.modal-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 480px;
  max-width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow-pop);
  animation: modal-in 0.25s var(--ease);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.modal-close:hover { color: var(--text); border-color: var(--blue); }

.detail-header { display: flex; gap: 16px; margin-bottom: 16px; }
.detail-header img { width: 104px; border-radius: var(--radius-sm); box-shadow: var(--shadow-card); }
.detail-header h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.detail-meta { color: var(--text-faint); font-size: 12px; }
.detail-plot { color: var(--text-dim); font-size: 13px; line-height: 1.7; margin-bottom: 10px; }
.detail-line { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }

.epg-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
#epg-play-btn { margin: 10px 0 4px; }
.epg-entry { padding: 12px; border-radius: var(--radius-sm); background: var(--panel-alt); border: 1px solid var(--border); }
.epg-entry.now { border-color: var(--blue); background: rgba(62, 143, 224, 0.12); }
.epg-time { display: block; font-size: 11px; font-weight: 700; color: var(--blue-bright); margin-bottom: 4px; }
.epg-title { display: block; font-size: 13px; font-weight: 600; }
.epg-desc { display: block; font-size: 12px; color: var(--text-faint); margin-top: 4px; }
