/* ========================================
   WTV123 - Layout estilo DONFLIX
   Cores: Azul (#1e73be) + Preto + Branco
   ======================================== */

:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, .7);
  --text-dim: rgba(255, 255, 255, .5);
  --brand: #1e73be;
  --brand-light: #54b6ff;
  --brand-glow: rgba(30, 115, 190, .4);
  --orange: #f5a623;
  --border: rgba(255, 255, 255, .08);
  --shadow: 0 8px 32px rgba(0, 0, 0, .5);
  --radius: 8px;
  --radius-lg: 12px;
  --header-h: 64px;
  --hero-h: 85vh;
  --transition: .25s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 1000;
  background: linear-gradient(180deg, rgba(0, 0, 0, .9) 0%, transparent 100%);
  transition: background var(--transition);
}

.header.scrolled {
  background: rgba(10, 10, 10, .95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, .5);
}

.header__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  transition: opacity var(--transition);
}

.logo:hover {
  opacity: .85;
}

.logo img {
  height: 50px;
  width: auto;
}

/* Nav */
.nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}

.nav__link {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
  padding: 8px 0;
  position: relative;
  transition: color var(--transition);
}

.nav__link:hover,
.nav__link.active {
  color: var(--text);
}

.nav__link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

/* Search Toggle */
.header__actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.search-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(255, 255, 255, .08);
  transition: background var(--transition);
}

.search-toggle:hover {
  background: rgba(255, 255, 255, .15);
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 12px;
  right: 80px;
  left: auto;
  width: auto;
  max-width: 400px;
  height: auto;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
  transform: translateY(-20px);
  opacity: 0;
  pointer-events: none;
  transition: transform .3s, opacity .3s;
  z-index: 1001;
}

.search-overlay.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 24px;
  padding: 8px 16px;
  width: 300px;
  max-width: 85vw;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .5);
}

.search-form svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-form input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 16px;
}

.search-form input::placeholder {
  color: var(--text-dim);
}

.search-close {
  color: var(--text-muted);
  font-size: 18px;
  padding: 4px 8px;
}

.search-close:hover {
  color: var(--text);
}

/* ========== HERO BANNER ========== */
.hero {
  position: relative;
  width: 100%;
  height: var(--hero-h);
  min-height: 500px;
  overflow: hidden;
}

.hero__slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
  background-size: cover;
  background-position: center top;
}

.hero__slide.active {
  opacity: 1;
}

.hero__slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 10, 10, .95) 0%, rgba(10, 10, 10, .6) 40%, transparent 70%),
    linear-gradient(180deg, transparent 50%, var(--bg) 100%);
}

.hero__content {
  position: absolute;
  left: 48px;
  bottom: 20%;
  max-width: 550px;
  z-index: 2;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero__type {
  background: rgba(255, 255, 255, .15);
  padding: 4px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.hero__meta {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--orange);
}

.hero__title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  margin: 0 0 12px;
  line-height: 1.15;
  text-shadow: 0 4px 20px rgba(0, 0, 0, .6);
}

.hero__overview {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 24px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero__buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  transition: all var(--transition);
}

.btn--primary {
  background: var(--text);
  color: var(--bg);
}

.btn--primary:hover {
  background: rgba(255, 255, 255, .85);
  transform: scale(1.02);
}

.btn--secondary {
  background: rgba(255, 255, 255, .2);
  color: var(--text);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, .3);
}

.btn--plus {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .15);
  border: 2px solid var(--text-muted);
  font-size: 24px;
}

.btn--plus:hover {
  border-color: var(--text);
  background: rgba(255, 255, 255, .25);
}

/* Hero Dots */
.hero__dots {
  position: absolute;
  right: 48px;
  bottom: 22%;
  display: flex;
  gap: 10px;
  z-index: 3;
}

.hero__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .4);
  cursor: pointer;
  transition: all var(--transition);
}

.hero__dot:hover {
  background: rgba(255, 255, 255, .6);
}

.hero__dot.active {
  width: 28px;
  border-radius: 5px;
  background: var(--brand);
}

/* ========== MAIN CONTENT ========== */
.main {
  position: relative;
  z-index: 1;
  margin-top: -80px;
  padding-bottom: 60px;
}

/* ========== ROW / CARROSSEL ========== */
.row {
  padding: 0 48px;
  margin-bottom: 36px;
}

.row__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.row__title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--orange);
}

.row__more {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition);
}

.row__more:hover {
  color: var(--brand-light);
}

