/* ==========================================================================
   BRADOX PLAY — Estilo Master Cinema Dark v0.4.2
   Identidade Oficial Bradox Play: #0B0F14, #111111, #D4AF37, #F2C94C
   Tipografia: Michroma (Display), Sora (Headings/Cards), Inter (Interface/Corpo)
   Zero Emojis · SVGs Coerentes · Proporções para Desktop, Tablet, Mobile & TV
   ========================================================================== */

:root {
  --bg: #0B0F14;
  --bg-translucent: rgba(11, 15, 20, 0.88);
  --panel: #111111;
  --surface: #141820;
  --surface-raised: #1A1F29;
  --surface-card: #161A22;
  --surface-card-hover: #202632;
  --surface-overlay: rgba(11, 15, 20, 0.94);

  --gold: #D4AF37;
  --gold-light: #F2C94C;
  --gold-dark: #9A741B;
  --gold-gradient: linear-gradient(135deg, #ECCB6E 0%, #E7B52C 50%, #C9971D 100%);
  --gold-gradient-hover: linear-gradient(135deg, #F0DE9F 0%, #ECCB6E 50%, #E7B52C 100%);

  --text: #FFFFFF;
  --muted: #C9D1D9;
  --faint: #7A8290;
  --edge: rgba(212, 175, 55, 0.22);
  --edge-strong: rgba(242, 201, 76, 0.48);
  --ring: #F2C94C;
  --radius: 18px;

  --font-display: 'Michroma', sans-serif;
  --font-heading: 'Sora', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  color-scheme: dark;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font-family: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Foco para controle remoto (DPAD TV) e navegação por teclado */
button:focus-visible,
input:focus-visible,
select:focus-visible,
[data-focusable]:focus-visible {
  outline: 3px solid var(--ring) !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(242, 201, 76, 0.3), 0 0 20px rgba(242, 201, 76, 0.4) !important;
}

img {
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none !important;
}

/* Shell & Fundos Ambientais */
.app-shell {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}

.background {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: url('/assets/official/fundo-bradox.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.72;
  transition: opacity 0.3s ease, background-image 0.3s ease;
}

body[data-screen="home"] .background { opacity: 0.82; }
body[data-screen="access"] .background { opacity: 0.55; }
body[data-screen="catalog"] .background,
body[data-screen="detail"] .background { opacity: 0.45; }

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: 
    radial-gradient(ellipse 65% 55% at 50% 50%, rgba(212, 175, 55, 0.12), transparent 75%),
    linear-gradient(95deg, rgba(2, 4, 8, 0.85), rgba(4, 6, 8, 0.35) 50%, rgba(2, 4, 8, 0.82)),
    linear-gradient(0deg, rgba(3, 5, 8, 0.90) 0%, rgba(3, 5, 8, 0.15) 55%, rgba(3, 5, 8, 0.75) 100%);
}

body[data-screen="home"] .ambient {
  background: 
    radial-gradient(ellipse 70% 60% at 50% 52%, rgba(212, 175, 55, 0.16), transparent 75%),
    linear-gradient(90deg, rgba(2, 4, 8, 0.72), rgba(4, 6, 8, 0.28) 50%, rgba(2, 4, 8, 0.68)),
    linear-gradient(0deg, rgba(3, 5, 8, 0.80) 0%, rgba(3, 5, 8, 0.08) 54%, rgba(3, 5, 8, 0.66));
}

.main {
  min-height: 100vh;
  padding: 88px clamp(18px, 4.5vw, 78px) 32px;
}

.screen {
  animation: fadeIn 0.24s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0.35; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.eyebrow {
  color: var(--gold-light);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.20em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   BARRA SUPERIOR (TOPBAR)
   -------------------------------------------------------------------------- */
.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 78px;
  padding: 0 clamp(18px, 4.5vw, 78px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(5, 7, 10, 0.94) 0%, rgba(5, 7, 10, 0.40) 100%);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #FFFFFF;
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  border-radius: 12px;
  transition: transform 0.18s, filter 0.18s;
}

.brand-mini:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 0 10px rgba(242, 201, 76, 0.4));
}

.nav-official-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}

.brand-mini span {
  max-width: 240px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.top-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.reseller-name {
  color: #D4CCB8;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 8px;
}

.icon-btn {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 50%;
  background: rgba(16, 18, 24, 0.85);
  color: var(--gold-light);
  padding: 0;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.18s, border-color 0.18s;
}

.icon-btn:hover {
  border-color: var(--gold-light);
  transform: scale(1.08);
  filter: drop-shadow(0 0 12px rgba(242, 201, 76, 0.55));
  background: rgba(26, 30, 40, 0.95);
}

.action-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  display: block;
}

/* --------------------------------------------------------------------------
   TELA INICIAL (HOME SCREEN)
   -------------------------------------------------------------------------- */
.home-screen {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.home-spacer {
  position: absolute;
  top: 10px;
  left: 0;
  z-index: 5;
}

.continue-card {
  padding: 14px 18px;
  background: rgba(17, 20, 27, 0.90);
  border: 1px solid var(--edge);
  border-radius: 18px;
  max-width: 380px;
  display: flex;
  gap: 15px;
  align-items: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
}

.continue-card img {
  width: 62px;
  height: 84px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.continue-card strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 14px;
  color: #FFFFFF;
  margin: 3px 0;
}

.continue-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 8px;
}

.continue-card button {
  border: none;
  background: var(--gold-gradient);
  color: #0B0F14;
  border-radius: 9px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 14px;
  transition: transform 0.15s, filter 0.15s;
}

.continue-card button:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.home-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  gap: 8px;
}

