body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: white;
  color: #000;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

html, body {
  height: 100%;
  overflow-y: auto;  /* ✅ добавь это */
  overscroll-behavior: contain; /* предотвращает странные скроллы */
}

main {
  padding-bottom: 150px; /* Make room for footer */
  flex: 1 0 auto;
  position: relative;
  z-index: 1;
}


header.controls {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background: white;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 25px;
  align-items: stretch;
  box-sizing: border-box;
  flex-wrap: nowrap;
  position: sticky;
  
}

#iykyk-wink {
  position: absolute;
  top: -22px;
  right: 0px; /* регулируй это под своё */
  white-space: nowrap;
  
  color: #b41aa7;
  font-size: 14px;
  font-weight: bold;
  z-index: 10;
}

#iykyk-wink.show {
  display: block;
}

.id-input-block {
  flex-shrink: 0;
  position: relative; 
}

#idFilter {
  height: 100%;
  width: 300px;
  resize: none;
  padding: 8px;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
  min-height: 80px;
  font-size: 14px;
}

.filter-block {

  flex-direction: column;
  gap: 8px;
  justify-content: space-between;
}



.zoom-control {
  flex-shrink: 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
  margin-right:8px;
}

.filter-top-row select {
  height: auto;
  padding: 4px;
}

.filter-checkbox-grid {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}


.filter-checkbox-grid label,
.filter-pair label {
  display: flex;
  align-items: center;
  gap: 4px;
}
.filter-pair {
  display: flex;
  align-items: flex-start;
    padding-right: 12px;
    border-right: 1px solid #cccccc;
}

.filter-label {
	margin-right: 5px;
  line-height: 1.2;
}

.filter-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-checkboxes label {
  display: flex;
  align-items: center;
  gap: 4px;
}

input[type="checkbox"] {
  vertical-align: middle;
}

.gallery {
  padding: 4px;
  display: grid;
  gap: 4px;
  row-gap: 22px;
  max-width: 100vw; /* 💥 не шире экрана */
  box-sizing: border-box;
}

#gallery {
  padding-bottom: 200px; /* slightly more than footer height */
}


.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1; /* 💥 делает квадратные */
  object-fit: cover;   /* или 'contain' если не хочешь обрезки */
  cursor: pointer;
  border-radius: 4px;
  transition: opacity 0.2s;
  z-index: 1;
  position: relative;
}

.gallery img:hover {
  opacity: 0.8;
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: white;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index:2000;
}

.lightbox.hidden {
  display: none;
}

#close-lightbox {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 40px;
  cursor: pointer;
}

#lightbox-image {
  max-width: 80%;
  max-height: 80%;
}

#image-info {
  margin-top: 1rem;
  text-align: center;
  color: #000;
  margin-left: 25px;
}

.img-wrapper {
  
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-label {
  margin-top: 0px;
  color: #999;
  text-align: center;
}

/*header {box-shadow:0px 2px 7px rgba(0,0,0,0.05);}*/

input[type='range']{ accent-color: #ffffff; transform: rotate(180deg);  }

.site-title {
  font-size: 18px;
  line-height: 1.1;
  padding: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: #111;
  white-space:nowrap;
  padding: 0px 30px 0px 45px;
  justify-content:center;
}

.site-title h1 {
	font-weight:400;
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  white-space:nowrap;
}

input[type="checkbox"] {
  accent-color: #bbb; /* светло-серый */
}


.filter-solo-block {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  row-gap: 4px;
  max-width: 100%;
  margin-top: 4px;
}


.filter-solo-block label {
  display: flex;
  align-items: center;
  gap: 4px;
	margin-right:8px;
  white-space: nowrap;
}


.filter-inprogress-block{ display: flex;
  flex-wrap: wrap;
  gap: 12px;
  row-gap: 4px;
  max-width: 100%;
  margin-top: 4px;}

.filter-inprogress-block label {
  display: flex;
  align-items: center;
  gap: 4px;
	margin-right:8px;
  white-space: nowrap;
}

#work-in-progress-select{}

#mobile-controls{display:flex;gap:1rem;justify-content: center;}



#impressum {padding:4vw 4vw;max-width:800px;margin:0 auto;line-height:1.5;}

#impressum h1 {text-align:center;}

#impressum h2 {margin-top:35px;}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: white;
  padding: 15px 20px;
  text-align: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

footer #menu-footer > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* ✅ Center the links */
  gap: 15px;
}

footer a {
  color: black;
  font-weight: 400;
  text-decoration: none;
}



.wallet-lookup{display:flex;  flex-direction: column;  justify-content: center;  /* Центрує по вертикалі */
}

.filter-label{text-align:center;}





#filter-reset {background-color:#5992a5; color:white;}

@media (max-width: 800px) {
	
	.lightbox {
    
    flex-direction: column !important;}
	
	.dual-wrapper {
   display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  max-width: 100%!important;
    width: 100%!important;
}
	
	.dual-wrapper img {
		height:auto!important; max-height:none!important;
  width: 100%;
  max-width: 90vw;  /* или 100% от .dual-wrapper */
  height: auto;
  object-fit: contain !important;
}
}

@media (max-width: 1024px) {
	
	footer {padding:15px 0px;}
	.gallery {
  width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 4px;
  display: grid;
  gap: 4px;
  row-gap: 22px;
  grid-template-columns: repeat(2, 1fr); /* на мобилке фиксируем на 2 */
}
	
	.dual-wrapper{
		
		 display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  max-width: 70%;
	}
	
	.dual-wrapper img {
  
	max-width: 45% !important;
    object-fit: contain;
  }
	.cent-info {margin-top:30px!important;}
	
	#lightbox{    flex-direction: row;
}
	#lightbox-image {
    width: 55vw!important;
    height: 55vw!important;
    object-fit: contain;
    max-width: none;
    max-height: none;
  }
  
	 .img-wrapper {
    flex-direction: column;
  }

  #image-info {
    margin-left: 0;
    margin-top: 1rem;
  }
	#zoomRange{width:100%!important;}
	
	#mobile-controls {
    display: none;
    flex-direction: column;
    gap: 12px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
    max-height: 0;
    opacity: 0; overflow-y: auto;
    max-height: 100vh;
  }