.row__wrapper {
  position: relative;
}

.row__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 8px 0;
}

.row__track::-webkit-scrollbar {
  display: none;
}

.row__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 100%;
  background: linear-gradient(90deg, rgba(10, 10, 10, .8), transparent);
  color: var(--text);
  font-size: 32px;
  z-index: 2;
  opacity: 0;
  transition: opacity var(--transition);
}

.row__wrapper:hover .row__arrow {
  opacity: 1;
}

.row__arrow--left {
  left: 0;
}

.row__arrow--right {
  right: 0;
  background: linear-gradient(-90deg, rgba(10, 10, 10, .8), transparent);
}

.row__arrow:hover {
  color: var(--brand-light);
}

/* === SETAS DE NAVEGAÇÃO DAS TEMPORADAS === */
.seasons-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 100%;
  background: linear-gradient(90deg, rgba(10, 10, 10, .8), transparent);
  color: var(--text);
  font-size: 32px;
  z-index: 2;
  opacity: 0;
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.4);
  border: none;
  cursor: pointer;
  transition: opacity var(--transition), background var(--transition);
}
.seasons-wrapper:hover .seasons-arrow {
  opacity: 1;
}
.seasons-arrow--left {
  left: 0;
}
.seasons-arrow--right {
  right: 0;
  background: linear-gradient(-90deg, rgba(10, 10, 10, .8), transparent);
}
.seasons-arrow:hover {
  background: linear-gradient(90deg, rgba(30,30,30,.9), transparent);
  color: var(--primary);
}

/* ========== CARD ========== */
.card {
  flex-shrink: 0;
  width: 160px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  position: relative;
  transition: transform .3s, box-shadow .3s;
}

.card:hover {
  transform: scale(1.08);
  z-index: 5;
  box-shadow: var(--shadow);
}

.card__poster {
  aspect-ratio: 2/3;
  width: 100%;
  object-fit: cover;
  background: #1a1a1a;
}

.card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.card__info {
  padding: 10px;
}

.card__title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card__year {
  font-size: 12px;
  color: var(--text-dim);
}

/* ========== FOOTER ========== */
.footer {
  background: rgba(0, 0, 0, .5);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
}

.footer__inner {
  max-width: 800px;
  margin: 0 auto;
}

.footer__disclaimer {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 20px;
  line-height: 1.7;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer__links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--brand-light);
}

.footer__copy {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0;
}

/* ========== RESPONSIVE ========== */

/* Menu mobile - exibir com mais espaçamento */
@media (max-width: 768px) {
  .nav {
    gap: 24px;
    /* Aumentado de 20px para 24px */
    justify-content: flex-start;
    flex: none;
  }

  .nav__link {
    font-size: 13px;
    padding: 6px 4px;
    /* Aumentado padding lateral */
  }

  .header__inner {
    padding: 0 12px;
    gap: 18px;
    /* Aumentado de 16px */
  }

  .logo img {
    height: 50px;
  }

  /* Campo de busca menor em mobile */
  .search-overlay {
    top: 10px;
    right: 12px;
    max-width: 260px;
    /* Reduzido de 280px */
  }

  .search-form {
    width: 220px;
    /* Reduzido de 240px */
    max-width: 65vw;
    /* Reduzido de 70vw */
    padding: 5px 10px;
    /* Reduzido padding */
    gap: 5px;
  }

  .search-form input {
    font-size: 14px;
  }

  .search-toggle {
    width: 36px;
    height: 36px;
  }

  .hero__content {
    left: 20px;
    right: 20px;
    max-width: none;
    bottom: 15%;
  }

  .hero__dots {
    right: 20px;
    bottom: 10%;
  }

  .hero__title {
    font-size: 26px;
  }

  .hero__overview {
    -webkit-line-clamp: 3;
    line-clamp: 3;
    font-size: 14px;
  }

  .row {
    padding: 0 16px;
  }

  .card {
    width: 130px;
  }

  .btn {
    padding: 10px 18px;
    font-size: 14px;
  }
}

/* Telas muito pequenas - celulares compactos */
@media (max-width: 400px) {
  .nav {
    gap: 16px;
    /* Aumentado de 12px */
  }

  .nav__link {
    font-size: 12px;
    padding: 6px 2px;
  }

  .header__inner {
    padding: 0 8px;
    gap: 12px;
    /* Aumentado de 10px */
  }

  .logo img {
    height: 50px;
  }

  .search-overlay {
    right: 8px;
    max-width: 200px;
    /* Reduzido de 220px */
  }

  .search-form {
    width: 180px;
    /* Reduzido de 200px */
    max-width: 60vw;
    /* Reduzido de 65vw */
    padding: 4px 8px;
    /* Mais compacto */
  }

  .search-form input {
    font-size: 12px;
    /* Reduzido de 13px */
  }

  .search-toggle {
    width: 32px;
    height: 32px;
  }

  .search-toggle svg {
    width: 18px;
    height: 18px;
  }
}

