details {
  border: 1px solid #aaa;
  border-radius: 4px;
  padding: .5em .5em 0;
  max-width: 250px;
}

summary {
  font-weight: bold;
  margin: -.5em -.5em 0;
  padding: .5em;
  cursor: pointer;
  text-align: center
}

details[open] {
  padding: .5em;
  max-width: 100%;
}

details[open] summary {
  border-bottom: 1px solid #aaa;
  margin-bottom: .5em;
}

/* Ховаємо стандартний текст summary */
summary.toggle-text {
  list-style: none; /* Прибирає стандартний трикутник у деяких браузерах */
  cursor: pointer;
}

/* Додаємо власний текст, коли закрито */
summary.toggle-text::after {
  content: "Натисніть, щоби переглянути";
}
/* Змінюємо текст, коли details відкрито */
details[open] summary.toggle-text::after {
  content: "Натисніть, щоби приховати";
}

/* Щоб прибрати стандартний трикутник взагалі (опціонально) */
summary.toggle-text::-webkit-details-marker {
  display: none;
}

.mod-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  color: #222;
  margin-top: 20px;
}

/* HEADER */
.mod-header {
  display: flex;
  gap: 20px;
  background: #ffffff;
  padding: 15px;
  border-radius: 10px;
  align-items: flex-start;
  flex-direction: column;
}

.mod-meta {
  font-size: 18px;
}

.mt-meta {
  margin: 4px 4px 0 0;
}

.mod-banner {
  /* width: 350px; */
  border-radius: 8px;
  width: 85%;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.mod-banner img {
  width: 100%;
  -o-border-radius: 6px;
  object-fit: cover;
  -webkit-border-radius: 6px;
  -moz-border-radius: 6px;
  -ms-border-radius: 6px;
  border-radius: 6px;
}

.mod-info {
  flex: 1;
}

.mod-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.mod-tags span {
  background: #f0f0f0;
  padding: 5px 10px;
  font-size: 16px;
  max-width: 180px;
  display: inline-flex;
  align-items: center;
  justify-content: space-evenly;
  -webkit-border-radius: 6px;
  -moz-border-radius: 6px;
  -ms-border-radius: 6px;
  -o-border-radius: 6px;
  border-radius: 6px;
}

.emoji {
  max-width: 25px;
  /* width: 15%; */
  /* padding: 0 2 0 0; */
}

.wpn {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.wpn2 {
  text-align: center;
  -webkit-transition: transform 0.2s ease;
  -moz-transition: transform 0.2s ease;
  -ms-transition: transform 0.2s ease;
  -o-transition: transform 0.2s ease;
  transition: transform 0.2s ease;
}

.wpn_icon {
  /* cursor: zoom-in; */
  max-width: 200px;
}

.wpn2:hover {
  -webkit-transform: scale(1.05);
  -moz-transform: scale(1.05);
  -ms-transform: scale(1.05);
  -o-transform: scale(1.05);
  transform: scale(1.05);
}

.wpn_name {
  text-align: center;
}

/* .localization {
  max-width: 25px;
} */

.center-iframe {
    display: block;
    margin: 0 auto;
    width: 600px; /* або %, наприклад 80% */
    max-width: 100%;
}

/* ОПИС */
.mod-section {
  margin-top: 30px;
  background: #ffffff;
  padding: 15px;
  border-radius: 10px;
}

.mod-section h2 {
  margin-bottom: 10px;
}

/* СКРІНИ */
.screenshots {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  scroll-behavior: smooth;
  /*scroll-snap-type: x mandatory;
  */scrollbar-width: none;
  overflow-x: auto;
  overflow-y: hidden; /* 🔥 ВАЖЛИВО */
  align-items: center; /* щоб не “підпирало” зверху */
}

.screenshots::-webkit-scrollbar {
  display: none;
}

.screenshots-wrapper {
  position: relative;
}

.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #0008;
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 2;
}

.scroll-btn.left {
  left: 0;
}

.scroll-btn.right {
  right: 0;
}

.screens-text {
  -moz-text-align-last: center;
  -ms-text-align-last: center;
  text-align-last: center;
  margin: 0 0 15px 0;
}

.screenshots img {
  width: 100%;
  max-width: 48%;
  border-radius: 8px;
  scroll-snap-align: start;
  flex: 0 0 auto;
  /* -webkit-border-radius: 0%;
  -moz-border-radius: 0%;
  -ms-border-radius: 0%;
  -o-border-radius: 0%;
  border-radius: 0%; */
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.screenshots img:hover {
  transform: scale(1.05);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 999;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lb-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: none;
  color: white;
  font-size: 24px;
  padding: 12px;
  cursor: pointer;
  z-index: 1001;
}

.lb-btn.left { left: 20px; }
.lb-btn.right { right: 20px; }

/* анімована картинка */
.zoom-img {
  position: fixed;
  border-radius: 10px;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  object-fit: contain;
}

.selector:hover {
  color: red;
  cursor: pointer;
}

.selector:active {
  color: rgb(0, 255, 0);
}

/* КНОПКА */
.btn-download {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 15px;
  background: #0073e6;
  border-radius: 6px;
  text-decoration: none;
  color: white;
  transition: 0.2s;
}

.btn-download:hover {
  background: #005bb5;
}

#download_mod, .mod_edisodes {
  scroll-margin-top: 100px; /* висота хедера */
}

#support_authors p {
  margin-top: 8px;
  margin-bottom: 8px;
}

/* ВЕРСІЇ */
.versions {
  /* margin-top: 10px; */
  display: block;
}

.versions .btn {
  margin-right: 5px;
}

.versions span {
  display: inline-block;
  padding: 5px 10px;
  background: rgb(221, 221, 221);
  color: black;
  margin: 3px;
  border-radius: 6px;
}

/* ТЕМНА ТЕМА */

.dark .mod-page {
  color: #ddd;
}

.dark .mod-header {
  background: #1e1e1e;
}

.dark .mod-section {
  background: #1e1e1e;
}

.dark .mod-tags span {
  background: #2a2a2a;
}

.dark .versions span {
  background: white;
}

