:root {
  color-scheme: dark;
  --bg: #070707;
  --surface: #141414;
  --surface-2: #242424;
  --text: #ffffff;
  --muted: #b3b3b3;
  --accent: #820ad1;
  --accent-hover: #9b2de3;
  --accent-soft: #c084fc;
  --accent-ink: #ffffff;
  --danger: #ff646e;
  --line: rgba(255, 255, 255, 0.12);
  --header: 72px;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}

/* Identidade visual playerTV */
.brand,
.login-brand,
.mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.04em;
}
.brand-mark {
  display: block;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 22%;
}
.brand-wordmark {
  color: #fff !important;
  font-weight: 850;
  letter-spacing: -0.025em;
}
.brand-wordmark b {
  color: var(--accent-soft);
  font-weight: inherit;
}
.brand .brand-mark {
  width: 42px;
  height: 42px;
  box-shadow: 0 0 24px rgba(130, 10, 209, 0.34);
}
.brand .brand-wordmark {
  font-size: 1.08rem;
}
.login-brand {
  align-items: flex-end;
  gap: 18px;
  font-size: inherit;
  line-height: 1;
}
.login-brand .brand-mark {
  width: clamp(112px, 12vw, 168px);
  height: clamp(112px, 12vw, 168px);
  box-shadow: 0 0 70px rgba(130, 10, 209, 0.38);
}
.login-brand .brand-wordmark {
  padding-bottom: 10px;
  font-size: clamp(1.7rem, 2.8vw, 2.8rem);
}
.mobile-brand .brand-mark {
  width: 58px;
  height: 58px;
  box-shadow: 0 0 26px rgba(130, 10, 209, 0.34);
}
.mobile-brand .brand-wordmark {
  font-size: 1.45rem;
}

* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
}
button,
input,
select {
  font: inherit;
}
button {
  color: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
video:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: fixed;
  z-index: 1000;
  left: 16px;
  top: -80px;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
}
.skip-link:focus {
  top: 16px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.muted {
  color: var(--muted);
}

.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(390px, 0.65fr);
}
.login-art {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(40px, 7vw, 110px);
  background:
    radial-gradient(
      circle at 72% 30%,
      rgba(130, 10, 209, 0.3),
      transparent 27%
    ),
    linear-gradient(135deg, #111419, #050506 72%);
}
.login-art::before {
  content: '';
  position: absolute;
  inset: 10% -15% -22% 28%;
  transform: rotate(-8deg);
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.055) 0 1px,
      transparent 1px 110px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.035) 0 1px,
      transparent 1px 110px
    );
  mask-image: linear-gradient(to bottom, transparent, #000);
}
.login-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  right: 12%;
  top: 17%;
  border: 1px solid rgba(130, 10, 209, 0.5);
  border-radius: 50%;
  box-shadow:
    0 0 130px rgba(130, 10, 209, 0.2),
    inset 0 0 90px rgba(130, 10, 209, 0.14);
}
.login-brand,
.brand,
.mobile-brand {
  font-weight: 900;
  letter-spacing: -0.08em;
}
.login-brand {
  position: relative;
  font-size: clamp(4rem, 8vw, 8.5rem);
  line-height: 0.82;
}
.login-brand span,
.brand span,
.mobile-brand span {
  color: var(--accent);
}
.login-art > p {
  position: relative;
  max-width: 520px;
  margin: 30px 0 0;
  color: #c4c7cc;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
}
.login-panel {
  display: grid;
  place-items: center;
  padding: 40px;
  background: #0d0e11;
}
.login-card {
  width: min(100%, 420px);
}
.mobile-brand {
  display: none;
  font-size: 2rem;
  margin-bottom: 56px;
}
.login-card h1 {
  margin: 0;
  font-size: 2.5rem;
  letter-spacing: -0.04em;
}
.login-helper {
  margin: 10px 0 34px;
  color: var(--muted);
}
.login-card label,
.history-form label,
.ai-dialog label {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: #d6d8dc;
  font-size: 0.88rem;
  font-weight: 700;
}
input,
select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 15px;
  background: #17191e;
  color: var(--text);
}
input::placeholder {
  color: #70757f;
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 82px;
}
.icon-button.inside {
  position: absolute;
  right: 8px;
  top: 5px;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
}
.form-error {
  min-height: 22px;
  margin: 12px 0 4px;
  color: var(--danger);
  font-size: 0.88rem;
}
.privacy-note {
  margin: 20px 0 0;
  color: #737780;
  font-size: 0.78rem;
  text-align: center;
}

