/* ==========================================================================
   1. VARIÁVEIS E CONFIGURAÇÕES GERAIS (:root & Reset)
   ========================================================================== */

:root {
  --bg-color: #040406;
  --surface-color: #0b0b0f;
  --surface-hover: #12121a;
  --border-color: rgba(255, 255, 255, 0.05);
  --accent-pink: #e50914; /* Vermelho premium PobreFlix */
  --text-main: #ffffff;
  --text-muted: #80808b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


/* ==========================================================================
   2. TELA DE SPLASH (Carregamento Inicial)
   ========================================================================== */

#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #020203;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s;
}

.splash-logo {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--accent-pink);
  margin-bottom: 24px;
  animation: zoomIn 1.2s ease-in-out forwards;
}

.loader-bar {
  width: 150px;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.loader-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 40%;
  background: var(--accent-pink);
  border-radius: 10px;
  animation: loading 1.5s infinite ease-in-out;
}

@keyframes zoomIn {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes loading {
  0% {
    left: -40%;
  }
  100% {
    left: 100%;
  }
}


/* ==========================================================================
   3. HEADER & NAVEGAÇÃO
   ========================================================================== */

header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 24px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(4, 4, 6, 0.8), transparent);
}

/* --- Bloco do Perfil do Usuário / Visitante (Direita) --- */
.user-profile-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 100px;
}

.user-profile-badge .profile-icon {
  font-size: 26px;
  transition: transform 0.2s ease, color 0.2s ease;
}

/* Estilo do Ícone para Usuário Logado */
.user-profile-badge .user-icon {
  color: var(--text-main, #ffffff);
}

/* Estilo do Ícone para Visitante */
.user-profile-badge .guest-icon {
  color: var(--text-muted, #a0a0a0);
}

.user-profile-badge .profile-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted, #cccccc);
  letter-spacing: 0.2px;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}




/* Container do Bloco do Perfil */
.user-profile-badge {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.profile-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 90px;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.profile-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
}

.user-profile-badge .profile-icon {
  font-size: 26px;
  transition: color 0.2s ease;
}

.user-profile-badge .user-icon {
  color: #ffffff;
}

.user-profile-badge .guest-icon {
  color: #a0a0a0;
}

.user-profile-badge .profile-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #cccccc;
  letter-spacing: 0.2px;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Menu Dropdown Escondido por Padrão */
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 210px;
  background: rgba(18, 18, 20, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  z-index: 1000;
  animation: fadeInDown 0.2s ease forwards;
}

/* Classe de controle para exibir o menu via JS */
.profile-dropdown-menu.active {
  display: flex;
}

/* Animação suave ao abrir */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Item do Menu */
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #e0e0e0;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-item .material-icons-round {
  font-size: 18px;
  color: #a0a0a0;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.dropdown-item:hover .material-icons-round {
  color: #ffffff;
}

/* Destaque para o botão Criar Conta */
.dropdown-item.highlight {
  color: #E50914;
}

.dropdown-item.highlight .material-icons-round {
  color: #E50914;
}

/* Cor de Perigo/Sair */
.dropdown-item.danger {
  color: #ff5252;
}

.dropdown-item.danger .material-icons-round {
  color: #ff5252;
}

.dropdown-item.danger:hover {
  background: rgba(255, 82, 82, 0.15);
}

/* Divisor de Seções */
.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 6px 0;
}






/* --- Logo (Esquerda) --- */
.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-pink);
  letter-spacing: -1.5px;
  cursor: pointer;
  text-decoration: none;
}

/* --- Nav (Centro) --- */
nav {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px 16px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(16px);
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 100px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
}

nav a.active,
nav a:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}


/* ==========================================================================
   4. BANNER HERO (Destaque Principal com Vídeo)
   ========================================================================== */

.hero {
  position: relative;
  height: 75vh;
  display: flex;
  align-items: center;
  padding: 0 60px;
  overflow: hidden;
}

/* Vídeo de Fundo */
.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Máscara de Gradiente (Garante visibilidade dos textos sobre o vídeo) */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: linear-gradient(to right, #040406 25%, rgba(4, 4, 6, 0.4) 65%, transparent 100%);
  box-shadow: inset 0 -120px 100px -40px #040406;
  pointer-events: none;
}

.hero-content {
  max-width: 600px;
  z-index: 10;
}

/* Estilos existentes */
.hero-title-img {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: 20px;
  background: linear-gradient(to bottom, #ffffff 60%, #a0a0b0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-meta .rating {
  color: #ffb800;
  display: flex;
  align-items: center;
  gap: 2px;
}

.hero-meta .badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text-main);
}

.hero-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
}

