@font-face {
  font-family: Palatino;
  src: url(./assets/font/Palatino.ttc) format("truetype");
}

@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

:root {
  --bg-color: #362208;
  --primary-color: #af8355;
  --bright-yellow: #FFE69D;
  --modal-bg-color: #362208d0;
}


body{
  background-color: #362208;
}

main {
  border-top: 1px solid transparent;
}

.sidebar-container{
  position: fixed;
  /* top: 0; */
  bottom: 0;
  width: 100%;
  height: 8.5rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  /* border: red solid 1px; */
  background-image: linear-gradient(to bottom, #36220800 0%, #362208 0%);
  padding-inline: 3rem ;
}

.logo {
  width: 100%;
  padding-block: 1rem;
  cursor: pointer;
  z-index: 11;
  justify-content: center;
  align-self: center;
  display: flex;
  position: fixed;
  top: 0;
  background-image: linear-gradient(to top, #36220800 0%, #362208 0%);
}

.logo svg{
  align-self: center;
  width: 4rem;
  height: auto;
}

#content{
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  padding-inline: 2rem;
  padding-block: 2rem;
  margin-block: 5rem 10rem;
  img {
    width: 100%;
    height: auto;
  }
}

.hidden {
  display: none;
}

#filters {
  background-color: rgb(0, 0, 0);
  width: 40svw;
  height: 7rem;
  border-radius: 2rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding-inline: 2.5rem;
  padding-block: 1rem ;
  border: #af8355 solid 1px;
  color: #af8355;
  font-family: 'Spectral', serif;
}

label {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  flex-shrink: 0;
  img{
    height: 2rem;
    width: auto;
  }
}

.dot{
  display: block;
  width: 0.5rem;
  height: 0.2rem;
  background-color: #ef9d47;
  border-radius: 3rem;
  opacity: 1;
}


input.gen-filter {
  display: none; 
}

input[type="checkbox"]:not(:checked) ~ img {
  color: grey;
  opacity: 0.5;
}

input[type="checkbox"]:not(:checked) ~ p {
  color: grey;
  opacity: 0.5;
}

input[type="checkbox"]:not(:checked) ~ .dot {
  opacity: 0;
}

.search-logo{
  /* border: red solid 1px; */
  width: 7rem;
  height: 4rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.search-logo svg {
  cursor: pointer;
}

.gen5-item {
  width: 3rem;
  height: 2rem;
  flex-shrink: 0;
  background-color: #00000000;
  border: 1px dashed #af8355;
  border-radius: 50%;
}

.search-container {
  position: fixed;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  z-index: 5;
  /* border: red solid 1px; */
  background-color: #1a110400;
  /* backdrop-filter: blur(10px); */
  /* -webkit-backdrop-filter: blur(10px); */
  display: none;
}

.search-wrapper {
  width: 50%;
  height: 4rem;
  padding: 1rem 2rem;         
  background-color: #1a1104;  
  border: 1.5px solid #af8355;  
  box-shadow: 0 0 1rem #2b16009b;
  border-radius: 10rem;        
  color: #af8355;            
  font-family: 'Spectral', serif;
  font-size: 1.5rem;
  outline: none; 
  display: flex;
  align-items: center;
  justify-content: space-between; 
  svg {
    cursor: pointer;
  }           
}

.search-container-active {
  display: flex;
}

.fav-wrapper {
  /* border: red solid 1px; */
  height: 6rem;
  top: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.fav-window {
  width: 7rem;
  height: 80%;
  border-radius: 0.5rem;
  background-color: #362208;
  border: var(--bright-yellow) solid 0.16rem;
  overflow: hidden;
  transform-origin: bottom right;
  transition: all 0.3s ease;
  display: relative;
  p{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--bright-yellow);
    background-color: var(--modal-bg-color);
    border: 0.005px solid var(--bright-yellow);
    font-family: 'Spectral', serif;
    padding: 0.06rem 0.12rem;
    box-sizing: border-box;
    border-radius: 0.5rem;
    font-size: 0.15rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
}

.fav-window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* border-radius: 1rem; */
}


.image-wrapper * {
  cursor: pointer;
}

#notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 16rem;
  height: 7rem;
  border-radius: 1rem;
  pointer-events: none;
  li{
    color: var(--bright-yellow);
    background-color: var(--modal-bg-color);
    border: var(--bright-yellow) solid 1px;
    position: absolute;
    font-family: 'Spectral', serif;
    font-size: 1.8rem;
    border-radius: 1rem;
    padding-inline: 1rem;
    transform: translate(0,2rem);
    opacity: 0;
    transition: all 0.5s ease;
  }
}


