/* Reset e Estilos Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: all 0.2s ease-in-out; 
}

/* Cores Principais (Variáveis CSS) */
:root {
  --color-dark-bg: #121212; /* Fundo principal: Preto neutro (quase puro) */
  --color-card-bg: #1e1e1e; /* Fundo dos cards: Cinza escuro neutro para contraste */
  --color-orange: #ff6600; /* Laranja Principal */
  --color-light-text: #e5e7eb; /* Texto claro */
  --color-subtle-text: #9ca3af; /* Texto secundário */
  --color-border: #333333; /* Borda sutil e neutra */
  --color-green: #22c55e; /* Verde de verificado/sucesso */
}

/* APLICADO CORRETAMENTE: Garante que o fundo seja ESCURO */
body.dark-mode {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
    sans-serif;
  background-color: var(--color-dark-bg); /* Fundo Preto Corrigido */
  color: var(--color-light-text);
  line-height: 1.5;
  font-size: 16px; 
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* Container Principal e Content Wrapper */
.main-container {
  padding-bottom: 70px; 
  width: 100%;
}

.content-wrapper {
  margin: 0 auto;
  padding: 0 0.5rem; 
  width: 100%;
  max-width: 28rem; /* Limite de largura para aparência de celular */
}

.cards-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* --- HEADER --- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: #000;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
}

.privacy-logo {
  height: 1.5rem;
  filter: brightness(0) invert(1); 
}

.header-icons {
  display: flex;
  gap: 1.25rem;
  font-size: 1.25rem;
  color: var(--color-subtle-text);
}

/* --- CARDS BASE --- */
.card {
  width: 100%;
  background-color: var(--color-card-bg); /* Cinza escuro neutro */
  border-radius: 0.75rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

/* --- CARD DE PERFIL --- */
.profile-header-card {
  padding: 0;
}

.background-image-cover {
  width: 100%;
  height: 120px; 
  overflow: hidden;
  position: relative;
}

.banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.profile-content {
  margin-top: -50px; 
  padding: 0 1rem 1rem;
  position: relative;
}

.profile-avatar-section {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid var(--color-dark-bg); 
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--color-card-bg);
}

.profile-stats {
  display: flex;
  gap: 0.75rem;
  color: var(--color-subtle-text);
  font-size: 0.8rem;
  margin-right: 0.5rem;
}

.profile-stats i {
  color: var(--color-orange); 
  margin-right: 0.25rem;
}

.user-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-light-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.verified-icon {
  color: #22c55e;
  font-size: 1rem;
}

.user-handle {
  font-size: 0.9rem;
  color: var(--color-subtle-text);
  margin-top: 0.15rem;
}

.user-bio {
  font-size: 0.95rem;
  color: var(--color-light-text);
  margin-top: 0.75rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 1.25rem;
}

.instagram-link {
  color: var(--color-subtle-text); 
  text-decoration: none;
}

.instagram-link:hover {
  color: var(--color-orange); 
}


/* --- CARTÃO DE ASSINATURA --- */
.subscription-card .card-content {
  padding: 1rem;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-light-text);
  margin-bottom: 0.75rem;
}

/* Estilo do Botão Principal - Laranja */
.subscription-button, .unlock-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  background: linear-gradient(90deg, #ff6600, #ff8c00); 
  border: none;
  border-radius: 0.6rem;
  color: white; 
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 0.6rem;
}

.subscription-button:active, .unlock-button:active {
  filter: brightness(0.85);
}

.button-price {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: bold;
  color: white;
}

/* Seção Promoções */
.promotions-section {
  margin-top: 1rem;
}

.promotions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.toggle-button {
  background: none;
  border: none;
  color: var(--color-light-text);
  cursor: pointer;
}

.chevron-icon {
  font-size: 0.8rem;
  transition: transform 0.3s ease-in-out;
}

.chevron-icon.rotated {
  transform: rotate(180deg);
}

.promotions-content {
  max-height: 200px; 
  overflow: hidden;
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.promotions-content.collapsed {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
}

/* --- TABS CARD (POSTS/MÍDIA) --- */
.tabs-card {
  padding: 0;
  position: relative;
}

.tabs {
  display: flex;
  width: 100%;
  justify-content: space-around;
  padding: 0.5rem;
}

.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 0;
  background: none;
  border: none;
  color: var(--color-subtle-text);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
}

.tab.active {
  color: var(--color-orange);
}

.tab-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background-color: var(--color-orange);
  width: 50%;
  transition: transform 0.3s ease-in-out;
}

.tab-indicator.media {
  transform: translateX(100%);
}

/* --- CARTÃO DE POSTAGEM --- */
.post-card {
    padding: 0;
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.post-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-user-name {
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-user-handle {
  font-size: 0.75rem;
  color: var(--color-subtle-text);
}

.post-options {
  font-size: 1.1rem;
  color: var(--color-subtle-text);
  cursor: pointer;
}

.post-media {
  position: relative;
  width: 100%;
  padding-top: 100%; 
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-image-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(8px) brightness(0.5); 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.post-lock-info {
  display: flex;
  align-items: center;
  color: white;
  font-size: 1.2rem;
  gap: 0.5rem;
  z-index: 10;
}

.price-overlay {
  font-size: 1rem;
  font-weight: bold;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 0.25rem 0.5rem;
  border-radius: 5px;
}

.unlock-button {
  width: auto;
  min-width: 200px;
  padding: 0.6rem 1.5rem;
  margin-top: 1rem;
  margin-bottom: 0; 
  z-index: 10;
}

.post-footer {
  padding: 1rem;
}

.post-description {
  font-size: 0.95rem;
  color: var(--color-subtle-text);
  margin-bottom: 0.75rem;
}

.post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--color-subtle-text);
}

.left-actions,
.right-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.left-actions i {
  font-size: 1.1rem;
  color: var(--color-orange); 
}

.dot-separator {
  width: 4px;
  height: 4px;
  background-color: var(--color-subtle-text);
  border-radius: 50%;
}

/* --- GRID DE MÍDIA --- */
.media-filters {
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.filter-button {
  background: var(--color-border);
  border: none;
  color: var(--color-light-text);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.filter-button.active {
  background: var(--color-orange);
  color: white;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 2px;
}

.media-item {
  position: relative;
  width: 100%;
  padding-top: 100%; 
  overflow: hidden;
  cursor: pointer;
  background-color: #000;
}

.media-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column; 
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.6); 
}

.media-overlay .lock-icon {
  font-size: 2.5rem;
  color: white;
  margin-bottom: 0.5rem;
}

.blurred {
  filter: blur(6px);
}

/* Estilo para o botão de desbloqueio dentro do grid de mídia */
.unlock-button-grid {
    background: linear-gradient(90deg, #ff6600, #ff8c00); 
    border: none;
    border-radius: 9999px; 
    color: white; 
    font-weight: bold;
    font-size: 0.8rem; 
    padding: 0.5rem 1rem;
    cursor: pointer;
    margin-top: 0.5rem; 
    z-index: 10; 
}

.unlock-button-grid:active {
  filter: brightness(0.85);
}


/* --- FOOTER MENU (Barra de Navegação Inferior) --- */
.footer-menu {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  background-color: var(--color-card-bg);
  padding: 0.5rem 0;
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  z-index: 2000;
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--color-subtle-text);
  font-size: 0.7rem;
  cursor: pointer;
  text-decoration: none; 
}

.menu-item i {
  font-size: 1.3rem;
  margin-bottom: 0.2rem;
}

.menu-item.active {
  color: var(--color-orange);
}