/* Images */
.topic-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.75rem 0;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin: 0;
  background: #f9f9f9;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

.wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background: #1e3a5f;
  color: white;
  padding: 0.75rem 0;
  border-bottom: 3px solid #2563eb;
}
.site-header .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-title {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
}
.site-title:hover { text-decoration: none; opacity: 0.9; }
.site-nav a { color: #cce; font-size: 0.9rem; }

/* Main */
.page-content { margin: 2rem 0 3rem; }

/* Footer */
.site-footer {
  border-top: 1px solid #ddd;
  padding: 1.5rem 0;
  font-size: 0.85rem;
  color: #777;
  background: #fff;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: #2563eb; }

/* Forum list (homepage) */
.forum-list { list-style: none; padding: 0; margin: 0; }
.forum-list li {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}
.forum-list .forum-name { font-size: 1.1rem; font-weight: 600; }
.forum-list .forum-desc { color: #555; font-size: 0.9rem; margin-top: 0.2rem; }
.forum-list .forum-stats { font-size: 0.82rem; color: #888; margin-top: 0.4rem; }

/* Topic table */
.topic-list {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.topic-list th {
  background: #f0f4f8;
  text-align: left;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  color: #555;
  border-bottom: 1px solid #ddd;
  user-select: none;
}
.topic-list th.sort-asc::after  { content: ' ▲'; font-size: 0.7em; }
.topic-list th.sort-desc::after { content: ' ▼'; font-size: 0.7em; }
.topic-list td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.95rem;
  vertical-align: top;
}
.topic-list tr:last-child td { border-bottom: none; }
.topic-list td:nth-child(2),
.topic-list td:nth-child(3) { white-space: nowrap; color: #777; font-size: 0.85rem; }

/* Topic page */
.topic h1 { margin-bottom: 0.25rem; }
.topic-meta { color: #777; font-size: 0.88rem; margin-bottom: 2rem; }
.topic-meta a { color: #2563eb; }

/* Posts within topic content */
.topic-content h2 {
  font-size: 1rem;
  color: #1e3a5f;
  margin: 2rem 0 0;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #e8e8e8;
}
.topic-content em { color: #888; font-size: 0.85rem; }
.topic-content hr { border: none; border-top: 1px solid #eee; margin: 1.5rem 0; }
.topic-content blockquote {
  border-left: 3px solid #ccc;
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  color: #555;
  background: #fafafa;
}
.topic-content pre {
  background: #f4f4f4;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 4px;
  font-size: 0.88rem;
}
.topic-content code {
  background: #f0f0f0;
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.88rem;
}
.topic-content pre code { background: none; padding: 0; }

/* Back nav */
.topic-nav { margin-top: 2rem; font-size: 0.9rem; }

/* Headings */
h1 { font-size: 1.6rem; margin-top: 0; }

/* Archive notice */
.archive-notice {
  background: #fffbcc;
  border: 1px solid #e6d800;
  border-radius: 5px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: #555;
}
