a,
button,
button:focus,
button:active,
button:hover {
  outline: none !important;
}

/* Video reel */
@media (max-width: 768px) {
  video {
    border-radius: 0 !important;
    padding: 0 !important;
  }

  .user-overlay {
    border-radius: 0 !important;
  }

  .container-arrows {
    display: none !important;
  }

  .video-controls #muteButton,
  .video-reel .video-container .video-controls button#muteButton {
    display: none !important;
  }

  .video-reel .video-controls {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .action-buttons {
    z-index: 6;
  }

  .reel-mute-action-wrap {
    display: block;
  }
}

.reel-mute-action-wrap {
  display: none;
}

@media (max-width: 768px) {
  .reel-mute-action-wrap {
    display: block;
  }
}

@media (min-width: 769px) {
  .reel-mute-action-wrap {
    display: none !important;
  }
}

/* Video grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

@media (min-width: 640px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

.video-reel {
  position: fixed;
  inset: 0;
  background-color: #000;
  z-index: 1049;
  display: none;
  align-items: center;
  justify-content: center;
}

.video-reel.active {
  display: flex;
  touch-action: none;
  overscroll-behavior: none;
  z-index: 1075;
}

body.reel-viewer-open .modal {
  z-index: 1090 !important;
}
body.reel-viewer-open .modal-backdrop {
  z-index: 1080 !important;
}

@media (max-width: 991px) {
  body.reel-viewer-open:has(.menuMobile) {
    padding-bottom: 0 !important;
  }

  body.reel-viewer-open .menuMobile {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (max-width: 768px) {
  .video-reel.active .video-container,
  .video-reel.active #videoPlayer {
    touch-action: none;
  }

  body.reels-page {
    overflow: hidden;
    overscroll-behavior: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
  }
}

.close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 9 / 16;
  overflow-x: hidden;
  position: relative;
}

@media (min-width: 768px) {
  .video-container {
    height: 96vmin;
    min-height: 96vmin;
    width: calc(50vmin);
    min-width: calc(50vmin);
    z-index: 3;
    transition: 0.3s;
    position: relative;
    overflow-x: visible;
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

video#videoPlayer {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  border-radius: 16px;
}

.video-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.play-icon {
  color: white;
  opacity: 0.8;
}

/* Navigation buttons */
.container-arrows {
  position: absolute;
  top: 50%;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 1.25rem;
}
.nav-button {
  transform: translateY(-50%);
  background-color: rgb(139 139 139 / 50%);
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-button.disabled {
  opacity: 0;
  cursor: default;
}

/* User info */
.user-info {
  position: absolute;
  bottom: 80px;
  left: 16px;
  right: 72px;
  display: flex;
  align-items: center;
  min-width: 0;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 8px;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info span {
  color: white;
  font-weight: 500;
}

.user-info .user-link {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  line-height: 1.25;
  word-break: break-all;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

/* Action buttons */
.action-buttons {
  position: absolute;
  bottom: 90px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  color: #fff;
}

.action-button {
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Video controls */
.video-controls {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-container-reels {
  flex: 1;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}

.progress-bar-reels {
  height: 100%;
  background-color: white;
  width: 0;
}

.time-display {
  color: white;
  font-size: 14px;
  display: flex;
  gap: 4px;
}

.hidden {
  display: none;
}

/* Prevent scrolling when video reel is open */
body.no-scroll {
  overflow: hidden;
}

/* Loader styles */
#videoLoader, #videoLoaderPage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 1s ease-in-out infinite;
  z-index: 20;
  display: none;
}

#videoLoader.active,
#videoLoaderPage.active {
  display: block;
}
.loader-reels {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  color: #fff;
}
.loader-reels .loader-text {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.user-overlay {
  position: absolute;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  display: block;
  width: 100%;
  bottom: 0;
  left: 0;
  min-height: 200px;
  border-bottom-right-radius: 16px;
  border-bottom-left-radius: 16px;
}

.user-link,
.user-avatar-link {
  cursor: pointer;
}

.user-link:hover {
  text-decoration: underline;
}

.text-reel {
  position: absolute;
  bottom: 35px;
  left: 16px;
  font-size: 14px;
  line-height: 13px;
  word-wrap: break-word !important;
  word-break: break-word !important;
  padding-right: 5px;
  color: #fff;
}

[data-bs-theme=dark] .comment-container {
  background-color: #303030;
}

.comment-container {
  position: absolute;
  width: 400px;
  right: 0;
  top: 0;
  height: 100%;
  background-color: #fff;
  visibility: hidden;
  opacity: 0;
  transform: translateX(0);
  transition: .3s linear;
  z-index: -1;
  overflow-y: hidden;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}

@media (max-width: 1199px) {
  .comment-container.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(0%) !important;
    z-index: 999;
  }
}

@media (max-width: 1499px) {
  .comment-container {
    width: 100%;
    height: 70%;
    bottom: 0;
    top: auto;
  }
}

@media (max-width: 767px) {
  .comment-container {
    position: fixed !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    height: 70vh !important;
    min-height: 380px !important;
    border-radius: 12px 12px 0 0 !important;
    z-index: 1080 !important;
  }
}

.comment-container.show {
  visibility: visible;
  opacity: 1;
  transform: translateX(102%);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 20px;
  padding-bottom: 0;
  flex-shrink: 0
}

.comment-content {
  overflow-y: scroll;
  overflow-x: hidden;
  flex: 1;
  padding: 0 30px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.comment-close-icon {
  background: transparent;
  border: none;
  color: inherit;
}

.wrap-container-replies-reel {
  margin-left: calc(40px + 15px);
}

.preloader-reel {
  position: absolute;
  top: 50px;
  left: 0;
  width: 100%;
  height: 100%;
}

.type-reel {
  color: #fff;
  font-size: 12px;
  margin-top: 4px;
}

/* Video thumbnail */
.video-thumbnail {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 9/16;
  background-color: #333;
}

.video-thumbnail--cotm,
.video-grid--cotm .video-thumbnail {
  box-shadow: 0 0 0 2px rgba(255, 77, 166, 0.88), 0 6px 18px rgba(232, 9, 236, 0.2);
}

.video-thumbnail--ambassador,
.video-grid--ambassador .video-thumbnail {
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.85), 0 6px 18px rgba(255, 183, 71, 0.18);
}

.video-thumbnail--star,
.video-grid--star .video-thumbnail {
  box-shadow: 0 0 0 2.5px rgba(168, 85, 247, 0.88), 0 6px 18px rgba(168, 85, 247, 0.25);
}

.user-avatar--cotm {
  box-shadow: 0 0 0 2px rgba(255, 77, 166, 0.9), 0 0 12px rgba(232, 9, 236, 0.35);
  border-radius: 50%;
}

.user-avatar--ambassador {
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.92), 0 0 12px rgba(255, 183, 71, 0.35);
  border-radius: 50%;
}

.user-avatar--star {
  box-shadow: 0 0 0 2.5px rgba(168, 85, 247, 0.9), 0 0 12px rgba(168, 85, 247, 0.6);
  border-radius: 50%;
  animation: starPulseGlow 2.5s infinite alternate;
}

@keyframes starPulseGlow {
  0% { box-shadow: 0 0 0 2.5px rgba(168, 85, 247, 0.9), 0 0 4px rgba(168, 85, 247, 0.4); }
  100% { box-shadow: 0 0 0 2.5px rgba(236, 72, 153, 0.95), 0 0 12px rgba(236, 72, 153, 0.7), 0 0 18px rgba(168, 85, 247, 0.4); }
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumbnail:hover .thumbnail-overlay,
.thumbnail-overlay.show {
  opacity: 1 !important;
}

.thumbnail-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.thumbnail-play {
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  padding: 12px;
  color: white;
}

.duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
}

.thumbnail-user {
  position: absolute;
  bottom: 8px;
  left: 8px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 2px 6px;
  border-radius: 4px;
}
.img-blurred {
  filter: blur(25px);
}

.video-thumbnail.thumbnail-locked-social {
  cursor: default;
}

.thumbnail-audience-icon {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.thumbnail-audience-badge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 36px;
  z-index: 2;
  text-align: center;
  color: #fff;
  font-size: 10px;
  line-height: 1.2;
  padding: 4px 6px;
  background-color: rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.user-info .type-reel,
.user-info .reel-audience-type-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 14px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

.user-info .reel-audience-type-icon > i {
  font-size: 14px;
  line-height: 1;
}

.user-info .reel-audience-type-icon > i.fa {
  font-family: "Font Awesome 5 Free" !important;
  font-weight: 900;
}

.user-info .reel-audience-type-icon > i.iconmoon {
  font-family: icomoon !important;
}

.user-info .reel-audience-type-icon > i.feather,
.user-info .reel-audience-type-icon > i.icon-lock {
  font-family: feather !important;
}

/* Flex layout details wrapper to prevent control overlap and allow natural flow */
.reel-details-container {
  position: absolute;
  bottom: 45px;
  left: 16px;
  right: 72px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 4;
  pointer-events: none;
}
.reel-details-container * {
  pointer-events: auto;
}
.user-info {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  display: flex;
  align-items: center;
  min-width: 0;
}
.text-reel {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  font-size: 14px;
  line-height: 1.35 !important;
  word-wrap: break-word !important;
  word-break: break-word !important;
  padding-right: 5px;
  color: #fff;
  margin: 0 !important;
}
.reel-sound-info {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #fff !important;
  background: rgba(0, 0, 0, 0.4) !important;
  padding: 4px 10px !important;
  border-radius: 50px !important;
  width: fit-content !important;
  max-width: 100% !important;
  align-self: flex-start !important;
  user-select: none !important;
}
.reel-sound-info.d-none {
  display: none !important;
}
.reel-sound-info span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  min-width: 0;
}
.reel-sound-info i {
  animation: rotateDisc 4s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
body.reel-portrait-locked,
html.reel-portrait-locked {
  overflow: hidden !important;
}

@keyframes rotateDisc {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---- Mobile landscape lock (portrait-only reels) ---- */
.reel-portrait-lock {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 80% 70% at 50% 40%, rgba(240, 50, 110, 0.22), transparent 65%),
    linear-gradient(160deg, #0a0a0c 0%, #161018 45%, #0d0d12 100%);
  color: #fff;
  text-align: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.reel-portrait-lock.is-visible {
  display: flex;
}

.reel-portrait-lock__glow {
  position: absolute;
  width: min(70vw, 420px);
  height: min(70vw, 420px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 50, 110, 0.35), transparent 70%);
  filter: blur(28px);
  animation: reelPortraitGlow 3.2s ease-in-out infinite;
  pointer-events: none;
}

.reel-portrait-lock__card {
  position: relative;
  z-index: 1;
  max-width: 360px;
  padding: 28px 22px;
}

.reel-portrait-lock__phone {
  position: relative;
  width: 88px;
  height: 140px;
  margin: 0 auto 22px;
  animation: reelPortraitTilt 2.4s ease-in-out infinite;
  transform-origin: center center;
}

.reel-portrait-lock__phone-body {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.12), rgba(240, 50, 110, 0.18));
  box-shadow:
    0 0 0 1px rgba(240, 50, 110, 0.35),
    0 18px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px;
}

.reel-portrait-lock__phone-notch {
  width: 28px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  margin-bottom: 10px;
}

.reel-portrait-lock__phone-screen {
  width: 70%;
  flex: 1;
  margin-bottom: 12px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(240, 50, 110, 0.55), rgba(90, 40, 120, 0.35)),
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent 8px,
      rgba(255, 255, 255, 0.06) 8px,
      rgba(255, 255, 255, 0.06) 9px
    );
}

