* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-user-select: none; 
  -moz-user-select: none; 
  -ms-user-select: none;
  user-select: none;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #0b0b0b;
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: url(); 
  background-size: cover;
  background-position: center;
  cursor: url('http://www.rw-designer.com/cursor-set/halloween-1'), auto;

}


header {
  background-color: #1a1a1a;
  padding: 20px;
  text-align: center;
  border-bottom: 2px solid #ff1e1e;
}

header h1 {
  font-size: 2rem;
  color: #ff1e1e;

}

.title{

  font-size: 2rem;
  color: #ff1e1e;
  font-weight: bold;
}

#search {
  margin: 20px auto;
  padding: 10px;
  width: 90%;
  max-width: 400px;
  border: 2px solid #ff1e1e;
  border-radius: 5px;
  background-color: #111;
  color: white;
  font-size: 1rem;
  transition: box-shadow 0.3s ease-out; 

}

#search:hover{

  box-shadow: 0px 0px 60px rgba(255, 0, 0, 0.315);
  
}

/* ======== MAIN CONTENT ======== */
#content {
  display: flex;
  padding: 20px;
}

/* ======== SIDEBAR ======== */
.sidebar {
  width: 250px;
  background-color: #111;
  padding: 20px;
  border-right: 2px solid #222;

}

.sidebar h3 {
  color: #ff1e1e;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  padding: 8px 12px;
  margin-bottom: 5px;
  background-color: #1a1a1a;
  color: white;
  border-left: 4px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar li.active,
.sidebar li:hover {
  background-color: #2a2a2a;
  border-left: 4px solid #ff1e1e;
  color: #ff1e1e;
}

/* ======== MOVIES GRID ======== */
#movies-list {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* C'est la clé ici */
  gap: 20px;
  padding: 10px;
}

.movie {
  flex: 0 1 calc(16.66% - 20px); /* 6 par ligne, moins l'espace du gap */
  max-width: calc(16.66% - 20px);
  background-color: #1a1a1a;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.movie:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px #ff13136b;
}

.movie img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}

.movie-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.movie-info h3 {
  margin: 10px 0 5px;
  font-size: 1rem;
}

.movie-info .meta {
  font-size: 0.9rem;
  color: #ccc;
}

.movie-info a {
  margin-top: 10px;
  background-color: #ff1e1e;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s;
}

.movie-info a:hover {
  background-color: #cc0000;
}

.language-info{
  color: red;
  font-size: 0.9rem;
  }

/* ======== PAGINATION ======== */
#pagination {
  width: fit-content;
  margin: 20px auto; /* Auto sur les côtés = centrage horizontal */
  margin-bottom: 20px;
}

#pagination button {
  background-color: transparent;
  color: white;
  border: 2px solid #ff1e1e;
  margin: 0 5px;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#pagination button:hover,
#pagination button:focus {
  background-color: #ff1e1e;
  color: black;
}


#pagination button.active {
  background-color: #ff0000;
  color: white;
  font-weight: bold;
  border-radius: 5px;
}


/* ======== RESPONSIVE STYLES ======== */
@media (max-width: 1024px) {
  #content {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #222;
  }

  #movies-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Grille dynamique pour des écrans moyens */
    gap: 15px;
  }
}

@media (max-width: 768px) {
  #content {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #222;
  }

  #movies-list {
    display: grid;
    grid-template-columns: 1fr; /* Une seule colonne sur les petits écrans */
    gap: 10px;
    padding: 0 15px; /* Ajouter un padding pour éviter que le contenu touche les bords */
  }

  .movie {
    max-width: 90%; /* Réduire la taille sur les petits écrans */
    margin: 0 auto; /* Centrer les éléments */
  }

  .movie img {
    width: 100%;
    max-width: 100%; /* Utilise toute la largeur disponible */
    aspect-ratio: 2/3;
    object-fit: cover;
  }

  #pagination {
    flex-direction: column; /* Pour que les boutons de pagination se placent verticalement sur petit écran */
    gap: 10px;
  }
}

@media (max-width: 1025px) {
  body {
    font-size: 0.8rem; /* Réduire la taille de la police pour les petits écrans */
  }

  #content, #pagination, #search {
    display: none; /* Cacher le contenu */
  }

  body::after {
    content: "La page n'est pas accessible sur cet écran. Utilisez un écran plus grand.";
    display: block;
    text-align: center;
    padding: 20px;
    color: white;
    background-color: #ff1e1e;
    font-size: 1.2rem;
  }
}

/* ======== Settings ======== */

/* Style du bouton "Settings" en haut à gauche */
#settings-btn {
  position: fixed;
  top: 10px;
  left: 10px;
  padding: 10px 20px;
  background-color: #333;
  color: white;
  border: none;
  cursor: pointer;
  z-index: 9999;  /* Assurer que le bouton reste en haut */
}

#settings-btn:hover {
  background-color: #555;
}

/* Style du popup */
.popup {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);
  padding-top: 60px;
}

/* Contenu du popup */
.popup-content {
  background-color: #000000;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 400px;
}

/* Bouton pour fermer le popup */
.close-btn {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
  color: rgb(255, 0, 0);
  text-decoration: none;
  cursor: pointer;
}

#porn-genre.hidden {
  display: none;
}



.marquee-bar {
  background-color: rgba(0, 0, 0, 0);
  color: white;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: bold;
  padding: 10px 0;
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
  margin-top: 10px;
}

.marquee-content {
  display: block;
  white-space: nowrap;
  animation: marquee 60s linear infinite;
  will-change: transform;
}

.marquee-bar:hover .marquee-content {
  animation-play-state: paused; /* Pause l'animation au survol */
}

@keyframes marquee {
  from {
      transform: translateX(100%);
  }
  to {
      transform: translateX(-100%);
  }
}

.masto-link {
  color: rgb(255, 0, 0);
  text-decoration: underline;
}


::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: #000000;
}

::-webkit-scrollbar-thumb {
  background-color: red;
  border-radius: 6px;
  border: 3px solid #f0f0f000;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: red #f0f0f000;
}

.footer {
  background-color: #00000054; /* Ou autre couleur pour ton footer */
  padding: 20px;
  text-align: center;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Permet d'empiler les éléments si nécessaire */
}

.footer-content a {
  margin: 0 10px; /* Espacement entre les liens */
  color: white; /* Ou la couleur que tu préfères */
  text-decoration: none;
}

.credit {
  color: white; /* Même couleur pour le crédit */
  margin: 0 15px; /* Espacement autour du crédit */
}