.home-logo {
  width: min(440px, 78vw);
  height: clamp(140px, 24vh, 270px);
  object-fit: contain;
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.85));
}

.home-center h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(34px, 4.8vw, 70px);
  letter-spacing: 0.08em;
  margin: 6px 0;
}

.brand-has-logo .home-center h1 {
  display: none;
}

.home-subtitle {
  color: #D4CCB8;
  font-family: var(--font-heading);
  font-size: clamp(11px, 1.1vw, 15px);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
}

/* 3 Cards de Seleção Principal (Canais, Filmes, Séries) */
.home-cards {
  display: flex;
  gap: clamp(16px, 2.8vw, 42px);
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: auto;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.home-card {
  width: clamp(165px, 18.5vw, 275px);
  height: auto;
  aspect-ratio: 1;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 28px;
  box-shadow: none;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.22s;
  cursor: pointer;
}

.home-card-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.85));
  transition: filter 0.2s;
}

.home-card:hover,
.home-card:focus-visible {
  transform: translateY(-9px) scale(1.04);
  filter: drop-shadow(0 0 20px rgba(242, 201, 76, 0.65));
}

.home-card:focus-visible {
  outline: 3px solid var(--ring) !important;
  outline-offset: 4px;
}

.home-footer {
  color: #E1D9CC;
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  margin: 32px 0 0;
}

/* --------------------------------------------------------------------------
   CATÁLOGO DE CONTEÚDO (CANAL, FILMES, SÉRIES)
   -------------------------------------------------------------------------- */
.catalog-screen {
  padding-top: 10px;
}

.catalog-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
}

.catalog-titlebar h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 800;
  color: #FFFFFF;
  margin: 6px 0 0;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--edge);
  background: rgba(11, 13, 16, 0.85);
  padding: 0 16px;
  border-radius: 14px;
  color: var(--gold-light);
  min-width: min(340px, 100%);
  height: 48px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-wrap:focus-within {
  border-color: var(--gold-light);
  box-shadow: 0 0 16px rgba(242, 201, 76, 0.35);
}

.search-wrap input {
  border: 0;
  outline: none;
  background: transparent;
  color: #FFFFFF;
  font-size: 14px;
  width: 100%;
  height: 100%;
}

.search-wrap input::placeholder {
  color: var(--faint);
}

.catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

