/* Social Media Simulator — Feed-Layout
   Nutzt bewusst die Variablen/Fonts aus dem geteilten ../xxx/css.css
   (--color-bg, --color-text, --color-accent, --content-width, ...),
   damit die Seite wie der Rest von dirkloop.com aussieht. Body-Hintergrund,
   #logoEbene, #start-space, #scroll, .icon kommen komplett aus css.css
   und werden hier nicht noch einmal definiert. */

:root {
  --post-bg: #FFFFFF;
  --post-border: rgba(46, 47, 47, 0.12);
  --skeleton: var(--color-highlight, #E2D9CA);
  --muted: rgba(46, 47, 47, 0.6);
  --radius: 10px;
}

/* Bewusst NUR innerhalb von #feed, nicht global (*), damit .icon/#logoEbene
   aus dem geteilten css.css nicht verzerrt werden (deren padding-Werte
   erwarten content-box, das globale CSS setzt kein eigenes box-sizing). */
#feed, #feed * { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

a.feed-link { color: var(--color-accent, #D97757); }

/* Feed */

#feed {
  width: 100%;
  max-width: var(--content-width, 450px);
  margin: 0 auto;
  padding: 20px 0 80px;
}

.post {
  background: var(--post-bg);
  border: 1px solid var(--post-border);
  border-radius: var(--radius);
  margin: 0 8px 16px;
  overflow: hidden;
}

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

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--skeleton);
  flex-shrink: 0;
}

.post-header-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.username {
  font-family: var(--font-medium), sans-serif;
  font-size: 15px;
  color: var(--color-text, #2E2F2F);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.userbio {
  font-family: var(--font-light), sans-serif;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timestamp {
  font-family: var(--font-light), sans-serif;
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
  padding-left: 8px;
}

.post-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--skeleton);
}

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

.post-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 4px;
  font-family: var(--font-light), sans-serif;
  font-size: 14px;
  color: var(--color-text, #2E2F2F);
}

.like-button {
  appearance: none;
  border: none;
  background: none;
  padding: 4px;
  margin: -4px;
  cursor: pointer;
  display: flex;
  color: var(--color-text, #2E2F2F);
  transition: transform 0.15s ease;
}

.like-button:active { transform: scale(0.85); }

.heart-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.like-button.liked {
  color: var(--color-accent, #D97757);
}

.like-button.liked .heart-icon {
  fill: currentColor;
}

.like-count {
  font-family: var(--font-medium), sans-serif;
}

.comments-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 4px 12px 14px;
  font-family: var(--font-light), sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text, #2E2F2F);
}

.comment-author {
  font-family: var(--font-medium), sans-serif;
  margin-right: 4px;
}

/* Sentinel: unsichtbarer Trigger fürs Nachladen */

#sentinel {
  height: 1px;
}

.error-message {
  text-align: center;
  padding: 40px 20px;
  font-family: var(--font-light), sans-serif;
  color: var(--muted);
  font-size: 14px;
}

/* Konsistent mit dem globalen 768px-Breakpoint aus css.css, der Fließtext
   dort auf 20px anhebt (Kompensation für initial-scale=0.8 im Viewport-Meta,
   sonst wirkt Text auf dem Handy ca. 20% kleiner als die CSS-Pixelzahl). */
@media screen and (max-width: 768px) {
  .username { font-size: 20px; }
  .userbio { font-size: 16px; }
  .timestamp { font-size: 14px; }
  .post-actions { font-size: 18px; }
  .comments-list { font-size: 18px; }
}
