/* Discover page main container */

#discover {
    display: flex;
    flex-direction: column;
    width: 60%;
}

.discover {
  display: inherit;
  flex-direction: row;
  flex-wrap: wrap;
  overflow-y: scroll;
  justify-content: center;
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* Internet Explorer 10+ */
  gap: 1em;
}

.discover::-webkit-scrollbar {
  display: none;               /* Chrome, Safari, Opera */
}

.discover-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: bolder;
  font-size: 2.3em;
}

.discover-subtitle {
  font-size: 1.3em;
  margin-bottom: 1em;
}

/* Styling for each individual discover preview card */
.discover-preview {
  cursor: pointer;
  background-color: var(--sidebar, #eee);
  width: 1.7in;
  height: 2.3in;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease-in-out;
  font-size: 1.15em;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

/* Hover effect for discover previews */
.discover-preview:hover {
  transform: translateY(-5px); /* Lift card slightly on hover */
}

/* Styling for the creator's info section */
.creator-info {
  display: flex;
  align-items: center;
  padding: 10px 10px 5px 10px;
  gap: 0.5em;
}

/* Styling for the creator's profile picture */
.creator-info img {
  width: 28px;
  height: 28px;
  border-radius: 50%; /* Make image circular */
  margin-right: 6px; /* Space between image and name */
  object-fit: cover; /* Ensure image covers the area without distortion */
  border-block: 1px solid var(--accent, #eee);
}

/* Styling for the creator's display name */
.creator-info .display-name {
  font-weight: bold; /* Bold text */
  color: var(--text, #eee);
  font-size: 0.98em;
  max-width: 7em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}

.discover-content {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* Styling for the main discover content image */
.discover-content img,
.discover-content video {
  width: 100%; /* Image takes full width of its container */
  height: 100%; /* Fixed height for the content image */
  object-fit: cover; /* Ensure image covers the area without distortion */
  display: block; /* Remove extra space below image */
  border-block: 1px solid var(--accent, #eee);
}

.discover-video {
  background: var(--sidebar);
}

/* Styling for the discover description */
.discover-description {
  padding: 15px; /* Padding around description text */
  color: var(--text, #eee);
  font-size: 1em;
  line-height: 1.5; /* Improved readability for text */
  flex-grow: 1; /* Allows description to take up available space */
  word-wrap: break-word; /* Ensures long words break to prevent overflow */
  display: -webkit-box;
  display: box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: calc(1em * 1.5 * 2);
}

.discover-text-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  max-height: 7em;
  line-height: 1.3;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.discover-text-media::-webkit-scrollbar {
  display: none;
}

.discover-text-large { font-size: 32px; text-align: center; padding: 0 1em; }
.discover-text-med { font-size: 20px; text-align: center; padding: 0 2em; }
.discover-text-smol {font-size: 15px; text-align: left; padding: 0 1em; }

/* Responsive adjustments for smaller screens */
@media screen and (max-width: 1199px) and (orientation: portrait){
  #discover {
    width: 100vw;
    min-width: 0;
    padding: 0;
    background: var(--background);
  }
}

@media screen and (max-width: 499px) and (orientation: portrait){
  .discover-title {
    margin: 0 10px;
    font-size: 2em;
  }

  .discover-subtitle {
    margin: 0 0 1em 0.6em;
    font-size: 18px;
  }

  .discover {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5em;
    padding: 0 2vw;
  }
  .discover-preview {
    width: 40vw;
    min-width: 120px;
    height: 2.1in;
    font-size: 1em;
    margin: 0.5vw;
    box-sizing: border-box;
  }
  #discover {
    width: 100vw;
    min-width: 0;
    padding: 0;
  }
  body {
    padding: 0;
    margin: 0;
  }
}