/* Base card styling */
/* Item cards */
.item-card {
  background: linear-gradient(145deg, #05374a, #260220); /* Futuristic dark blue gradient */
  border: 2px solid #196875; /* Neon blue border for a tech-inspired look */
  box-shadow: 0 4px 15px rgba(58, 13, 111, 0.5); /* Neon blue glow */
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.2, 1, 0.3, 1);
  cursor: pointer;
  height: auto;
  position: relative;
  padding: 0px;
  animation: fadeIn 0.5s ease-in-out;
}

.item-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1), 0 0 15px rgba(191, 0, 255, 0.377);
}

.item-image-container {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
  background-color: #1a1a1a;
  border-bottom: 1px solid rgba(0, 210, 255, 0.3); /* Subtle neon divider */
}

.item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  filter: brightness(1.05) contrast(1.05);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.item-content {
  padding: 15px;
}

.item-content h3 {
  margin: 0 0 10px 0;
  color: #ffffff;
  font-size: 1.2em;
}

.item-content p {
  margin: 8px 0;
  color: #cccccc;
  font-size: 0.9em;
  line-height: 1.4;
}

.item-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.8em;
  color: #888888;
}

.item-card:hover .item-image {
  transform: scale(1.03);
}

/* Book cards */
.book-card {
  height: auto;
  min-height: 100px;
  margin-bottom: 15px;
  display: flex;
  background: linear-gradient(145deg, #261403 0%, #40241e 100%); /* Dark, leather-inspired gradient */
  border: 2px solid #b08d57; 
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Subtle, deep shadow for depth */
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 10px;
  animation: fadeIn 0.5s ease-in-out;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1), 0 0 15px rgba(255, 174, 0, 0.377);
}

/* Movie cards - initially based on book card styling */
.movie-card {
  height: auto;
  min-height: 100px;
  margin-bottom: 15px;
  display: flex;
  background: linear-gradient(145deg, #2d2d2d 0%, #252525 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  padding-bottom: 10px;
  padding-top: 10px;
  padding-left: 10px;
  border: 2px solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  background-image: linear-gradient(145deg, #000, #4b0d0d),
    linear-gradient(45deg, #9b4d5f, #c1a8a8);
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1), 0 0 15px rgba(255, 0, 0, 0.377);
}

.tvshow-card {
  height: auto;
  min-height: 100px;
  margin-bottom: 15px;
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 10px;
  animation: fadeIn 0.5s ease-in-out;

  /* Metallic/tech gradient with blue accent */
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  background-clip: padding-box, border-box;
  background-origin: padding-box;
  background-image: linear-gradient(145deg, #000409, #04214e),
    linear-gradient(45deg, #878a98, #28717b);

  /* Subtle screen glow effect */
  position: relative;
}

.tvshow-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1), 0 0 15px rgba(13, 13, 198, 0.71);
}

/* Image containers for different media types */
.book-image-container {
  width: 170px;
  min-width: 170px;
  height: auto;
  position: relative;
  overflow: hidden;
  background-color: #1a1a1a;
  border: 4px solid #b08d57; /* Matching golden border */
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.movie-image-container {
  width: 170px;
  min-width: 170px;
  height: auto;
  position: relative;
  overflow: hidden;
  background-color: #1a1a1a;
  border: 4px solid rgba(255, 255, 255, 0.927);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.tvshow-image-container {
  width: 170px;
  min-width: 170px;
  height: auto;
  position: relative;
  overflow: hidden;
  background-color: #0a1a2f;
  border: 4px solid #3d5afe8a;
  box-shadow: 0 0 8px rgba(61, 90, 254, 0.5), inset 0 0 5px rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease;
}

.tvshow-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0) 0px,
    rgba(255, 255, 255, 0) 3px,
    rgba(255, 255, 255, 0.03) 3px,
    rgba(255, 255, 255, 0.03) 6px
  );
  pointer-events: none;
  z-index: 1;
}

.tvshow-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  box-shadow: inset 0 0 15px rgba(61, 90, 254, 0.2);
  pointer-events: none;
  border-radius: 6px;
}

.book-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px 0 0 8px;
  display: block;
  transition: transform 0.5s ease;
}

.movie-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px 0 0 8px;
  display: block;
  transition: transform 0.5s ease;
}

.tvshow-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px 0 0 8px;
  display: block;
  transition: transform 0.5s ease;
}

.book-card:hover .book-image,
.movie-card:hover .movie-image,
.tvshow-card:hover .tvshow-image {
  transform: scale(1.03);
}

.book-content,
.movie-content,
.tvshow-content {
  flex: 1;
  padding: 15px;
  padding-bottom: 35px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.book-content h3,
.movie-content h3,
.tvshow-content h3 {
  margin: 0 0 5px 0;
  color: #ffffff;
  font-size: 1.2em;
}

.book-author,
.movie-creator,
.tvshow-creator {
  color: #888;
  font-size: 0.9em;
  margin-bottom: 10px;
}

.book-content p {
  margin: 8px 0;
  color: #cccccc;
  font-size: 0.9em;
  line-height: 1.4;
}

.book-meta {
  margin-bottom: 25px;
}

/* Description styling */
.description-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.description {
  margin: 8px 0;
  color: #cccccc;
  font-size: 0.9em;
  line-height: 1.4;
}

.description.truncated {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.description.expanded {
  max-height: 200px;
  overflow-y: auto;
  padding-right: 10px;
}

.meta-container {
  margin-top: auto;
}

.book-meta span,
.item-meta span,
.movie-meta span,
.tvshow-meta span {
  display: block;
  margin-bottom: 6px;
  color: #cccccc;
}

.book-meta span strong,
.item-meta span strong,
.movie-meta span strong,
.tvshow-meta span strong {
  color: #888;
  font-weight: normal;
  margin-right: 5px;
}

.book-meta.truncated,
.movie-meta.truncated,
.tvshow-meta.truncated {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0;
}

.book-meta.span {
  display: inline-block;
  margin-right: 15px;
}

/* More button styling */
.more-button {
  position: absolute;
  bottom: 8px;
  right: 15px;
  z-index: 2;
  background: #3a3a3a;
  border: none;
  color: #ffffff;
  padding: 5px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background-color 0.2s;
  display: none;
}