/* ============================================================
   二次元图书馆全局样式
   黑蓝白紫主题 + 双栏布局 + 卡片
   移动端自适应
   ============================================================ */

:root {
  --primary: #9d7bff;        /* 紫色主色 */
  --primary-dark: #7d5cd6;
  --accent: #4d7cff;         /* 蓝色点缀 */
  --bg: #0d0d0f;             /* 页面黑色背景 */
  --bg-deep: #08080a;        /* 更深背景 */
  --card: #151518;           /* 卡片背景（深灰） */
  --card-hover: #1c1c20;
  --border: #2a2a30;         /* 灰色边框 */
  --text: #f0f0f2;           /* 白色文字 */
  --text-light: #888892;     /* 灰色辅助文字 */
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #fbbf24;
  --radius: 6px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

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

/* ---------- 图标（iconfont 风格 SVG） ---------- */
.icon-svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--primary-dark);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

/* ---------- 顶部站点横幅（站名 + 副标题） ---------- */
.site-header {
  background: linear-gradient(135deg, #08080a 0%, #0d0d12 55%, #12121a 100%);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.site-brand {
  display: flex;
  flex-direction: column;
}
.site-name {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.site-tagline {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 4px;
  letter-spacing: 1px;
}
.site-search form {
  display: flex;
  align-items: center;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.site-search form:focus-within {
  border-color: var(--primary);
}
.site-search .search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  flex-shrink: 0;
  font-size: 14px;
  opacity: 0.7;
}
.site-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  padding: 8px 14px 8px 0;
  font-size: 13px;
  width: 220px;
}
.site-search input::placeholder {
  color: var(--text-light);
}

/* ---------- 行内搜索框（管理中心复用首页搜索样式） ---------- */
.inline-search form {
  display: flex;
  align-items: center;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color 0.15s;
  max-width: 360px;
}
.inline-search form:focus-within {
  border-color: var(--primary);
}
.inline-search .search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  flex-shrink: 0;
  opacity: 0.7;
}
.inline-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  padding: 7px 14px 7px 0;
  font-size: 13px;
  flex: 1;
  min-width: 0;
}
.inline-search input::placeholder {
  color: var(--text-light);
}
.inline-search .search-clear {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-light);
  text-decoration: none;
  white-space: nowrap;
}
.inline-search .search-clear:hover {
  color: var(--primary);
}

/* ---------- 主导航栏 ---------- */
.navbar {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 8px 16px;
  color: var(--text);
  font-weight: 500;
  border-radius: 4px;
}
.nav-links a:hover {
  color: var(--primary);
  background: rgba(157, 123, 255, 0.08);
}
.nav-links a.active {
  color: #fff;
  background: var(--primary);
}
/* 导航下拉菜单（其他分类） */
.nav-dropdown {
  position: relative;
}
.nav-dropdown > a::after {
  content: '▾';
  margin-left: 4px;
  font-size: 18px;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 120px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow);
  list-style: none;
  padding: 6px 0;
  z-index: 200;
}
.dropdown-menu li a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 0;
  white-space: nowrap;
}
.dropdown-menu li a:hover {
  background: rgba(157, 123, 255, 0.12);
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  display: block;
}
.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.nav-user .avatar-sm {
  border: 1px solid var(--primary);
}
.avatar-sm {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
}

/* ---------- 双栏布局 ---------- */
.layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  margin: 20px auto;
  max-width: 1100px;
  align-items: start;
}
.layout-main {
  min-width: 0;
}
.layout-side {
  min-width: 0;
}

/* ---------- 侧边栏 ---------- */
.side-card {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.side-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  padding: 10px 14px;
  background: linear-gradient(90deg, var(--primary), transparent);
  border-left: 3px solid var(--primary);
  letter-spacing: 1px;
}
.side-body {
  padding: 10px 14px;
  font-size: 13px;
}
.side-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
}
.side-tags a {
  color: var(--text-light);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 14px;
  font-size: 12px;
}
.side-tags a:hover {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}
.side-list {
  list-style: none;
}
.side-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.side-list li:last-child {
  border-bottom: none;
}
.side-list .t {
  font-size: 13px;
  color: var(--text);
  display: block;
}
.side-list .meta {
  font-size: 12px;
  color: var(--text-light);
}
.side-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--accent);
  background: rgba(77, 124, 255, 0.12);
  padding: 0 6px;
  border-radius: 4px;
  margin-right: 4px;
  vertical-align: middle;
}
.side-list .rank {
  color: var(--primary);
  font-weight: 700;
  margin-right: 6px;
}

