/* Estilos Gerais */
body {
  font-family: "Roboto", sans-serif;
  background-color: #000000;
  color: #f5f5f5;
  margin: 0;
  padding: 0;
}

.hidden {
  display: none;
}

#content {
  max-width: 480px;
  margin: 0 auto;
  background-color: #000000;
  min-height: 100vh;
}

/* Tela de Carregamento */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-logo {
  width: 12rem;
  /* 192px */
  height: 12rem;
  /* 192px */
}

/* Cabeçalho Fixo */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #000000;
  z-index: 1000;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  max-width: 480px;
  margin: 0 auto;
}

.fixed-header h1 {
  font-size: 1rem;
  font-weight: 600;
}

.content-padding {
  padding-top: 40px;
}

/* Resumo do Perfil */
.profile-summary {
  display: flex;
  align-items: center;
  padding: 1rem;
  margin-top: 2rem;
}

.profile-image-container {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  padding: 2px;
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid white;
}

.stats {
  flex: 1;
  margin-left: 2rem;
  display: flex;
  justify-content: space-between;
  text-align: center;
}

.stat {
  font-size: 0.75rem;
}

.stat .font-bold {
  font-weight: 700;
  display: block;
}

/* Informações do Perfil */
.profile-info {
  padding: 0 1rem;
}

.verified-badge {
  color: #3897f0;
}

.translation-link {
  color: #1977f2;
  font-size: 0.875rem;
}

.followers-info {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
  padding: 0 1rem;
  color: #a8a8a8;
  font-size: 0.875rem;
}

.follower-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  margin-right: 0.5rem;
}

/* Botões de Ação */
.profile-actions {
  display: flex;
  margin-top: 1rem;
  padding: 0 1rem;
  gap: 0.5rem;
}

.btn {
  flex: 1;
  padding: 0.375rem 0;
  border-radius: 4px;
  font-weight: 600;
}

.btn-follow {
  background-color: #0095f6;
  color: white;
}

.btn-message {
  background-color: #363636;
  color: white;
}

.btn-add-user {
  padding: 0.375rem 0.5rem;
  background-color: #f3f4f6;
  border-radius: 4px;
}

/* Stories */
.stories {
  display: flex;
  padding: 1rem;
  gap: 1rem;
  overflow-x: auto;
}

.story {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
}

.story-image-container {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  border: 2px solid #a8a8a8;
}

.story-image-container img {
  border-radius: 50%;
}

/* Abas do Perfil */
.profile-tabs {
  display: flex;
  justify-content: space-around;
  padding-top: 0.5rem;
  margin-bottom: 0.5rem;
  border-top: 1px solid #363636;
}

.active-tab {
  color: #0095f6;
}

/* Grid de Posts */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.post-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.image-with-line {
  position: relative;
}

.image-with-line::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2.5px;
  background-color: #0095f6;
  margin-bottom: 3px;
}

/* Rodapé Fixo */
.fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #000000;
  display: flex;
  justify-content: space-around;
  padding: 1rem 0;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
  border-top: 1px solid #363636;
}

.footer-avatar {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
}

/* Popup */
#popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #1c1c1e;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  padding: 20px;
  z-index: 1000;
  width: 90%;
  max-width: 400px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.popup-header {
  color: #fff;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.popup-profile-image {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-right: 12px;
}

.popup-username {
  font-weight: 600;
  font-size: 16px;
}

.popup-ad-label {
  font-size: 12px;
  color: #8e8e8e;
  margin-left: 8px;
}

.popup-content {
  color: #fff;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.popup-content p {
  margin-top: 0.5rem;
}

.popup-content .font-bold {
  font-weight: 700;
  font-size: 1.25rem;
}

.voucher-button {
  background-color: #0095f6;
  color: white;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 8px;
  text-align: center;
  width: 100%;
  margin-top: 16px;
  transition: background-color 0.3s ease;
  text-decoration: none;
  display: block;
}

.voucher-button:hover {
  background-color: #0081d6;
}

.popup-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #8e8e8e;
  margin-top: 20px;
}

/* ================================================= */
/* ESTILOS DO POPUP - CORREÇÃO FINAL PARA O BOTÃO    */
/* ================================================= */

/* Animação de entrada do Popup */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Fundo escurecido atrás do popup */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  /* Fundo mais escuro */
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* Estilo principal do Popup */
#popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #262626;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 380px;
  z-index: 1000;
  opacity: 0;
  animation: fadeIn 0.4s ease-out 0.2s forwards;
  box-sizing: border-box;
  /* Garante que o padding não aumente a largura */
}

.popup-content-wrapper {
  text-align: center;
}

/* Cabeçalho do Popup */
.popup-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.popup-profile-image {
  width: 32px;
  height: 32px;
  margin-right: 10px;
}

.popup-username {
  font-weight: 600;
  font-size: 16px;
  color: #f5f5f5;
}

.popup-ad-label {
  font-size: 14px;
  color: #a8a8a8;
  margin-left: 8px;
  font-weight: 400;
}

/* Conteúdo de texto do Popup */
.popup-content .popup-headline {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.popup-content p {
  font-size: 1rem;
  color: #a8a8a8;
  line-height: 1.5;
  margin: 0;
}

.popup-content strong {
  color: #ffffff;
  font-weight: 600;
}

.social-proof {
  font-size: 0.875rem;
  color: #a8a8a8;
  margin-top: 1.5rem;
}

/* Botão de Ação (Voucher) - CORRIGIDO */
.voucher-button {
  display: block;
  background-color: #0095f6;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  /* Diminuí a fonte para caber melhor */
  padding: 14px 10px;
  /* Diminuí o padding horizontal */
  border-radius: 8px;
  text-align: center;
  width: 100%;
  margin-top: 20px;
  text-decoration: none;
  border: none;
  transition: background-color 0.2s ease;
  box-sizing: border-box;
  /* ESSA É A CORREÇÃO PRINCIPAL */
}

.voucher-button:hover {
  background-color: #1a83d3;
}