#mobile-controls.open {
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 1;
  max-height: none; /* убираем ограничение по высоте */
  overflow-y: auto;
 
  -webkit-overflow-scrolling: touch;
}
  
  header.controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
	position:relative!important;
  }

  .site-title {
    padding: 0;
    font-size: 20px;
    justify-content: right;
    text-align: center;
  }

  .site-title h1 {
    font-size: 20px;
  }

  .id-input-block {
    width: 100%;
  }

  #idFilter {
    width: 100%;
    min-height: 50px;
    font-size: 16px;
  }

  .filter-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

    .filter-top-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .zoom-control {
    width: 100%;
	order:99;
  }

  .zoom-control input[type="range"] {
    width: 100%;
  } 

  /* Остальные элементы по два в ряд */
  .filter-top-row select,
  #filter-reset,
  #union-mode,
  #amountdiv {
    width: calc(50% - 7px);
    box-sizing: border-box;
	padding: 4px;
	text-align: center;
  }

  .zoom-control {
    width: 100%;
    justify-content: center;
	margin-top: 15px;
	margin-bottom: 10px;
  }

  .zoom-control input[type="range"] {
    width: 100%;
  }

  .filter-checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }

  .filter-pair {
    width: calc(50% - 6px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border-right: none;
    padding-right: 0;
  }

  .filter-solo-block {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
  }

  .filter-solo-block label {
    min-width: 0;
  }

  #amountdiv {
    text-align: center;
    margin-left: 0;
    font-size: 14px;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .img-label {
    font-size: 12px;
  }

  .lightbox img {
    max-width: 90vw;
    max-height: 70vh;
  }
  
 .menu-toggle {
  width: 30px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1001;
  position: fixed;
  top: 3px;
  left: 3px;
  padding: 10px;
  gap: 6px;
}

.menu-toggle .bar {
  width: 22px;
  height: 2px;
  background-color: #555;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.menu-toggle.open .bar:nth-child(1) {
  transform: rotate(45deg);
  position: absolute;
}

.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open .bar:nth-child(3) {
  transform: rotate(-45deg);
  position: absolute;
}
  
  .zoom-control label {width:100%;}
  
  
  .filter-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Парные по два в ряд */
.filter-pair {
  width: calc(50% - 6px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  border-right: none;
  padding-right: 0;
}

/* Соло-фильтры – адаптивно */
.filter-solo-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
}

.filter-solo-block label {
  min-width: 0;
}

.filter-checkboxes {
  display: flex;
  flex-direction: row;
  gap: 4px;
}
}


@media (min-width: 1101px) {
  .menu-toggle,
  .menu-overlay {
    display: none !important;
  }
   #mobile-controls {
    display: flex !important;
  }
}




.filter-top-row button{padding:5px 12px!important;border-radius:0px!important;border:2px solid black;}
.filter-top-row select{padding:4px 12px!important;border-radius:0px!important;border:2px solid black;}


#walletLookup, #walletLookupBtn{margin-top:5px;}


#idFilter{border-radius:0px!important;border:2px solid black;}


.half-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  clip-path: inset(0 0% 0 0); /* Показываем левую половину */
}

.full-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio:auto!important;
}
#walletLookupBtn{
    padding: 4px 12px !important;
    border-radius: 0px !important;
border: 2px solid black;}