.primary-button,
.secondary-button,
.ghost-button,
.ai-button {
  min-height: 46px;
  border-radius: 9px;
  border: 1px solid transparent;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}
.primary-button {
  background: var(--accent);
  color: var(--accent-ink);
}
.secondary-button {
  background: rgba(255, 255, 255, 0.13);
  color: var(--text);
  backdrop-filter: blur(14px);
}
.ghost-button {
  background: transparent;
  border-color: var(--line);
}
.ai-button {
  background: transparent;
  border-color: rgba(130, 10, 209, 0.58);
  color: var(--accent);
}
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.ai-button:hover {
  transform: translateY(-1px);
}
.secondary-button:hover,
.ghost-button:hover {
  background: rgba(255, 255, 255, 0.2);
}
.full {
  width: 100%;
}
.danger {
  color: var(--danger);
}

.app-view {
  min-height: 100vh;
  padding-bottom: 40px;
}
.site-header {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  height: var(--header);
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 58px);
  padding: 0 clamp(22px, 4vw, 68px);
  background: linear-gradient(
    to bottom,
    rgba(5, 6, 8, 0.96),
    rgba(5, 6, 8, 0.72),
    transparent
  );
  transition: background 0.25s ease;
}
.site-header.scrolled {
  background: rgba(8, 9, 11, 0.95);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand {
  color: var(--text);
  text-decoration: none;
  font-size: 1.65rem;
  white-space: nowrap;
}
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  min-height: 44px;
  border: 0;
  padding: 0 13px;
  background: transparent;
  color: #b5b8bf;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
}
.nav-link:hover,
.nav-link.active {
  color: var(--text);
}
.nav-link.active {
  position: relative;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 5px;
  height: 2px;
  background: var(--accent);
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.search-box {
  width: clamp(160px, 18vw, 260px);
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(9, 10, 12, 0.7);
  backdrop-filter: blur(12px);
}
.search-box svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  color: var(--muted);
}
.search-box input {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  outline: 0;
}
.profile-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(130, 10, 209, 0.48);
  border-radius: 50%;
  background: #24272c;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: min(78vh, 760px);
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header) + 60px) clamp(22px, 5vw, 76px) 86px;
  background-color: #16191d;
  background-size: cover;
  background-position: center 25%;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(5, 6, 8, 0.96) 0%,
      rgba(5, 6, 8, 0.72) 37%,
      rgba(5, 6, 8, 0.13) 72%
    ),
    linear-gradient(0deg, var(--bg) 0%, transparent 36%);
}
.hero-content {
  position: relative;
  width: min(660px, 78%);
}
.hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.hero-meta {
  min-height: 24px;
  margin: 18px 0 8px;
  color: #d2d4d8;
  font-weight: 700;
}
.hero-description {
  max-width: 600px;
  margin: 0 0 26px;
  color: #d0d2d6;
  font-size: clamp(0.96rem, 1.2vw, 1.12rem);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-actions {
  display: flex;
  gap: 10px;
}

.page-content {
  position: relative;
  z-index: 2;
  margin-top: -34px;
  padding: 0 clamp(22px, 4vw, 68px) 80px;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 90px 0 36px;
}
.page-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: -0.04em;
}
.rails {
  display: grid;
  gap: 38px;
}
.rail {
  min-width: 0;
}
.rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.rail-header h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  letter-spacing: -0.025em;
}
.rail-reason {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.rail-more {
  min-height: 40px;
  border: 0;
  padding: 8px 4px 8px 18px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}
.rail-more:hover,
.rail-more:focus-visible {
  color: var(--text);
}
.rail-more:disabled {
  cursor: progress;
  opacity: 0.65;
}
.catalog-pagination {
  display: flex;
  justify-content: center;
  padding: 10px 0 28px;
}
.catalog-pagination .secondary-button {
  min-width: min(100%, 280px);
}
.tmdb-notice {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin: 0 0 38px;
  padding: 20px 22px;
  border: 1px solid rgba(1, 180, 228, 0.28);
  border-left: 3px solid #01b4e4;
  border-radius: 7px;
  background: #11161b;
}
.tmdb-notice[hidden] {
  display: none;
}
.tmdb-brand img {
  width: 62px;
  height: 48px;
  display: block;
  object-fit: contain;
}
.tmdb-notice strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1rem;
}
.tmdb-notice p,
.tmdb-notice small {
  margin: 0;
  color: var(--muted);
}
.tmdb-notice p {
  line-height: 1.55;
}
.tmdb-notice small {
  display: block;
  margin-top: 8px;
  font-size: 0.68rem;
}
.rail-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(156px, 15.2vw, 230px);
  gap: clamp(10px, 1.2vw, 18px);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
  scrollbar-width: none;
  padding: 5px 2px 14px;
}
.rail-track::-webkit-scrollbar {
  display: none;
}
.media-card {
  position: relative;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
}
.poster {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(145deg, #23272d, #131519);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}
.media-card:hover .poster,
.media-card:focus-visible .poster {
  transform: translateY(-4px) scale(1.015);
  border-color: rgba(130, 10, 209, 0.68);
}
.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: #c5c8ce;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 800;
}
.poster-badge {
  position: absolute;
  left: 9px;
  top: 9px;
  padding: 5px 8px;
  border-radius: 5px;
  background: rgba(7, 8, 10, 0.78);
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.progress-bar {
  position: absolute;
  z-index: 2;
  left: 8px;
  right: 8px;
  bottom: 8px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}
.card-title {
  margin: 10px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.94rem;
  font-weight: 750;
}
.card-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.empty-state {
  min-height: 380px;
  place-items: center;
  align-content: center;
  text-align: center;
  color: var(--muted);
}
.empty-state:not([hidden]) {
  display: grid;
}
.empty-state span {
  font-size: 3rem;
  color: #454a53;
}
.empty-state h2 {
  margin: 18px 0 4px;
  color: var(--text);
}

.profile-view {
  margin-top: 0;
  padding-top: calc(var(--header) + 70px);
}
.profile-heading {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 42px;
}
.profile-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
}
.profile-heading p:last-child {
  margin: 6px 0 0;
}
.profile-avatar {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.35rem;
  font-weight: 900;
}
.signal-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 48px;
}
.signal-card {
  min-height: 118px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.signal-card strong {
  display: block;
  font-size: 2rem;
  color: var(--accent);
}
.signal-card span {
  color: var(--muted);
  font-size: 0.84rem;
}
.profile-section {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
.section-title-row h2,
.section-title-row h3 {
  margin: 0;
}
.section-title-row p:last-child {
  margin: 8px 0 0;
}
.genre-chips,
.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}
.genre-chips span,
.suggestion-chips button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: var(--surface);
  color: #d9dbe0;
}
.suggestion-chips button {
  cursor: pointer;
}
.history-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1.25fr 1fr auto;
  align-items: end;
  gap: 12px;
  margin-top: 20px;
}
.history-form label {
  margin: 0;
}
.history-list {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}
.history-item {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}
.history-item strong {
  display: block;
}
.history-item span {
  color: var(--muted);
  font-size: 0.8rem;
}
.history-remove {
  min-width: 40px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
}
.account-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