/* Painel Lateral de Categorias */
.categories {
  background: rgba(18, 22, 28, 0.90);
  border: 1px solid var(--edge);
  border-radius: 20px;
  padding: 16px;
  max-height: calc(100vh - 215px);
  overflow-y: auto;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(14px);
}

.categories::-webkit-scrollbar {
  width: 6px;
}
.categories::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 3px;
}

.categories-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-light);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 10px 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 10px;
}

.categories-label img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.category-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.category-button {
  border: 1px solid transparent;
  text-align: left;
  background: transparent;
  color: #C9D1D9;
  border-radius: 11px;
  padding: 12px 14px;
  line-height: 1.3;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.16s ease;
}

.category-button:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.3);
  color: #FFFFFF;
  transform: translateX(4px);
}

.category-button.active {
  color: #090A0D;
  background: var(--gold-gradient);
  border-color: transparent;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
}

.catalog-results {
  min-width: 0;
}

.catalog-status {
  margin: 0 0 16px;
  color: #C9D1D9;
  min-height: 22px;
  font-size: 14px;
  font-weight: 500;
}

.catalog-status-error {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Grade de Itens (Canais / Filmes / Séries) */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
}

.catalog-grid.live-grid {
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}

.content-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 25, 33, 0.88);
  color: #FFFFFF;
  padding: 0 0 12px;
  border-radius: 16px;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.content-card:hover,
.content-card:focus-visible {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--gold-light);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8), 0 0 20px rgba(242, 201, 76, 0.35);
}

.content-cover {
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, #1C212B, #0E1116);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.live-grid .content-cover {
  aspect-ratio: 16/10;
  padding: 12px;
}

.content-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.live-grid .content-cover img {
  object-fit: contain;
}

.content-card:hover .content-cover img {
  transform: scale(1.05);
}

.content-cover .placeholder-icon svg {
  width: 50px;
  height: 50px;
  color: rgba(212, 175, 55, 0.5);
}

.content-card strong {
  padding: 0 12px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
  line-height: 1.25;
}

.content-card small {
  padding: 0 12px;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 600;
}

.card-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  color: #090A0D;
  background: var(--gold-gradient);
  font-size: 10px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.pagination {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  margin: 32px 0 30px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   DETALHES DE CONTEÚDO (DETAIL SCREEN)
   -------------------------------------------------------------------------- */
.detail-screen {
  max-width: 1280px;
  margin: 0 auto;
}

.back-button {
  padding: 10px 18px;
  margin: 10px 0 26px;
  background: rgba(21, 25, 33, 0.9);
  border: 1px solid var(--edge);
  border-radius: 12px;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.16s, transform 0.16s;
}

.back-button:hover {
  border-color: var(--gold-light);
  transform: translateX(-3px);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 40px;
  align-items: start;
}

.detail-poster {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: #141820;
  border: 1px solid var(--edge);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.85), 0 0 24px rgba(212, 175, 55, 0.2);
}

.detail-info {
  padding-top: 4px;
}

.detail-info h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4.2vw, 52px);
  font-weight: 800;
  color: #FFFFFF;
  margin: 10px 0 12px;
  line-height: 1.15;
}

.detail-meta {
  color: var(--gold-light);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.detail-plot {
  color: #C9D1D9;
  line-height: 1.7;
  font-size: 15px;
  max-width: 780px;
}

.detail-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.detail-actions .gold-button {
  margin: 0;
  width: auto;
  min-width: 200px;
}

.detail-episodes {
  margin: 36px 0 0;
}

.detail-episodes h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 16px;
}

