/* ==========================================================================
   AmorDramas — Home (visual de streaming profissional)
   ========================================================================== */

:root {
  --brand: #f43f5e;
  --brand-dark: #be123c;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: #050507;
  min-height: 100vh;
}
.font-display { font-family: 'Plus Jakarta Sans', sans-serif; }

/* Scrollbar */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: #0a0a0f; }
::-webkit-scrollbar-thumb { background: #2a2a37; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }
html { scroll-behavior: smooth; }

/* Navbar */
.nav-glass {
  background: linear-gradient(180deg, rgba(5,5,7,0.9) 0%, rgba(5,5,7,0.0) 100%);
  border-bottom: 1px solid transparent;
}
.nav-glass.scrolled {
  background: rgba(8, 8, 12, 0.82);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ===== HERO ===== */
#heroBackdrops .hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#heroBackdrops .hero-slide.active {
  opacity: 1;
  animation: kenburns 20s ease-out forwards;
}
@keyframes kenburns {
  0% { transform: scale(1.05); }
  100% { transform: scale(1.18); }
}
.hero-scrim {
  background:
    linear-gradient(90deg, rgba(5,5,7,0.95) 0%, rgba(5,5,7,0.6) 40%, rgba(5,5,7,0.1) 75%),
    linear-gradient(0deg, #050507 2%, rgba(5,5,7,0.2) 45%, transparent 80%);
}
.hero-vignette {
  background: radial-gradient(120% 80% at 70% 30%, transparent 30%, rgba(5,5,7,0.55) 100%);
  pointer-events: none;
}
.cta-primary {
  background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
  box-shadow: 0 6px 24px rgba(244,63,94,0.45);
}
.cta-primary:hover { box-shadow: 0 10px 34px rgba(244,63,94,0.65); transform: translateY(-2px); }

#heroDots .dot {
  width: 26px; height: 3px; border-radius: 3px;
  background: rgba(255,255,255,0.3); cursor: pointer; transition: all .3s;
}
#heroDots .dot.active { background: var(--brand); width: 40px; }

#heroContent { animation: heroIn .8s cubic-bezier(0.16,1,0.3,1); }
@keyframes heroIn { 0% { opacity:0; transform: translateY(26px); } 100% { opacity:1; transform:none; } }

/* ===== ROWS / CARROSSEL ===== */
.row-wrap { position: relative; }
.row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 6px 4px 18px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}
.row::-webkit-scrollbar { display: none; }
.row { scrollbar-width: none; }

.row-arrow {
  position: absolute;
  top: 0; bottom: 30px;
  width: 52px;
  z-index: 20;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
  background: rgba(5,5,7,0.6);
  backdrop-filter: blur(4px);
  border: none; cursor: pointer;
  opacity: 0; transition: opacity .25s;
}
.row-wrap:hover .row-arrow { opacity: 1; }
.row-arrow:hover { background: rgba(5,5,7,0.85); color: var(--brand); }
.row-arrow-left { left: 0; border-radius: 0 12px 12px 0; }
.row-arrow-right { right: 0; border-radius: 12px 0 0 12px; }
@media (max-width: 768px) { .row-arrow { display: none; } }

/* ===== CARD ===== */
.card {
  flex: 0 0 auto;
  width: 158px;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform .3s cubic-bezier(0.4,0,0.2,1);
}
@media (min-width: 640px) { .card { width: 176px; } }
@media (min-width: 1024px) { .card { width: 192px; } }
.card:hover { transform: translateY(-6px); }

.card-poster {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 14px;
  overflow: hidden;
  background: #13131a;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 26px rgba(0,0,0,0.5);
  transition: border-color .3s, box-shadow .3s;
}
.card:hover .card-poster {
  border-color: rgba(244,63,94,0.5);
  box-shadow: 0 14px 40px rgba(244,63,94,0.28);
}
.card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-poster img { transform: scale(1.08); }

.card-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 45%);
  opacity: .7; transition: opacity .3s;
}
.card:hover .card-scrim { opacity: .95; }

.badge {
  padding: 2px 8px; border-radius: 7px;
  font-size: 10px; font-weight: 800; color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.badge-dub { background: rgba(79,70,229,0.92); }
.badge-leg { background: rgba(217,119,6,0.92); }
.badge-new { background: var(--brand); }
.badge-eps {
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  color: #e2e8f0; font-weight: 700;
}

.card-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .3s;
}
.card:hover .card-play { opacity: 1; }
.card-play span {
  width: 52px; height: 52px; border-radius: 999px;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; box-shadow: 0 8px 24px rgba(244,63,94,0.6);
  transform: scale(0.7); transition: transform .3s;
}
.card:hover .card-play span { transform: scale(1); }

.card-title {
  margin-top: 10px; font-size: 13px; font-weight: 700; color: #e2e8f0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .3s;
}
.card:hover .card-title { color: var(--brand); }
.card-sub { font-size: 11px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

/* ===== TOP 10 (números gigantes) ===== */
.row-top10 .card { width: 220px; padding-left: 60px; position: relative; }
@media (min-width: 640px) { .row-top10 .card { width: 248px; padding-left: 72px; } }
.rank-num {
  position: absolute;
  left: -8px; bottom: 20px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 128px; line-height: 1; font-weight: 900;
  color: #0a0a0f;
  -webkit-text-stroke: 3px rgba(244,63,94,0.85);
  text-stroke: 3px rgba(244,63,94,0.85);
  z-index: 1; pointer-events: none;
  user-select: none;
}
@media (min-width: 640px) { .rank-num { font-size: 150px; left: -6px; } }
.row-top10 .card-poster { position: relative; z-index: 2; }

/* ===== SEARCH DROPDOWN ===== */
.search-dropdown {
  backdrop-filter: blur(20px);
  background: rgba(18, 18, 26, 0.96);
  border: 1px solid rgba(244,63,94,0.2);
  z-index: 60;
}

/* ===== SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, #13131a 25%, #1c1c26 50%, #13131a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
