/* ============================================================
   leave-message.css — 我要留言页面样式
   基于项目 CSS 变量体系，统一暖色渐变 + 卡片风格
   ============================================================ */

/* ===== 页面自适应 ===== */
html, body { overflow-x: hidden; max-width: 100vw; }
*, *::before, *::after { box-sizing: border-box; }
.page { min-width: auto; max-width: 1400px; width: 100%; }

/* ============================================== */
/* 留言表单                                        */
/* ============================================== */
.leave-message-form {
  max-width: 720px;
}

/* 温馨提示 */
.form-tip {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #fff7e3, #ffeed0);
  border: 1px solid #f1cf6c;
  border-radius: 8px;
  color: var(--ink-700);
  font-size: 14px;
  font-family: "Noto Serif SC", serif;
}
.form-tip .tip-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* 表单行 */
.form-row {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 18px;
}

.form-label {
  width: 80px; flex-shrink: 0;
  padding-top: 10px;
  font-size: 14px; font-weight: 500;
  color: var(--ink-700);
  text-align: right;
  font-family: "Noto Serif SC", serif;
}

.form-field {
  flex: 1; min-width: 0;
  position: relative;
}

/* 输入框 */
.form-field input[type="text"] {
  width: 100%; max-width: 280px;
  height: 40px; padding: 0 14px;
  background: linear-gradient(180deg, #fdfaf7, #f9f3ec);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px; color: var(--ink-900);
  font-family: inherit;
  transition: all .2s ease;
  outline: none;
}
.form-field input[type="text"]:focus {
  border-color: var(--red-400);
  box-shadow: 0 0 0 3px rgba(232,74,60,.1);
  background: #fff;
}

/* 文本域 */
.form-field textarea {
  width: 100%;
  height: 200px; padding: 14px;
  background: linear-gradient(180deg, #fdfaf7, #f9f3ec);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px; color: var(--ink-900);
  font-family: inherit;
  line-height: 1.7;
  resize: vertical;
  transition: all .2s ease;
  outline: none;
}
.form-field textarea:focus {
  border-color: var(--red-400);
  box-shadow: 0 0 0 3px rgba(232,74,60,.1);
  background: #fff;
}

/* 字数统计 */
.char-count {
  position: absolute;
  right: 14px; bottom: 12px;
  font-size: 13px;
  font-family: "DM Mono", monospace;
  color: var(--ink-400);
  line-height: 1;
  pointer-events: none;
}

/* 验证码行 */
.form-field-inline {
  display: flex; align-items: center; gap: 14px;
}
.captcha-img {
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color .2s;
}
.captcha-img:hover {
  border-color: var(--red-400);
}

/* 表单按钮间距 */
.form-field .btn + .btn {
  margin-left: 12px;
}

/* ============================================== */
/* 留言列表                                        */
/* ============================================== */
.message-list {
  list-style: none;
  margin: 0; padding: 0;
}

.message-list li {
  display: flex; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px dashed #e8d7ce;
  transition: background .2s;
}
.message-list li:first-child {
  padding-top: 0;
}
.message-list li:hover {
  background: linear-gradient(90deg, #fff7f2, transparent);
  margin: 0 -14px;
  padding-left: 14px;
  padding-right: 14px;
  border-radius: 6px;
}

/* 头像 */
.msg-avatar {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #ffe0d6, #ffc8b9);
  display: flex; align-items: center; justify-content: center;
}
.msg-avatar img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* 留言主体 */
.msg-body {
  flex: 1; min-width: 0;
}

.msg-header {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 4px;
}

.msg-name {
  font-size: 14px; font-weight: 600;
  color: var(--ink-900);
  font-family: "Noto Serif SC", serif;
}

.msg-date {
  font-size: 12px;
  font-family: "DM Mono", monospace;
  color: var(--ink-400);
  white-space: nowrap;
}

.msg-content {
  font-size: 14px; color: var(--ink-500);
  line-height: 1.7;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
}

/* ===== 分页 ===== */
.page_div {
  display: flex; justify-content: center; align-items: center; gap: 6px;
  flex-wrap: wrap; user-select: none;
  padding: 8px 0;
}
.page_div .spage-number {
  display: flex; align-items: center; gap: 6px;
}
.page_div button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink-600); font-size: 14px;
  font-family: "DM Mono", monospace;
  cursor: pointer; transition: all .2s ease;
  line-height: 1;
}
.page_div button:hover {
  border-color: var(--red-400); color: var(--red-600);
  background: linear-gradient(180deg, #fff5f1, #ffe8e0);
  box-shadow: 0 2px 8px rgba(217,74,43,.12);
  transform: translateY(-1px);
}
.page_div button:active { transform: translateY(0); }
.page_div button.active {
  background: linear-gradient(180deg, var(--red-500), var(--red-600));
  color: #fff; border-color: var(--red-500); font-weight: 600;
  box-shadow: 0 2px 8px rgba(217,74,43,.25);
}
.page_div button.active:hover {
  color: #fff; transform: none;
  box-shadow: 0 2px 8px rgba(217,74,43,.25);
}
.page_div button[data-page="prev"],
.page_div button[data-page="next"] {
  min-width: 36px; padding: 0 8px; font-size: 16px;
  background: linear-gradient(180deg, #faf8f6, #f3ede8);
  border-color: #e0d6cc;
}
.page_div button[data-page="prev"]:hover,
.page_div button[data-page="next"]:hover {
  background: linear-gradient(180deg, #fff5f1, #ffe8e0);
  border-color: var(--red-400);
  color: var(--red-600);
}
.page_div button.button-disabled {
  opacity: .35; cursor: not-allowed; pointer-events: none;
}
.page_div button[data-page="before"],
.page_div button[data-page="after"] {
  border: none; background: transparent; color: var(--ink-400);
  min-width: 28px; padding: 0; font-size: 14px;
  cursor: default; pointer-events: none;
}
.page_div button[data-page="before"]:hover,
.page_div button[data-page="after"]:hover {
  background: transparent; transform: none; box-shadow: none;
  color: var(--ink-400);
}