dialog {
  color: var(--text);
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
}
.details-dialog {
  width: min(920px, calc(100% - 32px));
  max-height: 90vh;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  overflow-x: hidden;
  background: #111317;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.65);
}
.details-backdrop {
  height: 370px;
  background-size: cover;
  background-position: center;
}
.details-backdrop::after {
  content: '';
  display: block;
  height: 100%;
  background: linear-gradient(to top, #111317 0%, transparent 72%);
}
.dialog-close {
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(9, 10, 12, 0.78);
  font-size: 1.7rem;
  cursor: pointer;
}
.details-content {
  position: relative;
  margin-top: -126px;
  padding: 0 clamp(22px, 5vw, 58px) 50px;
}
.details-content h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.7rem);
  line-height: 1;
  letter-spacing: -0.05em;
}
.details-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 18px 0;
  color: #d3d5d9;
  font-weight: 700;
}
.details-description {
  max-width: 720px;
  color: #d1d3d7;
  line-height: 1.65;
}
.details-cast {
  color: var(--muted);
  font-size: 0.88rem;
}
.details-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}
.rating-control {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  color: var(--muted);
}
.stars {
  display: flex;
  gap: 2px;
}
.star-button {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #676c75;
  font-size: 1.65rem;
  cursor: pointer;
}
.star-button.active {
  color: var(--accent);
}
.modal-section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.modal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 138px;
  gap: 12px;
  overflow-x: auto;
  padding: 14px 2px;
  scrollbar-width: none;
}
.modal-row .card-title {
  font-size: 0.82rem;
}
.episodes-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  max-height: 380px;
  overflow-y: auto;
}
.episode {
  min-height: 74px;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 7px;
  background: #181b20;
  cursor: pointer;
  text-align: left;
}
.episode:hover {
  border-color: var(--line);
  background: #202329;
}
.episode-thumb {
  width: 72px;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 5px;
  background: #292d34;
}
.episode strong {
  display: block;
}
.episode small {
  color: var(--muted);
}
.episode-state {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
}

