/* ===== CORREÇÃO DO BODY - Remove bordas laterais ===== */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
  position: relative;
}

/* ===== LOADING SCREEN CORRIGIDO ===== */
.loading-screen {
  visibility: visible !important;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: rgba(0, 0, 0, 0.98);
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease-out;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* ===== SPINNER CENTRALIZADO (MÉTODO MODERNO) ===== */
.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #e50914;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-sizing: border-box;
  /* Removido position/margin - centralização via flex do pai */
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== CONTAINER DE ANÚNCIOS ===== */
.ad-container, .ad-container2 {
  position: relative;
  width: 100%;
  min-height: 60px;
  overflow: hidden;
  margin: 0 auto;
  max-width: 100%;
}

.ad-item, .ad-item2 {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.ad-item.active, .ad-item2.active {
  display: block;
  opacity: 1;
}

/* ===== ANIMAÇÃO FADE IN ===== */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== CORREÇÃO ESPECÍFICA PARA MEDIAN ===== */
.bg-dark {
  overflow-x: hidden !important;
}

/* Previne scroll horizontal em todos os containers */
.container, .container-fluid {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* Cards e elementos que podem causar overflow */
.card, .row {
  max-width: 100%;
  overflow-x: hidden;
}

/* Fix para imagens que podem sair da tela */
img {
  max-width: 100%;
  height: auto;
}

/* ===== FIX EXTRA PARA WEBVIEW ===== */
@media (max-width: 768px) {
  html {
    overflow-x: hidden !important;
  }
  
  body {
    overflow-x: hidden !important;
    position: relative;
    width: 100% !important;
  }
}