:root {
  --background: #151515;
  --surface: #222222;
  --card: #262626;
  --primary: #ff2d55;
  --primary-glow: #ff5a4d;
  --primary-foreground: #ffffff;
  --secondary: #2e2e2e;
  --muted: #2e2e2e;
  --muted-foreground: #9c9c9c;
  --accent: #38332e;
  --border: #3a3a3a;
  --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-glow));
  --shadow-glow: 0 0 0 1px rgba(255, 45, 85, 0.35), 0 18px 45px -18px rgba(255, 45, 85, 0.65);
  --shadow-card: 0 18px 40px -22px rgba(0, 0, 0, 0.9);
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background);
  color: #fafafa;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .site-logo {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

.text-gradient-primary {
  background-image: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.bg-gradient-primary {
  background-image: var(--gradient-primary);
}

.shadow-glow {
  box-shadow: var(--shadow-glow);
}

.shadow-card {
  box-shadow: var(--shadow-card);
}

.text-muted {
  color: var(--muted-foreground) !important;
}

.site-main {
  flex: 1;
  padding-top: 56px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 768px) {
  .site-main {
    padding-top: 64px;
  }
}

body.has-bottom-nav .site-main {
  padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
}

/* ---------- Layout em tela cheia (sem contenção 1320px) ---------- */
.container-xxl {
  max-width: 100%;
}

@media (min-width: 1400px) {
  .container-xxl {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

@media (min-width: 768px) {
  body.has-bottom-nav .site-main {
    padding-bottom: 0;
  }
}

/* ---------- Header ---------- */
.site-header {
  inset-inline: 0;
  top: 0;
  z-index: 1030;
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  background: linear-gradient(to bottom, var(--background), transparent);
}

.site-header.scrolled {
  background: rgba(21, 21, 21, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(58, 58, 58, 0.6);
}

.header-inner {
  height: 56px;
}

@media (min-width: 768px) {
  .header-inner {
    height: 64px;
  }
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
}

.logo-icon {
  display: inline-block;
  flex-shrink: 0;
}

.main-nav .nav-pill,
.mobile-nav .nav-pill {
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.main-nav .nav-pill:hover,
.mobile-nav .nav-pill:hover {
  background: var(--secondary);
  color: #fafafa;
}

.main-nav .nav-pill.active,
.mobile-nav .nav-pill.active {
  background: var(--secondary);
  color: #fafafa;
}

.nav-dropdown .dropdown-toggle::after {
  border-top-color: var(--muted-foreground);
  margin-left: 0.375rem;
  vertical-align: 0.15em;
}

.nav-dropdown:hover .dropdown-toggle::after {
  border-top-color: #fafafa;
}

.nav-menu {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-card);
  padding: 0.375rem;
  max-height: 70vh;
  overflow-y: auto;
  scrollbar-width: thin;
}

.nav-menu .dropdown-item {
  color: var(--muted-foreground);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-menu .dropdown-item:hover,
.nav-menu .dropdown-item:focus {
  background: var(--secondary);
  color: #fafafa;
}

.nav-menu-scroll {
  max-height: 50vh;
}

.nav-caret {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.nav-pill[aria-expanded="true"] .nav-caret {
  transform: rotate(180deg);
}

.mobile-collapse {
  padding-left: 1rem;
}

.mobile-sub-pill {
  display: block;
  border-radius: 0.625rem;
  padding: 0.6rem 0.875rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.mobile-sub-pill:hover {
  background: var(--secondary);
  color: #fafafa;
}

.mobile-collapse-scroll {
  max-height: 40vh;
  overflow-y: auto;
}

.header-search {
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(34, 34, 34, 0.8);
  padding: 0.375rem 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search:focus-within,
.mobile-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(255, 45, 85, 0.35);
}

.header-search input,
.mobile-search input {
  background: transparent;
  border: none;
  outline: none;
  color: #fafafa;
  font-size: 0.875rem;
  width: 176px;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: var(--muted-foreground);
}

@media (min-width: 992px) {
  .header-search input {
    width: 224px;
  }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: rgba(250, 250, 250, 0.9);
  font-size: 1.25rem;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.icon-btn:hover {
  background: var(--secondary);
  color: #fafafa;
}

.mobile-menu {
  background-color: var(--background);
  color: #fafafa;
  width: 300px;
  max-width: 85vw;
}

.mobile-menu .btn-close {
  filter: invert(1);
}

.mobile-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
  transition: border-color 0.2s ease;
}

.mobile-search input {
  width: 100%;
  font-size: 1rem;
}

.mobile-nav .nav-pill {
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

/* ---------- Botões ---------- */
.btn-glow {
  background-image: var(--gradient-primary);
  color: var(--primary-foreground);
  border: none;
  font-weight: 600;
  box-shadow: var(--shadow-glow);
  transition: transform 0.2s ease;
}

.btn-glow:hover {
  color: var(--primary-foreground);
  transform: scale(1.03);
}

.btn-outline-nav {
  border: 1px solid var(--border);
  background: rgba(34, 34, 34, 0.7);
  backdrop-filter: blur(8px);
  color: #fafafa;
  border-radius: 999px;
  font-weight: 600;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-outline-nav:hover {
  border-color: rgba(255, 45, 85, 0.6);
  color: var(--primary);
}

/* ---------- Hero ---------- */
.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--background) 0%, rgba(21, 21, 21, 0.8) 40%, rgba(21, 21, 21, 0.3) 100%);
}

.hero-scrim-side {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--background) 0%, rgba(21, 21, 21, 0.6) 40%, transparent 100%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 45, 85, 0.5);
  background: rgba(255, 45, 85, 0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.hero-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #fafafa;
}

.hero-rating .bi {
  color: var(--primary);
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Seções ---------- */
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

@media (min-width: 576px) {
  .section-title {
    font-size: 1.5rem;
  }
}

.scroll-row {
  display: flex;
  gap: 0.875rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}

.scroll-row > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

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

/* ---------- Cards de anime ---------- */
.anime-card {
  display: block;
  transition: color 0.2s ease;
}

.anime-card:hover h3.anime-card-title {
  color: var(--primary);
}

.card-img-wrap {
  background: var(--secondary);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.anime-card:hover .card-img-wrap {
  transform: translateY(-4px);
  border-color: rgba(255, 45, 85, 0.5);
  box-shadow: var(--shadow-glow);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.anime-card:hover .card-img {
  transform: scale(1.05);
}

.img-missing {
  width: 100%;
  height: 100%;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.card-img-wrap .card-img-wrap .img-missing,
.card-img-wrap.img-missing .card-img {
  display: none;
}

.card-img-wrap.img-missing .img-missing {
  display: flex;
}

.rating-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(21, 21, 21, 0.8);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.6875rem;
  font-weight: 600;
}

.rating-badge .bi {
  color: var(--primary);
  font-size: 0.75rem;
}

.card-hover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(to top, rgba(21, 21, 21, 0.95) 0%, rgba(21, 21, 21, 0.2) 40%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.anime-card:hover .card-hover-overlay {
  opacity: 1;
}

.card-hover-genre {
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  margin-bottom: 0;
}

.anime-card-title {
  line-height: 1.3;
  transition: color 0.2s ease;
}

.card-title-md {
  font-size: 0.875rem;
}

.card-title-lg {
  font-size: 1rem;
}

.anime-card-meta {
  margin-top: 0.125rem;
  margin-bottom: 0;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hover-primary {
  transition: color 0.2s ease;
}

.hover-primary:hover {
  color: var(--primary) !important;
}

/* ---------- Grid de animes ---------- */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 576px) {
  .anime-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .anime-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1200px) {
  .anime-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 1600px) {
  .anime-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

/* ---------- Skeletons ---------- */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--secondary);
  border-radius: 0.5rem;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: skeleton-shimmer 1.4s infinite;
}

@keyframes skeleton-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.aspect-\[2\/3\] {
  aspect-ratio: 2 / 3;
}

.hero-skeleton {
  padding: 7rem 1rem 3.5rem;
}

.anime-card-skeleton .skeleton {
  width: 100%;
}

/* ---------- Estado de erro ---------- */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  border: 1px solid var(--border);
  background: rgba(34, 34, 34, 0.6);
  border-radius: 1rem;
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.error-state p {
  max-width: 24rem;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.error-icon {
  font-size: 2rem;
  color: var(--primary);
}

/* ---------- Catálogo / filtros ---------- */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(34, 34, 34, 0.5);
  border-radius: 1rem;
  padding: 1rem;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
  flex: 1;
}

@media (min-width: 576px) {
  .filter-field {
    flex: none;
  }
}

.filter-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

.filter-select {
  width: 100%;
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: #fafafa;
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.filter-select:focus {
  border-color: var(--primary);
}

@media (min-width: 576px) {
  .filter-select {
    width: 11rem;
  }
}

.filter-select option {
  background-color: var(--surface);
  color: #fafafa;
}

.page-title {
  font-size: 1.875rem;
  font-weight: 700;
}

@media (min-width: 576px) {
  .page-title {
    font-size: 2.25rem;
  }
}

.page-subtitle {
  margin-top: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.empty-state {
  padding: 4rem 0;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* ---------- Paginação ---------- */
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.pagination-info {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* ---------- Gêneros ---------- */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 576px) {
  .genre-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .genre-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.genre-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 1rem;
  padding: 1.25rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.genre-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 45, 85, 0.6);
  box-shadow: var(--shadow-glow);
}

.genre-card:hover .genre-name {
  color: var(--primary);
}

.genre-name {
  font-size: 1.125rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.genre-total {
  margin-top: 0.25rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.genre-glow {
  position: absolute;
  top: -2rem;
  right: -2rem;
  width: 6rem;
  height: 6rem;
  border-radius: 999px;
  background-image: var(--gradient-primary);
  opacity: 0.15;
  filter: blur(2rem);
  transition: opacity 0.2s ease;
}

.genre-card:hover .genre-glow {
  opacity: 0.4;
}

/* ---------- Detalhes do anime ---------- */
.detail-header {
  position: relative;
}

.detail-backdrop-wrap {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 420px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .detail-backdrop-wrap {
    height: 520px;
  }
}

.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--background) 0%, rgba(21, 21, 21, 0.85) 60%, rgba(21, 21, 21, 0.4) 100%);
}

.detail-content {
  position: relative;
  padding: 7rem 0 2rem;
}

@media (min-width: 768px) {
  .detail-content {
    padding-top: 10rem;
  }
}

.detail-poster {
  aspect-ratio: 2 / 3;
  width: 9rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  object-fit: cover;
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}

@media (min-width: 576px) {
  .detail-poster {
    width: 11rem;
  }
}

@media (min-width: 768px) {
  .detail-poster {
    width: 14rem;
  }
}

.detail-title {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
}

@media (min-width: 576px) {
  .detail-title {
    font-size: 2.25rem;
  }
}

@media (min-width: 768px) {
  .detail-title {
    font-size: 3rem;
  }
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.detail-status {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
}

.detail-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.genre-chip {
  background: var(--secondary);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.detail-providers {
  margin-top: 0.75rem;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.detail-synopsis {
  margin-top: 1.25rem;
  max-width: 48rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ---------- Temporadas & episódios ---------- */
.season-pills {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
  margin-top: 1rem;
}

.season-pills::-webkit-scrollbar {
  display: none;
}

.season-pill {
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  background: transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.season-pill:hover {
  border-color: rgba(255, 45, 85, 0.5);
  color: #fafafa;
}

.season-pill.active {
  border-color: var(--primary);
  background: rgba(255, 45, 85, 0.15);
  color: var(--primary);
}

.season-pill .ep-count {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.7;
}

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.episode-item {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 0.75rem;
  padding: 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.episode-item:hover {
  border-color: rgba(255, 45, 85, 0.6);
  box-shadow: var(--shadow-glow);
}

.episode-thumb {
  width: 8rem;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--secondary);
}

@media (min-width: 576px) {
  .episode-thumb {
    width: 11rem;
  }
}

.episode-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.episode-item:hover .episode-thumb img {
  transform: scale(1.05);
}

.episode-num {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.episode-title {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
}

@media (min-width: 576px) {
  .episode-title {
    font-size: 1rem;
  }
}

.episode-overview {
  display: none;
  margin-top: 0.25rem;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  line-height: 1.5;
}

@media (min-width: 576px) {
  .episode-overview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

.episode-watch {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.episode-item:hover .episode-watch {
  color: var(--primary);
}

/* ---------- Player ---------- */
.player-shell {
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
  background: #000;
  border-radius: 0;
}

@media (min-width: 576px) {
  .player-shell {
    border: 1px solid var(--border);
    border-radius: 1rem;
  }
}

.player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-unavailable {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  text-align: center;
  padding: 0 1.5rem;
}

.watch-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

@media (min-width: 576px) {
  .watch-title {
    font-size: 1.75rem;
  }
}

.watch-subtitle {
  margin-top: 0.25rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.watch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.episode-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

@media (min-width: 576px) {
  .episode-picker {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (min-width: 992px) {
  .episode-picker {
    grid-template-columns: repeat(12, 1fr);
  }
}

.episode-pill {
  display: block;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.625rem 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.episode-pill:hover {
  border-color: rgba(255, 45, 85, 0.5);
  color: #fafafa;
}

.episode-pill.active {
  border-color: var(--primary);
  background: rgba(255, 45, 85, 0.15);
  color: var(--primary);
}

/* ---------- Watch layout (estilo YouTube) ---------- */
.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

@media (min-width: 992px) {
  .watch-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }
}

@media (max-width: 575.98px) {
  .watch-pad,
  .watch-sidebar {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.watch-main {
  min-width: 0;
}

.watch-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (min-width: 576px) {
  .watch-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.watch-titles {
  min-width: 0;
}

.watch-head .watch-actions {
  margin-top: 0;
  flex-shrink: 0;
}

@media (max-width: 575.98px) {
  .watch-head .watch-actions {
    justify-content: center;
    width: 100%;
    gap: 0.5rem;
  }

  .watch-head .watch-actions .btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
  }
}

/* ---------- Grade de episódios (com capas) ---------- */
.episode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem;
  margin-top: 1rem;
}

@media (min-width: 576px) {
  .episode-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .episode-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.ep-card {
  display: block;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ep-card:hover {
  border-color: rgba(255, 45, 85, 0.5);
  transform: translateY(-2px);
}

.ep-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.ep-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.ep-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ep-num {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  background: rgba(0, 0, 0, 0.78);
  color: #fafafa;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 0.375rem;
}

.ep-card.active .ep-num {
  background: var(--primary);
}

.ep-now {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.ep-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: rgba(0, 0, 0, 0.35);
}

.ep-play i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 1.4rem;
}

.ep-card:hover .ep-play {
  opacity: 1;
}

.ep-card-title {
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
  color: #ececf1;
  padding: 0.6rem 0.75rem 0.75rem;
  margin: 0;
}

/* ---------- Sidebar de recomendados (rola junto com a página) ---------- */
.watch-sidebar {
  min-width: 0;
}

.rec-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-top: 1rem;
}

.rec-card {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  min-width: 0;
}

.rec-thumb {
  position: relative;
  width: 140px;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  border-radius: 0.6rem;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
}

.rec-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rec-body {
  min-width: 0;
}

.rec-title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  color: #ececf1;
  margin: 0.1rem 0 0;
}

.rec-card:hover .rec-title {
  color: var(--primary);
}

.rec-meta {
  font-size: 0.72rem;
  color: var(--muted-foreground);
  margin: 0.15rem 0 0;
}

@media (min-width: 992px) {
  .rec-thumb {
    width: 168px;
  }
}

/* ---------- Busca ---------- */
.search-hero {
  padding: 3rem 0 1rem;
}

.search-hero h1 {
  font-size: 1.875rem;
  font-weight: 700;
}

@media (min-width: 576px) {
  .search-hero h1 {
    font-size: 2.25rem;
  }
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 40rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.search-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fafafa;
  font-size: 1rem;
  padding: 0.5rem 0;
}

.search-form input::placeholder {
  color: var(--muted-foreground);
}

.search-result-count {
  margin-bottom: 1.25rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* ---------- Textos estáticos ---------- */
.static-page {
  max-width: 48rem;
  padding: 3.5rem 1rem;
}

.static-page h1 {
  font-size: 1.875rem;
  font-weight: 700;
}

.static-page .static-body {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.7;
}

.static-body p {
  margin: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 5rem;
  border-top: 1px solid rgba(58, 58, 58, 0.6);
  background: rgba(34, 34, 34, 0.4);
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2.5rem 1rem;
}

@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.footer-tagline {
  margin-top: 0.5rem;
  max-width: 20rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-bottom: 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.footer-nav a {
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(58, 58, 58, 0.6);
  padding: 1.25rem 1rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

/* ---------- Utilitários ---------- */
.container-xxl {
  max-width: 1400px;
}

.rounded-lg {
  border-radius: 0.75rem;
}

.rounded-full {
  border-radius: 999px;
}

.rounded-2xl {
  border-radius: 1rem;
}

.w-100 {
  width: 100%;
}

/* ---------- Bottom Nav (mobile only) ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1025;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(21, 21, 21, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(58, 58, 58, 0.6);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  padding: 0.625rem 0 0.375rem;
  font-size: 0.65rem;
  color: var(--muted-foreground);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item i {
  font-size: 1.35rem;
  line-height: 1;
}

.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-item:active {
  opacity: 0.7;
}

/* Hide bottom nav when player is focused */
body.player-active .bottom-nav {
  display: none !important;
}

@media (min-width: 768px) {
  .bottom-nav {
    display: none !important;
  }
}

/* ---------- FAB próximo episódio ---------- */
.fab-next-ep {
  position: fixed;
  bottom: 80px;
  right: 1.25rem;
  z-index: 1020;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background-image: var(--gradient-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-glow);
  opacity: 0;
  transform: scale(0.8) translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}

.fab-next-ep.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.fab-next-ep:active {
  transform: scale(0.92);
}

@media (min-width: 768px) {
  .fab-next-ep {
    display: none !important;
  }
}

/* ---------- Filtros colapsáveis (mobile) ---------- */
@media (max-width: 767.98px) {
  #catalogForm:not(.show) {
    display: none;
  }
}

/* ---------- Filtros empilhados no mobile ---------- */
@media (max-width: 767.98px) {
  .filters-bar {
    flex-direction: column;
  }

  .filter-field {
    flex: none;
    width: 100%;
  }
}

/* ---------- Hero mobile ---------- */
.hero {
  position: relative;
  min-height: 62vh;
  overflow: hidden;
}

@supports (height: 100dvh) {
  .hero {
    min-height: 62dvh;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  min-height: 62vh;
  padding: 5rem 0 2.5rem;
}

@supports (height: 100dvh) {
  .hero-content {
    min-height: 62dvh;
  }
}

@media (min-width: 768px) {
  .hero {
    min-height: 85vh;
  }

  @supports (height: 100dvh) {
    .hero {
      min-height: 85dvh;
    }
  }

  .hero-content {
    min-height: 85vh;
    padding-bottom: 5rem;
  }

  @supports (height: 100dvh) {
    .hero-content {
      min-height: 85dvh;
    }
  }
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.05;
}

@media (min-width: 576px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.75rem;
  }
}

.hero-desc {
  max-width: 36rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted-foreground);
}

@media (min-width: 576px) {
  .hero-desc {
    font-size: 1rem;
    line-height: 1.6;
  }
}

/* ---------- Safe area header ---------- */
@supports (padding-top: env(safe-area-inset-top)) {
  .site-header {
    padding-top: env(safe-area-inset-top);
  }

  .header-inner {
    height: calc(56px + env(safe-area-inset-top));
  }

  @media (min-width: 768px) {
    .header-inner {
      height: calc(64px + env(safe-area-inset-top));
    }
  }
}