.player-dialog {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 0;
  background: #000;
}
.player-topbar {
  position: absolute;
  z-index: 3;
  inset: 0 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent);
}
.player-topbar div {
  display: grid;
  gap: 3px;
}
.player-topbar span {
  color: #b5b8be;
  font-size: 0.8rem;
}
.player-series-button {
  min-height: 40px;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 4px;
  padding: 0 16px;
  background: rgba(18, 18, 18, 0.76);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.player-series-button:hover,
.player-series-button:focus-visible {
  border-color: var(--accent-soft);
  background: rgba(130, 10, 209, 0.72);
}
.player-back {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.4rem;
  cursor: pointer;
}
.player-dialog video {
  width: 100%;
  height: 100%;
  background: #000;
}
.player-error {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  max-width: 540px;
  padding: 20px;
  border-radius: 10px;
  background: rgba(25, 27, 32, 0.95);
  color: #fff;
  text-align: center;
}
.player-error p {
  margin: 0;
  line-height: 1.55;
}
.player-error .primary-button {
  margin-top: 18px;
}
.player-error small {
  display: block;
  margin-top: 12px;
  color: #b9b4bf;
  line-height: 1.45;
}

.ai-dialog {
  width: min(560px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(26px, 5vw, 48px);
  background: #121419;
}
.ai-dialog h2 {
  margin: 0;
  font-size: 2.3rem;
  letter-spacing: -0.04em;
}
.ai-dialog .muted {
  line-height: 1.5;
}
.ai-dialog form {
  margin-top: 26px;
}
.ai-dialog label {
  margin-top: 0;
}
.ai-dialog .primary-button {
  margin-top: 24px;
}
.dialog-close.dark {
  top: 12px;
  right: 12px;
}
.toast {
  position: fixed;
  z-index: 200;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100% - 48px));
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #22252b;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
}
.toast.error {
  border-color: rgba(255, 100, 110, 0.45);
  color: #ffd6d9;
}
.skeleton {
  position: relative;
  overflow: hidden;
  background: #1d2025;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.06),
    transparent
  );
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}
.mobile-nav {
  display: none;
}

@media (max-width: 980px) {
  body {
    padding-bottom: 72px;
  }
  .desktop-nav {
    display: none;
  }
  .mobile-nav {
    position: fixed;
    z-index: 60;
    inset: auto 0 0;
    height: 72px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    padding: 6px max(8px, env(safe-area-inset-right))
      max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: rgba(10, 10, 10, 0.97);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(16px);
  }
  .mobile-nav-item {
    min-width: 0;
    min-height: 52px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    border: 0;
    background: transparent;
    color: #868b94;
    font-size: 0.58rem;
    font-weight: 700;
  }
  .mobile-nav-item span {
    font-size: 1.2rem;
    line-height: 1;
  }
  .mobile-nav-item.active {
    color: var(--accent);
  }
  .site-header {
    padding-inline: 22px;
  }
  .search-box {
    width: min(38vw, 260px);
  }
  .hero-content {
    width: min(720px, 94%);
  }
  .signal-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .history-form {
    grid-template-columns: repeat(2, 1fr);
  }
  .history-form .primary-button {
    align-self: end;
  }
}

