/* Dream Lands — Reels mode, player, controls, info sheet, top bar, nav */
/* ===== Reels Mode ===== */
/* ── Detail bottom sheet ── */
.detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.detail-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.detail-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2501;
  background: var(--card-bg);
  border-radius: 20px 20px 0 0;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.32, .72, 0, 1);
  will-change: transform;
}

.detail-sheet.open {
  transform: translateY(0);
}

.detail-sheet-handle {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
  cursor: grab;
}

.detail-sheet-handle span {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .2);
}

.detail-sheet-content {
  padding: 0 1.25rem 1.5rem;
}

.detail-hero {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1rem;
  aspect-ratio: 16/10;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-hero .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  right: auto;
}

.detail-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 .5rem;
  line-height: 1.3;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .75rem;
}

.detail-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .8rem;
  color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .08);
  border-radius: 20px;
  padding: .3rem .7rem;
}

.detail-chip svg {
  width: 14px;
  height: 14px;
  opacity: .7;
}

.detail-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--acid);
  margin-bottom: .75rem;
}

.detail-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.detail-highlights li {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: rgba(255, 255, 255, .7);
}

.detail-highlights li svg {
  color: var(--acid);
  flex-shrink: 0;
}

.detail-actions {
  display: flex;
  gap: .75rem;
}

.detail-watch-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .9rem;
  border: none;
  border-radius: 14px;
  background: var(--acid);
  color: #08130b;
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}

.detail-watch-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(95, 208, 122, .3);
}

.detail-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.detail-owner-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--acid);
  background: rgba(95, 208, 122, .1);
  border: 1px solid rgba(95, 208, 122, .25);
  border-radius: 6px;
  padding: .2rem .5rem;
  margin-bottom: .75rem;
}

@media (min-width: 768px) {
  .detail-sheet {
    left: 50%;
    right: auto;
    width: min(500px, 90vw);
    transform: translate(-50%, 100%);
    border-radius: 20px 20px 0 0;
  }

  .detail-sheet.open {
    transform: translate(-50%, 0);
  }
}

/* ── Explore overlay ── */
.explore-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1900;
  background: var(--bg);
  flex-direction: column;
  overflow: hidden;
}

.explore-overlay.open {
  display: flex;
}

.explore-overlay-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.explore-overlay-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0;
}

.explore-overlay-header .explore-views {
  margin-left: auto;
}

.explore-overlay-close {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: .4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: .5rem;
  transition: background .15s;
}

.explore-overlay-close:hover {
  background: rgba(255, 255, 255, .1);
}

.explore-overlay-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem 2rem;
  -webkit-overflow-scrolling: touch;
}

.reels-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #000;
}

.reels-overlay.open {
  display: flex;
  flex-direction: column;
}


/* ── Player ── */
.reels-player {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #000;
  overflow: hidden;
}

/* content row: video + optional desktop detail panel */
.reels-content-row {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
  flex-direction: column;
}

.reels-video-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  transition: height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), flex 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  height: 100%;
}

/* track — the two-panel unit (current slide + incoming thumb) that translates together */
.ryc-track {
  position: absolute;
  inset: 0;
  will-change: transform;
}

/* slide wrap — fills the track, no individual transform needed */
.ryc-slide-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* incoming thumbnail panel — sits directly above or below the slide */
.ryc-incoming-thumb {
  position: absolute;
  left: 0;
  right: 0;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  /* JS always sets top explicitly per direction before showing */
  top: 100%;
  /* safe default — overridden by JS on every use */
}

/* desktop RHS panel — hidden on mobile */
.reels-desktop-detail {
  display: none;
}

