*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --border: #1e1e1e;
  --text: #e8e8e8;
  --muted: #666;
  --accent: #fff;
  --like: #e0245e;
  --radius: 12px;
  --max: 600px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

#app {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 0 80px;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
}

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

.site-logo {
  width: 32px;
  height: auto;
  image-rendering: auto;
}

header h1 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

#feed { display: flex; flex-direction: column; }

.post {
  border-bottom: 1px solid var(--border);
  padding: 20px;
  transition: background 0.15s;
}
.post:hover { background: rgba(255,255,255,0.02); }

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

.avatar { flex-shrink: 0; }
.avatar-img, .avatar-initials {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.avatar-initials {
  background: #222;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
}

.post-meta { display: flex; flex-direction: column; gap: 2px; }
.author { font-weight: 600; font-size: 0.92rem; }
.time { color: var(--muted); font-size: 0.8rem; }

.content { line-height: 1.6; font-size: 0.95rem; }

.post-image {
  margin-top: 12px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.post-actions {
  display: flex;
  gap: 20px;
  margin-top: 14px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px 0;
  transition: color 0.15s;
}
.action-btn:hover { color: var(--text); }
.action-btn svg { fill: currentColor; flex-shrink: 0; }
.action-btn.liked { color: var(--like); }

/* Skeleton */
.skeleton-post { padding: 20px; border-bottom: 1px solid var(--border); }
.sk {
  background: linear-gradient(90deg, #1a1a1a 25%, #222 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
.sk-avatar { width: 40px; height: 40px; border-radius: 50%; }
.sk-line { height: 12px; margin: 8px 0; }
.sk-header { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.sk-meta { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.sk-name { width: 100px; }
.sk-time { width: 40px; }
.sk-text-1 { width: 100%; }
.sk-text-2 { width: 75%; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.empty, .error {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 0.9rem;
}
.error a { color: var(--text); }