#notification li.active {
  opacity: 1;
  transform: translate(0,0rem);
}


#modal {
  padding: 20px;
  /* border: 1px solid #ff0000; */
  z-index: 10;
  width: 100svw;
  height: 100svh;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw; /* 或者 100% */
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  &::backdrop {
    background-color: var(--modal-bg-color);
    backdrop-filter: blur(100px);
    -webkit-backdrop-filter: blur(100px);
  }
}

#modal[open] {
  display: flex;
  justify-content: center;
  align-items: center;
}


.modal-content {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 80%;
  font-family: 'Spectral', serif;
  color: var(--bright-yellow);
  img{
    max-width: 68%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
  }
}

.modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 6rem;
  width: 20%;
  font-size: 1.2rem;
  button{
    cursor: pointer;
  }
}

#modal-caption {
  width: 20%;
  font-size: 1rem;
  text-align: center;
}

#close-modal {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
}

.fav-btn {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
  p{
    text-align: center;
  }
}

.saved {
  fill: var(--bright-yellow);
}

@media (hover: hover) {
  .fav-window:hover {
    transform: scale(9);
  }

  .fav-window:hover p {
    opacity: 1;
  }
}

@media screen and (width <= 1000px) {
  #content {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (width <= 600px) {
  #content {
    grid-template-columns: repeat(1, 1fr);
    padding-inline: 1rem;
    padding-block: 0rem;
  }
  .sidebar-container{
    padding-inline: 1rem ;
    height: 6rem;
  }

  .logo svg{
    align-self: center;
    width: 3rem;
    height: auto;
  }

  .search-logo{
    width: 3rem;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .search-logo svg{
    width: 1.2rem;
    height: auto;
  }

  .fav-wrapper{
    height: auto;
  }

  .fav-window {
    width: 3rem;
    height: 3rem;
    border: var(--bright-yellow) solid 0.1rem;
  }

  #filters {
    width: 63dvw;
    height: 4rem;
    padding-inline: 1.5rem;
  }

  label {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    img{
      height: 1.2rem;
      width: auto;
    }
    p{
      display: none;
    }
    .dot{
      flex-shrink: 0;
      width: 0.5rem;
      height: 0.1rem;
    }
  }

  .gen5-item {
    height: 1.2rem;
    width: 1.8rem;
  }

  .search-wrapper {
    width: 90%;
    height: 3.5rem;
    padding: 1rem 2rem;         
    background-color: #1a1104;  
    border: 1px solid #af8355;  
    border-radius: 10rem;        
    color: #af8355;            
    font-family: 'Spectral', serif;
    font-size: 1.2rem;
    outline: none; 
    display: flex;
    align-items: center;
    justify-content: space-between; 
    svg {
      cursor: pointer;
      width: 1.2rem;
    }           
  }

  #notification li{
    font-size: 1.2rem;
    border-radius: 1rem;
    padding-inline: 0.6rem;
  }

  .modal-content{
    flex-direction: column-reverse;
    justify-content: space-between;
    align-items: center;
    height: 75%;
    width: 90%;
     img{
      max-width: 100%;
      max-height: 80vh;
    }
  }
  .modal-buttons{
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 70%;
    gap: 4rem;
  }

  #modal-caption {
    width: 70%;
  } 

}