.season-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.season-tabs .ghost-button.active {
  background: var(--gold-gradient);
  color: #090A0D;
  font-weight: 800;
  border-color: transparent;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.episode-item {
  color: #FFFFFF;
  background: rgba(23, 26, 33, 0.85);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 16px;
  text-align: left;
  transition: transform 0.16s, border-color 0.16s;
}

.episode-item:hover,
.episode-item:focus-visible {
  transform: translateY(-4px);
  border-color: var(--gold-light);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.episode-item strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 14px;
  margin-bottom: 4px;
}

.episode-item small {
  color: var(--muted);
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   BOTÕES & PAINÉIS GLOBAIS
   -------------------------------------------------------------------------- */
.gold-button {
  min-height: 52px;
  padding: 12px 22px;
  border: none;
  border-radius: 12px;
  background: var(--gold-gradient);
  color: #0B0F14;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.25);
  transition: transform 0.16s, filter 0.16s, box-shadow 0.16s;
}

.gold-button:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 22px rgba(242, 201, 76, 0.45);
}

.ghost-button, .danger-button {
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: rgba(23, 27, 34, 0.85);
  color: #E7E4DD;
  padding: 12px 20px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.16s ease;
}

.ghost-button:hover {
  border-color: var(--gold-light);
  background: rgba(35, 41, 52, 0.95);
  color: #FFFFFF;
}

.danger-button {
  border-color: #A95454;
  color: #FFAAAA;
  background: rgba(40, 20, 22, 0.7);
}

.danger-button:hover {
  border-color: #FF5555;
  color: #FFFFFF;
  background: rgba(60, 22, 25, 0.9);
}

.glass-panel {
  background: linear-gradient(135deg, rgba(23, 25, 31, 0.92), rgba(12, 15, 20, 0.95));
  border: 1px solid var(--edge);
  box-shadow: 0 30px 75px rgba(0, 0, 0, 0.75), 0 0 35px rgba(212, 175, 55, 0.08);
  border-radius: 24px;
  padding: clamp(24px, 3.2vw, 42px);
  backdrop-filter: blur(16px);
}

/* --------------------------------------------------------------------------
   TELA DE ACESSO / LOGIN
   -------------------------------------------------------------------------- */
.access-screen {
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-columns: 1fr minmax(360px, 520px);
  gap: min(6vw, 100px);
  align-items: center;
  max-width: 1340px;
  margin: 0 auto;
}

.access-brand {
  text-align: center;
}

.official-logo {
  width: clamp(190px, 26vw, 340px);
  max-height: 240px;
  object-fit: contain;
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.85));
}

.access-brand h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(34px, 5vw, 76px);
  letter-spacing: 0.08em;
  margin: 16px 0 8px;
}

.access-brand h1 em {
  color: var(--gold-light);
  font-style: normal;
}

.access-brand p {
  color: #D4CCB8;
  letter-spacing: 0.22em;
  font-size: 12px;
  text-transform: uppercase;
}

.access-panel h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 2.2vw, 30px);
  margin: 12px 0;
}

.access-panel p {
  line-height: 1.6;
  color: #AAB0B8;
  font-size: 14px;
}

.access-panel label {
  display: block;
  font-size: 13px;
  color: #E5E0D1;
  font-weight: 700;
  margin: 16px 0 7px;
}

.access-panel input {
  display: block;
  width: 100%;
  height: 50px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: #0B0F14;
  color: #FFFFFF;
  padding: 0 16px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.access-panel input:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 12px rgba(242, 201, 76, 0.3);
}

.error-text {
  color: #F7A2A2 !important;
  min-height: 20px;
  font-size: 13px;
  margin: 12px 0 0;
}

.device-hint {
  margin-top: 12px;
  font-size: 12px;
  color: #9D9DA3;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.device-hint span {
  color: #DFCFAC;
  font-family: monospace;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 8px;
  border-radius: 6px;
}

.lists-device-hint {
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: -12px auto 24px;
  padding: 7px 10px;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: 10px;
  background: rgba(17, 21, 28, 0.78);
}

.text-link {
  border: none;
  background: none;
  color: var(--gold-light);
  font-weight: 700;
  padding: 5px;
}

/* --------------------------------------------------------------------------
   GERENCIADOR DE LISTAS
   -------------------------------------------------------------------------- */
.screen-heading {
  margin: 4vh 0 28px;
  text-align: center;
}

.screen-heading h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.8vw, 44px);
  margin: 10px 0;
}