@media (min-width: 768px) {
  .reels-content-row {
    flex-direction: row;
  }

  .reels-video-wrap {
    flex: 0 0 65%;
    width: 65%;
    display: flex;
    flex-direction: column;
  }

  /* video track fills available height above the controls bar */
  .ryc-track {
    position: relative;
    inset: auto;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  /* swipe zone covers just the video area (pointer-events already none on desktop) */
  .ryc-swipe-zone {
    top: 0;
    bottom: auto;
    height: 100%;
  }

  /* controls bar is normal flow — no longer an overlay */
  .ryc-controls-bg {
    position: relative;
    z-index: auto;
    flex-shrink: 0;
  }

  /* settings panel hidden on desktop, captions/speed in control bar instead */
  .ryc-settings-panel {
    display: none !important;
  }

  .reels-desktop-detail {
    flex: 0 0 35%;
    width: 35%;
    display: flex;
    flex-direction: column;
    background: #181a1b;
    border-left: 1px solid rgba(255, 255, 255, .08);
    overflow: hidden;
  }

  .reels-desktop-detail-inner {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .reels-desktop-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 14px 8px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  .reels-desktop-title {
    flex: 1;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin: 0;
  }

  .reels-desktop-close,
  .reels-desktop-share {
    background: rgba(255, 255, 255, .08);
    border: none;
    color: #e8e8e8;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s;
  }

  .reels-desktop-close:hover,
  .reels-desktop-share:hover {
    background: rgba(255, 255, 255, .18);
  }

  .reels-desktop-detail-footer {
    flex-shrink: 0;
    background: #181a1b;
  }

  /* dark-mode detail body inside desktop panel */
  .reels-desktop-detail .detail-body {
    color: #e8e8e8;
  }

  .reels-desktop-detail .detail-title {
    color: #fff;
  }

  .reels-desktop-detail .detail-price {
    color: #4caf50;
  }

  .reels-desktop-detail .detail-section-title {
    color: rgba(255, 255, 255, .45);
    border-bottom-color: rgba(255, 255, 255, .08);
  }

  .reels-desktop-detail .detail-field label {
    color: rgba(255, 255, 255, .45);
  }

  .reels-desktop-detail .detail-field span {
    color: #e8e8e8;
  }

  .reels-desktop-detail .detail-highlights li {
    color: #c8c8c8;
  }

  .reels-desktop-detail .detail-posted {
    color: rgba(255, 255, 255, .4);
  }

  .reels-desktop-detail .detail-broker {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(255, 255, 255, .08);
  }

  .reels-desktop-detail .detail-broker-info strong {
    color: #fff;
  }

  .reels-desktop-detail .detail-broker-info span {
    color: rgba(255, 255, 255, .5);
  }

  /* show desktop center-row with prev/next */
  .ryc-center-row {
    display: flex;
  }

  /* hide mobile-only elements on desktop */
  .reels-swipe-toast,
  .reels-info-sheet {
    display: none !important;
  }
}

/* fullscreen button — desktop only */
#ryc-fullscreen {
  display: none;
}

@media (min-width: 768px) {
  #ryc-fullscreen {
    display: flex;
  }
}

/* thumbnail cover — sits above the iframe, fades out once video plays */
.ryc-video-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.ryc-video-cover.hidden {
  opacity: 0;
}

/* loading spinner — shown during swipe and video load */
.ryc-loading-spinner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ryc-loading-spinner.visible {
  opacity: 1;
}

.ryc-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ryc-spin 1s linear infinite;
}

@keyframes ryc-spin {
  to {
    transform: rotate(360deg);
  }
}

/* .reels-iframe removed — replaced by YT IFrame Player API (#reels-yt-player) */

#reels-yt-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#reels-yt-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── YouTube-style custom controls overlay ─────────────────────────────────── */

.reels-yt-controls {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
  z-index: 5;
  /* hide controls bar by default; reveal on hover or when paused */
  --ryc-bar-opacity: 0;
  transition: --ryc-bar-opacity .2s;
}

/* make the whole overlay clickable for play/pause tap */
.reels-yt-controls.ryc-visible,
.reels-yt-controls:focus-within {
  --ryc-bar-opacity: 1;
}

/* transparent layer above the iframe that catches swipe touches */
.ryc-swipe-zone {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 80px;
  /* leave bottom ~80px for YouTube's native share/subtitle bar */
  z-index: 1;
  /* above iframe, below all control buttons */
  pointer-events: all;
  -webkit-tap-highlight-color: transparent;
}

/* desktop: swipe zone is mobile-only — disabling it lets mouse clicks reach the controls */
@media (min-width: 768px) {
  .ryc-swipe-zone {
    pointer-events: none;
  }
}

/* hide all overlay UI during swipe transition or active drag */
.reels-video-wrap.ryc-transitioning .reels-yt-controls>*,
.reels-video-wrap.ryc-dragging .reels-yt-controls>*,
.reels-video-wrap.ryc-transitioning .ryc-float-bar,
.reels-video-wrap.ryc-dragging .ryc-float-bar {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: none !important;
}

/* bottom gradient scrim */
.ryc-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .75) 0%, rgba(0, 0, 0, .2) 30%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
}

.reels-yt-controls.ryc-visible .ryc-scrim {
  opacity: 1;
}


/* rows */
/* solid black bg behind both control rows */
.ryc-controls-bg {
  background: rgba(0, 0, 0, .92);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: all;
  position: relative;
  z-index: 2;
  /* above swipe zone (z-index:1) */
}

