/* IG Reels Swiper V2 - Card Layout */
.ig-reels-splide {
  width: 100%;
}

.ig-reels-container {
  /* min-height: 100vh;
  background: linear-gradient(135deg, 
    rgba(243, 244, 246, 0.8) 0%, 
    rgba(251, 207, 232, 0.8) 25%, 
    rgba(254, 215, 170, 0.8) 100%); */
  padding: 2rem;
}

.reels-grid {
  max-width: 1536px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.reel-card-container {
  margin: auto;
}

.reel-card {
  position: relative;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1);
  z-index: 1;
  margin: auto;
}

.reel-card:hover {
  transform: scale(1.1) !important;
  z-index: 10;
}

.reel-card-container, .reel-container {
  width: 280px;
  height: 498px;
}

/* Reel Container */
.reel-container {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  /* box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); */
  background: black;
}

/* Background Thumbnail */
.reel-thumbnail {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
  background-color: #1f2937;
  /* background-image: linear-gradient(45deg, #374151 25%, transparent 25%),
    linear-gradient(-45deg, #374151 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #374151 75%),
    linear-gradient(-45deg, transparent 75%, #374151 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px; */
}

.reel-card:hover .reel-thumbnail {
  transform: scale(1.05);
}

/* Gradient Overlay */
.reel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.8) 0%,
      transparent 50%,
      rgba(0, 0, 0, 0.4) 100%);
}

/* Play Button */
.reel-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-button {
  transition: all 0.3s ease;
  transform: scale(1);
  opacity: 0.8;
}

.reel-card:hover .play-button {
  transform: scale(1.25);
  opacity: 1;
}

.play-icon {
  width: 5rem;
  height: 5rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.play-icon svg {
  margin-left: 0.25rem;
}

/* Instagram Logo */
.reel-instagram-logo {
  position: absolute;
  top: 1rem;
  right: 1rem;
  transition: all 0.3s ease;
  opacity: 0.7;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.reel-card:hover .reel-instagram-logo {
  transform: scale(1.1);
  opacity: 1;
}

/* User Info */
.reel-user-info {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid white;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(156, 163, 175, 1);
}

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

.avatar-placeholder {
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
}

.username {
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* Content Info */
.reel-content-info {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
}

.reel-title {
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.reel-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  line-height: 1.5;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.5rem;
  white-space: pre;
}

.reel-hashtags {
  color: rgb(147, 197, 253);
  font-size: 0.75rem;
  font-weight: 500;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* View Indicator */
.reel-view-indicator {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  transition: all 0.3s ease;
  opacity: 0;
  transform: scale(0.75);
}

.reel-card.keyboard-focused {
  outline: 3px solid #8b5cf6;
  outline-offset: 4px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.reel-card {
  opacity: 0;
}

.reel-card:hover .reel-view-indicator {
  opacity: 1;
  transform: scale(1);
}

.view-button {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.view-button span {
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Hover Effects */
.reel-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1.5rem;
  transition: all 0.5s ease;
  /* box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); */
  z-index: -1;
}

.reel-card:hover::before {
  /* box-shadow: 0 0 50px rgba(168, 85, 247, 0.5); */
  outline: 4px solid rgba(168, 85, 247, 0.5);
}

.reel-hover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(147, 51, 234, 0.2) 0%,
      rgba(219, 39, 119, 0.2) 100%);
  border-radius: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.reel-card:hover .reel-hover-overlay {
  opacity: 1;
}

/* Floating Elements */
.floating-element {
  position: absolute;
  transition: all 0.5s ease;
  opacity: 0;
  transform: scale(0.75);
}

.floating-element-1 {
  top: -0.75rem;
  right: -0.75rem;
  transition-delay: 0.1s;
}

.floating-element-2 {
  bottom: -0.75rem;
  left: -0.75rem;
  transition-delay: 0.2s;
}

.reel-card:hover .floating-element {
  opacity: 1;
  transform: scale(1);
}

.floating-dot {
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.floating-dot-purple {
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-dot-purple::after {
  content: '';
  width: 1rem;
  height: 1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

.floating-dot-orange {
  width: 1.5rem;
  height: 1.5rem;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.splide__track {
  padding: 40px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .ig-reels-container {
    padding: 1rem;
  }

  .reels-grid {
    gap: 1rem;
  }

  .reel-card-container, .reel-container {
    width: 240px;
    height: 427px;
  }
}

@media (max-width: 480px) {
  .reels-grid {
    flex-direction: column;
    align-items: center;
  }

  .reel-card-container, .reel-container {
    width: 240px;
    height: 427px;
  }
}

/* Animation for loading state */
.reel-card.loading {
  opacity: 0.7;
}

.reel-card.loading .reel-thumbnail {
  animation: skeleton-loading 1.5s ease-in-out infinite alternate;
}

@keyframes skeleton-loading {
  0% {
    background-color: #374151;
  }

  100% {
    background-color: #4b5563;
  }
}