* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f7f7f8; color: #222; line-height: 1.6; }
header { text-align: center; padding: 48px 16px 24px; background: #fff; border-bottom: 1px solid #eee; }
header h1 { font-size: 28px; margin-bottom: 8px; }
.subtitle { color: #888; font-size: 14px; }
main { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.06); cursor: pointer; transition: transform .15s; }
.card:hover { transform: translateY(-3px); }
.card-cover { height: 160px; display: flex; align-items: center; justify-content: center; font-size: 44px; color: #fff; }
.card-body { padding: 16px; }
.card-body h3 { font-size: 17px; margin-bottom: 6px; }
.card-body p { font-size: 13px; color: #888; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hidden { display: none; }
.detail { background: #fff; border-radius: 12px; padding: 28px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.back-btn { border: 1px solid #ddd; background: #fff; border-radius: 8px; padding: 8px 14px; cursor: pointer; margin-bottom: 20px; font-size: 14px; }
.back-btn:hover { background: #f5f5f5; }
.detail h2 { font-size: 24px; margin-bottom: 12px; }
.detail-desc { color: #555; margin-bottom: 32px; white-space: pre-line; }
.comments h3 { font-size: 18px; margin-bottom: 16px; padding-top: 20px; border-top: 1px solid #eee; }
.comment-list { margin-bottom: 24px; }
.comment { padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.comment:last-child { border-bottom: none; }
.comment-meta { font-size: 12px; color: #999; margin-bottom: 4px; }
.comment-meta .name { color: #f6821f; font-weight: 600; margin-right: 8px; }
.comment-body { font-size: 14px; white-space: pre-line; word-break: break-word; }
.empty-tip { color: #aaa; font-size: 14px; padding: 16px 0; }
.comment-form { display: flex; flex-direction: column; gap: 10px; }
.comment-form input, .comment-form textarea { border: 1px solid #ddd; border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: inherit; }
.comment-form textarea { min-height: 90px; resize: vertical; }
.comment-form button { align-self: flex-start; background: #f6821f; color: #fff; border: none; border-radius: 8px; padding: 10px 28px; font-size: 15px; cursor: pointer; }
.comment-form button:hover { background: #e67415; }
.comment-form button:disabled { background: #ccc; cursor: not-allowed; }
footer { text-align: center; padding: 24px; color: #aaa; font-size: 12px; }
.header-inner { max-width: 960px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; text-align: left; }
.auth-area { font-size: 14px; }
.auth-area button { border: 1px solid #ddd; background: #fff; border-radius: 8px; padding: 6px 14px; cursor: pointer; margin-left: 8px; font-size: 13px; }
.auth-area button:hover { background: #f5f5f5; }
.auth-area .username { color: #f6821f; font-weight: 600; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal.hidden { display: none; }
.modal-box { position: relative; background: #fff; border-radius: 12px; padding: 28px; width: 320px; display: flex; flex-direction: column; gap: 12px; }
.modal-box h3 { font-size: 18px; }
.modal-box input { border: 1px solid #ddd; border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.modal-box button#auth-submit { background: #f6821f; color: #fff; border: none; border-radius: 8px; padding: 10px; font-size: 15px; cursor: pointer; }
.auth-error { color: #e74c3c; font-size: 13px; min-height: 18px; }
.auth-switch { font-size: 13px; text-align: center; }
.auth-switch a { color: #f6821f; }
.modal-close { position: absolute; top: 8px; right: 12px; border: none; background: none; font-size: 22px; cursor: pointer; color: #aaa; }
#login-tip a { color: #f6821f; }