/* ---------- 侧边栏用户状态块 ---------- */
.side-user-box {
  padding: 10px 12px;
}
.side-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.side-user-info .avatar-sm {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.side-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.side-user-name {
  font-weight: 600;
  color: #fff;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-user-points {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 1px;
}
.side-user-icons {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.side-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.side-icon-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.side-user-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.side-user-actions .btn {
  flex: 1;
  text-align: center;
}

/* ---------- 页面标题条 ---------- */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 25px 16px 25px;
}
.page-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  border-left: 4px solid var(--primary);
  padding-left: 12px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  transition: 0.2s;
  background: var(--primary);
  color: #fff;
}
.btn:hover {
  background: var(--primary-dark);
  color: #fff;
}
.btn-sm {
  padding: 5px 11px;
  font-size: 13px;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}
.btn-danger {
  background: var(--danger);
}
.btn-danger:hover {
  background: #d43a3a;
}
.btn-success {
  background: var(--success);
  color: #0d2213;
}
.btn-success:hover {
  background: #3bbf6d;
}
.btn-ghost {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--card-hover);
  color: #fff;
}
.btn-block {
  width: 100%;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title::before {
  content: "";
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

/* ---------- 提示信息 ---------- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-success {
  background: rgba(74, 222, 128, 0.12);
  color: var(--success);
  border: 1px solid rgba(74, 222, 128, 0.4);
}
.alert-error {
  background: rgba(255, 77, 77, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 77, 77, 0.4);
}
.alert-info {
  background: rgba(157, 123, 255, 0.1);
  color: var(--primary);
  border: 1px solid rgba(157, 123, 255, 0.35);
}

/* ---------- 表单 ---------- */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
}
.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  background: var(--bg-deep);
  color: var(--text);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(157, 123, 255, 0.15);
}
/* 紧凑表单控件（用于搜索栏、分类新增等） */
.form-control-sm {
  padding: 6px 10px;
  font-size: 13px;
}
select.form-control {
  appearance: auto;
  color: var(--text);
}
select.form-control option {
  background: var(--bg-deep);
}
textarea.form-control {
  resize: vertical;
  min-height: 120px;
}
.field-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 4px;
}
.field-tip {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-light);
}
.form-row {
  display: flex;
  gap: 12px;
}
.form-row .form-group {
  flex: 1;
}

/* ---------- 认证卡片 ---------- */
.auth-wrap {
  max-width: 420px;
  margin: 50px auto;
}
.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.auth-card h1 {
  font-size: 22px;
  margin-bottom: 20px;
  text-align: center;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-links {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-light);
}
.auth-links a {
  margin: 0 8px;
}
.code-row {
  display: flex;
  gap: 8px;
}
.code-row .form-control {
  flex: 1;
}
.code-row .btn {
  white-space: nowrap;
}

/* ---------- 内容列表项（博文/帖子卡片） ---------- */
.post-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 14px;
  transition: 0.2s;
}
.post-item:hover {
  background: var(--card-hover);
  border-color: var(--primary);
  transform: translateY(-1px);
}
.post-item h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
.post-item h3 a {
  color: var(--text);
}
.post-item h3 a:hover {
  color: var(--primary);
}

/* 带缩略图的博文条目：固定缩略图尺寸，条目高度不随图片变化 */
.post-item-thumb {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.post-thumb {
  width: 150px;
  height: 100px;
  flex: 0 0 150px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-deep);
  border: 1px solid var(--border);
}
.post-thumb img {
  width: 150px;
  height: 100px;
  object-fit: cover;
  display: block;
}
@media (max-width: 560px) {
  .post-thumb {
    width: 110px;
    height: 80px;
    flex-basis: 110px;
  }
  .post-thumb img {
    width: 110px;
    height: 80px;
  }
}