.screen-heading p {
  color: var(--muted);
  font-size: 14px;
}

.section-art {
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.list-manager {
  max-width: 1080px;
  margin: 0 auto 24px;
  padding: 24px 28px;
}

.list-manager-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.list-manager-title h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  margin: 6px 0;
}

.list-manager-title p {
  color: #BAC0CA;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 16px;
}

.list-unlimited {
  white-space: nowrap;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-light);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.list-manager-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.list-manager-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #E8E1D0;
}

.list-manager-form input {
  width: 100%;
  height: 48px;
  border-radius: 11px;
  padding: 0 14px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: #0A0E14;
  color: #FFFFFF;
}

.list-manager-form .gold-button {
  margin: 0;
  min-height: 48px;
}

.list-status {
  font-size: 12px;
  min-height: 18px;
  color: #E7C973;
  margin-top: 10px;
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
}

.list-tile-wrap {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--edge);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(23, 25, 31, 0.88);
  transition: border-color 0.2s, transform 0.2s;
}

.list-tile-wrap:hover {
  border-color: var(--gold-light);
  transform: translateY(-4px);
}

.list-tile {
  background: transparent;
  border: none;
  padding: 24px;
  text-align: left;
  min-height: 170px;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.list-tile-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 4px;
}

.list-tile strong {
  font-family: var(--font-heading);
  font-size: 18px;
}

.list-tile small {
  color: var(--muted);
  font-size: 12px;
}

.list-remove {
  background: #11151D;
  color: #DFB2A3;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.15s;
}

.list-remove:hover {
  background: #36201F;
  color: #FFD4CF;
}

.center-actions {
  margin: 32px auto;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   CONFIGURAÇÕES (SETTINGS)
   -------------------------------------------------------------------------- */
.settings-screen {
  max-width: 900px;
  margin: 3vh auto;
}

.settings-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.settings-heading h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.8vw, 44px);
  margin: 4px 0;
}

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

.settings-item {
  background: rgba(20, 24, 32, 0.88);
  border: 1px solid var(--edge);
  border-radius: 16px;
  padding: 20px;
}

.settings-item label {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.settings-item strong {
  font-family: var(--font-heading);
  font-size: 15px;
  color: #FFFFFF;
  display: block;
  overflow-wrap: anywhere;
}

.server-test:not(:empty) {
  padding: 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 12px;
  color: #ECD99A;
  background: rgba(17, 21, 28, 0.90);
  line-height: 1.6;
  font-size: 13px;
}

.settings-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.button-with-art {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 44px;
  line-height: 1.2;
}

.button-with-art img {
  display: block;
  width: 20px !important;
  height: 20px !important;
  max-width: 20px;
  flex: 0 0 20px;
  object-fit: contain;
}

.button-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--gold-light);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   REPRODUTOR OVERLAY (PLAYER)
   -------------------------------------------------------------------------- */
.player-overlay {
  z-index: 80;
  position: fixed;
  inset: 0;
  background: #000000;
}

.player-overlay video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 24px clamp(20px, 4vw, 50px);
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
  pointer-events: none;
}

.player-header > * {
  pointer-events: auto;
}

.player-header > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
  text-shadow: 0 2px 8px #000000;
}

.player-header strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-header span {
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.player-back {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(20, 24, 32, 0.8);
  color: #FFFFFF;
  border-radius: 10px;
  padding: 10px 16px;
  min-height: 44px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  transition: border-color 0.16s;
}

.player-back:hover {
  border-color: var(--gold-light);
}

.player-bottom {
  position: absolute;
  bottom: clamp(88px, 12vh, 120px);
  left: 24px;
  right: 24px;
  pointer-events: none;
}

.player-warning {
  color: #FFE2A5;
  background: rgba(60, 38, 29, 0.9);
  padding: 14px 18px;
  border-radius: 12px;
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid rgba(212, 175, 55, 0.3);
  display: none;
}

.player-warning:not(:empty) {
  display: block;
}

/* Toast & Estados Vazios */
.toast {
  position: fixed;
  z-index: 100;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(24, 28, 36, 0.95);
  color: #FFFFFF;
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 14px 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.25);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
}