@media (max-width: 720px) {
  :root {
    --header: 62px;
  }
  body {
    padding-bottom: 70px;
  }
  .login-view {
    grid-template-columns: 1fr;
  }
  .login-art {
    display: none;
  }
  .login-panel {
    padding: 26px;
  }
  .mobile-brand {
    display: block;
  }
  .site-header {
    gap: 12px;
    padding: 0 16px;
    background: rgba(8, 9, 11, 0.92);
  }
  .brand {
    font-size: 1.35rem;
  }
  .profile-button {
    display: none;
  }
  .search-box {
    margin-left: auto;
    width: min(58vw, 270px);
  }
  .hero {
    min-height: 66vh;
    padding: calc(var(--header) + 40px) 20px 60px;
    background-position: 62% center;
  }
  .hero-shade {
    background: linear-gradient(
      0deg,
      var(--bg) 0%,
      rgba(5, 6, 8, 0.68) 58%,
      rgba(5, 6, 8, 0.18)
    );
  }
  .hero-content {
    width: 100%;
  }
  .hero h1 {
    font-size: clamp(2.25rem, 12vw, 4rem);
  }
  .hero-description {
    -webkit-line-clamp: 2;
    font-size: 0.92rem;
  }
  .page-content {
    margin-top: -20px;
    padding: 0 16px 60px;
  }
  .page-heading {
    margin-top: 72px;
    align-items: flex-start;
    flex-direction: column;
  }
  .ai-button {
    width: 100%;
  }
  .rails {
    gap: 28px;
  }
  .rail-track {
    grid-auto-columns: 40vw;
    gap: 11px;
  }
  .mobile-nav {
    position: fixed;
    z-index: 60;
    inset: auto 0 0;
    height: 68px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 6px max(8px, env(safe-area-inset-right))
      max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: rgba(17, 18, 21, 0.97);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(16px);
  }
  .mobile-nav-item {
    min-width: 0;
    min-height: 52px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    border: 0;
    background: transparent;
    color: #868b94;
    font-size: 0.62rem;
    font-weight: 700;
  }
  .mobile-nav-item span {
    font-size: 1.2rem;
    line-height: 1;
  }
  .mobile-nav-item.active {
    color: var(--accent);
  }
  .profile-view {
    padding-top: calc(var(--header) + 40px);
  }
  .profile-heading {
    align-items: flex-start;
  }
  .profile-avatar {
    width: 64px;
    height: 64px;
  }
  .signal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .signal-card {
    min-height: 100px;
  }
  .history-form {
    grid-template-columns: 1fr;
  }
  .history-item {
    grid-template-columns: 1fr auto;
  }
  .history-item > span {
    display: none;
  }
  .account-actions {
    flex-direction: column;
  }
  .details-dialog {
    width: 100%;
    max-height: 96vh;
    margin-bottom: 0;
    border-radius: 14px 14px 0 0;
  }
  .details-backdrop {
    height: 280px;
  }
  .details-content {
    margin-top: -90px;
  }
  .details-content h2 {
    font-size: 2.5rem;
  }
  .details-actions > button {
    flex: 1 1 150px;
  }
  .rating-control {
    align-items: flex-start;
    flex-direction: column;
  }
  .episode {
    grid-template-columns: 58px 1fr;
  }
  .episode-thumb {
    width: 58px;
  }
  .episode-state {
    grid-column: 2;
  }
  .toast {
    right: 16px;
    bottom: 84px;
  }
}

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

