body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: "BarlowCondensed-Bold", Arial, sans-serif;
  color: #fff;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
#stories-wrapper {
  position: relative;
  width: 360px;
  height: 640px;
  overflow: hidden;
  border: 1px solid #333;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}
#stories-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.3s ease;
}
.story-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  text-align: center;
  overflow: hidden;
  background: #222; /* Fallback if video fails */
}
.story-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.story-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 40vh;
  overflow-y: auto;
  padding: 15px;
  box-sizing: border-box;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  z-index: 2;
}
.story-title {
  font-size: 2.5rem;
  line-height: 2.5rem;
  padding: 0.5rem;
  -webkit-text-stroke-width: 1px;
  -webkit-text-stroke-color: #0f015d;
  text-transform: uppercase;
  word-wrap: break-word;
  hyphens: auto;
}
.story-subtitle {
  font-size: 14px;
  margin-bottom: 10px;
  word-wrap: break-word;
  hyphens: auto;
}
.progress-bar-container {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
  z-index: 10;
}
.progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  position: relative;
}
.progress-fill {
  height: 100%;
  background: white;
  width: 0;
}
.story-header {
  position: absolute;
  top: 20px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  font-size: 1.5rem;
}
.story-author {
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
}
.story-buttons {
  display: flex;
  align-items: center;
}
.story-buttons button {
  background: transparent;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  margin-left: 10px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#prev-btn,
#next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 1, 93, 0.5);
  color: white;
  border: none;
  padding: 15px 20px;
  cursor: pointer;
  z-index: 10;
  font-size: 24px;
  border-radius: 50%;
  transition: background 0.2s;
}
#prev-btn:hover,
#next-btn:hover {
  background: rgba(15, 1, 93, 0.8);
}
#prev-btn {
  left: 10px;
  background: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="none"><path stroke="%23000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.4" d="m21.52 16.22 7.75 7.75m-7.75 7.78L29.27 24"/></svg>') !important;
  color: #fff !important;
  filter: invert(1);
  background-repeat: no-repeat !important;
  background-color: transparent !important;
  background-position: 50% !important;
  transform: rotate(180deg) !important;
}
#next-btn {
  right: 10px;
  background: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="none"><path stroke="%23000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.4" d="m21.52 16.22 7.75 7.75m-7.75 7.78L29.27 24"/></svg>') !important;
  color: #fff !important;
  filter: invert(1);
  background-repeat: no-repeat !important;
  background-color: transparent !important;
  background-position: 50% !important;
}
button,
textarea,
input {
  font-family: "BarlowCondensed-Bold", Arial, sans-serif;
  text-transform: uppercase;
}
#bottom-buttons {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.bottom-btn {
  background: #fff;
  color: #0f015d;
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
  font-size: 1.5rem; /* Consistent font size */
  text-decoration: none; /* No underline for links */
  text-transform: uppercase;
}
.bottom-btn:hover {
  background: #0f015d;
  color: #fff;
}
#recording-mode {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  z-index: 100;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}
#camera-feed {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#close-recording {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: white;
  font-size: 30px;
  cursor: pointer;
}
#start-record-btn {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f015d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
  font-size: 1.5rem; /* Consistent font size */
  text-decoration: none; /* No underline for links */
  text-transform: uppercase;
}
#stop-record-btn {
  display: none;
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: #ff0000;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
  font-size: 1.5rem; /* Consistent font size */
  text-decoration: none; /* No underline for links */
  text-transform: uppercase;
}
#post-record-btn {
  display: none;
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f015d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
  font-size: 1.5rem; /* Consistent font size */
  text-decoration: none; /* No underline for links */
  text-transform: uppercase;
}
#author-input {
  position: absolute;
  bottom: 190px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: black;
  font-size: 16px;
  display: none;
}
#post-text {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: black;
  font-size: 16px;
  display: none; /* Show only in preview mode if needed */
}
#take-photo-btn,
#record-video-btn {
  background: #fff;
  color: #0f015d;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
  font-size: 1.5rem;
  text-decoration: none;
  text-transform: uppercase;
  margin: 0.25rem;
}
.like-container {
  display: flex;
  align-items: center;
  margin-top: 10px;
}
.like-btn {
  background: transparent no-repeat center center;
  background-size: contain;
  border: none;
  width: 24px;
  height: 24px;
  cursor: pointer;
  margin-right: 5px;
}
.like-btn.liked {
  background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%230f015d"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
}
.like-btn:not(.liked) {
  background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23fff"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
}

.share-list {
  display: none; /* Hidden by default */
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  border-radius: 5px;
  list-style: none;
  padding: 0;
  margin: 5px 0 0 0;
  width: 200px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
  text-transform: uppercase;
}

.share-list.show {
  display: block;
  opacity: 1;
}

.share-link {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  color: white;
  text-decoration: none;
  transition: background-color 0.3s;
}

.share-link i {
  margin-right: 10px;
}

.facebook {
  background-color: #1877f2;
}
.twitter {
  background-color: #000000;
}
.whatsapp {
  background-color: #25d366;
}

@media (max-width: 767px) {
  #stories-wrapper {
    width: 100vw;
    height: 100vh;
    border: none;
    border-radius: 0;
  }
}
