:root {
  --bg: #06061a;
  --surface: #0d0d24;
  --surface2: #13132e;
  --surface3: #1a1a3a;
  --border: #1e2052;
  --accent: #00ccff;
  --accent-glow: rgba(0, 204, 255, 0.35);
  --red: #e31c2d;
  --orange: #ff5a14;
  --live: #ff2222;
  --upcoming: #9333ea;
  --fin: #374151;
  --text: #e8edff;
  --dim: #7080b8;
  --muted: #4a5290;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font-family: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* ───────────────────────── TOPBAR (PC + MOBILE) ───────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(12px + var(--safe-top)) 28px 12px;
  background: rgba(6, 6, 26, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(30, 32, 82, 0.75);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  flex-shrink: 0;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 14px rgba(0, 204, 255, 0.25);
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
}

.brand-title span {
  color: var(--accent);
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.nav-tab {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.16s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  border-color: var(--accent);
  background: var(--surface2);
}

.nav-tab.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(227, 28, 45, 0.38);
}

.account-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
}

.user-exp {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0, 204, 255, 0.14);
  color: var(--accent);
}

.user-exp.warn {
  background: rgba(255, 90, 20, 0.18);
  color: var(--orange);
}

.btn-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-chip:hover {
  border-color: var(--accent);
  background: var(--surface3);
}

.btn-chip.primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn-chip.primary:hover {
  filter: brightness(1.1);
  border-color: #fff;
}

.btn-chip.accent {
  background: rgba(0, 204, 255, 0.14);
  border-color: var(--accent);
  color: var(--accent);
}

/* ───────────────────────── AVISO DO ADMIN ───────────────────────── */
.announcement-bar {
  margin: 14px 28px 0;
  padding: 11px 16px;
  border-radius: 10px;
  background: rgba(255, 90, 20, 0.14);
  border: 1px solid rgba(255, 90, 20, 0.45);
  color: #ffd7c2;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ───────────────────────── CONTEÚDO PRINCIPAL ───────────────────────── */
.main-wrap {
  padding: 16px 28px calc(44px + var(--safe-bottom));
  max-width: 1920px;
  margin: 0 auto;
}

.section-block {
  margin-bottom: 24px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 10px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text);
}

.section-bar {
  width: 4px;
  height: 16px;
  border-radius: 4px;
  background: var(--accent);
}

.section-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.row-arrows {
  display: flex;
  gap: 6px;
}

.row-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.row-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface3);
}

/* ───────────────────────── CARROSSEL HORIZONTAL ───────────────────────── */
.h-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 6px 4px 12px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.h-row::-webkit-scrollbar {
  display: none;
}

/* ───────────────────────── CARDS DE JOGOS (HERO / EVENTO IGUAL AO APK) ───────────────────────── */
.hero-card {
  flex: 0 0 360px;
  width: 360px;
  min-width: 360px;
  max-width: 360px;
  height: 204px;
  min-height: 204px;
  max-height: 204px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  position: relative;
  overflow: hidden;
}

.hero-card:hover {
  transform: scale(1.03);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  z-index: 4;
}

.event-poster-box {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--surface3), var(--surface2));
  overflow: hidden;
}

.event-poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.event-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.6px;
}

.event-shade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70%;
  background: linear-gradient(to bottom, rgba(4, 4, 20, 0) 0%, rgba(4, 4, 20, 0.94) 100%);
  pointer-events: none;
  z-index: 1;
}

.event-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.badge-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #fff;
  background: var(--live);
}

.badge-status.upcoming {
  background: var(--upcoming);
}

.badge-status.finished {
  background: var(--fin);
}

