:root {
  color-scheme: light;
  --bg: #F2F4F7;
  --text-primary: #000000;
  --text-secondary: #7E7E7E;
  --text-muted: #1E1E1E;
  --link-blue: #018AFF;
  --primary-blue: #008CFF;
  --button-blue: #038DFF;
  --border: #E1E1E3;
  --font-body: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 60px;
  gap: 60px;
  max-width: 1440px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
}

.s0-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
  height: 80px;
  padding: 0 30px;
  background: #FFFFFF;
  box-shadow: 0px 4px 9.6px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 10;
}

.s0-logo-search {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 80px;
  padding: 16px 0;
}

.s0-logo {
  width: 48px;
  height: 48px;
  display: block;
  flex-shrink: 0;
}

.s0-search {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 40px;
  padding: 8px 20px;
  border-radius: 123px;
  background: #F0F2F5;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.s0-search img {
  width: 18px;
  height: 18px;
  display: block;
}

.s0-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 80px;
  width: 740px;
  max-width: 50%;
}

.s0-nav-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  position: relative;
  text-decoration: none;
  color: #5D6163;
  transition: color 0.15s ease;
}

.s0-nav-link img {
  height: 30px;
  width: auto;
  display: block;
}

.s0-nav-icon {
  height: 30px;
  width: auto;
  display: block;
  object-fit: contain;
}

.s0-nav-link:hover { color: #1E1E1E; }

.s0-nav-link.s0-active { color: var(--primary-blue); }
.s0-nav-link.s0-active .s0-nav-icon { color: var(--primary-blue); }

.s0-nav-link.s0-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 3px;
  background: var(--primary-blue);
  border-radius: 2px;
}

.s0-icons {
  display: flex;
  align-items: center;
  gap: 31px;
  height: 80px;
  padding: 16px 0;
}

.s0-icon-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.s0-icon-btn img { display: block; }

.s0-icon-btn.s0-has-badge::after {
  content: '1';
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  background: #FF0000;
  color: #FFFFFF;
  border-radius: 50%;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.s0-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: block;
  background: #E4E6EB;
}

.s1-post {
  width: 740px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0 0 28px;
  gap: 28px;
  background: #FFFFFF;
  box-shadow: 0px 0px 14px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-family: var(--font-body);
  margin: 0;
}

.s1-post-container {
  width: 100%;
  background: #FFFFFF;
  padding: 16px 14px 7px 14px;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.06);
  border-radius: 12px 12px 0 0;
}

.s1-post-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.s1-post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.s1-post-author {
  display: flex;
  align-items: center;
  gap: 9px;
}

.s1-post-author > img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #E4E6EB;
  flex-shrink: 0;
}

.s1-post-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.s1-post-author-name {
  color: #000000;
  font-size: 20px;
  font-weight: 500;
  line-height: 24px;
}

.s1-post-author-time {
  color: #7E7E7E;
  font-size: 18px;
  font-weight: 500;
  line-height: 22px;
}

.s1-post-menu {
  cursor: pointer;
  padding: 12px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.s1-post-menu img {
  width: 30px;
  height: 6px;
  display: block;
}

.s1-post-text {
  color: #000000;
  font-size: 20px;
  font-weight: 500;
  line-height: 130%;
  margin: 0;
}

.s1-post-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  background: #f0f0f0;
}

.s1-post-reactions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.s1-reaction-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.s1-reaction-icons img {
  height: 28px;
  width: auto;
  display: block;
}

.s1-reaction-count {
  color: #7E7E7E;
  font-size: 20px;
  font-weight: 500;
  line-height: 140%;
}

.s1-post-stats {
  color: #7E7E7E;
  font-size: 18px;
  font-weight: 500;
  line-height: 140%;
}

.s1-post-divider {
  width: 100%;
  height: 1px;
  background: #E1E1E3;
  border: none;
  margin: 0;
  display: block;
}

.s1-post-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-top: 4px;
}