/* Experiência de streaming playerTV */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-art {
  background:
    linear-gradient(90deg, rgba(7, 7, 7, 0.2), #070707 105%),
    radial-gradient(
      circle at 64% 26%,
      rgba(130, 10, 209, 0.34),
      transparent 31%
    ),
    linear-gradient(145deg, #1c0929 0%, #080808 56%, #020202 100%);
}
.login-panel,
.login-card {
  position: relative;
}
.login-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.08) 0.7px,
    transparent 0.7px
  );
  background-size: 9px 9px;
  pointer-events: none;
}
.login-card {
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.58);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}
.primary-button {
  background: var(--accent);
  box-shadow: 0 7px 28px rgba(130, 10, 209, 0.22);
}
.primary-button:hover {
  background: var(--accent-hover);
}
.button-icon {
  font-size: 0.92em;
}
.info-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 0.82rem;
}
.icon-action {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.56);
  color: #fff;
  font-size: 1.55rem;
  cursor: pointer;
  backdrop-filter: blur(12px);
}
.icon-action:hover {
  border-color: #fff;
  background: rgba(130, 10, 209, 0.62);
}

.site-header {
  height: 68px;
  gap: clamp(22px, 3vw, 48px);
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.94),
    rgba(0, 0, 0, 0.62),
    transparent
  );
}
.site-header.scrolled {
  background: rgba(7, 7, 7, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.brand {
  color: var(--accent);
  font-size: 1.85rem;
  text-shadow: 0 0 28px rgba(130, 10, 209, 0.2);
}
.brand span {
  color: inherit;
}
.nav-link {
  padding-inline: 10px;
  color: #d8d8d8;
  font-size: 0.86rem;
  font-weight: 500;
}
.nav-link.active {
  font-weight: 750;
}
.nav-link.active::after {
  left: 10px;
  right: 10px;
  bottom: 3px;
  height: 3px;
  border-radius: 4px;
}
.search-box {
  border-radius: 3px;
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.66);
}
.profile-button {
  border-radius: 5px;
  background: linear-gradient(145deg, var(--accent-hover), #4c0677);
  color: #fff;
}

.hero {
  min-height: min(88vh, 860px);
  align-items: center;
  padding-bottom: 118px;
  background-position: center 22%;
}
.hero-shade {
  background:
    linear-gradient(
      90deg,
      #070707 0%,
      rgba(7, 7, 7, 0.9) 30%,
      rgba(7, 7, 7, 0.16) 72%
    ),
    linear-gradient(0deg, #070707 0%, transparent 42%);
}
.hero-content {
  margin-top: 9vh;
}
.hero h1 {
  max-width: 820px;
  font-size: clamp(3rem, 6.4vw, 6.3rem);
  text-shadow: 0 6px 34px rgba(0, 0, 0, 0.72);
}
.hero-description {
  max-width: 630px;
  color: #f0f0f0;
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  text-shadow: 0 2px 12px #000;
}
.page-content {
  margin-top: -112px;
  padding-inline: clamp(22px, 4vw, 64px);
}
.page-heading {
  margin-top: 128px;
}
.rails {
  gap: 42px;
}
.rail-header {
  margin-bottom: 7px;
}
.rail-header h2 {
  font-size: clamp(1.18rem, 1.8vw, 1.55rem);
}
.rail-reason {
  opacity: 0;
  transform: translateX(-6px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}
.rail:hover .rail-reason,
.rail:focus-within .rail-reason {
  opacity: 1;
  transform: none;
}
.rail-track {
  grid-auto-columns: clamp(156px, 15.2vw, 230px);
  gap: 7px;
  padding: 12px 3px 28px;
}
.media-card {
  isolation: isolate;
  border-radius: 5px;
  color: inherit;
  outline: none;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}
.media-card:hover,
.media-card:focus-visible {
  z-index: 5;
  transform: translateY(-7px) scale(1.035);
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.48));
}
.poster {
  aspect-ratio: 2 / 3;
  border-radius: 4px;
  background: linear-gradient(145deg, #2d1838, #141414 60%);
  border-color: rgba(255, 255, 255, 0.05);
}
.poster::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), transparent 58%);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.media-card:hover .poster,
.media-card:focus-visible .poster {
  transform: none;
  border-color: rgba(130, 10, 209, 0.82);
}
.media-card:hover .poster::after,
.media-card:focus-visible .poster::after {
  opacity: 1;
}
.poster img {
  transition: transform 0.35s ease;
}
.poster img.artwork-contain {
  object-fit: contain;
  padding: 8px;
  background: #111;
}
.media-card.landscape-card .poster {
  aspect-ratio: 16 / 9;
}
.media-card:hover .poster img,
.media-card:focus-visible .poster img {
  transform: scale(1.045);
}
.poster-badge {
  z-index: 2;
  left: 8px;
  top: 8px;
  background: rgba(0, 0, 0, 0.76);
  color: #fff;
}
.progress-bar {
  z-index: 4;
  left: 10px;
  right: 10px;
  bottom: 7px;
}
.card-hover-panel {
  position: absolute;
  z-index: 3;
  inset: auto 10px 12px;
  display: grid;
  gap: 4px;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  pointer-events: none;
}
.media-card:hover .card-hover-panel,
.media-card:focus-within .card-hover-panel {
  opacity: 1;
  transform: none;
}
.card-hover-panel strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
}
.card-hover-panel small {
  overflow: hidden;
  color: #d0d0d0;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-quick-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 3px;
  pointer-events: auto;
}
.card-action {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.78);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.card-action.play {
  border-color: #fff;
  background: #fff;
  color: #111;
  font-size: 0.7rem;
}
.card-action.discover {
  border-color: #01b4e4;
  background: #01b4e4;
  color: #06141a;
  font-size: 1rem;
}
.external-card .poster {
  border-color: rgba(1, 180, 228, 0.2);
}
.external-card .poster-badge {
  color: #90e9ff;
}
.card-action.more {
  margin-left: auto;
  pointer-events: none;
}
.card-title {
  margin-top: 8px;
  font-size: 0.88rem;
}
.card-meta {
  color: #8f8f8f;
}