.empty-state {
  padding: clamp(28px, 5vw, 50px) 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  background: rgba(18, 22, 28, 0.5);
  grid-column: 1 / -1;
}

.empty-state-title {
  margin: 0;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
}

.empty-state-copy {
  max-width: 58ch;
  margin: 10px auto 0;
  color: #D7DDE4;
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.error-state {
  position: relative;
  width: min(100%, 760px);
  justify-self: center;
  padding-inline: clamp(18px, 5vw, 40px);
  border-style: solid;
  border-color: rgba(247, 162, 162, 0.28);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(147, 55, 55, 0.20), transparent 72%),
    linear-gradient(145deg, rgba(28, 25, 30, 0.96), rgba(15, 18, 24, 0.96));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.error-state::before {
  content: "!";
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 16px;
  border: 1px solid rgba(247, 162, 162, 0.55);
  border-radius: 50%;
  background: rgba(123, 52, 52, 0.25);
  color: #FFD2C5;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
}

.loading-line {
  padding: 20px;
  color: var(--gold-light);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
}

.catalog-retry {
  display: inline-flex;
  margin: 16px auto 0;
  align-items: center;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   RESPONSIVIDADE (TABLET & MOBILE)
   -------------------------------------------------------------------------- */
@media (max-width: 950px) {
  .access-screen {
    grid-template-columns: 1fr;
    max-width: 620px;
    gap: 24px;
  }
  .catalog-layout {
    grid-template-columns: 200px 1fr;
    gap: 16px;
  }
  .home-cards {
    margin-top: 4vh;
  }
  .home-card {
    width: clamp(140px, 24vw, 210px);
  }
}

@media (max-width: 680px) {
  .main {
    padding: 76px 14px 24px;
  }
  .topbar {
    height: 66px;
    padding: 0 14px;
  }
  .reseller-name {
    display: none;
  }
  .brand-mini span {
    max-width: 140px;
  }
  .icon-btn {
    width: 44px;
    height: 44px;
  }
  .home-screen {
    min-height: calc(100dvh - 100px);
  }
  .home-cards {
    gap: 10px;
  }
  .home-card {
    width: calc((100vw - 44px) / 3);
    min-width: 0;
    border-radius: 14px;
  }
  .continue-card {
    max-width: 96vw;
  }
  .catalog-titlebar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .catalog-layout {
    display: block;
  }
  .categories {
    max-height: none;
    margin-bottom: 16px;
    padding: 8px;
  }
  .categories-label {
    display: none;
  }
  .category-items {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.55) rgba(255, 255, 255, 0.06);
    gap: 8px;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
  }
  .category-button {
    white-space: nowrap;
    padding: 10px 14px;
    min-height: 44px;
    scroll-snap-align: start;
  }
  .category-items::-webkit-scrollbar {
    height: 4px;
  }
  .category-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
  }
  .category-items::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.55);
    border-radius: 999px;
  }
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .catalog-grid.live-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .content-card strong {
    font-size: 11px;
    padding: 0 8px;
    min-height: 28px;
  }
  .content-card small {
    font-size: 10px;
    padding: 0 8px;
  }
  .detail-hero {
    grid-template-columns: 120px 1fr;
    gap: 20px;
  }
  .detail-info h2 {
    font-size: 24px;
  }
  .detail-plot {
    font-size: 13px;
  }
}

@media (max-width: 420px) {
  .catalog-grid,
  .catalog-grid.live-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .player-header {
    padding: max(12px, env(safe-area-inset-top)) 10px 16px;
    gap: 8px;
  }
  .player-header strong {
    font-size: 14px;
  }
  .player-back {
    padding: 8px 10px;
    font-size: 11px;
  }
  .player-bottom {
    bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));
    left: 10px;
    right: 10px;
  }
  .player-warning {
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
  }
}

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