/* hacg 风格：标题醒目，meta 行简洁靠左 */
.post-item-thumb .post-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.4;
}
.post-item-thumb .post-title a {
  color: var(--text);
  font-weight: 600;
}
.post-item-thumb .post-title a:hover {
  color: var(--primary);
}
.post-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-light);
}
.post-meta-line .badge {
  background: var(--primary);
  color: #fff;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 12px;
}
.post-meta-line .meta-author {
  color: var(--primary);
  font-weight: 500;
}
.post-meta-line .meta-date::before {
  content: '·';
  margin-right: 8px;
  color: var(--text-light);
}
.post-meta-line .meta-reply::before {
  content: '·';
  margin-right: 8px;
  color: var(--text-light);
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-light);
  flex-wrap: wrap;
}
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  background: rgba(157, 123, 255, 0.15);
  color: var(--primary);
  border: 1px solid rgba(157, 123, 255, 0.3);
}
.badge-pending {
  background: rgba(251, 191, 36, 0.12);
  color: var(--warning);
  border-color: rgba(251, 191, 36, 0.35);
}
.badge-approved {
  background: rgba(74, 222, 128, 0.12);
  color: var(--success);
  border-color: rgba(74, 222, 128, 0.35);
}
.badge-rejected {
  background: rgba(255, 77, 77, 0.12);
  color: var(--danger);
  border-color: rgba(255, 77, 77, 0.35);
}
.badge-deleted {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-light);
  border-color: rgba(148, 163, 184, 0.35);
}

/* ---------- 用户信息行 ---------- */
.user-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.user-line img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.level-tag {
  background: rgba(255, 209, 102, 0.15);
  color: var(--accent);
  border: 1px solid rgba(255, 209, 102, 0.35);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 600;
}

/* ---------- 内容正文 ---------- */
.post-content,
.reply-content,
.rich-content {
  line-height: 1.8;
  word-wrap: break-word;
}
.post-content img,
.reply-content img,
.rich-content img {
  max-width: 100%;
  border-radius: 6px;
}
.post-content pre,
.rich-content pre {
  background: #0d0d10;
  color: #f0f0f2;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  border: 1px solid var(--border);
}
.post-content h1, .post-content h2, .post-content h3,
.rich-content h1, .rich-content h2, .rich-content h3 {
  margin: 16px 0 8px;
  color: #fff;
}

/* ---------- 回复列表 ---------- */
.reply-item {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}
.reply-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.reply-time {
  color: var(--text-light);
  font-size: 12px;
  margin-left: auto;
}

/* ---------- 楼中楼（子回复） ---------- */
.reply-children {
  margin-left: 36px;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--bg-deep);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.reply-child {
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.reply-child:first-child {
  border-top: none;
}
.reply-child .reply-head {
  margin-bottom: 4px;
}
.reply-child .reply-content {
  font-size: 13px;
  color: var(--text);
  margin-left: 30px;
}
.reply-toggle {
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
  margin-left: 8px;
}
.reply-toggle:hover {
  text-decoration: underline;
}
.reply-sub-form {
  margin-left: 36px;
  margin-top: 10px;
  padding: 12px;
  background: var(--bg-deep);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.reply-expand,
.reply-collapse {
  display: inline-block;
  margin: 6px 0;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
}
.reply-expand:hover,
.reply-collapse:hover {
  text-decoration: underline;
}
.reply-level {
  font-size: 11px;
  color: var(--accent);
  background: rgba(77, 124, 255, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
}
.badge-guest {
  font-size: 11px;
  color: var(--text-light);
  background: var(--card-hover);
  padding: 1px 6px;
  border-radius: 4px;
}
.reply-item .reply-content {
  margin-left: 36px;
}

/* ---------- 分页 ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 24px 0;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
}
.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.pagination .current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ---------- 管理中心布局 ---------- */
.center-layout {
  display: flex;
  gap: 20px;
  margin: 20px auto;
  max-width: 1100px;
}

/* 个人资料：我的投稿/我的帖子 双栏布局 */
.profile-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 768px) {
  .profile-two-col {
    grid-template-columns: 1fr;
  }
}
.center-sidebar {
  width: 220px;
  flex-shrink: 0;
}
.center-sidebar .card {
  padding: 12px;
}
.center-sidebar ul {
  list-style: none;
}
.center-sidebar li a {
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
}
.center-sidebar li a:hover {
  background: var(--card-hover);
  color: var(--primary);
}
.center-sidebar li a.active {
  background: var(--primary);
  color: #fff;
}
.center-main {
  flex: 1;
  min-width: 0;
}
.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.profile-head img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--primary);
}
.profile-meta {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--text-light);
  flex-wrap: wrap;
}

/* 后台表格 */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.table th {
  background: var(--bg-deep);
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
}
.table .actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.inline-form {
  display: inline;
}