#zoomRange {
  -webkit-appearance: none;
  width: 300px;
  height: 10px;
  background: #ddd;
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

/* Chrome, Safari */
#zoomRange::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 32px;
  height: 32px;
  background: url('pics/slider.jpg') no-repeat center;
  background-size: cover;
  border: none;

  cursor: pointer;
}

/* Firefox */
#zoomRange::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  background: url('pics/slider.jpg') no-repeat center center;
  background-size: cover;
  border: none;
  border-radius: 50%;
  display: block;
  box-sizing: border-box;
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
  position: relative;
}



.dual-wrapper {
  display: flex;
  align-items: center; /* 🟢 по вертикали по центру */
  justify-content: center;
  gap: 10px;
}

.dual-wrapper img {
  width: 50%;
  max-width: 50%;
  height: auto;
  object-fit: contain;
}

.dual-wrapper .info-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 5px;
  text-align: center;
  font-size: 0.9em;
  
  
  box-sizing: border-box;
}

.triple-mode .img-label{display:none!important;}
.triple-mode .dual-wrapper img {object-fit:cover!important;}

.info-box hr{width:50%;}



.filter-top-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 10px;
  margin-bottom: 10px;
}

.filter-row-upper,
.filter-row-lower {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filter-row-upper {
  justify-content: flex-start;
}

.filter-row-lower {
  justify-content: flex-start;
  margin-top: 6px;
}

.zoom-control {
 
  min-width: 200px;
}

#amountdiv {
  flex: 0 0 auto;

  white-space: nowrap;
}

.filter-row-upper select,
.filter-row-lower select,
.filter-row-lower button {
  flex: 0 0 auto;
  padding: 4px 10px;
  min-width: 130px;
}

.coin-label {
  display: inline-flex;
  align-items: center;
  gap: 5px; /* расстояние между иконкой и текстом */
  line-height: 1;
}
.coin-icon {
  width: 20px; /* немного меньше, чтобы не сдвигался текст */
  height: 20px;
  object-fit: cover;
  object-position: left center;
  border-radius: 3px;
}




@media (min-width: 1101px) and (max-width: 1366px) {
	
	 .dual-wrapper {
    max-width: 900px; /* или другое значение по факту */
    margin-right: 20px;
  }

  .dual-wrapper img {
    width: 50%;
    max-width: 50%;
    height: auto!important;
  }

  #image-info {
    max-width: 320px;
    margin-left: 40px;
    font-size: 14px;
  }
  #mobile-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .filter-block {
    flex: 1 1 0%;
    min-width: 0;
    box-sizing: border-box;
    order: 1; /* всегда первая */
  }

  .id-input-block,
  .wallet-lookup {
    flex: 0 0 230px;
    box-sizing: border-box;
    order: 2; /* справа */
  }

  .id-input-block {
    margin-left: auto;
    padding-left: 12px;
    padding-right: 12px;
  }

  .wallet-lookup {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Текстовое поле и инпут занимают всю ширину своих 200px блоков */
  .id-input-block textarea,
  .wallet-lookup input {
    width: 100% !important;
  }
  
.filter-solo-block{flex-wrap:nowrap;}
.filter-checkbox-grid{margin-top:25px;}
}

@media (min-width: 768px) and (max-width: 1100px) {
	
	.filter-top-row select, #filter-reset, #union-mode, #amountdiv{
		
		width:auto!important;
	}

  /* Гибкая сетка для верхнего ряда (range, кнопки, select и пр.) */
  .filter-row-upper,
  .filter-row-lower {
    
    
    gap: 10px;
    width: 100%;
  }

  .filter-row-upper > *,
  .filter-row-lower > * {
   
    box-sizing: border-box;
  }

  /* Ползунок – минимум половина */
  .zoom-control {
    grid-column: span 2;
    width: 37%;
    justify-content: center;
    display: flex;
  }

  /* Hits справа, но компактно */
  #amountdiv {
    text-align: center;
    white-space: nowrap;
  }

  /* Парные фильтры – плотная сетка */
  .filter-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    width: 100%;
  }

  .filter-pair {
    border-right: none;
    padding-right: 0;
    width: 100%;
    box-sizing: border-box;
  }

  /* Соло-фильтры – сколько влезет */
  .filter-solo-block {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    width: 100%;
  }

  .filter-solo-block label {
    white-space: nowrap;
  }
}


.select-wrapper {
  position: relative;
  display: inline-block;
  
  border: 2px solid black;
  background: white;
  padding: 0;
  box-sizing: border-box;
}

.select-wrapper select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  width: 100%;
  padding: 4px 36px 5px 12px !important;
  font-size: 14px;
  border: none;
  background: transparent;
  outline: none;
  box-sizing: border-box;
    text-align: center;

}

/* Псевдострелка */
.select-wrapper::after {
  content: '▼';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 12px;
  color: black;
}