.reels-yt-controls.ryc-visible .ryc-controls-bg {
  opacity: 1;
}

/* desktop: bottom controls + seek + nav buttons always visible */
@media (min-width: 768px) {

  .ryc-controls-bg,
  .ryc-seek,
  .ryc-nav-side-btn {
    opacity: 1 !important;
  }
}

.ryc-row {
  position: relative;
  pointer-events: all;
  padding: 0 10px;
}

.ryc-row--seek {
  padding-top: 6px;
  padding-bottom: 2px;
  display: flex;
  align-items: center;
  height: 20px;
}

.ryc-row--bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  gap: 4px;
}

/* seek bar */
.ryc-seek {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 16px;
  /* tall enough to contain the 14px thumb */
  margin: 0;
  padding: 0;
  background: transparent;
  /* track drawn via pseudo-element */
  cursor: pointer;
  outline: none;
  opacity: 0;
  transition: opacity .25s;
  align-self: center;
}

.reels-yt-controls.ryc-visible .ryc-seek {
  opacity: 1;
}

.ryc-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 0 3px rgba(0, 0, 0, .6);
  margin-top: -5px;
  /* centre 14px thumb on the 4px track: (4-14)/2 = -5 */
  transition: width .15s, height .15s;
}

.ryc-seek:hover::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
}

.ryc-seek::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #fff var(--seek-pct, 0%), rgba(255, 255, 255, .35) var(--seek-pct, 0%));
  border-radius: 2px;
  height: 4px;
}

.ryc-seek:hover::-webkit-slider-runnable-track {
  height: 5px;
}

/* bar left / right */
.ryc-bar-left,
.ryc-bar-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* icon buttons */
.ryc-btn {
  background: transparent;
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
  padding: 0;
}

.ryc-btn:hover {
  background: rgba(255, 255, 255, .12);
}

/* time display */
.ryc-time {
  font-size: .78rem;
  color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding: 0 4px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
  user-select: none;
}

/* volume inline slider */
.ryc-vol-wrap {
  display: flex;
  align-items: center;
}

.ryc-vol-inline {
  width: 0;
  overflow: hidden;
  transition: width .2s;
}

.ryc-vol-wrap:hover .ryc-vol-inline,
.ryc-vol-inline:focus-within {
  width: 72px;
}

.ryc-vol-inline-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 68px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .4);
  cursor: pointer;
  outline: none;
  margin-left: 4px;
}

.ryc-vol-inline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.ryc-vol-inline-slider::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #fff var(--vol-pct, 100%), rgba(255, 255, 255, .4) var(--vol-pct, 100%));
  border-radius: 2px;
  height: 4px;
}

/* settings panel */
.ryc-settings-panel {
  position: absolute;
  bottom: 60px;
  right: 10px;
  background: rgba(18, 18, 18, .95);
  border-radius: 8px;
  padding: 10px 0;
  min-width: 220px;
  pointer-events: all;
  z-index: 20;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .6);
  backdrop-filter: blur(8px);
}

.ryc-settings-section {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.ryc-settings-section:last-child {
  border-bottom: none;
}

.ryc-settings-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .5);
  margin-bottom: 6px;
}

.ryc-settings-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ryc-set-opt {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .15);
  color: #fff;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: .78rem;
  cursor: pointer;
}

.ryc-set-opt:hover {
  background: rgba(255, 255, 255, .2);
}

.ryc-set-opt--active {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* hide old volume popup slider */
.ryc-vol-slider-wrap {
  display: none;
}

/* desktop-only captions button */
#ryc-cc-btn {
  transition: background-color .2s;
}

#ryc-cc-btn.cc-on {
  background: rgba(255, 255, 255, .2);
}

.ryc-cc-text {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* desktop-only speed dropdown */
.ryc-speed-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ryc-speed-text {
  font-size: .8rem;
  font-weight: 500;
}

.ryc-speed-menu {
  position: absolute;
  bottom: 40px;
  right: 0;
  background: rgba(18, 18, 18, .95);
  border-radius: 6px;
  min-width: 110px;
  padding: 6px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .6);
  backdrop-filter: blur(8px);
  z-index: 25;
  pointer-events: all;
}

.ryc-speed-option {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
  font-size: .78rem;
  transition: background .15s;
}

.ryc-speed-option:hover {
  background: rgba(255, 255, 255, .12);
}

.ryc-speed-option--active {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}


/* top bar */
/* ── Floating top bar (back + info) ─────────────────────────────────────────── */

