/* ============================================================
   CLAPXSE — Feed vertical + carrusel + navegación inferior
   ============================================================ */

.feed-container {
  position: fixed;
  inset: 0;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  /* scroll-behavior: smooth se quitó a propósito: al combinarse con
     scroll-snap-type en móvil, un deslizamiento rápido pierde el
     "freno" del snap y salta varias publicaciones de una vez en
     lugar de avanzar solo a la siguiente. Sin "smooth" el navegador
     usa el snap nativo, que sí respeta un post por deslizamiento. */
  -webkit-overflow-scrolling: touch;
}

.post {
  position: relative;
  width: 100%;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ---------------- Área de imagen (arriba) ---------------- */
.media-area {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #000;
  overflow: hidden;
}

/* ---------------- Carrusel de imágenes ---------------- */
.carousel {
  position: absolute;
  inset: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050505;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.carousel-dots {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
  z-index: 5;
}

.carousel-dots .dot {
  flex: 1;
  height: 2.5px;
  border-radius: 2px;
  background: rgba(255,255,255,0.3);
  overflow: hidden;
}

.carousel-dots .dot.is-active {
  background: #fff;
}

/* ---------------- Info del creador y descripción (banda debajo de la imagen) ---------------- */
.post-info {
  position: relative;
  flex-shrink: 0;
  z-index: 6;
  color: #fff;
  background: rgba(8,8,12,0.97);
  padding: 12px 14px calc(12px + 58px + env(safe-area-inset-bottom));
  max-height: 40%;
  overflow-y: auto;
}

.post-creator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.post-creator-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.post-creator img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #fff;
}

.post-creator .name {
  font-weight: 700;
  font-size: 14px;
}

.post-creator .username {
  font-size: 13px;
  color: #ddd;
}

.follow-btn {
  border: 1.5px solid var(--accent);
  color: #fff;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
  margin-left: 4px;
}

.follow-btn.is-following {
  border-color: #555;
  color: #aaa;
}

.post-description {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 6px;
  word-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-hashtags {
  font-size: 13px;
  color: #8ec9ff;
  margin-bottom: 4px;
}

.post-category-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255,45,45,0.15);
  padding: 3px 8px;
  border-radius: 5px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.post-audio-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #ddd;
  margin-top: 6px;
}

.post-audio-tag svg { width: 13px; height: 13px; }

/* ---------------- Botones de acción (derecha, sobre la imagen) ----------------
   Viven dentro de .media-area (no de .post-info), así siempre quedan
   sobre la imagen y nunca se superponen con la descripción de abajo. */
.post-actions {
  position: absolute;
  right: 10px;
  bottom: 12px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #fff;
}

.action-btn .icon-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn svg {
  width: 25px;
  height: 25px;
  stroke: #fff;
}

.action-btn.is-liked svg {
  stroke: var(--accent);
  fill: var(--accent);
}

.action-btn.is-saved svg {
  stroke: #ffd23f;
  fill: #ffd23f;
}

.action-btn .count {
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.mute-toggle {
  position: absolute;
  top: 16px;
  right: 14px;
  z-index: 6;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mute-toggle svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
}

.views-count {
  position: absolute;
  top: 20px;
  left: 14px;
  z-index: 6;
  font-size: 12px;
  color: #ddd;
  display: flex;
  align-items: center;
  gap: 4px;
}

.views-count svg { width: 13px; height: 13px; stroke: #ddd; }

/* ---------------- Estado vacío / carga ---------------- */
.feed-status {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

/* La barra de navegación inferior (.bottom-nav, .nav-item, etc.)
   ahora vive en main.css, porque se usa en todas las páginas
   de la app, no solo en el feed. */
