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

:root {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --border: #d8dde6;
  --text: #1a1d24;
  --muted: #5c6578;
  --accent: #2d6cdf;
  --accent-hover: #1f56bd;
  --tag: #e8eefb;
  --shadow: 0 1px 3px rgba(20, 30, 60, 0.08);
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  background: #1e2a3a;
  color: #fff;
  border-bottom: 3px solid var(--accent);
}

.site-header__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header__logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.site-header__logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

.site-header__nav a {
  color: #c8d4e8;
  margin-left: 18px;
  font-size: 0.9rem;
}

.site-header__nav a:hover {
  color: #fff;
  text-decoration: none;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--muted);
}

.page-title {
  margin: 0 0 6px;
  font-size: 1.6rem;
}

.page-subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.forum-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}

.forum-block__head {
  padding: 12px 16px;
  background: #eef1f6;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.95rem;
}

.forum-block__head--link {
  display: block;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.forum-block__head--link:hover {
  background: #e4e9f2;
  text-decoration: none;
}

.container--narrow {
  max-width: 480px;
}

.alert-banner {
  padding: 14px 18px;
  margin-bottom: 24px;
  border-radius: 8px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #664d03;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
}

.register-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.register-form__field {
  display: block;
  margin-bottom: 16px;
}

.register-form__field span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.register-form__field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  background: #f7f9fc;
  color: var(--muted);
}

.register-form__submit {
  width: 100%;
  margin-top: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: not-allowed;
  opacity: 0.55;
}

.register-form__note {
  margin-top: 18px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.thread-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.thread-list__item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.thread-list__item:last-child {
  border-bottom: none;
}

.thread-list__title {
  font-weight: 600;
  color: var(--text);
}

.thread-list__meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 4px;
}

.thread-list__stats {
  text-align: right;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.thread-list__stats strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
}

.post {
  display: grid;
  grid-template-columns: 140px 1fr;
  border-bottom: 1px solid var(--border);
}

.post:last-child {
  border-bottom: none;
}

.post__author {
  padding: 16px;
  background: #f7f9fc;
  border-right: 1px solid var(--border);
  text-align: center;
}

.post__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6b8cce, #2d6cdf);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 auto 10px;
}

.post__name {
  font-weight: 700;
  font-size: 0.9rem;
}

.post__role {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--tag);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.post__info {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

.post__body {
  padding: 16px 20px;
}

.post__date {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.post__text p {
  margin: 0 0 12px;
}

.post__text p:last-child {
  margin-bottom: 0;
}

.reply-box {
  margin-top: 20px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.reply-box h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.reply-box textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  resize: vertical;
}

.reply-box button {
  margin-top: 10px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.reply-box button:hover {
  background: var(--accent-hover);
}

.site-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .thread-list__item {
    grid-template-columns: 1fr;
  }

  .thread-list__stats {
    text-align: left;
  }

  .post {
    grid-template-columns: 1fr;
  }

  .post__author {
    border-right: none;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
  }

  .post__avatar {
    margin: 0;
    width: 44px;
    height: 44px;
    font-size: 0.95rem;
  }

  .post__info {
    display: none;
  }
}
