* { margin: 0; padding: 0; box-sizing: border-box; } /* 全局 */

@font-face {
  font-family: 'YouYuanFont';
  src: url('/fonts/1.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body { font-family: 'YouYuanFont', "幼圆","YouYuan","Yuanti SC","华文圆体","Microsoft YaHei",sans-serif; /* 字体 */  background: #faf5f5; color: #333; line-height: 1.8; padding: 40px 20px; /* 背景 */  max-width: 720px; margin: 0 auto; font-size: 15px;  }
.container { background: #fff; margin-bottom: 30px; padding: 28px 30px; }

h1, h2 { font-weight: 400; color: #ff69b4; margin-bottom: 18px; letter-spacing: 0.03em; } /* h1 h2全局 */

/* 单独 */
h1 { font-size: 22px; text-align: center; }
h2 { font-size: 17px; border-bottom: 1px solid #ffb6c1; padding-bottom: 6px; }
h3 { font-size: 17px; padding-bottom: 6px; text-decoration: none;color: #ff69b4;}
/* 公告链接 */
h2 a { font-size: 17px; padding-bottom: 6px; text-decoration: none;}
h2 a:link, h2 a:visited, h2 a:active { color: #ff69b4; }         /* 始终与h2颜色一致 */

/* 分区 */
.tabs { display: flex; gap: 0; margin-bottom: 20px; }
.tab { flex: 1; text-align: center; padding: 10px 0; background: #fafafa; border: 1px solid #ddd; cursor: pointer; font-size: 15px; color: #888; transition: 0.2s; }
.tab:first-child { border-right: none; }
.tab.active { background: #ff69b4; color: #fff; border-color: #ff69b4; font-weight: bold; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.pagination button { background: #fff; border: 1px solid #ddd; color: #ff69b4; padding: 6px 12px; cursor: pointer; font-size: 14px; min-width: 36px; transition: 0.2s; }
.pagination button.active { background: #ff69b4; color: #fff; border-color: #ff69b4; font-weight: bold; }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* 文本域 */
.form-group { margin-bottom: 18px; }
textarea, input[type="text"], input[type="password"], select { width: 100%; padding: 10px 12px; border: 1px solid #ddd; background: #fafafa; font-size: 15px; line-height: 1.6; color: #333; outline: none; transition: border-color 0.15s; }
textarea:focus, input:focus, select:focus { border-color: #ff69b4; }
textarea { resize: vertical; min-height: 120px; }
.char-count { text-align: right; font-size: 12px; color: #aaa; margin-top: 4px; }

/* 文件上传 */
.file-upload-group { position: relative; display: inline-block; }
.file-upload-btn { background: #fff; border: 1px solid #ffb6c1; color: #ff69b4; padding: 6px 14px; font-size: 13px; cursor: pointer; display: inline-block; }
.file-name, .remove-image { font-size: 12px; color: #aaa; margin-left: 8px; vertical-align: middle; }
.remove-image { color: #ff69b4; cursor: pointer; }
.image-preview { margin-top: 10px; text-align: center; }
.image-preview img { max-width: 200px; max-height: 200px; border: 1px solid #ebebeb; }

/* 提交反馈 */
.submit-btn { background: #ff69b4; color: white; border: none; padding: 10px 28px;font-size: 15px; cursor: pointer; letter-spacing: 0.04em;display: block;width: fit-content; margin-left: auto; margin-right: 0;}
.submit-btn:hover { background: #ff1493; }

/* 发帖 */
#post-form .form-group:nth-of-type(2) { margin-bottom: 8px; }
.post { background: #fff; padding: 20px 24px; margin-bottom: 20px; border-left: 3px solid #ffb6c1; }
.post-header { display: flex; justify-content: space-between; font-size: 13px; color: #888; margin-bottom: 12px; }
.post-content { margin-bottom: 14px; line-height: 1.7; word-break: break-word; }
.post-image { max-width: 100%; max-height: 260px; margin-bottom: 10px; cursor: pointer; border: 1px solid #f0f0f0; }
.post-tag { display: inline-block; padding: 2px 10px; font-size: 12px; margin-left: 6px; }
.tag-feedback { background: #ff4444; color: white; }
.tag-resolved { background: #44ff44; color: #333; }
.admin-name { color: #ff0000; font-weight: bold; }
.user-uid { color: #666; }

/* 回复 */
.replies { margin-top: 18px; border-top: 1px dashed #dadada; padding-top: 14px; }
.reply { margin-bottom: 14px; padding-left: 14px; border-left: 2px solid #ffb6c1; font-size: 14px; }
.reply-header { display: flex; justify-content: space-between; font-size: 12px; color: #888; margin-bottom: 4px; }
.reply-image { max-width: 100%; max-height: 180px; margin-top: 6px; cursor: pointer; border: 1px solid #f0f0f0; }
.reply-form { margin-top: 14px; }
.reply-content { width: 100%; padding: 8px 10px; border: 1px solid #ddd; background: #fafafa; resize: vertical; min-height: 70px; font-size: 14px; }
.reply-content:focus { border-color: #ff69b4; }
.submit-reply { background: #ff69b4; color: white; border: none; padding: 6px 18px; font-size: 13px; cursor: pointer; margin-top: 6px; float: right; }
.submit-reply:hover { background: #ff1493; }
.clearfix::after { content: ""; display: table; clear: both; }

/* 表情 */
.emoji-selector { margin: 10px 0; }
.emoji-selector h3 { font-size: 13px; color: #ff69b4; margin-bottom: 4px; font-weight: 400; }
.emoji-list { display: flex; flex-wrap: wrap; gap: 4px; }
.emoji-item { width: 28px; height: 28px; cursor: pointer; }
.emoji { width: 18px; height: 18px; vertical-align: middle; }

/* 图片 */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); text-align: center; }
.modal-content { max-width: 90%; max-height: 80%; margin: 5% auto; }
.close-modal { position: absolute; top: 20px; right: 30px; color: white; font-size: 40px; cursor: pointer; }

/* 更新 */
.update-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2000; justify-content: center; align-items: center; }
.update-modal { background: #fff; max-width: 480px; width: 90%; padding: 28px 24px; position: relative; border-left: 4px solid #ff69b4; }
.update-modal h2 { margin-top: 0; border-bottom: 1px solid #ddd; padding-bottom: 8px; color: #ff69b4; }
.update-modal-content { max-height: 280px; overflow-y: auto; margin: 16px 0; font-size: 14px; line-height: 1.7; }
.update-modal-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #eee; padding-top: 16px; }
.update-modal-footer label { font-size: 13px; color: #888; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.update-modal-footer button { background: #ff69b4; color: white; border: none; padding: 7px 20px; font-size: 13px; cursor: pointer; }
.update-modal-footer button:hover { background: #ff1493; }
.update-modal-close { position: absolute; top: 12px; right: 18px; font-size: 24px; color: #ccc; cursor: pointer; }
.update-modal-close:hover { color: #ff69b4; }

/* 页脚 */
footer { text-align: center; margin-top: 40px; color: #bbb; font-size: 12px; }
img.logo { display: block; margin: 0 auto 20px; }

/* 提示 */
.message { padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.error { background: #fff0f0; color: #d33; border-left: 3px solid #ff3333; }
.success { background: #f0fff0; color: #2a2; border-left: 3px solid #33cc33; }
.loading { text-align: center; padding: 30px; color: #ff69b4; }