* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    background: #f3f5f9;
    color: #2c3e50;
    line-height: 1.6;
}

.container { max-width: 860px; margin: 0 auto; padding: 0 16px; }

.topbar { background: linear-gradient(90deg, #4a6cf7, #6a8dff); color: #fff; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 56px; }
.brand { color: #fff; font-size: 20px; font-weight: bold; text-decoration: none; }
.topbar nav { display: flex; gap: 16px; align-items: center; }
.topbar nav a, .link-btn { color: #fff; text-decoration: none; font-size: 14px; }
.link-btn { background: none; border: none; cursor: pointer; padding: 0; font-family: inherit; }
.inline { display: inline; margin: 0; }

main { padding: 24px 16px; }

.card { background: #fff; border-radius: 10px; padding: 20px 24px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.card.narrow { max-width: 400px; margin: 40px auto; }
.card h2 { margin-top: 0; font-size: 18px; }
.card h2 small { color: #999; font-weight: normal; font-size: 13px; }

.row { display: flex; gap: 16px; }
.row .field { flex: 1; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; margin-bottom: 4px; color: #555; }
input, textarea {
    width: 100%; padding: 8px 10px; border: 1px solid #d5dbe5; border-radius: 6px;
    font-family: inherit; font-size: 14px;
}
input:focus, textarea:focus { outline: none; border-color: #4a6cf7; box-shadow: 0 0 0 3px rgba(74,108,247,.15); }
.field-error, .field-error ul { color: #e74c3c; font-size: 13px; margin: 4px 0 0; padding: 0; list-style: none; }

.btn {
    display: inline-block; background: #4a6cf7; color: #fff; border: none; border-radius: 6px;
    padding: 8px 20px; font-size: 14px; cursor: pointer; text-decoration: none; font-family: inherit;
}
.btn:hover { background: #3a5ae0; }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn.danger { background: #e74c3c; }
.btn.danger:hover { background: #c0392b; }

.alert { padding: 10px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert.success { background: #e8f8ef; color: #1e8449; border: 1px solid #b7e4c7; }
.alert.error { background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb; }

.list-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.list-head h2 { margin: 0; }
.search { display: flex; gap: 6px; }
.search input { width: 200px; }

.message { border-top: 1px solid #eef1f5; padding: 16px 0; }
.meta { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.meta time, .muted { color: #999; }
.floor { margin-left: auto; color: #bbb; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%; background: #4a6cf7; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: bold;
}
.content { margin: 8px 0 0 42px; white-space: pre-wrap; word-break: break-word; }
.reply { margin: 10px 0 0 42px; background: #f6f8fc; border-left: 3px solid #4a6cf7; padding: 8px 12px; font-size: 14px; white-space: pre-wrap; }
.reply time { display: block; color: #999; font-size: 12px; }
.reply-form { margin: 10px 0 0 42px; }
.actions { display: flex; gap: 8px; margin-top: 6px; }

.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row input { flex: 1; }
.captcha-img { height: 40px; width: 120px; border: 1px solid #d5dbe5; border-radius: 6px; cursor: pointer; }

.empty { color: #999; text-align: center; padding: 30px 0; }
.pager { display: flex; justify-content: center; gap: 16px; margin-top: 16px; font-size: 14px; }
.pager a { color: #4a6cf7; text-decoration: none; }

.footer { text-align: center; color: #aaa; font-size: 13px; padding: 20px 0 30px; }

@media (max-width: 600px) {
    .row { flex-direction: column; gap: 0; }
    .search input { width: 140px; }
}