.event-title-txt {
  font-size: 16.5px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.event-sub-txt {
  font-size: 12px;
  font-weight: 500;
  color: #b8c2f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ───────────────────────── CARDS DE CANAL ───────────────────────── */
.channel-card {
  flex: 0 0 165px;
  width: 165px;
  min-width: 165px;
  max-width: 165px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.channel-card:hover {
  transform: scale(1.04);
  border-color: var(--accent);
  background: var(--surface2);
}

.ch-logo-box {
  position: relative;
  width: 100%;
  height: 108px;
  min-height: 108px;
  max-height: 108px;
  flex: 0 0 108px;
  background: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow: hidden;
}

.ch-logo-box img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.ch-ph {
  font-size: 28px;
  font-weight: 800;
  color: #3a4170;
}

.ch-lock {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(6, 6, 26, 0.85);
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
}

.ch-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 8px 6px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ch-now {
  font-size: 11px;
  color: var(--dim);
  margin: 0 6px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 15px;
}

.prog-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
  margin: 0 4px 3px;
}

.prog-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
}

/* ───────────────────────── ATALHOS DE CATEGORIA ───────────────────────── */
.cat-card {
  flex: 0 0 150px;
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  background: linear-gradient(145deg, var(--surface3), var(--surface));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.15s, border-color 0.15s;
}

.cat-card:hover {
  transform: scale(1.04);
  border-color: var(--accent);
}

.cat-card img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.cat-card span {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ───────────────────────── CARDS DE FILMES / SÉRIES (POSTER TAMANHO FIXO) ───────────────────────── */
.poster-card {
  flex: 0 0 165px;
  width: 165px;
  min-width: 165px;
  max-width: 165px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 5px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.poster-card:hover {
  transform: scale(1.05);
  border-color: var(--accent);
  background: var(--surface2);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.6);
  z-index: 5;
}

.poster-box {
  position: relative;
  width: 100%;
  height: 232px;
  min-height: 232px;
  max-height: 232px;
  flex: 0 0 232px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--surface3), var(--surface2));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.poster-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poster-ph {
  padding: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.poster-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  background: rgba(7, 7, 28, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
}

.poster-del {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(6, 6, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.poster-card:hover .poster-del {
  opacity: 1;
}

.poster-del:hover {
  background: var(--red);
}

.poster-foot-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 14px 7px 6px;
  background: linear-gradient(to top, rgba(5, 5, 20, 0.95), transparent);
}

.poster-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 7px 6px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poster-meta {
  font-size: 11px;
  color: var(--dim);
  margin: 0 6px 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poster-meta.continue {
  color: var(--orange);
  font-weight: 700;
}

/* ───────────────────────── TOP 10 ESTILO NETFLIX (NÚMERO PARA FORA DO CARD) ───────────────────────── */
.rank-item {
  flex: 0 0 auto;
  position: relative;
  padding-left: 48px;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  transition: transform 0.16s ease;
}

.rank-item.rank-10 {
  padding-left: 66px;
}

.rank-item:hover {
  transform: scale(1.05);
  z-index: 6;
}

.rank-item .poster-card {
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  flex: 0 0 160px;
}

.rank-item .poster-box {
  height: 225px;
  min-height: 225px;
  max-height: 225px;
  flex: 0 0 225px;
}

.rank-item:hover .poster-card {
  transform: none;
  border-color: var(--accent);
  background: var(--surface2);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65);
}

.rank-num {
  position: absolute;
  left: 2px;
  bottom: 46px;
  z-index: 7;
  font-size: 96px;
  line-height: 1;
  font-weight: 900;
  font-style: italic;
  color: #0a0c24;
  -webkit-text-stroke: 3.5px #d8e2ff;
  paint-order: stroke fill;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  letter-spacing: -5px;
  transition: -webkit-text-stroke-color 0.16s ease;
}

.rank-item.rank-10 .rank-num {
  font-size: 84px;
  letter-spacing: -9px;
  left: -2px;
}

.rank-item:hover .rank-num {
  -webkit-text-stroke-color: var(--accent);
}

/* ───────────────────────── FILTROS E GRADES (CANAIS, FILMES, SÉRIES, BUSCA) ───────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  white-space: nowrap;
  transition: all 0.15s;
}

.chip:hover {
  border-color: var(--accent);
}

.chip.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.sub-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.search-input-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  min-width: 260px;
  flex: 1;
  max-width: 460px;
}

.search-input-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 204, 255, 0.2);
}

.search-input-box input {
  width: 100%;
  font-size: 14px;
  color: #fff;
}

.grid-posters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.grid-posters .poster-card {
  flex: initial;
  width: 100%;
  min-width: 0;
  max-width: none;
}

.grid-channels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 14px;
}

.grid-channels .channel-card {
  flex: initial;
  width: 100%;
  min-width: 0;
  max-width: none;
}

.grid-events {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.grid-events .hero-card {
  flex: initial;
  width: 100%;
  min-width: 0;
  max-width: none;
}

.empty-msg {
  padding: 40px 20px;
  text-align: center;
  color: var(--dim);
  font-size: 15px;
  font-weight: 600;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 26px 0 12px;
}

/* ───────────────────────── TELA DE DETALHES (FILME / SÉRIE) ───────────────────────── */
.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  overflow-y: auto;
  padding: calc(24px + var(--safe-top)) 32px calc(40px + var(--safe-bottom));
}

.detail-bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center top;
  opacity: 0.32;
  filter: blur(8px);
  pointer-events: none;
}

.detail-shade {
  position: fixed;
  inset: 0;
  background: linear-gradient(90deg, #06061a 15%, rgba(6, 6, 26, 0.86) 60%, rgba(6, 6, 26, 0.65) 100%),
              linear-gradient(0deg, #06061a 10%, rgba(6, 6, 26, 0.4) 100%);
  pointer-events: none;
}

.detail-content {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  gap: 34px;
  align-items: flex-start;
}

.detail-poster {
  position: relative;
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  height: 360px;
  min-height: 360px;
  max-height: 360px;
  flex: 0 0 240px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: var(--surface2);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.detail-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-right {
  flex: 1;
  min-width: 0;
}

.detail-title {
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
}

.detail-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.genre-pill {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.detail-meta {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #c9d2f2;
}

.detail-syn {
  margin-top: 14px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  max-width: 780px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn-play-main {
  padding: 13px 34px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(227, 28, 45, 0.45);
  transition: transform 0.15s, filter 0.15s;
}

.btn-play-main:hover {
  transform: scale(1.04);
  filter: brightness(1.1);
}

.episodes-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 6px;
}

.ep-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(19, 19, 46, 0.85);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}

.ep-row:hover {
  border-color: var(--accent);
  background: var(--surface3);
}

.ep-thumb {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  height: 74px;
  min-height: 74px;
  max-height: 74px;
  flex: 0 0 130px;
  border-radius: 8px;
  background: var(--surface3);
  overflow: hidden;
  position: relative;
}

.ep-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ep-info {
  flex: 1;
  min-width: 0;
}

.ep-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.ep-sub {
  font-size: 12px;
  color: var(--dim);
  margin-top: 3px;
}

/* ───────────────────────── PLAYER DE VÍDEO (PC + IPHONE) ───────────────────────── */
.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.player-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.player-stage video,
.player-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.player-top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(16px + var(--safe-top)) 24px 28px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.88), transparent);
  transition: opacity 0.25s ease;
}

.player-bottom {
  position: relative;
  z-index: 5;
  padding: 28px 24px calc(18px + var(--safe-bottom));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), transparent);
  transition: opacity 0.25s ease;
}

