body {
  background-color: black;
  font-family: "googlesans";
  max-width: 100%;
  overflow-x: hidden;
}

.nav-left {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 200px;
  box-sizing: border-box;
  display: flex;
  justify-content: end;
  align-items: start;
  z-index: 2;
}

.nav-right {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 200px;
  box-sizing: border-box;
  display: flex;
  justify-content: end;
  align-items: start;
  z-index: 3;
  padding: 70px 70px;
}

.nav-btn {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  transition: all 0.3s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.nav-btn:hover {
  cursor: pointer;
}

.nav-icon {
  height: 30px;
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tooltip {
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%) translateY(-5px);
  opacity: 0;
  transition: 0.25s ease;
  pointer-events: none;
  color: black;
  background: white;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 15px;
}

.nav-btn:hover .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.logo {
  height: 90px;
  position: absolute;
  left: 20px;
  top: 30px;
}

.nav-txt {
  font-weight: 900;
  color: #6699ff;
  position: absolute;
  font-size: 20px;
  left: 110px;
  top: 40px;
  letter-spacing: 1px;
}

input[type="search"]::-webkit-search-cancel-button {
  display: none;
  -webkit-appearance: none;
  appearance: none;
}

input[type="search"] {
  appearance: none;
  -webkit-appearance: none;
}

.background-blur {
  height: 200px;
  width: 100%;
  z-index: 1;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  backdrop-filter: blur(10px);
}

.toolbar-section {
  margin-top: 150px;
  min-height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  position: sticky;
  z-index: 2;
  top: 0;
  flex-direction: column;
  top: 50px;
}

.search-bar {
  color: white;
  padding: 15px;
  border-radius: 50px;
  border: 2px solid #6699ff;
  display: flex;
  align-items: center;
  max-width: 500px;
}

.search-bar input {
  background-color: transparent;
  border: none;
  color: white;
  font-family: "googlesans";
  font-size: 15px;
  width: 460px;
  margin-left: 5px;
}

#searchInput:focus {
  outline: none;
}

#searchInput::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.delete-svg {
  height: 20px;
  width: 20px;
}

.clear-search svg {
  display: block;
  margin: auto;
}

.clear-search {
  height: 30px;
  width: 30px;
  border-radius: 50px;
  background-color: #6699ff;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

#clearSearch:hover {
  cursor: pointer;
}

.search-symbol {
  height: 24px;
}

.result-counter {
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.result-counter img {
  height: 24px;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.filter-button {
  font-family: "googlesans";
  background-color: transparent;
  border: 1px solid #6699ff;
  color: #6699ff;
  padding: 10px 15px;
  border-radius: 30px;
  transition: all 0.2s ease;
}

.filter-button:hover {
  border-color: white;
  color: white;
  cursor: pointer;
}

.all-category {
  background-color: #6699ff;
  color: black;
}

.all-category:hover {
  cursor: pointer;
}

.gallery-message {
  height: 300px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: 100;
  position: absolute;
  font-size: 20px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding: 20px;
  box-sizing: border-box;
}

.wallpaper-card {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  background-color: white;
  position: relative;
  aspect-ratio: 16 / 11;
  background: linear-gradient(
    to top right,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.6) 35%,
    rgba(0, 0, 0, 0.2) 65%,
    transparent 100%
  );
}

.wallpaper-card:hover {
  cursor: pointer;
}

.wallpaper-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: all 0.5s ease;
}

.wallpaper-card img:hover {
  transform: scale(1.03);
}

.card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  border-radius: 16px;
  font-family: "googlesans";
  background-color: rgba(255, 255, 255, 0.39);
  backdrop-filter: blur(10px);
  color: white;
}

.detail-dialog {
  position: fixed;
  width: min(1000px, calc(100vw - 32px));
  max-width: none;
  max-height: min(92vh, 1000px);
  padding: 0;
  overflow: auto;
  border: 1px solid #333;
  border-radius: 20px;
  background: #111;
  color: white;
}

.detail-dialog::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
}

.detail-dialog::-webkit-scrollbar {
  display: none;
}

.close-dialog {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.699);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.detail-image-wrap {
  display: grid;
  place-items: center;
  min-height: 180px;
  max-height: 62vh;
  background: #050505;
}

.detail-image-wrap img {
  display: block;
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
}

.detail-content {
  padding: clamp(22px, 4vw, 36px);
}

.detail-category {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
}

.detail-content h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 500;
}

.detail-description {
  max-width: 720px;
  margin: 14px 0 0;
  color: #b7b7b7;
  line-height: 1.7;
  white-space: pre-wrap;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 18px;
  color: #d1d1d1;
  font-size: 14px;
}

.detail-meta p {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
}

.detail-meta-label {
  color: #8e8e8e;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
}

.detail-tag {
  padding: 6px 9px;
  border-radius: 99px;
  background: #242424;
  color: #c9c9c9;
  font-size: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.together {
  display: flex;
  align-items: center;
  height: 30px;
  gap: 10px;
}

@media (max-width: 1350px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 3px;
    margin-top: 50px;
  }
}

@media (max-width: 768px) {
  .background-blur {
    display: none;
  }

  .nav-right {
    height: 100px;
    padding: 20px 15px;
    justify-content: flex-end;
    backdrop-filter: none;
  }

  .nav-left {
    height: 100px;
  }

  .logo {
    height: 45px;
    left: 12px;
    top: 20px;
  }

  .nav-txt {
    font-size: 15px;
    left: 65px;
    top: 18px;
    letter-spacing: 0;
  }

  .nav-btn {
    font-size: 14px;
    padding: 5px;
  }

  .nav-icon {
    height: 23px;
  }

  .tooltip {
    display: none;
  }

  .toolbar-section {
    margin-top: 60px;
    min-height: auto;
    padding: 15px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    top: 60px;
    margin-bottom: -10px;
  }

  .search-bar {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 10px 12px;
    backdrop-filter: blur(10px);
  }

  .search-bar input {
    flex: 1;
    width: 0;
    min-width: 0;
    font-size: 14px;
  }

  .search-symbol {
    height: 20px;
  }

  .clear-search {
    flex-shrink: 0;
    height: 28px;
    width: 28px;
  }

  .result-counter {
    display: none;
  }

  .category-filters {
    display: none;
  }

  .gallery-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 12px;
    padding: 3px;
    margin-top: -40px;
  }

  .wallpaper-card {
    border-radius: 14px;
  }

  .card-category {
    top: 8px;
    left: 8px;
    font-size: 12px;
    padding: 5px 8px;
  }

  .gallery-message {
    font-size: 16px;
    padding: 0 15px;
    box-sizing: border-box;
    text-align: center;
  }

  .detail-dialog {
    width: calc(100vw - 20px);
    max-width: none;
    max-height: 90dvh;
    border-radius: 14px;
  }

  .detail-image-wrap {
    max-height: 45dvh;
  }

  .detail-image-wrap img {
    max-height: 45dvh;
  }

  .detail-content {
    padding: 20px;
  }

  .detail-content h2 {
    font-size: 25px;
  }

  .detail-description {
    font-size: 14px;
    line-height: 1.6;
  }

  .detail-meta {
    gap: 12px 20px;
    font-size: 13px;
  }

  .close-dialog {
    width: 36px;
    height: 36px;
  }
}
