@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=ZCOOL+KuaiLe&display=swap");

:root {
  --blue: #1a3a8f;
  --blue-deep: #0f2460;
  --blue-soft: #e8eefc;
  --red: #d61f26;
  --yellow: #f5c518;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --line: #d8dee9;
  --paper: #f3f5f9;
  --card: #ffffff;
  --radius: 6px;
  --shadow: 0 1px 0 rgba(15, 36, 96, 0.06), 0 8px 24px rgba(15, 36, 96, 0.06);
  --font: "Noto Sans SC", "PingFang SC", sans-serif;
  --brand: "ZCOOL KuaiLe", "Noto Sans SC", sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 420px at 10% -10%, rgba(245, 197, 24, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(26, 58, 143, 0.16), transparent 50%),
    linear-gradient(180deg, #e9eef8 0%, var(--paper) 40%, #eef1f7 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #17368a, var(--blue-deep));
  color: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 2px solid rgba(245, 197, 24, 0.85);
  background: #0b1d4d;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-name {
  font-family: var(--brand);
  font-size: 28px;
  line-height: 1;
  letter-spacing: 1px;
}

.brand-sub {
  font-size: 12px;
  opacity: 0.82;
}

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

.nav-links a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  background: rgba(245, 197, 24, 0.22);
  transform: translateY(-1px);
}

/* ---------- utility row ---------- */
.util-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  margin-top: 14px;
  align-items: stretch;
}

.notice,
.btn,
.login-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  min-height: 48px;
}

.notice-tag {
  flex: none;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.notice-text {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 18px;
  min-height: 48px;
  cursor: pointer;
  font-weight: 700;
  border: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn-checkin {
  background: linear-gradient(180deg, #ffe56a, var(--yellow));
  color: #5a3d00;
  border: 1px solid #e0b400;
}

.btn-login {
  background: linear-gradient(180deg, #2b4fb0, var(--blue));
  color: #fff;
  border: 1px solid var(--blue-deep);
  min-width: 96px;
}

.btn-ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn-red {
  background: linear-gradient(180deg, #ef3b42, var(--red));
  color: #fff;
  border: 1px solid #b5151b;
}

.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 4px;
}

/* ---------- panels ---------- */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #f7f9fd, #eef2fb);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.panel-hd .more {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.panel-bd {
  padding: 8px 0;
}

/* ---------- home columns ---------- */
.home-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  margin-top: 14px;
}

.topic-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 12px 16px;
  border-bottom: 1px dashed var(--line);
  transition: background 0.15s ease;
}

.topic-item:last-child {
  border-bottom: none;
}

.topic-item:hover {
  background: var(--blue-soft);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    linear-gradient(145deg, #2d4ea8, #132768);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex: none;
}

.topic-main {
  min-width: 0;
}

.topic-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
}

.topic-meta {
  font-size: 12px;
  color: var(--muted);
}

.topic-stats {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 4px;
}

.match-table-wrap {
  padding: 0 16px 16px;
}

.match-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.match-table th,
.match-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.match-table th {
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-weight: 700;
}

.match-table tr:last-child td {
  border-bottom: none;
}

.match-table .home {
  text-align: right;
  font-weight: 600;
}

.match-table .away {
  text-align: left;
  font-weight: 600;
}

/* ---------- post page ---------- */
.page-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--blue);
  font-weight: 600;
}

.post-card,
.user-card,
.auth-card {
  padding: 18px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-author .info strong {
  display: block;
  font-size: 16px;
}

.post-author .info span {
  color: var(--muted);
  font-size: 13px;
}

.post-title {
  margin: 14px 0 10px;
  font-size: 22px;
  line-height: 1.35;
}

.post-body {
  color: #333;
  line-height: 1.7;
  font-size: 15px;
}

.post-figure {
  margin: 14px 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, #12306f, #1d4bb3 55%, #0d204d);
  min-height: 220px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.92);
  position: relative;
}

.post-figure::after {
  content: "图片";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--brand);
  font-size: 42px;
  letter-spacing: 4px;
  opacity: 0.35;
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.reply-box {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.reply-box textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fafbff;
}

.reply-box .row {
  display: flex;
  justify-content: flex-end;
}

.section-title {
  margin: 18px 0 8px;
  font-size: 16px;
  font-weight: 800;
}

.comment {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

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

.comment .name {
  font-weight: 700;
  font-size: 14px;
}

.comment .text {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.55;
}

.comment .ops {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ---------- user page ---------- */
.user-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.user-head .left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar.lg {
  width: 64px;
  height: 64px;
  font-size: 18px;
}

.user-id {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 6px;
}

.user-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}

.user-stats b {
  color: var(--ink);
  font-size: 16px;
  margin-right: 4px;
}

.user-grid {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 14px;
  margin-top: 16px;
}

.side-box {
  padding: 14px;
  background: var(--blue-soft);
  border-radius: 8px;
  border: 1px solid #d5dff5;
}

.side-box h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.side-box p,
.side-box li {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.side-box ul {
  margin: 0;
  padding-left: 18px;
}

/* ---------- register ---------- */
.auth-wrap {
  width: min(520px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.auth-card h1 {
  margin: 0 0 6px;
  font-family: var(--brand);
  font-size: 32px;
  color: var(--blue-deep);
}

.auth-card .desc {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
}

.field input {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.rules {
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  background: #fff8e8;
  border: 1px solid #f0d789;
}

.rules h2 {
  margin: 0 0 8px;
  font-size: 15px;
}

.rules ol {
  margin: 0;
  padding-left: 20px;
  color: #5c4a16;
  font-size: 13px;
  line-height: 1.7;
}

.site-foot {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.demo-note {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.demo-note a {
  color: var(--blue);
  font-weight: 600;
}

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

  .nav-links {
    justify-content: flex-start;
  }

  .util-row,
  .home-grid,
  .user-grid {
    grid-template-columns: 1fr;
  }

  .btn-checkin,
  .btn-login {
    width: 100%;
  }
}
