:root {
  --fundo-topo: #151011;
  --fundo-base: #211318;
  --cartao: #241a1e;
  --dourado: #cfa96a;
  --vinho: #b05461;
  --vinho-profundo: #8c2f3d;
  --texto: #f0e6d6;
  --texto-titulo: #e8d9c0;
  --texto-suave: #a89386;
  --texto-apagado: #9c8a7e;
  --chip-fundo: #332028;
  --sombra: 0 8px 28px rgba(0, 0, 0, 0.45);
  --raio: 20px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(600px 300px at 90% -50px, rgba(207, 169, 106, 0.08) 0%, transparent 70%),
    radial-gradient(500px 260px at -10% 220px, rgba(176, 84, 97, 0.10) 0%, transparent 70%),
    linear-gradient(180deg, var(--fundo-topo) 0%, var(--fundo-base) 100%);
  color: var(--texto);
  font-family: "EB Garamond", Georgia, serif;
  min-height: 100vh;
}

.pagina {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 18px 40px;
}

/* ---------- Cabeçalho ---------- */

.topo { text-align: center; margin-bottom: 22px; }

.topo h1 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: 2.3rem;
  letter-spacing: 0.5px;
  color: var(--texto-titulo);
  margin: 0 0 8px;
}

.coracao { color: var(--vinho); }

.dedicatoria {
  font-style: italic;
  color: var(--texto-apagado);
  line-height: 1.6;
  max-width: 36ch;
  margin: 0 auto;
}

.instrucao {
  font-size: 0.85rem;
  color: var(--dourado);
  opacity: 0.75;
  line-height: 1.5;
  max-width: 38ch;
  margin: 10px auto 0;
}

/* ---------- Chips de filtro ---------- */

.filtros {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filtros::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  border: 0;
  background: var(--chip-fundo);
  color: var(--dourado);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 9px 16px;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.chip:active { transform: scale(0.96); }

.chip.ativo { background: var(--dourado); color: #221418; }

/* ---------- Toggle feed/lista ---------- */

.modo-toggle {
  display: flex;
  background: #2a1c21;
  border-radius: 999px;
  padding: 4px;
  margin: 4px 0 20px;
}

.modo-toggle button {
  flex: 1;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--texto-apagado);
  padding: 10px 0;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.modo-toggle button.ativo {
  background: #3a2830;
  color: var(--dourado);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* ---------- Cards (modo feed) ---------- */

.card {
  background: var(--cartao);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  overflow: hidden;
  margin-bottom: 22px;
  animation: surgir 0.5s ease backwards;
}

@keyframes surgir {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.poster-wrap { position: relative; }

.feed .poster-wrap { aspect-ratio: 2 / 3; }

.poster-wrap img,
.poster-falta {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-falta {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3a2830, #6e3b46);
  color: #d8c4b4;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  text-align: center;
  padding: 16px;
}

.card-info { position: relative; padding: 16px 18px 18px; }

.card-info h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--texto);
  margin: 0 0 8px;
  padding-right: 48px; /* espaço para o coração */
}

.categoria {
  display: inline-block;
  background: var(--chip-fundo);
  color: var(--dourado);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ---------- Chip de serviço (onde assistir) ---------- */

.servico {
  display: inline-block;
  background: var(--chip-fundo);
  color: var(--texto);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  margin-left: 6px;
}

.servico-netflix { background: #b4232a; color: #fff; }
.servico-prime-video { background: #1a98ff; color: #fff; }
.servico-disney { background: #0e47ba; color: #fff; }
.servico-max { background: #7a3ff2; color: #fff; }
.servico-hbo-max { background: #7a3ff2; color: #fff; }
.servico-paramount { background: #0064ff; color: #fff; }
.servico-globoplay { background: #fb4e00; color: #fff; }
.servico-apple-tv { background: #3a3a3c; color: #fff; }

.observacao {
  font-style: italic;
  color: var(--texto-suave);
  line-height: 1.65;
  margin: 10px 0 0;
}

.btn-assistido {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  color: #8a6f78;
  transition: color 0.2s ease, transform 0.2s ease;
}

.btn-assistido.marcado {
  color: var(--vinho);
  animation: pulsar 0.35s ease;
}

@keyframes pulsar {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ---------- Estrelas ---------- */

.estrelas {
  display: flex;
  margin: 8px 0 0 -12px;
}

.estrela {
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  cursor: pointer;
  color: #4a3a40;
  transition: color 0.15s ease, transform 0.15s ease;
}

.estrela:active { transform: scale(1.2); }

.estrela.ativa {
  color: var(--dourado);
  animation: brilhar 0.3s ease;
}

@keyframes brilhar {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ---------- Cards (modo lista) ---------- */

.lista .card { display: flex; }

.lista .poster-wrap {
  width: 96px;
  flex-shrink: 0;
  aspect-ratio: 2 / 3;
}

.lista .card-info { flex: 1; padding: 12px 14px; }

.lista .card-info h2 { font-size: 1.25rem; }

.lista .observacao { font-size: 0.9rem; margin-top: 8px; }

.lista .poster-falta { font-size: 0.95rem; padding: 8px; }

/* Desvio consciente do spec (≥44px): 5 estrelas de 44px não cabem na coluna de
   texto do modo lista em 360px; 38x40px é o compromisso aceito para este modo. */
.lista .estrela { font-size: 1.15rem; min-width: 38px; min-height: 40px; }

/* ---------- Estado vazio e rodapé ---------- */

.vazio {
  text-align: center;
  font-style: italic;
  color: var(--texto-suave);
  padding: 40px 0;
}

.rodape {
  text-align: center;
  margin-top: 44px;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(12px);
  visibility: hidden;
  transition: opacity 0.8s ease, transform 0.8s ease, visibility 0s linear 0.8s;
}

.rodape.revelado {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.rodape-caps {
  display: block;
  font-family: "Oswald", sans-serif;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 6px;
  font-size: 0.8rem;
  color: var(--texto-apagado);
  margin-top: 12px;
}

.rodape-script {
  display: block;
  font-family: "Dancing Script", cursive;
  color: var(--dourado);
  font-size: 2rem;
}

.rodape-script.grande { font-size: 2.6rem; }
