* {
  box-sizing: border-box;
  font-family: "Verdana";
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: rgb(9, 10, 10);
}

.main-header {
  background-color: rgba(0, 0, 0, 0.5);
  padding-bottom: 10px;
}

.title {
  text-align: center;
  margin: 0;
  font-family: "Bungee", sans-serif;
  font-size: 5em;
  font-weight: normal;
  color: white;
}

.description-text {
  text-align: center;
  color: white;
  font-size: 3em;
  padding: 50px;
  background-image: url("images/many.avif");
  background-color: rgba(0, 0, 0, 0.5);
  background-size: cover;
  background-position: center;
  background-blend-mode: overlay;
  background-attachment: fixed;
  line-height: 1.5;
}

#card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

#anime-cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

.card {
  width: 300px;
  height: 500px;
  border: 1px solid #ccc;
  background-color: #111010;
  border-radius: 20px;
  border-color: rgb(9, 10, 10);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 5px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.card:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 5px solid rgb(247, 58, 0);
  z-index: 10;
}

.card.flipped {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  backface-visibility: hidden;
}

.card-front img {
  width: 100%;
  height: 430px;
  object-fit: cover;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.card-front video {
  width: 100%;
  height: 430px;
  object-fit: cover;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  position: absolute;
  top: 0;
  left: 0;
  backface-visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover .card-front video {
  opacity: 0.75;
}

.card-back {
  border-radius: 20px;
  background-color: #111010;
  padding: 20px;
  transform: rotateY(180deg);
}

.card-content {
  justify-content: center;
  text-align: center;
  color: #ffffff;
}

.card-content .genre,
.card-content .studio,
.card-content .rating,
.card-content .year {
  margin-bottom: 10px;
}

.card-content .description {
  font-size: 25px;
  margin-top: 60px;
}

.card-content h2 {
  text-align: left;
  padding: 10px;
  margin: 1.5px;
  font-size: clamp(14px, 2.5vw, 20px);
  line-height: 1.2;
}

.footer {
  display: flex;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 10px;
}

button {
  text-align: center;
  background-color: #666;
  border: none;
  padding-left: 10px;
  padding-right: 10px;
  height: 40px;
  border-radius: 10px;
  color: white;
  font-size: 22px;
  cursor: pointer;
  margin: 5px;
}

ul {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
}

.search-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px;
}

#searchInput {
  width: clamp(300px, 50vw, 500px);
  height: clamp(50px, 6vh, 60px);
  padding: 10px;
  background-color: #111010;
  border-radius: 10px;
  border: 1px solid #111010;
  font-size: 1rem;
  color: white;
  margin-right: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

#searchInput:focus {
  outline: none;
  border-bottom: 2px solid rgb(247, 58, 0);
  box-shadow: none;
}

.filter-panel {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 15px;
  margin-top: 10px;
  transition: max-height 0.3s ease;
  overflow: hidden;
}

.hidden {
  max-height: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.filter-group {
  position: relative;
  display: flex;
  flex-direction: column;
  font-size: 20px;
  color: white;
  margin: 0 5px;
  gap: 10px;
}

.filter-group select {
  background-color: #111010;
  border: none;
  padding: 0 20px;
  height: clamp(40px, 3vh, 40px);
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.filter-group select:focus {
  outline: none;
}

#filterButton {
  background-color: #111010;
  border: none;
  padding: 0 20px;
  height: clamp(50px, 6vh, 60px);
  border-radius: 10px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

#filterButton:hover {
  color: rgb(247, 58, 0);
}

#noResults {
  font-size: 1.5rem;
  color: white;
  text-align: center;
  margin-top: 20px;
  font-weight: bold;
  padding: 10px;
}

.link {
  font-size: 1.5rem;
  text-decoration: none;
  font-weight: bold;
  color: inherit;
  margin-top: 50px;
  display: inline-block;
}

.link:hover {
  color: rgb(54, 0, 247);
}