/* 内容预览（后台截断） */
.cell-content {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 富文本编辑器（Quill 深色主题适配） ---------- */
.quill-editor-wrap {
  margin-bottom: 12px;
}
/* 工具栏 */
.quill-editor-wrap .ql-toolbar {
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--bg-deep);
}
.quill-editor-wrap .ql-toolbar button {
  color: var(--text);
}
.quill-editor-wrap .ql-toolbar button:hover,
.quill-editor-wrap .ql-toolbar button.ql-active {
  color: var(--primary);
}
.quill-editor-wrap .ql-toolbar .ql-picker-label {
  color: var(--text);
}
.quill-editor-wrap .ql-toolbar .ql-picker-label:hover,
.quill-editor-wrap .ql-toolbar .ql-picker.ql-expanded .ql-picker-label {
  color: var(--primary);
  border-color: var(--border);
}
.quill-editor-wrap .ql-toolbar .ql-picker-options {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}
.quill-editor-wrap .ql-toolbar .ql-picker-item {
  color: var(--text);
}
.quill-editor-wrap .ql-toolbar .ql-stroke {
  stroke: var(--text-light);
}
.quill-editor-wrap .ql-toolbar button:hover .ql-stroke,
.quill-editor-wrap .ql-toolbar button.ql-active .ql-stroke {
  stroke: var(--primary);
}
.quill-editor-wrap .ql-toolbar .ql-fill {
  fill: var(--text-light);
}
.quill-editor-wrap .ql-toolbar button:hover .ql-fill,
.quill-editor-wrap .ql-toolbar button.ql-active .ql-fill {
  fill: var(--primary);
}
/* 编辑区 */
.quill-editor-wrap .ql-container {
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--bg-deep);
  min-height: 300px;
  font-family: inherit;
}
.quill-editor-wrap .ql-editor {
  color: var(--text);
  min-height: 300px;
}
.quill-editor-wrap .ql-editor.ql-blank::before {
  color: var(--text-light);
  font-style: normal;
}
.quill-editor-wrap .ql-editor h1,
.quill-editor-wrap .ql-editor h2,
.quill-editor-wrap .ql-editor h3 {
  color: #fff;
}
.quill-editor-wrap .ql-editor a {
  color: var(--primary);
}
.quill-editor-wrap .ql-editor img {
  max-width: 100%;
}
.quill-editor-wrap .ql-tooltip {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow);
}
.quill-editor-wrap .ql-tooltip input[type="text"] {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 2px 6px;
}
/* 音频按钮图标（Quill 默认无 ql-audio 图标，用 SVG 补充，与主题 stroke 一致） */
.quill-editor-wrap .ql-toolbar button.ql-audio svg {
  width: 18px;
  height: 18px;
}
.quill-editor-wrap .ql-toolbar button.ql-audio .ql-stroke {
  stroke: var(--text-light);
}
.quill-editor-wrap .ql-toolbar button.ql-audio:hover .ql-stroke,
.quill-editor-wrap .ql-toolbar button.ql-audio.ql-active .ql-stroke {
  stroke: var(--primary);
}
/* ---------- 分类标签选择（tag 样式） ---------- */
.tag-select {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-option {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}
.tag-option input[type="radio"] {
  display: none;
}
.tag-option:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.tag-option.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.editor-tip {
  margin-top: 6px;
  font-size: 13px;
  color: var(--warning);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 8px 12px;
  border-radius: 6px;
}

/* ---------- 站点横幅图（站点头部下方） ---------- */
.home-banner {
  margin: 14px auto 0; /* 水平居中 */
  max-width: 1180px;
  max-height: 360px; /* 最高360px */
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center; /* 图片水平居中 */
}
.home-banner img {
    display: inline-block;
    width: 100%;
    height: auto;
    transform: translateY(-80px);
}

/* ---------- 免责声明（页脚上方） ---------- */
.disclaimer {
  max-width: 1100px;
  margin: 20px auto 0;
  padding: 12px 16px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-light);
  text-align: center;
  border-top: 1px dashed var(--border);
  width: 100%;
}

/* ---------- 页脚 ---------- */
.footer {
  margin-top: auto;
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--bg-deep);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-user {
    flex-wrap: wrap;
  }
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-search {
    width: 100%;
  }
  .site-search input {
    width: 100%;
  }
  .center-layout {
    flex-direction: column;
  }
  .center-sidebar {
    width: 100%;
  }
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  .table {
    font-size: 13px;
  }
  .table-responsive {
    overflow-x: auto;
  }
}