/* ============================================================
   listafilmes.css — Seriesflix HD
   Tema: vermelho #e50914, fundo escuro #0f0f12
============================================================ */

:root {
  --red:       #e50914;
  --red-dark:  #b0060f;
  --red-dim:   rgba(229,9,20,0.15);
  --bg:        #0f0f12;
  --bg2:       #16161a;
  --bg3:       #1c1c22;
  --border:    rgba(255,255,255,0.07);
  --text:      #f0f0f0;
  --muted:     #888;
  --card-w:    200px;
  --radius:    12px;
  --font:      'Poppins', 'Segoe UI', sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── BASE ── */
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
}

main {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── HEADINGS ── */
h1 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 500;
  color: #fff;
  margin: 10px 0 8px;
}

h2 {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 400;
  color: #fff;
  border-left: 4px solid var(--red);
  padding-left: 10px;
  margin: 32px 0 16px;
}

/* ── GRID ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

@media (min-width: 1200px) { .grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 991px)  { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px)  { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px)  { .grid { grid-template-columns: repeat(3, 1fr); } }

/* ── CARD (grid) ── */
.card,
.serie-card {
  background: var(--bg2);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  text-decoration: none;
  color: var(--text);
  display: block;
  aspect-ratio: 2/3;
  transition: transform 0.2s ease;
  border: 1px solid var(--border);
  will-change: transform;
}

.card:hover,
.serie-card:hover {
  transform: scale(1.04);
  border-color: rgba(229,9,20,0.35);
}

.card img,
.serie-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── OVERLAY ── */
.card-overlay,
.serie-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 8px 12px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.88) 100%);
}

.card-overlay h3,
.serie-info h3 {
  font-size: 11px;
  font-weight: 500;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.card-overlay span,
.serie-info span {
  font-size: 10px;
  color: #bbb;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── RANK (carrossel top 10) ── */
.serie-rank {
  position: absolute;
  top: 20%;
  left: 20%;
  transform: translate(-50%, -50%);
  font-size: 80px;
  font-weight: 200;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--red);
  opacity: 0.35;
  z-index: 2;
  pointer-events: none;
  line-height: 1;
}

/* ── CARROSSEL ── */
.carrossel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-bottom: 28px;
}

.carrossel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--red) var(--bg3);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.carrossel::-webkit-scrollbar        { height: 4px; }
.carrossel::-webkit-scrollbar-thumb  { background: var(--red); border-radius: 4px; }
.carrossel::-webkit-scrollbar-track  { background: var(--bg3); }

/* Cards dentro do carrossel */
.carrossel .serie-card,
.carrossel .card {
  flex: 0 0 var(--card-w);
  width: var(--card-w);
  scroll-snap-align: start;
  aspect-ratio: 2/3;
}

/* ── BOTÕES DO CARROSSEL ── */
.carrossel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15,15,18,0.9);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  border-radius: 50%;
  transition: background 0.2s, border-color 0.2s;
}

.carrossel-btn:hover {
  background: var(--red);
  border-color: var(--red);
}

.carrossel-btn.prev { left: 4px; }
.carrossel-btn.next { right: 4px; }

@media (max-width: 768px) {
  .carrossel-btn { display: none; }
}

/* ── PAGINAÇÃO ── */
.pagination {
  display: flex;
  justify-content: center;
  margin: 32px 0;
  flex-wrap: wrap;
  gap: 6px;
}

.pagination a,
.pagination span {
  text-decoration: none;
  color: var(--text);
  padding: 7px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  transition: background 0.2s, border-color 0.2s;
}

.pagination a:hover {
  background: var(--red-dim);
  border-color: rgba(229,9,20,0.4);
  color: #fff;
}

.pagination .current {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  font-weight: 600;
}

.pagination-dots {
  display: inline-flex;
  align-items: center;
  padding: 7px 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  list-style: none;
  display: flex;
  gap: 6px;
  font-size: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  color: var(--muted);
}

.breadcrumb a {
  color: #7a9fff;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover { color: #fff; }

/* ── TABS ── */
.top-tabs {
  display: flex;
  align-items: center;
  background: var(--bg2);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
}

.tab-item {
  padding: 11px 16px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: color 0.2s, background 0.2s;
}

.tab-item:hover { color: #fff; background: rgba(255,255,255,0.04); }
.tab-item.active { color: var(--red); }

.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--red);
}

.tab-item + .tab-item { border-left: 1px solid var(--border); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── MOBILE ── */
@media (max-width: 480px) {
  :root { --card-w: calc((100vw - 48px) / 2.5); }
  main { padding: 14px 12px; }
  h1 { font-size: 1.2rem; }
  h2 { font-size: 1rem; }
}