body {
  background: #323233;
}

.story-container {

}

@media  (max-width: 430px) {
  .story-progress-bar {
    margin-top: 1rem;
    display: flex; /* Arrange segments in a single row */
    justify-content: space-between; /* Add equal spacing between segments */
    align-items: center;
    flex-wrap: nowrap; /* Prevent segments from wrapping to a new row */
    width: 100%; /* Full width of the container */
    height: 5px; /* Adjust height as needed */
    position: relative;
  }

  .story-content, .video-content {
    margin-top: 3.2rem;
    position: relative; /* Ensure proper positioning for child elements */
    width: 100%; /* Full width of the container */
    height: 80vh; /* 80% of the screen height */
    overflow: hidden; /* Hide overflow if the image exceeds the container */
    display: flex; /* Center the image horizontally and vertically */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
  }

  .story-image, .video-content video {
    width: 100%; /* Image takes 96% of the container's width */
    height: 100%; /* Maintain aspect ratio */
    max-height: 100%; /* Ensure it doesn't exceed the container's height */
    object-fit: cover; /* Maintain aspect ratio and fill the container */
  }

  .close-button {
    position: fixed;
    top: 1.5rem;
    right: 0;
    z-index: 1000;
    color: white;
    font-size: 3rem;
    cursor: pointer;
  }

  .story-sidebar {
    position: absolute;
    right: 15px;
    top: 45%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 20;
  }

  .icon-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .arrow-icon, .pause-icon, .play-icon {
    color: white;
    width: 24px;
    height: 2px;
    font-size: 30px;
  }

  .play-icon, .pause-icon {
    margin-left: 5px;
  }

  .arrow-icon:last-child {
    margin: 20px 0 20px;
  }

  .profile-thumbnail {
    margin-left: 10px;
    width: 100px; /* Circle diameter */
    height: 100px; /* Circle diameter */
    border-radius: 50%; /* Circular shape */
    overflow: hidden; /* Clip image outside the circle */
    border: 2px solid white; /* White border */
    position: relative; /* Enable proper positioning for the image */
  }

  .video-player video {
    max-width: 100%;
    max-height: 70vh; /* Pas plus haut que 70% de la hauteur écran */
    object-fit: contain; /* Affiche toute la vidéo sans la couper */
    display: block;
  }

  .profile-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    margin: 0;
  }

  .story-footer {
    position: absolute;
    bottom: 15px;
    left: 0;
    z-index: 20;
    color: white;
    font-size: 25px;
    padding: 10px; /* Optional: Add padding for better spacing */
  }

  .username, .username-video {
    font-weight: bold;
  }

  .username-link, .username-link-video {
    text-decoration: none;
    color: #ab65ff !important;
    font-weight: bolder;
    text-align: center;
    background: #00000070;
    padding: 0px 10px 4px;
    border-radius: 4px;
  }

  .date-creation {
    position: fixed;
    top: 2.4rem;
    left: 30%;
    z-index: 1000;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
  }

  .gender-label {
    position: fixed;
    top: 2.4rem;
    left: 2%;
    z-index: 1000;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    padding: 2px 5px;
    width: 100px; /* Fixed width */
    text-align: center; /* Center the text */
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden; /* Hide overflowing text */
    text-overflow: ellipsis; /* Add ellipsis if text is too long */
  }

  /* segment posts */
  .segment {
    flex: 1; /* Ensure equal width for all segments */
    height: 100%; /* Match the height of the progress bar */
    background-color: rgba(255, 255, 255, 0.3); /* Inactive segment color */
    margin: 0 6px; /* Add space between segments */
    border-radius: 2px; /* Optional rounded corners */
  }

  /* Active Segment */
  .segment.active {
    background-color: white; /* Highlight the active segment */
    animation: fill-segment 5s linear; /* Optional animation */
  }

  /* Optional Animation */
  @keyframes fill-segment {
    from {
      width: 0%;
    }
    to {
      width: 100%;
    }
  }

  /* Description */
  .description {
    display: flex;
    font-size: 20px;
    padding: 5px;
    color: white;
  }

  .description-text {
    margin-left: 10px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    /*white-space: nowrap;*/
  }
}