.s1-post-action-btn {
  flex: 1;
  display: flex;
  padding: 6px 0;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border-radius: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.s1-post-action-btn:hover { background: #F0F2F5; }

.s1-post-action-btn img {
  width: 22px;
  height: 22px;
  display: block;
}

.s1-post-action-btn.s1-comment-btn img {
  width: 24px;
  height: 24px;
}

.s1-post-action-btn.s1-share-btn img {
  width: 24px;
  height: 22px;
}

.s1-post-action-btn span {
  color: #7E7E7E;
  font-size: 20px;
  font-weight: 500;
  line-height: 120%;
}

.s1-comments-section {
  width: 100%;
  padding: 0 14px;
  display: flex;
  flex-direction: column;
}

.s1-comments-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
}

.s1-comments-title {
  color: #000000;
  font-size: 20px;
  font-weight: 600;
  line-height: 24px;
  margin: 0;
}

.s1-comments-dropdown {
  width: 18px;
  height: 18px;
  cursor: pointer;
  display: block;
}

.s1-comment-item {
  display: flex;
  padding: 14px 0;
  gap: 8px;
  width: 100%;
}

.s1-comment-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #E4E6EB;
  object-fit: cover;
}

.s1-comment-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.s1-comment-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.s1-comment-author {
  color: #1E1E1E;
  font-size: 20px;
  font-weight: 600;
  line-height: 24px;
}

.s1-comment-text {
  color: #1E1E1E;
  font-size: 18px;
  font-weight: 400;
  line-height: 132.99%;
}

.s1-comment-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.s1-comment-meta {
  display: flex;
  align-items: center;
  gap: 40px;
}

.s1-comment-time {
  color: #7E7E7E;
  font-size: 16px;
  font-weight: 500;
  line-height: 19px;
}

.s1-comment-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.s1-comment-like {
  color: #018AFF;
  font-size: 16px;
  font-weight: 600;
  line-height: 19px;
  cursor: pointer;
}

.s1-comment-reply {
  color: rgba(30, 30, 30, 0.6);
  font-size: 16px;
  font-weight: 500;
  line-height: 19px;
  cursor: pointer;
}

.s1-comment-reaction {
  display: flex;
  align-items: center;
  gap: 6px;
}

.s1-comment-reaction-count {
  color: #7E7E7E;
  font-size: 16px;
  font-weight: 500;
  line-height: 120%;
}

.s1-comment-reaction img {
  width: 26px;
  height: 26px;
  display: block;
}

.s1-load-more {
  width: 600px;
  max-width: calc(100% - 28px);
  height: 52px;
  margin: 14px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background: #A1A1A1;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
  padding: 14px 0;
}

