/* Video reel */
@media (max-width: 768px) {
  video {
    border-radius: 0 !important;
    padding: 0 !important;
  }
}

.video-reel {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.video-reel.active {
  display: flex;
}

.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 {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 9 / 16;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  .video-container {
    position: relative;
    height: 80vmin;
    min-height: 80vmin;
    width: calc(45vmin);
    min-width: calc(45vmin);
    z-index: 3;
    transition: 0.3s;
    position: relative;
    overflow-x: visible;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

video {
  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.3);
  opacity: 0;
  pointer-events: none;
}

.video-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.play-icon {
  color: white;
  opacity: 0.8;
}

/* Navigation buttons */
.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  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;
}

.prev-button {
  left: 8px;
}

.next-button {
  right: 8px;
}

.nav-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* User info */
.user-info {
  position: absolute;
  bottom: 80px;
  left: 16px;
  display: flex;
  align-items: center;
}

.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;
}

/* Action buttons */
.action-buttons {
  position: absolute;
  bottom: 80px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.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;
}

/* 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 {
  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 {
  display: block;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}