.btn {
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-primary {
  background-color: var(--text-main);
  color: #000;
}

.btn-primary:hover {
  transform: scale(1.03);
  background-color: #e2e2e8;
}

/* Botão Flutuante de Áudio */
.audio-control-btn {
  position: absolute;
  bottom: 30px;
  right: 60px;
  z-index: 10;
  background: rgba(4, 4, 6, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.audio-control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}


/* ==========================================================================
   5. CARROSSEL DE MARCAS (Brands)
   ========================================================================== */

.brands-container {
  padding: 20px 60px;
  margin-top: -30px;
  position: relative;
  z-index: 20;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; /* Rolagem macia no iOS */
  scrollbar-width: none; /* Firefox */
}

/* Esconde a barra de rolagem no Chrome, Safari e Opera */
.brands-container::-webkit-scrollbar {
  display: none;
}

.brand-card {
  height: 95px;
  flex: 0 0 200px; /* Impede que os cards encolham no carrossel */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.brand-card img {
  height: 95px;
  border-radius: 16px;
  border: 2px solid #fff;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.brand-card:hover {
  transform: translateY(-5px);
}

.brand-card:hover img {
  opacity: 1;
}


/* ==========================================================================
   6. SEÇÃO TOP 10 MAIS ASSISTIDOS
   ========================================================================== */

.top10-section {
  padding: 40px 60px 20px 60px;
  background: var(--bg-color);
}

.top10-carousel {
  display: flex;
  gap: 45px; /* Espaço maior para destacar o número gigante que fica atrás */
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 20px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.top10-carousel::-webkit-scrollbar {
  display: none;
}

/* Container do item: Junta o número de fundo e o card da frente */
.top10-item {
  position: relative;
  display: flex;
  align-items: flex-end;
  flex: 0 0 140px; /* Largura minimalista para os posters */
  margin-left: 25px; /* Espaço para o número aparecer do lado esquerdo */
  text-decoration: none;
}

/* O Número Gigante Outline atrás do card */
.top10-number {
  position: absolute;
  left: -40px;
  bottom: 35px; /* Sobe um pouco para não cortar no rodapé */
  font-size: 140px;
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgb(255, 255, 255); /* Outline elegante */
  z-index: 1;
  user-select: none;
  transition: -webkit-text-stroke 0.3s ease;
}

/* Card do Filme */
.top10-card {
  position: relative;
  z-index: 2; /* Fica por cima do número */
  width: 100%;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.top10-card:hover {
  transform: translateY(-8px);
}

.top10-card:hover ~ .top10-number {
  -webkit-text-stroke: 2px var(--accent-pink); /* Acende o número correspondente */
}

/* Poster menor e mais minimalista */
.top10-poster {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

/* Metadados e Título abaixo do Poster */
.top10-info {
  margin-top: 10px;
}

.top10-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Corta com "..." se for muito grande */
  margin-bottom: 4px;
}

.top10-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.top10-meta .rating {
  color: #ffb800;
  display: flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
}


/* ==========================================================================
   7. SEÇÃO DE PEDIDOS (Estilo Netflix)
   ========================================================================== */

.netflix-request-section {
  padding: 80px 24px;
  background: var(--bg-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.netflix-request-content {
  width: 100%;
  max-width: 550px;
}

.netflix-request-content h2 {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 24px;
  line-height: 1.5;
}

.netflix-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.netflix-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  padding: 18px 16px;
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
}

.netflix-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.netflix-input:focus {
  border-color: #ffffff;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 0 1px #ffffff;
}

textarea.netflix-input {
  height: 100px;
  resize: none;
}

.netflix-btn {
  width: 100%;
  background-color: var(--accent-pink);
  color: #ffffff;
  border: none;
  padding: 16px;
  font-size: 1.3rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.2s, transform 0.1s;
  margin-top: 8px;
}

.netflix-btn:hover {
  background-color: #ff1e27;
}

.netflix-btn:active {
  transform: scale(0.99);
}

.netflix-disclaimer {
  margin-top: 28px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.6;
  text-align: center;
}

.netflix-disclaimer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
  transition: color 0.2s;
}

.netflix-disclaimer a:hover {
  color: #ffffff;
}


/* ==========================================================================
   8. PLAYER DE VÍDEO
   ========================================================================== */

.player-section {
  padding: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(to bottom, #040406, #07070b);
}

.section-header {
  width: 100%;
  max-width: 1000px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header::before {
  content: '';
  display: block;
  width: 3px;
  height: 20px;
  background: var(--accent-pink);
  border-radius: 4px;
}

.inline-player-container {
  width: 100%;
  max-width: 1000px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.video-js {
  width: 100% !important;
}


/* ==========================================================================
   9. RODAPÉ (Footer)
   ========================================================================== */

footer {
  background-color: #030305;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding: 80px 60px 40px 60px;
  margin-top: auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 50px;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-brand {
  max-width: 450px;
}

.footer-logo {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-pink);
  letter-spacing: -2px;
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 10px 24px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s;
}

.footer-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.footer-middle {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 40px;
}

.footer-middle-title {
  color: #3b82f6;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.footer-middle-header {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.footer-middle-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 30px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}


/* ==========================================================================
   10. RESPONSIVIDADE (Media Queries)
   ========================================================================== */

/* Tablets e dispositivos médios */
@media (max-width: 1024px) {
  .brands-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Celulares e dispositivos pequenos */
@media (max-width: 768px) {
  header {
    padding: 16px 24px;
  }

  nav {
    display: none;
  }

  .hero {
    padding: 0 24px;
    height: 65vh;
  }

  .hero-title-img {
    font-size: 2.5rem;
  }

  .brands-container {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px 24px; /* Unificado com o espaçamento mobile original */
  }

  .brand-card {
    flex: 0 0 150px;
    height: 80px;
  }

  .top10-section {
    padding: 30px 24px 10px 24px;
  }

  .top10-item {
    flex: 0 0 110px;
    margin-left: 20px;
  }

  .top10-number {
    font-size: 110px;
    left: -30px;
    bottom: 42px;
  }

  .top10-poster {
    height: 160px;
  }

  .player-section {
    padding: 40px 24px;
  }

  footer {
    padding: 60px 24px 30px 24px;
  }

  .footer-top {
    flex-direction: column;
    gap: 24px;
  }
}