html {
  --dark-gray: rgb(90, 90, 90);
  --light-gray: rgb(148, 148, 148);
  --focus-blue: rgb(69, 159, 189);
}
body {
  font-family: "IBM Plex Sans Condensed", sans-serif;
  text-align: center;
  background-color: #f4f4f4;
}
.controls {
  margin: 20px;
}
.category {
  width: 40px;
  height: auto;
  cursor: pointer;
  transition: transform 0.3s;
  background: white;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 6px;
  margin: 0 10px;
}
.category:hover {
  transform: scale(1.05);
}
.gallery {
  display: grid;
  grid-template-columns: repeat(6, 200px);
  gap: 10px;
  justify-content: flex-start;
  max-width: 1220px;
  margin: 0 auto;
}
.card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s;
}
.card:hover {
  transform: scale(1.05);
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}
.popup img {
  max-width: 80%;
  max-height: 80%;
}
.popup.show {
  display: flex;
}
.title {
  background-color: #eeeeee;
}
.searchbox {
  --target-size: 48px; /* https://web.dev/accessible-tap-targets/ */
  --box-height: var(--target-size);
  --border-radius: calc(var(--box-height) / 2);
  --border-width: 2px;
  --icon-size: calc(var(--box-height) * 3 / 4);
  --side-margin: calc(var(--border-radius) / 2);
  --icon-vertical-margin: calc((var(--box-height) - var(--icon-size)) / 2);
}

/* shaping the box */
.searchbox {
  height: var(--box-height);
  max-width: 561px; /* to follow the search box of google.com */
}
.searchbox input[type="search"] {
  border: var(--border-width) solid var(--dark-gray);
  border-radius: var(--border-radius);
  height: 100%;
  width: 100%;
}

/* Styling each component */
.searchbox svg {
  fill: var(--dark-gray);
  height: var(--icon-size);
  width: var(--icon-size);
}
.searchbox input[type="search"] {
  -webkit-appearance: none; /* to prevent Safari from ignoring font-size */
  color: var(--dark-gray);
  font-family: "Noto Sans", Verdana, sans-serif;
  font-size: 1rem;
}
.searchbox input[type="search"]::placeholder {
  color: var(--light-gray);
  opacity: 1; /* to override the default of Firefox */
}

/* positioning inner elements */
.searchbox {
  position: relative;
}
.searchbox svg {
  position: absolute;
  left: var(--side-margin);
  top: var(--icon-vertical-margin);
  bottom: var(--icon-vertical-margin);
}
.searchbox input[type="search"] {
  padding-left: calc(var(--side-margin) + var(--icon-size) + 4px);
  padding-right: var(--side-margin);
}
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none; /* Remove the left padding inside the box for Safari; see https://github.com/filipelinhares/ress/blob/master/ress.css */
}

/* Ensuring that tapping the icon focuses the search box */
.searchbox svg {
  z-index: -1;
}
.searchbox input[type="search"] {
  background: transparent;
}

/* Styling focus state */
.searchbox input[type="search"]:focus {
  border-color: var(--focus-blue);
  box-shadow: 0px 0px 5px var(--focus-blue);
  outline: 1px solid transparent; /* fallback for forced color modes; see https://www.sarasoueidan.com/blog/focus-indicators/#tips-for-styling-focus-indicators */
  /* it also removes the default focus ring imposed by browsers */
}

/* Custom-style the delete button that appears once the user enters text (Chrome and Safari only); see https://css-tricks.com/webkit-html5-search-inputs/#aa-styling-search-graphical-widgets */
.searchbox input[type="search"]::-webkit-search-cancel-button {
  /* Remove default */
  -webkit-appearance: none;
  /* Now your own custom styles */
  background-image: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgb(148, 148, 148)' %3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z' /%3E%3C/svg%3E%0A");
  height: calc(var(--box-height) / 2);
  width: calc(var(--box-height) / 2);
}

input[type="search"] {
  -webkit-tap-highlight-color: transparent; /* Otherwise, tapping will show a flash of grey background on iOS Safari; see https://twitter.com/masa_kudamatsu/status/1429387005658468356 */
}

.search-panel {
  width: auto;
  margin: 24px auto;
}

body .searchbox {
  margin: 0 auto;
}