.ms-reels {
  padding: clamp(32px, 6vw, 72px) 0;
  position: relative;
}

.ms-reels::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 300px at 20% 20%, rgba(255, 106, 61, 0.12), transparent 65%),
              radial-gradient(500px 240px at 80% 40%, rgba(255, 61, 124, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.ms-reels .ms-container {
  position: relative;
  z-index: 1;
}

.ms-reels-head {
  text-align: center;
  margin-bottom: 22px;
}

.ms-reels .ms-subtitle {
  color: var(--muted);
  margin: 0 auto;
  max-width: 640px;
}

.reels-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 4px 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.reels-track::-webkit-scrollbar {
  height: 8px;
}

.reels-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.reel-card {
  position: relative;
  flex: 0 0 clamp(190px, 30vw, 260px);
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  background: #0b0d10;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  scroll-snap-align: start;
}

.reel-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0b0d10;
}

.reel-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.65) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.reel-card:hover .reel-gradient,
.reel-card.is-playing .reel-gradient {
  opacity: 1;
}

.reel-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  font-size: 0.9rem;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reel-btn {
  position: absolute;
  z-index: 2;
  border: none;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.reel-play {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  transition: opacity 0.2s ease;
}

.reel-play::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}

.reel-card.is-playing .reel-play {
  opacity: 0;
  pointer-events: none;
}

.reel-mute {
  right: 10px;
  top: 10px;
  padding: 6px 10px;
  font-size: 0.78rem;
  border-radius: 999px;
}

.reels-empty {
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  color: var(--muted);
  text-align: center;
  width: 100%;
}

@media (max-width: 640px) {
  .reel-card {
    flex: 0 0 70vw;
  }
}