/* ========== TITLE PAGE ========== */
.title-page {
  min-height: 100vh;
  padding-top: var(--header-h);
}

.title-hero {
  position: relative;
  height: 60vh;
  min-height: 400px;
  background-size: cover;
  background-position: top center;
  margin-top: 4px;
  border-radius: var(--radius-lg);
}

.title-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 100%);
}

.title-content {
  max-width: 1000px;
  margin: 40px auto 0;
  padding: 0 24px 60px;
  position: relative;
  z-index: 1;
}

.title-header {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
}

.title-poster {
  width: 200px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.title-info {
  flex: 1;
}

.title-info h1 {
  font-size: 32px;
  margin: 0 0 10px;
}

.title-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.title-genres {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.title-genre {
  background: rgba(255, 255, 255, .1);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
}

.title-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.title-section {
  margin-top: 40px;
}

.title-section h2 {
  font-size: 20px;
  margin: 0 0 16px;
  color: var(--text);
  font-weight: 600;
}

.title-section p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* ========== TRAILERS SECTION ========== */
.trailers-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 0;
  scrollbar-width: none;
}

.trailers-row::-webkit-scrollbar {
  display: none;
}

.trailer-card {
  flex-shrink: 0;
  width: 200px;
  cursor: pointer;
  transition: transform var(--transition);
}

.trailer-card:hover {
  transform: scale(1.05);
}

.trailer-thumb {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
}

.trailer-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trailer-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .8) 100%);
}

.trailer-thumb::after {
  content: '▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, .9);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--bg);
  opacity: 0.9;
  transition: opacity var(--transition), transform var(--transition);
}

.trailer-card:hover .trailer-thumb::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.trailer-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========== CAST SECTION (DONFLIX STYLE) ========== */
.cast-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 0;
  scrollbar-width: none;
}

.cast-row::-webkit-scrollbar {
  display: none;
}

.cast-item {
  flex-shrink: 0;
  width: 85px;
  text-align: center;
}

.cast-photo {
  width: 85px;
  height: 85px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}

.cast-item:hover .cast-photo {
  border-color: var(--brand);
}

.cast-photo--placeholder {
  width: 85px;
  height: 85px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  margin: 0 auto 10px;
}

.cast-name {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cast-character {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: rgba(30, 115, 190, .2);
  color: var(--brand-light);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
}

@media (max-width: 600px) {
  .title-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .title-poster {
    width: 160px;
  }
}

/* ========== SEASONS CARDS ========== */
.seasons-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 0 16px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.seasons-row::-webkit-scrollbar {
  height: 6px;
}

.seasons-row::-webkit-scrollbar-track {
  background: var(--bg-card);
  border-radius: 3px;
}

.seasons-row::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.season-card {
  flex-shrink: 0;
  width: 140px;
  text-decoration: none;
  color: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}

.season-card:hover {
  transform: scale(1.05);
}

.season-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.season-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.season-number {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--brand);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.season-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 8px;
}

.season-year {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.season-episodes {
  font-size: 12px;
  color: var(--text-muted);
}

/* ========================================
   LEGAL PAGES (Terms & Privacy)
   ======================================== */

.legal-page {
  background: var(--bg);
}

.legal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

.legal-header {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.legal-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}

.legal-updated {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.legal-content {
  color: var(--text);
}

.legal-section {
  margin-bottom: 40px;
}

.legal-section h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--brand-light);
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.legal-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 12px;
}

.legal-section p {
  line-height: 1.8;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.legal-section ul {
  margin: 0 0 16px;
  padding-left: 24px;
}

.legal-section li {
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.legal-section strong {
  color: var(--text);
}

.legal-nav {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.legal-nav .btn {
  display: inline-flex;
  padding: 12px 24px;
}

/* Responsive Legal Pages */
@media (max-width: 600px) {
  .legal-container {
    padding: 80px 16px 40px;
  }

  .legal-header h1 {
    font-size: 1.8rem;
  }

  .legal-section h2 {
    font-size: 1.2rem;
  }
}
