/* General Layout */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: auto; /* Allow scrolling only when content overflows */
}

body {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: Arial, sans-serif;
  color: #f0e6d2;
  text-align: center;
  padding: 1rem;
  box-sizing: border-box; /* Ensure padding doesn't affect layout */
  backdrop-filter: blur(3px); /* Apply a slight blur effect */
  -webkit-backdrop-filter: blur(3px); /* For Safari support */
}

/* Title */
h1 {
  color: #C89B3C;
  font-family: 'Beaufort for LOL', serif;
  font-size: 5.3rem;
  margin-bottom: 1.5rem;
}

.title-wrapper {
  text-align: center;
  width: 100%;
}

#typing-title {
  font-size: 5.3rem;
  font-family: 'Beaufort for LOL', serif;
  color: #C89B3C;
  white-space: nowrap;
  border-right: 2px solid #C89B3C;
  display: inline-block;
  overflow: hidden;
}


/* Controls */
.controls {
  display: flex; /* Enable flexbox */
  justify-content: center; /* Center buttons horizontally */
  gap: 1rem; /* Add spacing between buttons */
  margin: 0; /* Remove any default margin */
  padding-bottom: 20px;
}

button,
select,
#searchInput {
  font-weight: bold;
  padding: 0.5rem 1rem;
  margin: 0.25rem;
  width: 140px;
  height: 42px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: 'Spiegel Bold', sans-serif;
  font-size: 16px;
}


#randomBtn {
  background-color: #C89B3C;
  color: #010A13;
}

#randomBtn:hover {
  background-color: #95742d; /* Gold color */
  color: #010A13; /* Dark text */
  transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition */
}

 

#roleFilter {
  background-color: #C89B3C;
  color: #010A13;
}

/* Card Container */
#card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* Card Style */
.card {
  width: 256px;
  height: 480px;
  perspective: 1000px;
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for scaling and shadow */
}

.card:hover {
  transform: scale(1.03); /* Slightly increase the size */
}

.card:hover .portrait {
  transition: transform 0.3s ease; /* Smooth transition for the scaling effect */
}

.portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 0.3s ease; /* Ensure smooth scaling */
}

.card.flipped {
  transform: none; /* Reset to original size */
}

.card.flipped:hover {
  transform: scale(1.03); /* Apply hover effect again */
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s ease;
  transform-style: preserve-3d;
}

.card.flipped .card-inner {
  transform: rotateY(180deg); /* Flip the card */
}


.card-front,
.card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  backface-visibility: hidden;
  border-radius: 5px;
  overflow: hidden;
  background-color: #1c1c1c;
  border: 2px solid #c89b3c;
}

.card-back{
  overflow-y: scroll;
  scrollbar-color: #c89b3c #1c1c1c;
  scrollbar-width: thin;
  z-index: 2;
}
/* Front */
.card-front {
  z-index: 2;
}

.portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.card-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 1rem 0;
  background: linear-gradient(to top, rgba(1, 10, 19, 0.9), transparent);
  z-index: 2;
}

.card-footer h2 {
  margin: 0;
  font-size: 1.5rem;
  font-family: 'Beaufort for LOL', serif;
  color: #f0e6d2;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

.card-footer p {
  margin: 0;
  font-size: 1.2rem;
  font-style: italic;
  color: #a09b8c;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

.top-icons {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.top-icons img {
  width: 32px;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 4px;
  border-radius: 4px;
}

/* Back */
.card-back {
  transform: rotateY(180deg);
  padding: 1rem;
  text-align: left;
  overflow-y: auto;
}

#searchToggleBtn {
  background-color: #0AC8B9;
  color: #010A13;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#searchToggleBtn:hover {
  background-color: #09a699;
}

#searchInput {
  background-color: #0AC8B9;
  color: #ffffff;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
  margin-bottom: 20px;
  width: 256px; /* Adjust width as needed */
  height: 42px; /* Explicitly set height to match other buttons */
  outline: none;
  display: inline-block;
  box-sizing: border-box; /* Ensure padding doesn't affect height */

}

#searchInput:focus {
  height: 42px; /* Ensure height remains consistent when focused */
  width: 256px;
}

#searchInput::placeholder {
  color: #000000; /* Light gray color for the placeholder text */
}


.custom-dropdown {
  position: relative;
  display: inline-block;
  font-family: 'Spiegel Bold', sans-serif;
  margin: 0.25rem;
}

.dropdown-selected {
  background-color: #A09B8C;
  color: #010A13;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  height: 42px;
  min-width: 140px;
  box-sizing: border-box;
  align-content: center;
}

.dropdown-selected:hover {
  background-color: #747166; /* Gold color */
  color: #010A13; /* Dark text */
  transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition */
}

.dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: #010A13;
  border: 2px solid #C89B3C;
  border-top: none;
  border-radius: 0 0 5px 5px;
  overflow: hidden;
  z-index: 1000;
  display: none;
  box-sizing: border-box;
}

/* Remove bullets and set spacing */
.dropdown-options li {
  list-style: none; /* ⛔ removes bullets */
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: #F0E6D2;
  background-color: #010A13;
  font-size: 1rem;
}

/* Gold hover */
.dropdown-options li:hover {
  background-color: #C89B3C;
  color: #010A13;
}

@media (max-width: 560px) {
  .controls {
    flex-direction: column; /* Stack buttons vertically */
    align-items: center; /* Center buttons horizontally */
    gap: 1rem; /* Add spacing between buttons */
  }

  #typing-title {
    font-size: 4rem; /* Make the title smaller */
    margin-top: 0.5rem; /* Reduce space above the title */
  }
}

@media (max-width: 430px) {

  .controls {
      flex-direction: column; /* Stack buttons vertically */
      align-items: center; /* Center buttons horizontally */
      gap: 1rem; /* Add spacing between buttons */
    }
  
    #typing-title {
      font-size: 3rem; /* Make the title smaller */
    }
  
  }