.details-dialog {
  width: min(1000px, calc(100% - 32px));
  max-height: 92vh;
  border-radius: 7px;
  background: #181818;
}
.details-dialog.series-mode {
  width: min(1180px, calc(100% - 32px));
}
.details-dialog.series-mode .episodes-list {
  max-height: min(62vh, 720px);
}
.details-dialog.tmdb-mode {
  width: min(920px, calc(100% - 32px));
}
.details-source {
  max-width: 720px;
  color: #aeb8c2;
  font-size: 0.78rem;
  line-height: 1.55;
}
.details-source a {
  color: #01b4e4;
  font-weight: 800;
}
.episodes-button {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(15, 15, 15, 0.7);
}
.details-backdrop {
  height: 440px;
}
.details-backdrop::after {
  background: linear-gradient(to top, #181818 0%, rgba(24, 24, 24, 0.04) 80%);
}
.details-content {
  margin-top: -150px;
  padding-bottom: 58px;
}
.details-content h2 {
  max-width: 800px;
  text-shadow: 0 5px 25px #000;
}
.details-meta span:first-child {
  color: #46d369;
}
.details-cast {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
}
.details-cast > span {
  color: #777;
  font-size: 0.78rem;
}
.details-cast button {
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 3px 1px;
  background: transparent;
  color: #ddd;
  cursor: pointer;
}
.details-cast button:hover {
  color: var(--accent-soft);
  border-bottom-color: currentColor;
}
.details-cast button small {
  display: none;
}
.episode-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}
.season-select {
  width: auto;
  min-height: 38px;
  border-radius: 3px;
  background: #242424;
  font-weight: 700;
}
.episodes-list {
  max-height: 520px;
}
.episode {
  position: relative;
  min-height: 104px;
  display: block;
  border: 0;
  border-bottom: 1px solid #404040;
  border-radius: 0;
  padding: 0 58px 0 0;
  background: transparent;
}
.episode:hover {
  background: #242424;
}
.episode-main {
  width: 100%;
  min-height: 104px;
  display: grid;
  grid-template-columns: 36px 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 0;
  padding: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.episode-number {
  color: #aaa;
  font-size: 1.3rem;
  text-align: center;
}
.episode-art {
  position: relative;
}
.episode-thumb {
  width: 150px;
  aspect-ratio: 16 / 9;
}
.episode-play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid #fff;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  font-size: 0.7rem;
}
.episode-progress {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
}
.episode-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}
.episode-copy {
  min-width: 0;
}
.episode-copy strong,
.episode-copy small {
  display: block;
}
.episode-copy small {
  margin-top: 6px;
  overflow: hidden;
  color: #aaa;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.episode-download {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  border: 1px solid #777;
  border-radius: 50%;
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
}
.episode-download:hover {
  border-color: #fff;
  background: rgba(130, 10, 209, 0.28);
}

