/* =========================
   GLOBAL RESET
========================= */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  background: #000;
}

/* Only lock scrolling on feed page */
body.feed-page {
  overscroll-behavior: none;
}

body.feed-page {
  overflow: hidden;
}
body.admin-bar .stimuli-feed {
  top: 0 !important;
}

body.feed-page .stimuli-feed {
  touch-action: none;
}

/* =========================
   FEED CONTAINER
========================= */
.stimuli-feed {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  overflow: hidden;
  padding-bottom: 52px; /* space for bottom nav */
}

/* =========================
   SLIDES
========================= */
.stimuli-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
}

.stimuli-slide.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   VIDEO WRAPPER
========================= */
.stimuli-video-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
}

/* =========================
   VIDEO
========================= */
.stimuli-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* =========================
   PAUSE / PLAY ICON OVERLAY
========================= */
.stimuli-pause-icon {
  position: absolute;
  inset: 0;
  display: none;               /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 80;
  font-size: 64px;
  color: rgba(255,255,255,0.9);
  pointer-events: none;        /* tap passes through */
  background: rgba(0,0,0,0.15);
}

/* =========================
   CAPTION + HASHTAGS
========================= */
.stimuli-caption {
  position: absolute;
  left: 12px;
  bottom: calc(190px + env(safe-area-inset-bottom));
  max-width: 70%;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  z-index: 50;
  pointer-events: auto;
}

.stimuli-caption p {
  margin: 0;
}

.stimuli-caption a {
  color: #6ecbff;
  text-decoration: none;
  font-weight: 500;
}

.stimuli-caption a:hover {
  text-decoration: underline;
}

.stimuli-caption::before {
  content: '';
  position: absolute;
  inset: -8px -12px;
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
  z-index: -1;
  border-radius: 8px;
}

/* =========================
   PROGRESS BAR
========================= */
.stimuli-progress {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 64px;
  height: 3px;
  background: rgba(255,255,255,0.25);
  border-radius: 3px;
  overflow: hidden;
  z-index: 10000;
}

.stimuli-progress-bar {
  height: 100%;
  width: 0%;
  background: #6ecbff;
}

/* =========================
   BUFFERING INDICATOR
========================= */
.stimuli-loader {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
  pointer-events: none;
}

.stimuli-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: #6ecbff;
  border-radius: 50%;
  animation: stimuli-spin 0.8s linear infinite;
}

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

/* =========================
   ACTION ICONS
========================= */
.stimuli-actions {
  position: absolute;
  right: 12px;
  bottom: calc(190px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  z-index: 55;
}

.stimuli-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  color: #fff;
}

.stimuli-action svg {
  width: 34px;
  height: 34px;
  fill: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* LIKE ACTIVE */
.stimuli-action.like.active svg {
  fill: #ff2d55;
}

/* LIKE POP */
.stimuli-action.like.pop svg {
  animation: likePop 0.3s ease;
}

@keyframes likePop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* SOUND MUTED */
.stimuli-action.sound.muted svg {
  opacity: 0.45;
}

/* =========================
   FREEZE OVERLAY
========================= */
.stimuli-freeze {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 18px;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

#guest-limit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

.guest-box {
  text-align: center;
  color: #fff;
  padding: 30px;
}

.guest-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 24px;
  background: #6ecbff;
  color: #000;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
}
/* =========================
   BOTTOM NAVIGATION
========================= */
.stimuli-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 99999;
}

.stimuli-bottom-nav a {
  text-decoration: none !important;
}

/* NAV ITEM */
.stimuli-nav-item {
  flex: 1;
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

/* ICON */
.stimuli-nav-item .nav-icon {
  width: 22px;
  height: 22px;
  fill: rgba(255,255,255,0.6);
}

/* ACTIVE */
.stimuli-nav-item.active,
.stimuli-nav-item.active .nav-icon {
  color: #6ecbff;
  fill: #6ecbff;
}

/* UPLOAD */
.stimuli-nav-item.upload .nav-icon {
  width: 26px;
  height: 26px;
  background: #6ecbff;
  fill: #000;
  padding: 6px;
  border-radius: 6px;
}

/* COINS */
.stimuli-nav-item.coins .coin-count {
  font-size: 10px;
  color: #fff;
}

.stimuli-nav-item.coins.low,
.stimuli-nav-item.coins.low .nav-icon {
  color: #ff3b30;
  fill: #ff3b30;
}

/* =========================
   FIX: FORCE BOTTOM NAV ICONS TO RENDER (ANDROID)
========================= */
.stimuli-bottom-nav svg,
.stimuli-bottom-nav .nav-icon {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/*.stimuli-search-bar {
  display: none;
}*/