.ryc-float-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: env(safe-area-inset-top, 12px) 8px 12px;
  padding-top: max(env(safe-area-inset-top, 0px), 12px);
  pointer-events: all;
  z-index: 2;
  /* above swipe-zone (z-index:1) — now a sibling in reels-video-wrap */
  background: linear-gradient(to bottom, rgba(0, 0, 0, .45) 0%, transparent 100%);
  opacity: 1;
  transition: opacity .2s ease;
}

/* hide float bar during playback, show on pause or interaction */
.ryc-float-bar.ryc-hidden {
  opacity: 0;
  pointer-events: none;
}

.ryc-float-bar-right {
  display: flex;
  align-items: center;
  gap: 0;
}

.ryc-ghost-btn {
  background: rgba(0, 0, 0, .55);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  border-radius: 50%;
  cursor: pointer;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .7));
  transition: background .15s;
}

.ryc-ghost-btn:hover {
  background: rgba(255, 255, 255, .12);
}

/* mobile-only helper */
.ryc-mobile-only {
  display: flex;
}

/* mobile settings button — bottom-right of video */
.ryc-settings-fab {
  position: absolute;
  bottom: 14px;
  right: 10px;
  z-index: 20;
  background: rgba(0, 0, 0, .55);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .7));
  transition: background .15s, opacity .3s ease;
}

.ryc-settings-fab:hover {
  background: rgba(0, 0, 0, .75);
}

.ryc-settings-fab.ryc-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

/* thin progress bar — mobile only, no background, bottom edge */
.ryc-mobile-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 200;
  pointer-events: all;
  /* invisible touch target below the 2px bar */
  padding-bottom: 18px;
  margin-bottom: -18px;
  touch-action: none;
}

.ryc-mobile-progress::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, .3);
}

.ryc-mobile-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: #fff;
  transition: width .25s linear;
  pointer-events: none;
  z-index: 1;
}

.ryc-mobile-progress.seeking .ryc-mobile-progress-fill {
  transition: none;
}

/* mobile: hide full controls bar */
.ryc-controls-bg {
  display: none;
}

@media (min-width: 768px) {

  /* desktop: show full controls bar, hide mobile-only elements */
  .ryc-controls-bg {
    display: block;
  }

  .ryc-mobile-only {
    display: none !important;
  }

  .ryc-mobile-progress {
    display: none;
  }
}

/* ── Swipe toast (mobile only) ───────────────────────────────────────────────── */

.reels-swipe-toast {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .4rem;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font-size: .8rem;
  font-weight: 500;
  padding: .5rem 1rem;
  border-radius: 2rem;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(6px);
  z-index: 30;
  opacity: 0;
  transition: opacity .4s;
}

.reels-swipe-toast.visible {
  opacity: 1;
}

/* ── Desktop prev/next side buttons in video overlay ────────────────────────── */

.ryc-center-row {
  position: absolute;
  inset: 0;
  display: none;
  /* shown on desktop via media query below */
  align-items: center;
  justify-content: space-between;
  z-index: 2;
  /* above swipe zone (z-index:1) */
  padding: 0 16px;
  pointer-events: none;
}

@media (min-width: 768px) {
  .ryc-float-bar {
    display: none;
  }

  .ryc-center-row {
    display: flex;
  }
}

.ryc-desktop-only {
  display: none;
}

@media (min-width: 768px) {
  .ryc-desktop-only {
    display: flex;
  }
}

.ryc-nav-side-btn {
  pointer-events: all;
  background: rgba(0, 0, 0, .55);
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .2s, background .15s;
}

.ryc-nav-side-btn:hover {
  background: rgba(0, 0, 0, .75);
}

.ryc-nav-side-btn:disabled {
  opacity: .2 !important;
  cursor: not-allowed;
}

.reels-yt-controls.ryc-visible .ryc-nav-side-btn {
  opacity: 1;
}



