:root{
  --bg:#f5f7ff;
  --panel:#ffffff;
  --panel2:#f2f4fb;
  --border:rgba(15,23,42,.12);
  --text:#0f172a;
  --muted:rgba(15,23,42,.60);
  --accent:#2563eb;
  --accent2:#0f766e;
  --shadow:0 18px 60px rgba(15,23,42,.12);
  --radius:14px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font:14px/1.45 ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,"Noto Sans",sans-serif;
  color:var(--text);
  background: #f7f9ff;
}

.container{max-width:1100px; margin:0 auto; padding:0 18px}

.topbar{
  position:sticky; top:0; z-index:10;
  background:rgba(255,255,255,.80);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}
.topbar__inner{display:flex; align-items:center; justify-content:space-between; padding:14px 18px}
.brand__link{color:var(--text); text-decoration:none; font-weight:700; letter-spacing:.4px}

.nav{display:flex; gap:10px; align-items:center}
.nav__user{color:var(--muted); display:flex; align-items:center; gap:10px}

.search{display:flex; gap:8px; align-items:center}
.search__input{
  width:260px;
  height:34px;
  padding:0 12px;
  border-radius:10px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.90);
  color:var(--text);
}
.search__input::placeholder{color:rgba(15,23,42,.35)}

.main{padding:22px 18px 48px}

.h1{margin:0 0 6px; font-size:22px; line-height:1.2}
.h2{margin:0 0 10px; font-size:16px}

.muted{color:var(--muted)}
.strong{font-weight:650}
.right{text-align:right}

.cell-stack{display:flex; flex-direction:column; align-items:flex-start; gap:6px; min-width:0}

.rowlink{color:var(--text); text-decoration:none}
.rowlink:hover{text-decoration:underline}

.page-head{display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin:4px 0 14px}
.breadcrumbs{display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:2px 0 12px; color:var(--muted)}
.breadcrumbs a{color:var(--text); text-decoration:none}
.breadcrumbs a:hover{text-decoration:underline}
.sep{opacity:.45}

.section{margin:0 0 16px}
.section__head{display:flex; justify-content:space-between; align-items:flex-end; gap:12px; margin:0 0 10px}

.banners{display:grid; grid-template-columns:repeat(4, 1fr); gap:10px; margin:0 0 14px}
.banner{
  position:relative;
  display:block;
  border-radius:var(--radius);
  overflow:hidden;
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  text-decoration:none;
  color:var(--text);
  aspect-ratio: 1 / 1;
}
.banner__img{display:block; width:100%; height:100%; object-fit:cover}
.banner__overlay{
  position:absolute; inset:0;
  background:linear-gradient(90deg, rgba(15,23,42,.70), rgba(15,23,42,.10));
  color:#fff;
  padding:18px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  gap:4px;
}
.banner__title{font-size:18px; font-weight:750}
.banner__subtitle{opacity:.9}

.card{
  background:linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.85));
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.card--pad{padding:16px}

.table{display:flex; flex-direction:column}
.table__head{
  display:grid;
  gap:12px;
  padding:12px 14px;
  background:rgba(15,23,42,.04);
  border-bottom:1px solid var(--border);
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.6px;
}
.table__row{
  display:grid;
  gap:12px;
  padding:12px 14px;
  text-decoration:none;
  color:var(--text);
  border-bottom:1px solid rgba(15,23,42,.08);
  align-items:start;
}
.table__row:hover{background:rgba(15,23,42,.03)}
.table__empty{padding:14px; color:var(--muted)}

.table__head > *,
.table__row > *{min-width:0}

.table__row .strong,
.table__row .muted{overflow-wrap:anywhere}

.table--2 .table__head,
.table--2 .table__row{grid-template-columns: minmax(0, 1fr) 110px}

.table--3 .table__head,
.table--3 .table__row{grid-template-columns: minmax(0, 1fr) 110px 150px}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  height:34px; padding:0 12px;
  border-radius:10px;
  border:1px solid rgba(37,99,235,.28);
  background:rgba(37,99,235,.10);
  color:var(--text);
  text-decoration:none;
  cursor:pointer;
}
.btn:hover{background:rgba(37,99,235,.14)}
.btn--ghost{
  border:1px solid var(--border);
  background:rgba(255,255,255,.70);
}
.btn--ghost:hover{background:rgba(255,255,255,.06)}

.posts{display:flex; flex-direction:column; gap:10px; margin:0 0 14px}
.post{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:rgba(255,255,255,.78);
  overflow:hidden;
}
.post__meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border-bottom:1px solid rgba(15,23,42,.08);
  background:rgba(15,23,42,.04)
}
.post__author{display:flex; align-items:center; gap:10px; min-width:0}
.post__author > div{min-width:0}
.post__body{
  padding:12px;
  white-space:pre-wrap;
  line-height:1.6;
  font-size:14px;
  overflow-wrap:anywhere;
}

.topic-head{
  margin:0 0 14px;
}
.topic-head__title{margin:0 0 6px; font-size:20px; line-height:1.25}
.topic-head__meta{display:flex; flex-wrap:wrap; gap:10px; color:var(--muted)}

form p{margin:10px 0}
label{display:block; margin:0 0 6px; color:var(--muted)}
input[type=text], input[type=password], textarea{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.90);
  color:var(--text);
}
textarea{resize:vertical}

.subforums{display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; align-items:center}
.subforums{justify-content:flex-start; margin-top:0}
.subforums__item a{
  display:inline-flex;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.85);
  color:var(--text);
  text-decoration:none;
  font-size:12px;
  line-height:1.2;
}
.subforums__item a:hover{background:rgba(255,255,255,.06)}

.avatar{width:34px; height:34px; border-radius:50%; border:1px solid var(--border); background:#fff; display:block; object-fit:cover}
.avatar--sm{width:22px; height:22px}

.footer{border-top:1px solid var(--border); padding:18px 0; background:rgba(255,255,255,.70)}
.footer__inner{display:flex; justify-content:space-between; align-items:center}

.auth{max-width:520px; margin:0 auto}

.notice{padding:12px 14px; border-radius:12px; border:1px dashed rgba(15,23,42,.22); background:rgba(255,255,255,.75); color:var(--muted)}

@media (max-width:720px){
  .table--3 .table__head, .table--3 .table__row{grid-template-columns: 1fr 80px 120px}
  .table--2 .table__head, .table--2 .table__row{grid-template-columns: 1fr 80px}
  .search__input{width:160px}
  .banners{grid-template-columns:repeat(2, 1fr)}
}