.person-dialog {
  width: min(980px, calc(100% - 32px));
  max-height: 90vh;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: clamp(26px, 4vw, 48px);
  background: #181818;
}
.person-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-right: 50px;
}
.person-header img,
.person-image-fallback {
  width: 112px;
  height: 112px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(145deg, var(--accent), #3b075b);
}
.person-image-fallback {
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 900;
}
.person-header h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  letter-spacing: -0.045em;
}
.person-items-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 10px;
}

.ai-dialog {
  border-color: rgba(130, 10, 209, 0.46);
  background: linear-gradient(155deg, #261033, #121212 58%);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
}
.suggestion-chips button:hover {
  border-color: var(--accent);
  color: var(--accent-soft);
}
.toast {
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  background: #242424;
}

@media (hover: none) {
  .card-hover-panel {
    display: none;
  }
  .media-card:hover,
  .media-card:focus-visible {
    transform: none;
    filter: none;
  }
}

@media (max-width: 1120px) {
  .desktop-nav {
    gap: 0;
  }
  .nav-link {
    padding-inline: 7px;
    font-size: 0.8rem;
  }
  .rail-track {
    grid-auto-columns: clamp(156px, 22vw, 210px);
  }
}

@media (max-width: 720px) {
  .login-card {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .hero {
    min-height: 72vh;
    align-items: flex-end;
    padding-bottom: 76px;
  }
  .hero-content {
    margin-top: 0;
  }
  .hero h1 {
    font-size: clamp(2.25rem, 11vw, 3.8rem);
  }
  .hero-actions {
    align-items: center;
  }
  .hero-actions .primary-button,
  .hero-actions .secondary-button {
    min-height: 42px;
    padding-inline: 14px;
    font-size: 0.78rem;
  }
  .icon-action {
    width: 42px;
    height: 42px;
  }
  .page-content {
    margin-top: -46px;
  }
  .rail-track {
    grid-auto-columns: clamp(146px, 42vw, 180px);
    gap: 7px;
    padding-bottom: 16px;
  }
  .rail-reason {
    display: none;
  }
  .tmdb-notice {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 24px;
    padding: 16px;
  }
  .tmdb-brand img {
    width: 46px;
    height: 38px;
  }
  .tmdb-notice p {
    font-size: 0.8rem;
  }
  .mobile-nav {
    height: 72px;
    grid-template-columns: repeat(7, 1fr);
    background: rgba(10, 10, 10, 0.97);
  }
  .mobile-nav-item {
    font-size: 0.5rem;
  }
  .mobile-nav-item span {
    font-size: 1rem;
  }
  .details-dialog,
  .person-dialog {
    width: 100%;
    max-height: 96vh;
    margin-bottom: 0;
    border-radius: 8px 8px 0 0;
  }
  .details-dialog.series-mode {
    width: 100%;
  }
  .details-backdrop {
    height: 300px;
  }
  .details-content {
    margin-top: -94px;
  }
  .details-actions > button {
    flex: 1 1 140px;
  }
  .section-title-row {
    align-items: flex-start;
  }
  .episode-tools {
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
  }
  .episode {
    padding-right: 46px;
  }
  .episode-main {
    min-height: 86px;
    grid-template-columns: 24px 94px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 4px;
  }
  .episode-thumb {
    width: 94px;
  }
  .episode-state {
    display: none;
  }
  .episode-copy small {
    -webkit-line-clamp: 1;
  }
  .episode-download {
    right: 4px;
    width: 34px;
    height: 34px;
  }
  .player-topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .player-series-button {
    min-height: 36px;
    margin-left: 64px;
    padding-inline: 12px;
    font-size: 0.76rem;
  }
  .person-header {
    align-items: flex-start;
  }
  .person-header img,
  .person-image-fallback {
    width: 76px;
    height: 76px;
  }
  .person-items-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 8px;
  }
}

@media (max-width: 720px) {
  .brand {
    gap: 6px;
  }
  .brand .brand-mark {
    width: 38px;
    height: 38px;
  }
  .mobile-brand {
    display: flex;
  }
  .brand .brand-wordmark {
    display: none;
  }
}