.reel-portrait-lock__arrows {
  position: absolute;
  right: -36px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reel-portrait-lock__arrows span {
  display: block;
  width: 18px;
  height: 18px;
  border-right: 2.5px solid #f0326e;
  border-bottom: 2.5px solid #f0326e;
  transform: rotate(45deg);
  opacity: 0.35;
  animation: reelPortraitArrow 1.4s ease-in-out infinite;
}

.reel-portrait-lock__arrows span:nth-child(2) {
  animation-delay: 0.2s;
}

.reel-portrait-lock__title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
  color: #fff;
}

.reel-portrait-lock__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}

@keyframes reelPortraitTilt {
  0%, 100% { transform: rotate(-78deg) scale(1); }
  40% { transform: rotate(-78deg) scale(1.02); }
  55% { transform: rotate(0deg) scale(1.05); }
  85% { transform: rotate(0deg) scale(1); }
}

@keyframes reelPortraitArrow {
  0%, 100% { opacity: 0.2; transform: rotate(45deg) translate(-2px, -2px); }
  50% { opacity: 1; transform: rotate(45deg) translate(2px, 2px); }
}

@keyframes reelPortraitGlow {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .reel-portrait-lock__phone,
  .reel-portrait-lock__arrows span,
  .reel-portrait-lock__glow {
    animation: none !important;
  }
  .reel-portrait-lock__phone {
    transform: rotate(0deg);
  }
}