.player-overlay.idle .player-top,
.player-overlay.idle .player-bottom {
  opacity: 0;
  pointer-events: none;
}

.player-title-wrap {
  min-width: 0;
  flex: 1;
}

.player-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-sub {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  margin-top: 2px;
}

.player-top-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.player-seek-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.player-time {
  font-size: 12.5px;
  font-weight: 700;
  color: #dbe4ff;
  min-width: 48px;
  font-variant-numeric: tabular-nums;
}

.seek-slider {
  flex: 1;
  accent-color: var(--accent);
  height: 6px;
  cursor: pointer;
}

.player-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.player-left-btns,
.player-right-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.player-loading {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(6, 6, 26, 0.85);
  border: 1px solid var(--border);
  padding: 16px 24px;
  border-radius: 14px;
  text-align: center;
  pointer-events: none;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(0, 204, 255, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Menu lateral de canais no player */
.player-drawer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  z-index: 10;
  background: rgba(8, 8, 32, 0.96);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: calc(16px + var(--safe-top)) 14px calc(16px + var(--safe-bottom));
}

.drawer-list {
  flex: 1;
  overflow-y: auto;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-ch-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid transparent;
  cursor: pointer;
}

.drawer-ch-item:hover,
.drawer-ch-item.active {
  border-color: var(--accent);
  background: var(--surface2);
}

.drawer-ch-item img {
  width: 38px;
  height: 28px;
  object-fit: contain;
  background: #fff;
  border-radius: 5px;
  padding: 2px;
}

/* ───────────────────────── MODAIS (LOGIN, PIX, REPORT, PIN) ───────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(4, 4, 16, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow-y: auto;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75);
}

.modal-card.wide {
  max-width: 680px;
}

.modal-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 18px;
}

.modal-logo img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin-bottom: 10px;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--dim);
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 14px;
}

.form-input:focus {
  border-color: var(--accent);
}

.form-err {
  color: #ff6b78;
  font-size: 12.5px;
  font-weight: 600;
  margin: 8px 0;
  min-height: 18px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.plan-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}

.plan-box:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.plan-price {
  font-size: 22px;
  font-weight: 900;
  color: var(--accent);
  margin: 8px 0;
}

.qr-box {
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  width: 210px;
  height: 210px;
  margin: 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ───────────────────────── TOAST ───────────────────────── */
.toast-box {
  position: fixed;
  bottom: calc(24px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  background: rgba(13, 13, 36, 0.96);
  border: 1px solid var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

/* ───────────────────────── BARRA INFERIOR (IPHONE / MOBILE) ───────────────────────── */
.bottom-nav {
  display: none;
}

@media (max-width: 860px) {
  .topbar {
    padding: calc(10px + var(--safe-top)) 14px 10px;
  }
  .topbar .nav-tabs {
    display: none;
  }
  .main-wrap {
    padding: 12px 14px calc(82px + var(--safe-bottom));
  }
  .announcement-bar {
    margin: 10px 14px 0;
  }
  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 6px calc(8px + var(--safe-bottom));
    background: rgba(6, 6, 26, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
  }
  .bnav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--dim);
    padding: 4px 2px;
  }
  .bnav-btn.active {
    color: var(--accent);
  }
  .bnav-icon {
    font-size: 17px;
    line-height: 1;
  }
  .poster-card {
    flex: 0 0 132px;
    width: 132px;
    min-width: 132px;
    max-width: 132px;
  }
  .poster-box {
    height: 188px;
    min-height: 188px;
    max-height: 188px;
    flex: 0 0 188px;
  }
  .rank-item {
    padding-left: 38px;
  }
  .rank-item.rank-10 {
    padding-left: 52px;
  }
  .rank-item .poster-card {
    width: 128px;
    min-width: 128px;
    max-width: 128px;
    flex: 0 0 128px;
  }
  .rank-item .poster-box {
    height: 182px;
    min-height: 182px;
    max-height: 182px;
    flex: 0 0 182px;
  }
  .rank-num {
    font-size: 82px;
    bottom: 38px;
  }
  .rank-item.rank-10 .rank-num {
    font-size: 72px;
  }
  .grid-posters {
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    gap: 10px;
  }
  .grid-posters .poster-card {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  .grid-channels {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 10px;
  }
  .grid-channels .channel-card {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  .detail-overlay {
    padding: calc(16px + var(--safe-top)) 16px calc(90px + var(--safe-bottom));
  }
  .detail-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
  }
  .detail-poster {
    width: 170px;
    min-width: 170px;
    max-width: 170px;
    height: 255px;
    min-height: 255px;
    max-height: 255px;
    flex: 0 0 255px;
  }
  .detail-genres,
  .detail-actions {
    justify-content: center;
  }
  .ep-row {
    text-align: left;
  }
}
