/* ── 整體佈局 ── */
body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--base-color);
  color: var(--text-color);
  display: flex;
}

.main-content {
  width: 100%;
  flex: 1;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 930px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reel-story {
  width: 100%;
  max-width: 930px;
  height: 124px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 8px 9px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.reel-story::-webkit-scrollbar {
  display: none;
}

/* ── 貼文列表 ── */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 480px;
}

/* ── 貼文卡片 ── */
.post-card {
  border-radius: 4px;
  background-color: var(--base-color);
}

.post-header {
  display: flex;
  align-items: center;
  padding: 12px 10px 12px 14px;
  cursor: pointer;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-user {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
}

.post-time {
  font-size: 14px;
  color: var(--secondary-text-color);
}

.post-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--line-color);
}

.post-footer {
  display: flex;
  flex-direction: column;
  padding: 0px 10px;
  cursor: pointer;
}
.post-actions {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 6px;
  padding: 2px 0px;
}

.post-actions svg {
  width: 40px;
  height: 40px;
  padding: 8px;
  cursor: pointer;
  color: var(--text-color);
  stroke-width: 2px;
  transition: transform 0.1s ease;
}

.post-actions .post-like:first-child svg {
  margin-left: -8px;
}

.post-actions svg:hover {
  transform: scale(1.1);
}

.post-like,
.post-comment {
  display: flex;
  align-items: center;
  justify-content: left;
  gap: 2px;
  font-size: 18px;
  font-weight: 400;
  color: var(--text-color);
  cursor: pointer;
}

.post-content {
  padding: 4px 0px 16px;
  font-size: 14px;
  color: var(--text-color);
  text-align: left;
  line-height: 1.5;
}

.post-content .post-user {
  margin-right: 6px;
  font-weight: 600;
}
.caption {
  white-space: pre-line;
}

.caption.truncated {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-color);
}

.more-btn {
  font-size: 13px;
  color: var(--secondary-text-color);
  cursor: pointer;
  margin-left: 4px;
}

.aside-content {
  position: fixed;
  top: 130px;
  right: 0px;
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: 24px 24px;
  overflow: hidden;
  overflow-y: auto;
}

.suggest-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.suggest-card .user-info {
  flex: 1;
  min-width: 0;
}

.suggest-card .post-user {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.follow-btn {
  color: var(--secondary-text-color);
  background: none;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.follow-btn:hover {
  color: var(--accent-color);
}

.follow-btn:disabled {
  color: var(--secondary-text-color);
  cursor: default;
}

.post-like {
  transition: all 0.2s ease;
}

.post-like.liked svg {
  fill: #ed4956;
  stroke: #ed4956;
  animation: pop 0.3s ease;
}

@keyframes pop {
  50% {
    transform: scale(1.3);
  }
}

/* RWD */
@media (max-width: 1160px) {
  .aside-content {
    display: none;
  }
}

.loading-spinner {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.loading-spinner::after {
  content: "";
  width: 30px;
  height: 30px;
  border: 3px solid var(--line-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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