/* === MODAL WINDOW === */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%; /* Pełna szerokość */
  height: 100%; /* Pełna wysokość */

  backdrop-filter: blur(8px);
}

/* === MODAL CONTENT === */
.modal-content1 {
  background: linear-gradient(180deg, #ffecd1 0%, #ffb6b9 50%, #ff8b94 100%);
  padding: 24px;
  border-radius: 16px;
  width: 90%; /* Użyj 90% szerokości ekranu */
  max-width: 500px; /* Maksymalna szerokość */
  margin: 10vh auto; /* Wyśrodkowanie na ekranie */
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  color: #222;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: "Arial", sans-serif;
  line-height: 1.6;
  text-align: left;
  max-height: 70vh; /* Maksymalna wysokość */
  scrollbar-width: none; /* Ukrycie suwaka */
}

.modal-content::-webkit-scrollbar {
  display: none;
}

/* === MODAL TITLE === */
.modal-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: #ff4553;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* === MODAL SUBTITLES === */
.modal-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: #ff4553;
  margin-top: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === MODAL LISTS === */
.modal-content ul {
  list-style: none;
  padding: 0;
}

.modal-content li {
  margin-bottom: 8px;
  font-size: 16px;
  display: flex;
  align-items: center;
}

.modal-content li::before {
  content: "•";
  color: #ff4553;
  margin-right: 8px;
  font-size: 20px;
}

/* === MODAL TEXT === */
.modal-content p {
  font-size: 16px;
  color: #222;
  margin-bottom: 12px;
}

/* === CLOSE BUTTON === */
.close {
  color: #444;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close:hover {
  color: #ff4553;
}

/* === RESPONSYWNOŚĆ === */

/* 🔹 Telefony – układ pionowy (390x840) */
@media (max-width: 420px) {
  .modal-content {
    width: 77%; /* Dopasowanie do wąskich ekranów */

    padding: 16px;
    max-height: 80vh; /* Większa wysokość na wąskich ekranach */
  }

  .modal-content h2 {
    font-size: 20px;
  }

  .modal-content h3 {
    font-size: 16px;
  }

  .modal-content li {
    font-size: 14px;
  }

  .modal-content p {
    font-size: 14px;
  }

  .close {
    font-size: 24px;
  }
}

/* 🔹 Tablety w układzie pionowym (480px - 768px) */
@media (min-width: 480px) and (max-width: 768px) {
  .modal-content {
    width: 85%; /* Szerszy modal na tabletach */
    padding: 20px;
  }
}

/* 🔹 Małe laptopy (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .modal-content {
    width: 75%;
    padding: 24px;
  }
}

/* 🔹 Duże ekrany (ponad 1200px) */
@media (min-width: 1200px) {
  .modal-content {
    width: 500px; /* Stała szerokość na dużych ekranach */
    padding: 24px;
  }
}
/* === MODAL CONTAINER === */
#gameRulesModal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90%;
  max-width: 500px;
  transform: translate(-50%, -50%);

  padding: 24px;
  border-radius: 16px;

  color: #222;
  overflow-y: auto;
  font-family: "Arial", sans-serif;
  line-height: 1.6;
  text-align: center;
  max-height: 80vh;
  z-index: 999;
}

/* === MODAL IMAGE CONTAINER === */
.modal-image-container {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

/* === MODAL IMAGE STYLE === */
.modal-image {
  width: 80%; /* Ustaw szerokość na 80% */
  max-width: 300px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

/* Efekt powiększenia po najechaniu */
.modal-image:hover {
  transform: scale(1.05);
}

/* === RESPONSYWNOŚĆ === */

/* 🔹 Telefony (max 480px) */
@media (max-width: 480px) {
  #gameRulesModal {
    width: 95%;
    padding: 16px;
  }

  .modal-image {
    width: 90%;
    max-width: 250px;
  }
}

/* 🔹 Tablety (480px - 768px) */
@media (min-width: 480px) and (max-width: 768px) {
  #gameRulesModal {
    width: 85%;
  }
}

/* 🔹 Małe laptopy (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  #gameRulesModal {
    width: 70%;
  }
}

/* 🔹 Duże ekrany (ponad 1200px) */
@media (min-width: 1200px) {
  #gameRulesModal {
    width: 500px;
  }
}
#gameRulesModal {
  overflow-y: scroll; /* Umożliwia przewijanie */
  scrollbar-width: none; /* Ukrywa suwak w przeglądarkach Firefox */
}

#gameRulesModal::-webkit-scrollbar {
  display: none; /* Ukrywa suwak w przeglądarkach opartych na WebKit (Chrome, Edge, Safari) */
}