@media  (min-width: 430px) {
  .story-progress-bar {
    margin-top: 1rem;
    display: flex; /* Arrange segments in a single row */
    justify-content: space-between; /* Add equal spacing between segments */
    align-items: center;
    flex-wrap: nowrap; /* Prevent segments from wrapping to a new row */
    width: 100%; /* Full width of the container */
    height: 5px; /* Adjust height as needed */
    position: relative;
  }

  .story-content, .video-content {
    margin-top: 3.2rem;
    position: relative; /* Ensure proper positioning for child elements */
    width: 100%; /* Full width of the container */
    height: 70vh; /* 80% of the screen height */
    overflow: hidden; /* Hide overflow if the image exceeds the container */
    display: flex; /* Center the image horizontally and vertically */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
  }

  .story-image, .video-content video {
    width: 100%; /* Image takes 96% of the container's width */
    height: 100%; /* Maintain aspect ratio */
    max-height: 100%; /* Ensure it doesn't exceed the container's height */
    object-fit: cover; /* Maintain aspect ratio and fill the container */
  }

  .close-button {
    position: fixed;
    top: 1.5rem;
    right: 0;
    z-index: 1000;
    color: white;
    font-size: 3rem;
    cursor: pointer;
  }

  .story-sidebar {
    position: absolute;
    right: 15px;
    top: 45%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 20;
  }

  .icon-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .arrow-icon, .pause-icon, .play-icon {
    color: white;
    width: 24px;
    height: 2px;
    font-size: 30px;
  }

  .play-icon, .pause-icon {
    margin-left: 5px;
  }

  .arrow-icon:last-child {
    margin: 20px 0 20px;
  }

  .profile-thumbnail {
    margin-left: 10px;
    width: 100px; /* Circle diameter */
    height: 100px; /* Circle diameter */
    border-radius: 50%; /* Circular shape */
    overflow: hidden; /* Clip image outside the circle */
    border: 2px solid white; /* White border */
    position: relative; /* Enable proper positioning for the image */
  }

  .profile-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    margin: 0;
  }

  .story-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 999999;
    color: white;
    font-size: 25px;
    padding: 10px;
    width: 100%;
    text-align: center;
  }

  .username, .username-video {
    font-weight: bold;
  }

  .username-link, .username-link-video {
    text-decoration: none;
    color: #ab65ff !important;
    font-weight: bolder;
    text-align: center;
    background: #00000070;
    padding: 0px 10px 4px;
    border-radius: 4px;
  }

  .date-creation {
    position: fixed;
    top: 2.4rem;
    left: 30%;
    z-index: 1000;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
  }

  .gender-label {
    position: fixed;
    top: 2.4rem;
    left: 2%;
    z-index: 1000;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    padding: 2px 5px;
    width: 100px; /* Fixed width */
    text-align: center; /* Center the text */
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden; /* Hide overflowing text */
    text-overflow: ellipsis; /* Add ellipsis if text is too long */
  }

  /* segment posts */
  .segment {
    flex: 1; /* Ensure equal width for all segments */
    height: 100%; /* Match the height of the progress bar */
    background-color: rgba(255, 255, 255, 0.3); /* Inactive segment color */
    margin: 0 6px; /* Add space between segments */
    border-radius: 2px; /* Optional rounded corners */
  }

  /* Active Segment */
  .segment.active {
    background-color: white; /* Highlight the active segment */
    animation: fill-segment 5s linear; /* Optional animation */
  }

  /* Optional Animation */
  @keyframes fill-segment {
    from {
      width: 0%;
    }
    to {
      width: 100%;
    }
  }

  /* Description */
  .description {
    display: block;
    font-size: 20px;
    padding: 5px;
    color: white;
  }

  .description-text {
    margin-left: 10px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
  }
}

.gender-label[data-gender="femme"] {
  background-color: #FF69B4; /* Pink for femme */
}

.gender-label[data-gender="homme"] {
  background-color: #1E90FF; /* Blue for homme */
}

.gender-label[data-gender="trans"] {
  background-color: #9400D3; /* Purple for trans */
}

@media (min-width: 800px) {
  .story-progress-bar {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    width: 80%; /* Reduce width slightly for better alignment on large screens */
    height: 10px; /* Increase height slightly for larger screens */
    position: relative;
    margin-left: auto;
    margin-right: auto; /* Center the progress bar horizontally */
  }

  .story-content, .video-content {
    margin-top: 5rem;
    position: relative;
    width: 80%; /* Reduce width for larger screens */
    height: 80vh; /* Adjust height for better aspect ratio */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: auto;
    margin-right: auto; /* Center the story content */
    text-align: center; /* Center the content */
  }

  .story-image, .video-content video {
    width: auto !important; /* Maintain aspect ratio */
    height: 100%; /* Ensure it fits the container height */
    max-width: 100%; /* Prevent it from exceeding container width */
    object-fit: contain; /* Keep the entire image visible */
  }

  .close-button {
    position: fixed;
    top: 5rem;
    right: 2%;
    z-index: 1000;
    color: white;
    font-size: 4rem; /* Reduce size for larger screens */
    cursor: pointer;
  }

  .story-sidebar {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 20;
  }

  .icon-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .arrow-icon, .pause-icon, .play-icon {
    color: white;
    font-size: 40px; /* Adjust size for larger screens */
  }

  .profile-thumbnail {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid white;
    margin-left: auto;
    margin-right: auto; /* Center the thumbnail horizontally */
  }

  .profile-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
  }

  .story-footer {
    position: absolute;
    bottom: 5px;
    right: 0;
    z-index: 20;
    color: white;
    font-size: 25px;
  }

  .gender-label {
    position: fixed;
    top: 5.5rem;
    left: 2%;
    z-index: 1000;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 5px;
    padding: 5px 10px;
    width: 180px; /* Larger width for labels on bigger screens */
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .segment {
    flex: 1;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5); /* Slightly brighter inactive color */
    margin: 0 8px; /* Adjust spacing between segments */
    border-radius: 3px;
  }

  .segment.active {
    background-color: white;
    animation: fill-segment 5s linear;
  }

  .date-creation {
    position: fixed;
    top: 5.25rem;
    left: 12%;
    z-index: 1000;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
  }

  .username-link, .username-link-video {
    text-decoration: none;
    color: #ab65ff !important;
    font-weight: bolder;
    text-align: center;
    background: #00000070;
    padding: 0px 10px 4px;
    border-radius: 4px;
  }

  .description {
    font-size: 30px; /* Adjust font size for larger screens */
    padding: 10px;
    color: white;
    text-align: center;
  }

  .description-text {
    margin-left: 15px;
  }
}


