#reels-root {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 2147483647;
  background: #000;
  touch-action: none;
  overflow: hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
#reels-root,
#reels-root * {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
body.reels-lock { overflow: hidden !important; }

.reel-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  opacity: 1;
  transition: opacity .15s ease;
}
.reel-video:not(.is-active) {
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s ease, visibility 0s linear .15s;
}

.reels-spinner,
.reels-paused-glyph {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 40px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
  z-index: 3;
}
#reels-root.is-loading .reels-spinner { opacity: .9; }
#reels-root.is-paused .reels-paused-glyph { opacity: .85; }
.reels-paused-glyph i { text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }

.reels-scrub-hud {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 168px;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  border-radius: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 4;
}
#reels-root.is-scrubbing .reels-scrub-hud {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.reels-scrub-icon { font-size: 24px; line-height: 1; color: #fa5da2; }
.reels-scrub-time { font-size: 20px; font-weight: 600; letter-spacing: .5px; }
.reels-scrub-bar {
  width: 150px;
  height: 4px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 2px;
  overflow: hidden;
}
.reels-scrub-fill { height: 100%; width: 0; background: #fff; border-radius: 2px; }
#reels-root.is-scrubbing .reels-paused-glyph,
#reels-root.is-scrubbing .reels-spinner { opacity: 0; }
#reels-root.is-scrubbing .reel-video.is-active { filter: brightness(0.65); }
#reels-root.is-scrubbing .reels-progress { height: 6px; }
.reels-progress { transition: height .12s ease; }

.reels-chrome {
  pointer-events: none;
  opacity: 1;
  transition: opacity .2s ease;
}
.reels-chrome a,
.reels-chrome button { pointer-events: auto; }
#reels-root.chrome-off .reels-chrome { opacity: 0; }
#reels-root.chrome-off .reels-chrome a,
#reels-root.chrome-off .reels-chrome button { pointer-events: none; }

.reels-chrome-toggle {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: 10px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  z-index: 6;
  opacity: .85;
  transition: opacity .2s ease;
}
#reels-root.chrome-off .reels-chrome-toggle { opacity: .45; }

.reels-close {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 10px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  z-index: 5;
}

.reels-top {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 64px;
  right: 64px;
  z-index: 4;
}
.reels-context {
  display: block;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .4px;
  margin-bottom: 6px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}
.reels-segdots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
  min-height: 6px;
}
.reels-segdots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}
.reels-segdots span.is-current { background: #fff; }
.reels-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  overflow: hidden;
}
.reels-progress-fill {
  height: 100%;
  width: 0;
  background: #fa5da2;
  border-radius: 2px;
}

.reels-meta {
  position: absolute;
  left: 14px;
  right: 76px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 4;
}
.reels-model {
  color: #fa5da2;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}
.reels-title {
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  max-height: 2.7em;
  overflow: hidden;
  text-decoration: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

.reels-tools {
  position: absolute;
  right: 10px;
  bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 5;
}
.reels-tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
}
.reels-like.is-liked i { color: #d53030; }
.reels-like-count { font-size: 11px; line-height: 1; }

.reels-heart {
  position: fixed;
  z-index: 2147483647;
  margin: 0;
  color: #d53030;
  font-size: 46px;
  line-height: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  animation: reels-heart-rise 900ms ease-out forwards;
}
@keyframes reels-heart-rise {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  15%  { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  40%  { opacity: 1; transform: translate(-50%, -90px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -180px) scale(0.9); }
}

.reels-ad-break {
  position: absolute;
  inset: 0;
  z-index: 2147483647;
  background: #000;
}
.reels-ad-break video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.reels-ad-label {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 10px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  border-radius: 6px;
  z-index: 1;
  pointer-events: none;
}
#reels-root.is-ad-break .reels-chrome,
#reels-root.is-ad-break .reels-chrome-toggle {
  opacity: 0;
  pointer-events: none;
}

#reels-root .reels-overlay {
  position: absolute;
  z-index: 2147483647;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
#reels-root .reels-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}
#reels-root .reels-overlay-card {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  max-width: 86%;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  border-radius: 14px;
}
#reels-root .reels-overlay-card.is-visible {
  transform: translate(-50%, -50%) scale(1);
}
.reels-hint-title { font-size: 15px; font-weight: 700; letter-spacing: .3px; margin-bottom: 10px; text-align: center; }
.reels-hint ul { list-style: none; margin: 0; padding: 0; }
.reels-hint li { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.5; padding: 3px 0; }
.reels-hint li i { width: 20px; text-align: center; color: #fa5da2; flex: none; }
.reels-hint-dismiss { margin-top: 10px; text-align: center; font-size: 11px; opacity: .6; }

.reels-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #b9b9b9;
  display: none;
  z-index: 4;
}
#reels-root.is-empty .reels-empty { display: block; }
#reels-root.is-empty .reels-spinner,
#reels-root.is-empty .reels-chrome { display: none; }
.reels-empty i { font-size: 40px; color: #fa5da2; margin-bottom: 14px; }
.reels-empty p { font-size: 15px; margin: 0 0 20px; }
.reels-empty a {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  background: #fa5da2;
  color: #0a0a0a;
  font-weight: 600;
  text-decoration: none;
}
