/* Shared public-site chrome, news rows, and the read-only forum. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: block;
  height: auto;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-family: Outfit, Inter, sans-serif;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.5px;
}

.site-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-menu-btn {
  display: none;
  margin-left: auto;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: #fff;
  font-family: Outfit, Inter, sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  color: #c8c8c8;
  text-decoration: none;
  font-family: Outfit, Inter, sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 10px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #fff;
  outline: none;
}

.site-nav a.is-current {
  color: #fff;
  background: rgba(108, 99, 255, 0.22);
}

.site-nav a.site-nav-store {
  background: #6c63ff;
  color: #fff;
  margin-left: 8px;
}

.site-nav a.site-nav-store:hover {
  filter: brightness(1.08);
}

.site-footer {
  margin-top: 48px;
  padding: 28px 20px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #a0a0a0;
  font-family: Outfit, Inter, sans-serif;
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  margin-bottom: 14px;
}

.site-footer a {
  color: #6c63ff;
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  text-decoration: underline;
}

body.site-page {
  margin: 0;
  padding: 0;
  background: #0a0a0a;
}

body.site-page > .container {
  margin-top: 28px;
  margin-bottom: 40px;
}

@media (max-width: 760px) {
  .site-menu-btn {
    display: inline-flex;
    align-items: center;
  }

  .site-header {
    position: sticky;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin: 0;
    padding: 8px 16px 16px;
    flex-direction: column;
    align-items: stretch;
    background: #111;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-header.is-open .site-nav {
    display: flex;
  }

  .site-nav a.site-nav-store {
    margin-left: 0;
    text-align: center;
  }
}

/* Compact news archive rows */
.news-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 12px;
}

.news-row-main {
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  display: block;
}

.news-row h2 {
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  margin: 0 0 6px;
}

.news-row p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #d0d0d0;
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
}

.news-row .meta {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.news-row .tag {
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #ddd;
}

.news-row .date {
  color: #9a9a9a;
  font-size: 12px;
  font-weight: 600;
  margin-left: auto;
}

.news-row .share-btn {
  flex-shrink: 0;
  align-self: center;
}

.feed-intro p {
  margin: 0;
  color: #d0d0d0;
}

/* Homepage forum teaser */
.forum-teaser {
  padding: 20px 0 40px;
}

.forum-teaser h2 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
  letter-spacing: -1px;
  text-align: center;
}

.forum-teaser .lede {
  color: #a0a0a0;
  text-align: center;
  margin: 12px auto 28px;
  max-width: 560px;
  font-size: 18px;
}

.country-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.country-row a {
  display: block;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 12px;
  font-weight: 700;
}

.country-row a:hover,
.country-row a:focus-visible {
  border-color: rgba(108, 99, 255, 0.6);
  outline: none;
}

/* Read-only forum */
.forum-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  font-family: Outfit, "PingFang TC", "PingFang SC", sans-serif;
  color: #fff;
}

.forum-page h1 {
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: -0.5px;
  margin: 0 0 8px;
}

.forum-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: #bdbdbd;
  font-size: 14px;
  margin-bottom: 16px;
}

.forum-crumb button {
  background: none;
  border: none;
  color: #6c63ff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.forum-note,
.forum-panel,
.forum-card,
.forum-post {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.forum-note {
  padding: 12px 14px;
  color: #d0d0d0;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.forum-note strong {
  color: #ffb4a8;
  font-weight: 600;
}

.forum-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.forum-card {
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  padding: 16px 16px;
  cursor: pointer;
}

a.forum-card {
  text-decoration: none;
  display: block;
  color: inherit;
}

.forum-card:hover,
.forum-card:focus-visible,
.forum-chip:focus-visible,
.forum-text-btn:focus-visible {
  border-color: rgba(108, 99, 255, 0.7);
  outline: none;
}

.forum-card h2 {
  font-size: 18px;
  margin: 0 0 6px;
}

.forum-meta {
  color: #bdbdbd;
  font-size: 13px;
}

.forum-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 8px;
}

.forum-chip {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #eee;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
}

.forum-chip.is-current {
  background: rgba(108, 99, 255, 0.24);
  border-color: transparent;
  color: #fff;
}

.forum-post {
  padding: 16px;
  margin-bottom: 10px;
}

.forum-post header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: #bdbdbd;
  font-size: 13px;
  background: transparent;
  border: none;
  height: auto;
  position: static;
}

.forum-post .author {
  color: #fff;
  font-weight: 700;
}

.forum-post .body {
  white-space: pre-wrap;
  color: #ececec;
  font-size: 16px;
  line-height: 1.45;
  margin: 0;
}

.forum-counts {
  margin-top: 10px;
  color: #bdbdbd;
  font-size: 13px;
}

.forum-panel {
  margin-top: 20px;
  padding: 18px;
}

.forum-panel h2 {
  font-size: 18px;
  margin: 0 0 8px;
}

.forum-panel p {
  color: #d0d0d0;
  margin: 0 0 14px;
}

.forum-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.forum-actions a,
.forum-text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  font-family: inherit;
  font-size: 15px;
}

.forum-actions a {
  background: #6c63ff;
  color: #fff;
}

.forum-text-btn {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.forum-state {
  text-align: center;
  padding: 36px 12px;
  color: #d0d0d0;
}

.forum-skeleton {
  height: 72px;
  border-radius: 14px;
  background: linear-gradient(90deg, #1a1a1a 0%, #262626 50%, #1a1a1a 100%);
  background-size: 200% 100%;
  animation: forum-shimmer 1.2s linear infinite;
  margin-bottom: 10px;
}

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