/**
 * Reels — full-viewport vertical video, dark immersive UI.
 */

:root {
  --site-nav-height: 58px;
}

.reels-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: #000;
  color: #f2f4f8;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
}

.reels-body .site-nav {
  flex-shrink: 0;
}

.reels-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: #000;
}

.reels-main {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.reels-viewport {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.reels-track {
  will-change: transform;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.reels-slide {
  position: relative;
  height: calc(100vh - var(--site-nav-height));
  height: calc(100dvh - var(--site-nav-height));
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: #050608;
}

.reels-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.reels-gradient {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 100%);
  z-index: 1;
}

.reels-tap-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: transparent;
  color: transparent;
}

.reels-meta {
  position: absolute;
  left: 0.85rem;
  right: 4.25rem;
  bottom: 1rem;
  z-index: 3;
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

.reels-meta-user {
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.reels-meta-caption {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: rgba(245, 247, 252, 0.92);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reels-rail {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.reels-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.55));
}

.reels-action-btn:focus-visible {
  outline: 2px solid rgba(110, 176, 255, 0.95);
  outline-offset: 4px;
  border-radius: 10px;
}

.reels-action-icon {
  display: flex;
  width: 2.65rem;
  height: 2.65rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(12, 14, 18, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.18s ease, transform 0.15s ease;
}

.reels-action-btn:hover .reels-action-icon {
  background: rgba(24, 28, 36, 0.55);
  transform: scale(1.04);
}

.reels-action-btn:active .reels-action-icon {
  transform: scale(0.96);
}

.reels-action-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.reels-action-btn--like.is-liked .reels-action-icon {
  color: #ff5c7a;
  border-color: rgba(255, 92, 122, 0.35);
}

.reels-action-btn--save.is-saved .reels-action-icon {
  color: #6eb0ff;
  border-color: rgba(110, 176, 255, 0.4);
}

.reels-action-btn.is-done .reels-action-icon {
  color: #7dffb2;
  border-color: rgba(125, 255, 178, 0.35);
}

.reels-action-count {
  font-size: 0.68rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.88);
  min-height: 0.85rem;
}

.reels-empty {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
  min-height: calc(100vh - var(--site-nav-height));
  min-height: calc(100dvh - var(--site-nav-height));
  color: rgba(200, 208, 222, 0.88);
}

.reels-empty h1 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 650;
  color: #f0f3f7;
}

.reels-empty p {
  margin: 0 0 1.25rem;
  max-width: 22rem;
  line-height: 1.5;
  font-size: 0.95rem;
}

.reels-empty a {
  color: #6eb0ff;
  font-weight: 600;
  text-decoration: none;
}

.reels-empty a:hover {
  text-decoration: underline;
}

@media (max-width: 520px) {
  .reels-slide {
    max-width: none;
  }
}
