/* ── Feed Page ─────────────────────────────── */

/* Prevent mobile zoom on button focus */
button {
  font-size: 16px;
  outline: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.feed-page {
  display: none;
}

.feed-wrapper {
  display: flex;
  flex-direction: column;
  /* padding: 0 40px; */
  background: var(--gradient-bg-global);
  min-height: 100%;
}

/* Feed Header */
.feed-header {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 14, 39, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 0.5px solid rgba(107, 158, 255, 0.12);
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.feed-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-image-wrap {
  position: relative;
  overflow: hidden;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  flex-shrink: 0;
}

.feed-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.18) 48%,
    rgba(255, 255, 255, 0.32) 52%,
    transparent 68%
  );
  transform: translateX(-120%) skewX(-20deg);
  animation: glass-shine 3.6s ease-in-out 0.6s infinite;
  pointer-events: none;
  z-index: 2;
}

.feed-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

.post-image-wrap {
  position: relative;
  overflow: hidden;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  border: 0.75px solid rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.post-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.18) 48%,
    rgba(255, 255, 255, 0.32) 52%,
    transparent 68%
  );
  transform: translateX(-120%) skewX(-20deg);
  animation: glass-shine 3.6s ease-in-out 1.2s infinite;
  pointer-events: none;
  z-index: 2;
}

.feed-title-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: 5px;
}

.feed-name-sub {
  font-size: 7px;
  font-weight: var(--font-weight-regular);
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.2;
  text-transform: uppercase;
  opacity: 0.75;
}

.feed-name {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.75px;
  line-height: 0.95;
  background: var(--gradient-primary-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feed-tagline {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-regular);
  letter-spacing: -0.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

.feed-header-right {
  display: flex;
  align-items: flex-end;
  padding-bottom: 2px;
}

.feed-icon {
  width: 18px;
  height: 18px;
  opacity: 0.5;
  /* transform: translateY(8px); */
}

/* Feed Main */
.feed-main {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 20px;
  padding-bottom: 28px;
}

/* Date separator between posts */
.post-date-label {
  color: #555;
  font-size: 11px;
  padding: 8px 0 6px;
}

/* Post card */
.feed-post {
  height: auto;
  overflow: hidden;
  border-radius: 0;
  padding: 28px 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  background: transparent;
  border-bottom: 0.5px solid rgba(107, 158, 255, 0.08);
}

/* Expanded post */
.feed-post.expanded {
  height: auto;
  overflow: visible;
  cursor: default;
  padding-top: 40px;
  padding-bottom: 40px;
}

.feed-post.expanded .post-read-more {
  display: none;
}

/* Expanded content block — hidden by default */
.post-expanded-content {
  display: none;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 0;
  border-bottom: none;
}

.feed-post.expanded .post-expanded-content {
  display: flex;
}

/* Vertical thread line */
/* .feed-post.expanded .post-expanded-content::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1px;
  border-bottom: none;
} */

/* Thread title — bold text with colon */
.post-thread-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.25px;
  opacity: 0.9;
  color: #ddd;
  padding: 5px 0;
  border-bottom: 0.5px solid rgba(107, 158, 255, 0.08);
}

.post-thread-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-line;
  padding-top: 30px;
  padding-bottom: 30px;
}

/* Post top row: image + title/author */
.post-top {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.post-title-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.post-subject {
  color: #ddd;
  font-size: 15px;
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.25px;
  max-width: 400px;
  opacity: 0.9;
}

.post-author {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  margin-top: 2px;
}

/* Post body content */
.post-content {
  color: #ddd;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-line;
}

.post-read-more {
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
  margin-top: -4px;
  margin-bottom: 8px;
}

.post-timeframe {
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
}

/* Post Footer */
.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
}

.post-footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.post-footer-stat {
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: default;
  opacity: 0.5;
}

.feed-post.expanded .post-footer-stat {
  opacity: 1;
  cursor: pointer;
}

.feed-post.expanded .post-impression-stat {
  cursor: default;
}

.post-footer-stat.voted {
  opacity: 1;
}

/* .post-footer-icon {
  width: 12px;
  height: 12px;
  object-fit: contain;
} */

.post-like-icon {
  width: 18px;
  height: 18px;
  transform-origin: center;
  animation: post-like-icon-breathe 2.2s ease-in-out infinite;
}

.post-impression-icon {
  width: 18px;
  height: auto;
}

.post-like-btn.voted .post-like-icon {
  animation: post-like-icon-heartbeat 1.8s ease-in-out infinite;
}

.post-footer-count {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

.post-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-cta-tag {
  display: inline-block;
  background: #5c3a1e;
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 2px;
  letter-spacing: -0.2px;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

/* ── Like icon animations ── */
@keyframes post-like-icon-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

@keyframes post-like-icon-heartbeat {
  0% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.28);
  }
  30% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.18);
  }
  65% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

/* ── Responsive — Tablet (768px+) ── */
@media (min-width: 768px) {
  .feed-wrapper {
    max-width: 900px;
    margin: 0 auto;
  }

  .feed-header {
    max-width: 900px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
  }

  .posts-list {
    padding: 12px 32px 0;
  }
}

/* ── Responsive — Desktop (1024px+) ── */
@media (min-width: 1024px) {
  .feed-wrapper {
    max-width: 860px;
  }

  .feed-header {
    max-width: 860px;
    left: auto;
    transform: none;
  }

  .posts-list {
    padding: 12px 48px 0;
  }

  .post-card {
    border-radius: 10px;
  }
}
