/* MAGNETBR STREAMING - AUTHENTICATION AND PROFILE STYLES */

/* --- TELA DE AUTENTICAÇÃO --- */
.auth-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
  background: radial-gradient(circle at center, rgba(30,30,38,0.95) 0%, rgba(10,10,12,0.98) 100%),
              url('https://images.unsplash.com/photo-1574375927938-d5a98e8ffe85?q=80&w=1920') no-repeat center center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  font-family: 'Outfit', 'Inter', sans-serif;
  /* Card mais alto que a janela (telas baixas, zoom, muitos campos como no cadastro) não pode
     ficar cortado sem jeito de ver o resto — overflow-y:auto deixa rolar até o conteúdo que não
     coube, em vez do overflow:hidden anterior que simplesmente cortava fora da tela. */
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(20, 20, 25, 0.7);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: fadeInAuth 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInAuth {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-logo {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -1.5px;
  margin-bottom: 2rem;
}

.auth-logo span {
  color: var(--accent-red, #e50914);
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1.5rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-input-group label {
  font-size: 0.85rem;
  color: #aaa;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  color: #fff;
  font-size: 1rem;
  transition: all 0.25s ease;
}

.auth-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-red, #e50914);
  box-shadow: 0 0 12px rgba(229, 9, 20, 0.3);
}

.auth-btn {
  background: var(--accent-red, #e50914);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 1rem;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-btn:hover {
  background: #f40b17;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(229, 9, 20, 0.4);
}

.auth-toggle-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: #aaa;
}

.auth-toggle-link a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  margin-left: 5px;
  transition: color 0.2s ease;
}

.auth-toggle-link a:hover {
  color: var(--accent-red, #e50914);
  text-decoration: underline;
}

.auth-error {
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.3);
  color: #ff4a5a;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  display: none;
  line-height: 1.4;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: #aaa;
  margin-top: -1rem;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

/* Campo de código de verificação (cadastro/redefinição de senha) — mesma base de .auth-input,
   só maior/espaçado pra parecer um campo de OTP em vez de um texto qualquer. */
.auth-otp-input {
  text-align: center;
  font-size: 1.8rem;
  letter-spacing: 0.5em;
  font-weight: 700;
}

.auth-resend-btn-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* --- SELEÇÃO DE PERFIS --- */
.profile-selection-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #09090b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  font-family: 'Outfit', sans-serif;
  padding: 2rem;
  overflow-y: auto;
}

.profile-selection-title {
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 3rem;
  text-align: center;
  letter-spacing: -0.5px;
}

.profiles-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  max-width: 1000px;
  margin-bottom: 4rem;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  position: relative;
  width: 120px;
}

.profile-avatar-wrapper {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  border: 3px solid transparent;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* Cores dos Avatares */
.avatar-bg-1 { background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%); } /* Indigo */
.avatar-bg-2 { background: linear-gradient(135deg, #10b981 0%, #047857 100%); } /* Emerald */
.avatar-bg-3 { background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%); } /* Amber */
.avatar-bg-4 { background: linear-gradient(135deg, #ec4899 0%, #be185d 100%); } /* Pink */
.avatar-bg-5 { background: linear-gradient(135deg, #8b5cf6 0%, #5b21b6 100%); } /* Purple */

.profile-avatar-letters {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-kids-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent-red, #e50914);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.profile-delete-btn {
  position: absolute;
  top: -8px;
  left: -8px;
  background: rgba(229, 9, 20, 0.9);
  color: #fff;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.profile-card:hover .profile-delete-btn {
  opacity: 1;
  transform: scale(1);
}

.profile-delete-btn:hover {
  background: #f40b17;
  transform: scale(1.1) !important;
}

.profile-edit-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background: rgba(60, 60, 66, 0.9);
  color: #fff;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.profile-card:hover .profile-edit-btn {
  opacity: 1;
  transform: scale(1);
}

.profile-edit-btn:hover {
  background: var(--accent-red, #e50914);
  transform: scale(1.1) !important;
}

/* Sem mouse não existe :hover pra revelar os botões — em touch eles ficariam presos em
   opacity:0 pra sempre (mesmo problema já corrigido pro .card-info em style.css). */
@media (hover: none) {
  .profile-delete-btn,
  .profile-edit-btn {
    opacity: 1;
    transform: scale(1);
  }
}

.profile-name {
  color: #aaa;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  transition: color 0.2s ease;
}

.profile-card:hover .profile-avatar-wrapper {
  border-color: #fff;
  transform: scale(1.08);
  box-shadow: 0 12px 25px rgba(255, 255, 255, 0.15);
}

.profile-card:hover .profile-name {
  color: #fff;
}

/* Adicionar Perfil Card */
.profile-add-card .profile-avatar-wrapper {
  border: 3px dashed rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-add-card .profile-avatar-letters {
  color: rgba(255, 255, 255, 0.3);
  font-size: 3rem;
  transition: color 0.2s ease;
}

.profile-add-card:hover .profile-avatar-wrapper {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.profile-add-card:hover .profile-avatar-letters {
  color: #fff;
}

/* Modal de Criação de Perfil */
.profile-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.profile-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.profile-modal {
  width: 100%;
  max-width: 500px;
  background: #141419;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.profile-modal-backdrop.active .profile-modal {
  transform: translateY(0);
}

.profile-modal-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2rem;
}

.profile-avatar-select-title {
  font-size: 0.9rem;
  color: #aaa;
  font-weight: 700;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}

.profile-avatar-options {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.profile-avatar-opt {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.25s ease;
}

.profile-avatar-opt.selected {
  border-color: #fff;
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(255,255,255,0.25);
}

.profile-checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 1.5rem 0;
  cursor: pointer;
}

.profile-checkbox-group input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.profile-checkbox-group label {
  color: #ccc;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.profile-modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.profile-modal-btn {
  flex: 1;
  padding: 0.9rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.profile-modal-btn-cancel {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #aaa;
}

.profile-modal-btn-cancel:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.profile-modal-btn-save {
  background: var(--accent-red, #e50914);
  border: none;
  color: #fff;
}

.profile-modal-btn-save:hover {
  background: #f40b17;
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

/* Indicador de perfil e ações na Navbar */
.nav-profile-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 20px;
  transition: background 0.2s ease;
  user-select: none;
}

.nav-profile-menu:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Ponte transparente para cobrir a margem de 8px e manter o estado hover */
.nav-profile-menu:hover::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
}

.nav-profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
}

.nav-profile-name {
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.nav-profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #141419;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  width: 160px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
}

.nav-profile-dropdown.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.nav-dropdown-item {
  padding: 10px 15px;
  color: #ccc;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.kids-only-nav-badge {
  background: var(--accent-red, #e50914);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  margin-left: 5px;
}

/* Responsividade para Autenticação e Perfis */
@media (max-width: 480px) {
  .auth-card {
    padding: 2rem 1.5rem;
    margin: 1rem;
    border-radius: 12px;
  }
  .auth-title {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
  }
  .auth-logo {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }
  
  .profile-selection-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
  }
  
  .profiles-grid {
    gap: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .profile-card {
    width: 90px;
  }
  
  .profile-avatar-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 8px;
  }
  
  .profile-avatar-letters {
    font-size: 2.2rem;
  }
  
  .profile-name {
    font-size: 0.95rem;
  }
  
  .profile-modal {
    padding: 1.5rem;
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }
  
  .profile-modal-title {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
  }
  
  .profile-avatar-options {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .profile-avatar-opt {
    width: 40px;
    height: 40px;
  }
}