/* info sheet */
.reels-info-backdrop {
  position: absolute;
  inset: 0;
  z-index: 19;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.reels-info-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

/* drag indicator — appears at bottom when sheet is closed (0%) */
.reels-info-indicator {
  position: fixed;
  bottom: 6px;
  left: 0;
  right: 0;
  height: 40px;
  z-index: 17;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.reels-info-indicator.visible {
  opacity: 1;
  pointer-events: all;
}

@media (min-width: 768px) {
  .reels-info-indicator {
    display: none !important;
  }

  /* desktop shows details in the RHS side panel, never as a bottom sheet */
  .reels-info-sheet,
  .reels-info-backdrop {
    display: none !important;
  }
}

.reels-info-indicator-caret {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
  line-height: 1;
  transition: transform 0.2s ease;
}

.reels-info-indicator:active .reels-info-indicator-caret {
  transform: scale(0.9);
}

/* mobile: info sheet as bottom sheet — 3 snap points: 0%, 15%, 60% */
.reels-info-sheet {
  position: fixed;
  bottom: calc(58px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  background: var(--card-bg, #16201b);
  color: var(--text, #e8e6e1);
  border-radius: 1.25rem 1.25rem 0 0;
  padding: 0;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), height 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 20;
  max-height: calc(100dvh - 58px - env(safe-area-inset-bottom));
  overflow-y: auto;
  touch-action: none;
  height: calc(100dvh - 58px - env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .3);
  will-change: transform;
}

/* mobile: video wrap height adjusts based on bottom sheet height */
@media (max-width: 767px) {
  .reels-player .reels-video-wrap {
    height: 100%;
    flex: 1;
    transition: height 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), flex 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: height, flex;
  }

  .reels-player.reels-info-0 .reels-video-wrap {
    height: 100%;
    flex: 1;
  }

  .reels-player.reels-info-60 .reels-video-wrap {
    height: 40%;
    flex: 0 0 40%;
  }
}

/* 0% height — sheet hidden */
.reels-info-sheet.snap-0 {
  transform: translateY(100%);
}

/* 60% height — expanded */
.reels-info-sheet.snap-60 {
  transform: translateY(0);
  height: 60%;
}


/* suppress transition while the user is dragging the sheet */
.reels-info-sheet.dragging {
  transition: none;
}

.reels-info-sheet.open {
  transform: translateY(0);
}

.reels-info-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, .3);
  border-radius: 2px;
  flex-shrink: 0;
  margin: 0.5rem auto;
}

.reels-info-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 16px;
  gap: 0;
}

.reels-info-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text, #e8e6e1);
  flex: 1;
  line-height: 1.3;
}

.reels-info-share {
  background: none;
  border: none;
  color: var(--text, #e8e6e1);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.reels-info-share:hover {
  background: rgba(255, 255, 255, .1);
  border-radius: 50%;
}

.reels-info-close {
  background: none;
  border: none;
  color: var(--text, #e8e6e1);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.reels-info-close:hover {
  background: rgba(255, 255, 255, .1);
  border-radius: 50%;
}

.reels-info-content {
  padding: 0rem 16px 2rem;
}

.reels-info-content .detail-body {
  padding: 0;
}

.ri-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--green);
}

.ri-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.ri-highlights {
  list-style: none;
  font-size: .85rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: .25rem;
  margin-top: .15rem;
}

.reels-view-full-btn {
  display: block;
  width: calc(100% - 2rem);
  margin: 1rem 1rem 0;
  padding: .75rem;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: .75rem;
  font-size: .95rem;
  font-weight: 700;
}

/* ── Header reels button ── */
/* ── Header nav ── */
.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: .4rem;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .3px;
  padding-bottom: 4px;
  transition: color .2s;
}

.nav-link svg {
  flex-shrink: 0;
  opacity: .85;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--acid, #b8ff3c);
  transition: width .2s ease;
}

.nav-link:hover {
  color: #fff;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  z-index: 201;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 199;
}

.nav-drawer-overlay.open {
  display: block;
}

@media (max-width: 768px) {
  .header-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100dvh;
    background: #0d1a14;
    flex-direction: column;
    align-items: flex-start;
    padding: 50px 1.5rem 2rem;
    gap: 0;
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 200;
    box-shadow: -4px 0 20px rgba(0, 0, 0, .4);
  }

  .header-nav.open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 1rem;
    padding: .85rem 0;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  .nav-hamburger {
    display: flex;
  }

  .header-reels-btn {
    display: none !important;
  }
}

.header-reels-btn {
  background: var(--green);
  color: #fff;
  border: none;
  padding: .35rem .85rem;
  border-radius: 2rem;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .3px;
  display: flex;
  align-items: center;
  gap: .3rem;
}

/* ── Hero reels button ── */
.hunt-reels {
  background: transparent;
  border: 2px solid var(--acid);
  color: var(--acid);
}

.hunt-reels:hover {
  background: rgba(184, 255, 60, .1);
  box-shadow: 0 8px 28px rgba(184, 255, 60, .2);
}

/* ── Keyboard shortcuts hint ── */
.ryc-shortcuts-wrap {
  position: relative;
}

.reels-keyboard-toast {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.keyboard-hints {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}

.hint-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.hint-item kbd {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.25rem;
  padding: 0.2rem 0.4rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
}

