html,
body {
  margin: 0;
  padding: 0;
  transition: 0.5s;
  font-family: sans-serif;
  background: var(--nc-bg-1);
  color: var(--nc-tx-1);
}

body {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.title {
  font-size: 50pt;
  font-family: "facon", sans-serif;
  letter-spacing: 3pt;
  text-align: center;
}

.controls {
  text-align: center;
  margin-bottom: 20px;
}

#contain-wrapper {
  display: flex;
  justify-content: center; /* Center all tiles */
}

#contain {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.tile {
  width: 200px;
  text-align: center;
  border: 1px solid var(--nc-tx-1);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--nc-bg-2);
}

.tile:hover {
  background: var(--nc-bg-3);
  font-weight: bold;
}

.tile img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.tile p {
  margin: 5px 0;
}

/* Overlay */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}
.shade {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}
.cont {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100vw - 70px);
  height: calc(100vh - 70px);
  background: var(--nc-bg-3);
  border-radius: 10px;
  text-align: center;
  z-index: 1001;
}
.cont iframe {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  border: 0;
}
.loader {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  border: 16px solid var(--nc-bg-3);
  border-top: 16px solid var(--nc-lk-2);
  border-radius: 50%;
  animation: spin 2s linear infinite;
  transform: translate(-50%, -50%);
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  transition: 0.4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background: white;
  transition: 0.4s;
}
input:checked + .slider {
  background: #2196f3;
}
input:checked + .slider:before {
  transform: translateX(26px);
}
.slider.round {
  border-radius: 34px;
}
.slider.round:before {
  border-radius: 50%;
}

/* Search field container */
#searcher {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 100;
  display: flex;
  align-items: center;
  transition: all 0.3s ease-in-out;
}

/* Search input */
#searchQuery {
  width: 150px;
  padding: 5px 10px;
  font-size: 13pt;
  border: 1px solid var(--nc-tx-2);
  border-radius: 5px;
  background-color: var(--nc-bg-2);
  color: var(--nc-tx-1);
  transition: width 0.3s ease, background-color 0.3s ease;
}

#searchQuery:focus {
  width: 250px;
  outline: none;
  background-color: var(--nc-bg-3);
}

/* Optional: placeholder style */
#searchQuery::placeholder {
  color: var(--nc-tx-2);
  opacity: 0.7;
}
