:root {
  --bg: #e7edf1;
  --ink: #16202a;
  --muted: #647386;
  --line: rgba(22, 32, 42, 0.13);
  --brand: #00b8d4;
  --hot: #f59e0b;
  --deep: #07111b;
  --shadow: 0 18px 48px rgba(8, 19, 31, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Bahnschrift", "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 184, 212, 0.18), transparent 28rem),
    radial-gradient(circle at 92% 12%, rgba(245, 158, 11, 0.15), transparent 24rem),
    linear-gradient(135deg, #f8fafc, var(--bg));
}

h1, h2, h3, p { margin: 0; }

.forum-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px max(18px, calc((100vw - 1200px) / 2));
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}

.forum-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 900;
}

.forum-brand span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #06111a;
  background: linear-gradient(135deg, var(--brand), #effcff 54%, #facc15);
  transform: rotate(-6deg);
}

.forum-topbar nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.forum-topbar nav a {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  font-weight: 800;
}

.forum-topbar nav a:hover {
  color: var(--ink);
  border-color: rgba(0, 184, 212, 0.42);
}

.forum-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  gap: 22px;
  align-items: center;
  padding: 44px max(18px, calc((100vw - 1200px) / 2)) 46px;
  color: #f8fafc;
  background:
    linear-gradient(120deg, rgba(7, 17, 27, 0.98), rgba(6, 70, 94, 0.96)),
    radial-gradient(circle at 80% 10%, rgba(0, 184, 212, 0.55), transparent 18rem);
  box-shadow: var(--shadow);
}

.forum-kicker {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #06111a;
  background: linear-gradient(135deg, #ecfeff, #fef3c7);
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.forum-hero.compact h1 {
  font-size: clamp(2rem, 4vw, 4.2rem);
}

.back-link {
  display: inline-flex;
  margin-bottom: 14px;
  color: rgba(248, 250, 252, 0.76);
  text-decoration: none;
}

.back-link:hover { color: #fff; }

h1 {
  max-width: 860px;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.forum-hero p {
  max-width: 720px;
  margin-top: 16px;
  color: rgba(248, 250, 252, 0.72);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-stats {
  display: grid;
  gap: 10px;
}

.hero-stats div,
.hero-card {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.hero-stats strong,
.hero-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.hero-stats span,
.hero-card span { color: rgba(248, 250, 252, 0.7); }

.forum-layout {
  width: min(1200px, calc(100% - 28px));
  margin: 24px auto 44px;
}

.forum-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.forum-main,
.topic-layout {
  display: grid;
  gap: 14px;
}

.forum-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.forum-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 34px rgba(8, 19, 31, 0.08);
}

.forum-intro,
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.section-head {
  margin-bottom: 14px;
}

.forum-card span {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--brand);
  font-weight: 900;
}

.forum-card h2,
.forum-card h3 {
  letter-spacing: -0.04em;
}

.forum-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.board-card {
  padding: 0;
  overflow: hidden;
}

.board-card .section-head {
  padding: 18px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.forum-board {
  display: grid;
}

.board-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 74px 92px minmax(210px, 0.56fr);
  gap: 12px;
  align-items: center;
  padding: 15px 18px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.48);
  transition: background 150ms ease, transform 150ms ease;
}

.board-row:last-child {
  border-bottom: 0;
}

.board-row:hover,
.board-row.active {
  background: linear-gradient(135deg, rgba(0, 184, 212, 0.11), rgba(245, 158, 11, 0.08));
}

.board-icon {
  display: grid !important;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 !important;
  border-radius: 13px;
  color: #06111a !important;
  background: linear-gradient(135deg, var(--brand), #effcff 58%, #facc15);
}

.board-info strong,
.board-info em,
.board-count strong,
.board-count em,
.board-last strong,
.board-last em {
  display: block;
}

.board-info strong {
  font-size: 1.05rem;
}

.board-info em,
.board-count em,
.board-last em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.35;
}

.board-count {
  text-align: center;
}

.board-count strong {
  font-size: 1.2rem;
}

.board-last strong {
  color: var(--ink);
  font-size: 0.93rem;
}

.board-last em {
  margin-top: 4px;
  font-size: 0.86rem;
}

.topic-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.topic-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 900;
}

.topic-form input,
.topic-form select,
.topic-form textarea,
.search-form input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  font: inherit;
}

.topics-card {
  margin-top: 0;
}

.topic-list,
.reply-list {
  display: grid;
  gap: 12px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
}

.pagination a,
.pagination span {
  min-width: 38px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: inherit;
  text-align: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.pagination a:hover,
.pagination a.active {
  border-color: rgba(0, 184, 212, 0.58);
  background: rgba(0, 184, 212, 0.12);
}

.topic-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.82);
}

.forum-sidebar {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 88px;
}

.sidebar-card h2 {
  margin-bottom: 12px;
}

.mini-topic-list {
  display: grid;
  gap: 10px;
}

.mini-topic-list a {
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: inherit;
  background: rgba(248, 250, 252, 0.7);
  text-decoration: none;
}

.mini-topic-list a:hover {
  border-color: rgba(0, 184, 212, 0.44);
}

.mini-topic-list strong,
.mini-topic-list span {
  display: block;
}

.mini-topic-list span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.check-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  padding: 10px 11px;
  border-radius: 13px;
  background: rgba(236, 253, 245, 0.78);
  color: #0f4f4b;
  font-weight: 800;
}

.topic-card span {
  margin-bottom: 8px;
}

.topic-card h3 a {
  color: inherit;
  text-decoration: none;
}

.topic-card h3 a:hover {
  color: #087f9a;
}

.topic-card footer {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.topic-thumb {
  width: 92px;
  height: 92px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
}

.search-form {
  display: flex;
  gap: 8px;
  min-width: min(420px, 100%);
}

.search-form input {
  min-width: 0;
}

.filter-note {
  margin: -4px 0 14px;
  color: var(--muted);
  font-weight: 800;
}

.filter-note a,
.linked-build a {
  color: #087f9a;
  font-weight: 900;
}

.topic-status {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #854d0e;
  background: #fef3c7;
  font-weight: 900;
}

.topic-status.solved {
  color: #14532d;
  background: #dcfce7;
}

.linked-build {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.64);
}

.linked-build img {
  width: 120px;
  height: 96px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
}

.linked-build strong,
.linked-build span,
.linked-build a {
  display: block;
}

.linked-build span {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.linked-build a {
  margin-top: 8px;
}

.inline-action {
  margin-top: 16px;
}

.reply-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.82);
}

.reply-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 10px 15px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #087f9a);
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(0, 184, 212, 0.22);
  cursor: pointer;
}

.button.ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  box-shadow: none;
}

.button.ghost.dark {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.notice {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  font-weight: 900;
}

.notice.ok {
  color: #14532d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.notice.error {
  color: #7f1d1d;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

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

@media (max-width: 760px) {
  .forum-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .forum-topbar nav {
    justify-content: flex-start;
  }

  .forum-hero,
  .forum-intro,
  .section-head,
  .search-form,
  .linked-build,
  .forum-shell,
  .board-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .forum-grid,
  .topic-card {
    grid-template-columns: 1fr;
  }

  .forum-sidebar {
    position: static;
  }

  .board-count {
    text-align: left;
  }
}