.s1-load-more:hover { background: #909090; }

.s1-load-more span {
  color: #FFFFFF;
  font-size: 20px;
  font-weight: 600;
  line-height: 24px;
}

.s2-button {
  width: 740px;
  display: flex;
  justify-content: center;
  padding: 0;
  background: transparent;
}

.s2-button-cta {
  width: 100%;
  height: 59px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #038DFF;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 26px;
  font-weight: 600;
  line-height: 31px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  padding: 14px 0;
  transition: background 0.2s ease;
}

.s2-button-cta:hover { background: #0277CC; }
.s2-button-cta:active { background: #0066BB; }

@media (max-width: 1024px) {
  .page {
    padding: 0 0 40px;
    gap: 40px;
  }

  .s0-header {
    padding: 0 20px;
  }

  .s0-nav {
    width: 60%;
    max-width: 500px;
  }

  .s0-nav-link img,
  .s0-nav-icon {
    height: 28px;
    width: 28px;
  }

  .s0-nav-link.s0-active::after {
    width: 90px;
  }

  .s0-icons {
    gap: 22px;
  }

  .s1-post,
  .s2-button {
    width: calc(100% - 32px);
    max-width: 740px;
  }

  .s1-load-more {
    width: 80%;
    max-width: 600px;
  }
}

@media (max-width: 900px) and (min-width: 641px) {
  .page {
    padding: 0 0 28px;
    gap: 28px;
  }

  .s0-header {
    padding: 0 16px;
    height: 72px;
  }

  .s0-logo {
    width: 40px;
    height: 40px;
  }

  .s0-avatar {
    width: 40px;
    height: 40px;
  }

  .s0-logo-search {
    height: 72px;
    gap: 12px;
  }

  .s0-icons {
    gap: 18px;
    height: 72px;
  }

  .s0-nav {
    height: 72px;
    width: 40%;
    max-width: 320px;
    gap: 0;
  }

  .s0-nav-link {
    height: 72px;
  }

  .s0-nav-link img,
  .s0-nav-icon {
    height: 24px;
    width: 24px;
  }

  .s0-nav-link.s0-active::after {
    width: 50px;
    height: 3px;
  }

  .s1-post-author > img {
    width: 48px;
    height: 48px;
  }

  .s1-post-author-name { font-size: 18px; line-height: 22px; }
  .s1-post-author-time { font-size: 16px; line-height: 20px; }
  .s1-post-text { font-size: 18px; }
  .s1-reaction-count { font-size: 18px; }
  .s1-post-stats { font-size: 16px; }
  .s1-post-action-btn span { font-size: 18px; }
  .s1-comments-title { font-size: 18px; }
  .s1-comment-author { font-size: 18px; line-height: 22px; }
  .s1-comment-text { font-size: 16px; }

  .s1-load-more span { font-size: 18px; }
  .s2-button-cta { font-size: 22px; height: 52px; }
}

@media (max-width: 640px) {
  .page {
    padding: 0 0 16px;
    gap: 16px;
  }

  .s0-header {
    padding: 12px 16px 0;
    height: auto;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 8px;
    column-gap: 12px;
  }

  .s0-logo {
    width: 40px;
    height: 40px;
  }

  .s0-logo-search {
    height: auto;
    padding: 0;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .s0-search {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    justify-content: flex-start;
    padding: 8px 18px;
  }

  .s0-icons {
    gap: 0;
    padding: 0;
    height: auto;
    flex: 0 0 auto;
  }

  .s0-icons .s0-icon-btn { display: none; }

  .s0-icons .s0-icon-btn[aria-label="Menu"] {
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
  }

  .s0-nav {
    position: static;
    transform: none;
    order: 99;
    flex: 0 0 100%;
    width: calc(100% + 32px);
    height: 56px;
    max-width: 100%;
    justify-content: space-around;
    border-bottom: 1px solid #E1E1E3;
    margin: 0 -16px;
    padding: 0 8px;
  }

  .s0-nav-link {
    height: 56px;
  }

  .s0-nav-link img,
  .s0-nav-icon {
    height: 26px;
    width: 26px;
  }

  .s0-nav-link.s0-active::after {
    width: 44px;
    height: 3px;
  }

  .s1-post {
    width: calc(100% - 16px);
    border-radius: 12px;
  }

  .s1-post-container {
    padding: 12px 12px 6px 12px;
  }

  .s1-post-author > img {
    width: 40px;
    height: 40px;
  }

  .s1-post-author-name { font-size: 16px; line-height: 20px; }
  .s1-post-author-time { font-size: 14px; line-height: 18px; }
  .s1-post-text { font-size: 16px; }
  .s1-reaction-count { font-size: 16px; }
  .s1-post-stats { font-size: 14px; }
  .s1-post-action-btn span { font-size: 16px; }
  .s1-post-action-btn img { width: 20px; height: 20px; }

  .s1-comments-section {
    padding: 0 12px;
  }

  .s1-comments-title { font-size: 16px; }

  .s1-comment-avatar {
    width: 40px;
    height: 40px;
  }

  .s1-comment-author { font-size: 16px; line-height: 20px; }
  .s1-comment-text { font-size: 14px; }
  .s1-comment-time,
  .s1-comment-like,
  .s1-comment-reply,
  .s1-comment-reaction-count { font-size: 14px; }

  .s1-comment-meta { gap: 16px; }
  .s1-comment-reaction img { width: 22px; height: 22px; }

  .s1-load-more {
    width: calc(100% - 24px);
    height: 44px;
    max-width: 100%;
  }
  .s1-load-more span { font-size: 16px; }

  .s2-button {
    width: calc(100% - 16px);
  }

  .s2-button-cta {
    font-size: 20px;
    height: 52px;
  }
}
