/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: #f4f2ee;
  color: #000000e6;
  font-size: 14px;
  line-height: 1.4;
}
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
ul { list-style: none; }

/* ── Top Nav ── */
.topnav {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky; top: 0; z-index: 100;
}
.topnav-inner {
  max-width: 1128px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  height: 52px;
}
.nav-left { display: flex; align-items: center; gap: 8px; }
.logo { display: flex; align-items: center; padding: 4px; }
.search-box {
  display: flex; align-items: center; gap: 6px;
  background: #eef3f8; border-radius: 4px; padding: 0 12px; height: 34px; width: 280px;
}
.search-box input {
  border: none; background: none; outline: none; font-size: 14px; width: 100%;
}
.search-box svg { flex-shrink: 0; color: #666; }

.nav-right { display: flex; align-items: center; gap: 0; }
.nav-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 12px; height: 52px; justify-content: center;
  color: #666; font-size: 12px; position: relative;
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
}
.nav-item:hover { color: #000; }
.nav-item.active { color: #000; border-bottom-color: #000; }
.nav-item svg { margin-bottom: 2px; }
.nav-item .badge {
  position: absolute; top: 6px; right: 6px;
  background: #cc1016; color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 50%; width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
}
.nav-me { cursor: pointer; }
.me-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
  margin-bottom: 2px;
}
.me-dropdown {
  display: none; position: absolute; top: 52px; right: 0;
  background: #fff; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  width: 280px; padding: 12px 0; z-index: 200;
}
.nav-me:hover .me-dropdown { display: block; }
.dropdown-header { display: flex; gap: 12px; padding: 0 16px 12px; border-bottom: 1px solid #e0e0e0; }
.dropdown-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #0a66c2 0%, #004182 100%); flex-shrink: 0; }
.dropdown-info { display: flex; flex-direction: column; gap: 2px; }
.dropdown-info strong { font-size: 16px; }
.dropdown-info span { font-size: 12px; color: #666; }
.dropdown-btn {
  display: block; margin: 12px 16px; padding: 6px 16px;
  border: 1px solid #0a66c2; border-radius: 16px;
  color: #0a66c2; font-weight: 600; text-align: center; font-size: 14px;
}
.dropdown-btn:hover { background: #e8f0fe; }
.dropdown-divider { border-top: 1px solid #e0e0e0; margin: 8px 0; }
.me-dropdown a { display: block; padding: 4px 16px; font-size: 14px; color: #666; }
.me-dropdown a:hover { color: #000; background: #f5f5f5; }

/* ── Container ── */
.container {
  max-width: 1128px; margin: 20px auto; display: grid;
  grid-template-columns: 225px 1fr 300px; gap: 24px;
  padding: 0 16px;
}

/* ── Left Sidebar ── */
.sidebar-left { display: flex; flex-direction: column; gap: 8px; }
.profile-card {
  background: #fff; border-radius: 8px;
  border: 1px solid #e0e0e0; overflow: hidden; text-align: center;
}
.profile-banner { height: 56px; background: linear-gradient(135deg, #004182, #0a66c2, #378fe9); }
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%; border: 2px solid #fff;
  background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
  margin: -38px auto 0; position: relative;
}
.profile-card h3 { margin-top: 8px; font-size: 16px; }
.profile-card .headline { padding: 0 16px; font-size: 12px; color: #666; margin-top: 4px; }
.profile-stats { border-top: 1px solid #e0e0e0; margin-top: 12px; }
.profile-stats a {
  display: flex; justify-content: space-between; padding: 8px 16px;
  font-size: 12px; color: #666;
}
.profile-stats a:hover { background: #f5f5f5; }
.profile-stats strong { color: #0a66c2; }
.profile-premium {
  border-top: 1px solid #e0e0e0; padding: 12px 16px;
  font-size: 12px; display: flex; flex-direction: column; gap: 4px;
}
.profile-premium span { color: #666; }
.profile-premium a { color: #0a66c2; font-weight: 600; }
.profile-saved {
  border-top: 1px solid #e0e0e0; padding: 12px 16px;
  display: flex; align-items: center; gap: 8px; font-size: 12px;
}
.profile-saved a { color: #666; font-weight: 600; }

.sidebar-section {
  background: #fff; border-radius: 8px;
  border: 1px solid #e0e0e0; padding: 12px 16px;
}
.sidebar-section h4 { font-size: 12px; color: #666; margin-bottom: 8px; }
.sidebar-section li { padding: 4px 0; }
.sidebar-section li a { font-size: 12px; color: #666; font-weight: 600; }
.sidebar-section li a:hover { color: #0a66c2; }

/* ── Feed ── */
.feed { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.create-post {
  background: #fff; border-radius: 8px;
  border: 1px solid #e0e0e0; padding: 12px 16px;
}
.create-post-top { display: flex; align-items: center; gap: 8px; }
.post-avatar-small {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
  flex-shrink: 0;
}
.start-post {
  flex: 1; border: 1px solid #999; border-radius: 24px;
  padding: 10px 16px; text-align: left; color: #666; font-size: 14px;
}
.start-post:hover { background: #f5f5f5; border-color: #666; }
.create-post-actions {
  display: flex; justify-content: space-around; margin-top: 8px;
}
.create-post-actions button {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px; border-radius: 4px; font-size: 14px; font-weight: 600; color: #666;
}
.create-post-actions button:hover { background: #f5f5f5; }

.sort-bar {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #666; white-space: nowrap;
}
.sort-bar hr { flex: 1; border: none; border-top: 1px solid #e0e0e0; }
.sort-bar button { color: #666; font-weight: 600; font-size: 12px; }

/* ── Post Card ── */
.post {
  background: #fff; border-radius: 8px;
  border: 1px solid #e0e0e0; overflow: hidden;
}
.post-header { display: flex; align-items: flex-start; gap: 8px; padding: 12px 16px 0; }
.post-author-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
}
.post-meta { flex: 1; }
.post-author-name { font-weight: 600; font-size: 14px; }
.post-author-name a:hover { color: #0a66c2; text-decoration: underline; }
.post-author-title { font-size: 12px; color: #666; margin-top: 1px; }
.post-time { font-size: 12px; color: #666; display: flex; align-items: center; gap: 4px; }
.post-more {
  color: #666; font-size: 20px; padding: 4px 8px; border-radius: 50%;
  line-height: 1;
}
.post-more:hover { background: #f0f0f0; }

.post-content { padding: 12px 16px; font-size: 14px; line-height: 1.5; }
.post-content .hashtag { color: #0a66c2; font-weight: 600; }
.post-content .see-more { color: #666; cursor: pointer; font-weight: 600; }
.post-content .see-more:hover { color: #0a66c2; }
.post-image { width: 100%; display: block; }

.post-stats {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px; font-size: 12px; color: #666;
}
.post-reactions { display: flex; align-items: center; gap: 4px; }
.reaction-icons { display: flex; }
.reaction-icon {
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; margin-right: -2px; border: 1px solid #fff;
}
.reaction-like { background: #378fe9; color: #fff; }
.reaction-celebrate { background: #44712e; color: #fff; }
.reaction-love { background: #df704d; color: #fff; }

.post-actions {
  display: flex; border-top: 1px solid #e0e0e0;
}
.post-action {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 10px 0; font-size: 12px; font-weight: 600;
  color: #666; border-radius: 0;
}
.post-action:hover { background: #f0f0f0; color: #000; }
.post-action.liked { color: #0a66c2; }
.post-action svg { width: 20px; height: 20px; }

/* ── Comment Section ── */
.post-comments {
  padding: 0 16px 12px;
  display: none;
}
.post-comments.open { display: block; }
.comment-input-row {
  display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px;
}
.comment-input-row .post-avatar-small { width: 32px; height: 32px; }
.comment-input {
  flex: 1; border: 1px solid #999; border-radius: 24px;
  padding: 8px 14px; font-size: 13px; outline: none;
  resize: none; font-family: inherit; min-height: 36px;
}
.comment-input:focus { border-color: #0a66c2; }
.comment-item {
  display: flex; gap: 8px; margin-bottom: 8px;
}
.comment-body {
  background: #f2f2f2; border-radius: 0 8px 8px 8px;
  padding: 8px 12px; flex: 1;
}
.comment-body strong { font-size: 13px; }
.comment-body p { font-size: 13px; color: #333; margin-top: 2px; }
.comment-actions { display: flex; gap: 12px; margin-top: 4px; padding-left: 40px; }
.comment-actions button { font-size: 12px; font-weight: 600; color: #666; }
.comment-actions button:hover { color: #0a66c2; }

/* ── Right Sidebar ── */
.sidebar-right { display: flex; flex-direction: column; gap: 8px; }
.news-card {
  background: #fff; border-radius: 8px;
  border: 1px solid #e0e0e0; padding: 12px 0;
}
.news-header { display: flex; justify-content: space-between; align-items: center; padding: 0 16px 8px; }
.news-header h4 { font-size: 16px; }
.news-list li { padding: 6px 16px; }
.news-list li:hover { background: #f5f5f5; }
.news-list li a { font-size: 12px; font-weight: 600; display: block; }
.news-list li a span { display: block; font-weight: 400; color: #666; font-size: 11px; margin-top: 2px; }

.ad-card {
  background: #fff; border-radius: 8px;
  border: 1px solid #e0e0e0; padding: 16px; text-align: center;
  position: relative;
}
.ad-label {
  position: absolute; top: 8px; right: 12px;
  font-size: 10px; color: #999;
}
.ad-card p { font-size: 13px; margin-bottom: 12px; }
.ad-card button {
  background: #0a66c2; color: #fff; padding: 8px 20px;
  border-radius: 20px; font-weight: 600; font-size: 14px;
}
.ad-card button:hover { background: #004182; }

.footer-links {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; font-size: 11px; color: #666; padding: 16px 0;
}
.footer-links a:hover { color: #0a66c2; text-decoration: underline; }
.footer-links span { margin-top: 4px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .container { grid-template-columns: 225px 1fr; }
  .sidebar-right { display: none; }
}
@media (max-width: 768px) {
  .container { grid-template-columns: 1fr; }
  .sidebar-left { display: none; }
  .search-box { width: 160px; }
  .nav-item span { display: none; }
}
