/* ==========================================================================
   星辰社区 · 自定义主题样式
   明亮浅色 · 白底蓝青 / 通透卡片 / 柔和阴影 / 微动效
   ========================================================================== */

/* ---------- 设计令牌 ---------- */
:root {
  --xc-bg: #f4f7fb;
  --xc-bg-soft: #ffffff;
  --xc-surface: #ffffff;
  --xc-surface-hover: #ffffff;
  --xc-border: rgba(15, 42, 74, 0.10);
  --xc-border-strong: rgba(15, 42, 74, 0.18);
  --xc-text: #0f2740;
  --xc-text-dim: #4a6178;
  --xc-text-mute: #7d92a6;
  --xc-primary: #0d6efd;
  --xc-primary-soft: #3b8efd;
  --xc-accent: #06b6d4;
  --xc-cyan: #0891b2;
  --xc-radius: 16px;
  --xc-radius-sm: 11px;
  --xc-shadow: 0 1px 2px rgba(15, 42, 74, 0.04), 0 8px 24px -12px rgba(15, 42, 74, 0.12);
  --xc-shadow-lg: 0 2px 4px rgba(15, 42, 74, 0.05), 0 20px 44px -18px rgba(15, 42, 74, 0.20);
  --xc-nav-h: 66px;
}

/* ---------- 基础 ---------- */
* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--xc-text);
  background: var(--xc-bg);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 背景：极淡的蓝青晕染，保持通透干净 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1000px 560px at 8% -10%, rgba(13, 110, 253, 0.09), transparent 62%),
    radial-gradient(820px 520px at 94% 0%, rgba(6, 182, 212, 0.08), transparent 60%),
    radial-gradient(1100px 620px at 50% 106%, rgba(13, 110, 253, 0.05), transparent 65%),
    linear-gradient(180deg, #f7fafd 0%, #f2f6fb 48%, #eef3fa 100%);
}

/* 细腻点阵纹理，替代原星空 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(15, 42, 74, 0.055) 1px, transparent 0);
  background-size: 22px 22px;
}

/* ---------- 图标基准尺寸 ---------- */
/* 内联 SVG 未设宽高时会按 viewBox 撑满父容器，导致按钮、标签等比例失真。
   这里统一给所有内联图标一个 1em 的基准尺寸，再由各组件规则按需微调。 */
svg {
  width: 1em;
  height: 1em;
  flex: none;
  vertical-align: -0.12em;
}

/* 明确需要撑满容器的场景（如头像内的图片、灯箱）保持原样 */
.xc-avatar img,
.xc-markdown img,
.xc-lightbox img {
  width: 100%;
  height: 100%;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }::-webkit-scrollbar-track { background: rgba(15, 42, 74, 0.03); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(13, 110, 253, 0.55), rgba(6, 182, 212, 0.5));
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(13, 110, 253, 0.8), rgba(6, 182, 212, 0.75));
  background-clip: padding-box;
}

::selection { background: rgba(13, 110, 253, 0.2); color: #0b2138; }

/* ---------- 卡片 ---------- */
.xc-card {
  position: relative;
  background: var(--xc-surface);
  border: 1px solid var(--xc-border);
  border-radius: var(--xc-radius);
  box-shadow: var(--xc-shadow);
  transition: transform .3s cubic-bezier(.2,.8,.25,1), box-shadow .3s ease, border-color .3s ease;
}

.xc-card-hover:hover {
  transform: translateY(-3px);
  border-color: var(--xc-border-strong);
  box-shadow: var(--xc-shadow-lg);
}

/* 顶部高光边（浅色下改为极淡的彩色描边） */
.xc-card-glow::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  border-radius: var(--xc-radius) var(--xc-radius) 0 0;
  background: linear-gradient(90deg, rgba(13, 110, 253, 0), rgba(13, 110, 253, 0.45), rgba(6, 182, 212, 0.35), rgba(13, 110, 253, 0));
  opacity: .9;
}

.xc-glass {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--xc-border);
}

/* ---------- 文字渐变 ---------- */
.xc-gradient-text {
  background: linear-gradient(105deg, #0d6efd 0%, #2563eb 40%, #06b6d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: xc-shimmer 9s linear infinite;
}

@keyframes xc-shimmer {
  to { background-position: 200% center; }
}

/* ---------- 按钮 ---------- */
.xc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.375rem;
  padding: .6rem 1.15rem;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .3s ease, background .25s ease, border-color .25s ease, color .25s ease;
}
.xc-btn svg { width: 1.05em; height: 1.05em; flex: none; }
.xc-btn:active { transform: scale(.97); }

.xc-btn-primary {
  color: #fff;
  background: linear-gradient(105deg, #0d6efd 0%, #1e7bf5 55%, #06b6d4 100%);
  box-shadow: 0 6px 16px -6px rgba(13, 110, 253, 0.5);
}
.xc-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -8px rgba(13, 110, 253, 0.6);
  filter: brightness(1.04);
}

.xc-btn-ghost {
  color: var(--xc-text-dim);
  background: #fff;
  border-color: var(--xc-border);
  box-shadow: 0 1px 2px rgba(15, 42, 74, 0.04);
}
.xc-btn-ghost:hover {
  color: var(--xc-text);
  background: #fff;
  border-color: rgba(13, 110, 253, 0.45);
  box-shadow: 0 4px 12px -6px rgba(13, 110, 253, 0.3);
  transform: translateY(-1px);
}

.xc-btn-danger {
  color: #fff;
  background: linear-gradient(105deg, #e11d48, #f43f5e);
  box-shadow: 0 6px 16px -8px rgba(244, 63, 94, 0.55);
}
.xc-btn-danger:hover { transform: translateY(-1px); filter: brightness(1.06); }

.xc-btn-sm { min-height: 1.95rem; padding: .35rem .8rem; font-size: .78rem; }
.xc-btn-xs { min-height: 1.7rem; padding: .22rem .6rem; font-size: .72rem; border-radius: 8px; }

/* 空状态等大图标场景：显式覆盖，避免被 1em 基准压得过小 */
.xc-btn-lg-icon svg { width: 3rem; height: 3rem; }

/* ---------- 输入框 ---------- */
.xc-input,
.xc-textarea,
.xc-select {
  width: 100%;
  padding: .7rem 1rem;
  color: var(--xc-text);
  background: #fff;
  border: 1px solid var(--xc-border-strong);
  border-radius: var(--xc-radius-sm);
  font-size: .9rem;
  outline: none;
  transition: border-color .22s ease, box-shadow .22s ease, background .22s ease;
}
.xc-input::placeholder,
.xc-textarea::placeholder { color: var(--xc-text-mute); }

.xc-input:hover,
.xc-textarea:hover,
.xc-select:hover { border-color: rgba(13, 110, 253, 0.35); }

.xc-input:focus,
.xc-textarea:focus,
.xc-select:focus {
  border-color: rgba(13, 110, 253, 0.75);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.14);
}

.xc-textarea { resize: vertical; min-height: 110px; line-height: 1.75; }

.xc-select { appearance: none; cursor: pointer; }
.xc-select option { background: #fff; color: var(--xc-text); }

/* ---------- 标签 / 徽章 ---------- */
.xc-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .28rem .7rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 500;
  border: 1px solid var(--xc-border);
  background: #f6f9fc;
  color: var(--xc-text-dim);
  transition: all .22s ease;
}
.xc-chip:hover {
  color: var(--xc-primary);
  border-color: rgba(13, 110, 253, 0.45);
  background: rgba(13, 110, 253, 0.07);
  transform: translateY(-1px);
}
.xc-chip svg { width: .95rem; height: .95rem; flex: none; }

/* 标签配色（浅底深字，保证可读性） */
.tag-violet  { color:#5b21b6; background:#f3eeff; border-color:#ddd0f7; }
.tag-indigo  { color:#1e40af; background:#eef2ff; border-color:#cdd8f8; }
.tag-sky     { color:#075985; background:#eaf6fd; border-color:#bde4f5; }
.tag-cyan    { color:#155e75; background:#e6f7fa; border-color:#b6e8f0; }
.tag-emerald { color:#065f46; background:#e8f8f0; border-color:#b8e6cf; }
.tag-amber   { color:#92400e; background:#fdf5e4; border-color:#f2ddb0; }
.tag-rose    { color:#9f1239; background:#fdf0f3; border-color:#f6ccd7; }
.tag-fuchsia { color:#86198f; background:#fcf0fd; border-color:#f0c9f2; }

/* ---------- 头像 ---------- */
.xc-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #0d6efd, #06b6d4);
  box-shadow: 0 4px 12px -6px rgba(13, 110, 253, .55);
  user-select: none;
}
.xc-avatar img { width: 100%; height: 100%; object-fit: cover; }

.avatar-0 { background: linear-gradient(135deg,#0d6efd,#3b82f6); }
.avatar-1 { background: linear-gradient(135deg,#0ea5e9,#0284c7); }
.avatar-2 { background: linear-gradient(135deg,#06b6d4,#0891b2); }
.avatar-3 { background: linear-gradient(135deg,#10b981,#0d9488); }
.avatar-4 { background: linear-gradient(135deg,#f59e0b,#f97316); }
.avatar-5 { background: linear-gradient(135deg,#ef4444,#f43f5e); }
.avatar-6 { background: linear-gradient(135deg,#6366f1,#0d6efd); }
.avatar-7 { background: linear-gradient(135deg,#14b8a6,#22c55e); }

/* ---------- 图标块 ---------- */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 11px;
  background: rgba(13, 110, 253, 0.09);
  border: 1px solid rgba(13, 110, 253, 0.18);
  color: var(--xc-primary);
  flex: none;
}
.icon-badge svg { width: 1.15rem; height: 1.15rem; }
/* 小尺寸徽章内图标相应缩小，避免撑满方框显得局促 */
.icon-badge.\!h-7 svg, .icon-badge.\!h-8 svg { width: .95rem; height: .95rem; }
.icon-badge.\!h-10 svg, .icon-badge.\!h-12 svg { width: 1.25rem; height: 1.25rem; }

/* ---------- 导航栏 ---------- */
.xc-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--xc-nav-h);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--xc-border);
  box-shadow: 0 1px 3px rgba(15, 42, 74, 0.03);
}
.xc-nav::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(13,110,253,.35), rgba(6,182,212,.3), transparent);
}

.xc-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .85rem;
  border-radius: 9px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--xc-text-dim);
  transition: color .2s ease, background .2s ease;
}
.xc-nav-link svg { width: 1.05rem; height: 1.05rem; }
.xc-nav-link:hover { color: var(--xc-primary); background: rgba(13, 110, 253, 0.06); }
.xc-nav-link.active {
  color: var(--xc-primary);
  background: rgba(13, 110, 253, 0.09);
  box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.18);
}
.xc-nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #0d6efd, #06b6d4);
}

/* ---------- 区块标题 ---------- */
.xc-section-title {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--xc-text);
}
.xc-section-title svg { width: 1.1rem; height: 1.1rem; color: var(--xc-primary); }

/* ---------- 帖子卡片 ---------- */
.xc-post-item {
  position: relative;
  display: block;
  padding: 1.15rem 1.25rem;
  border-radius: var(--xc-radius);
  border: 1px solid var(--xc-border);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 42, 74, 0.04);
  transition: transform .3s cubic-bezier(.2,.8,.25,1), border-color .3s ease, box-shadow .3s ease;
  overflow: hidden;
}
.xc-post-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #0d6efd, #06b6d4);
  opacity: 0;
  transition: opacity .3s ease;
}
.xc-post-item:hover {
  transform: translateY(-3px);
  border-color: rgba(13, 110, 253, 0.3);
  box-shadow: 0 12px 32px -14px rgba(13, 110, 253, 0.28);
}
.xc-post-item:hover::before { opacity: 1; }

.xc-post-title {
  font-size: 1.02rem;
  font-weight: 650;
  color: var(--xc-text);
  line-height: 1.5;
  transition: color .22s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.xc-post-item:hover .xc-post-title { color: var(--xc-primary); }

.xc-post-excerpt {
  margin-top: .45rem;
  font-size: .82rem;
  line-height: 1.7;
  color: var(--xc-text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.xc-meta {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  color: var(--xc-text-mute);
}
.xc-meta svg { width: .95rem; height: .95rem; opacity: .8; }

/* ---------- 轮播图 ---------- */
.xc-carousel { position: relative; border-radius: 20px; overflow: hidden; }
.xc-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .8s ease, transform 1.2s ease;
  pointer-events: none;
}
.xc-slide.is-active { opacity: 1; transform: scale(1); pointer-events: auto; }

.xc-carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: all .3s ease;
  cursor: pointer;
  border: none;
  padding: 0;
}
.xc-carousel-dot.is-active {
  width: 22px;
  background: #fff;
}

/* ---------- 统计数字 ---------- */
.xc-stat-value {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
}

/* ---------- Markdown 正文 ---------- */
.xc-markdown {
  font-size: .95rem;
  line-height: 1.85;
  color: #24405c;
  word-break: break-word;
}
.xc-markdown > *:first-child { margin-top: 0; }
.xc-markdown > *:last-child { margin-bottom: 0; }

.xc-markdown h1,
.xc-markdown h2,
.xc-markdown h3,
.xc-markdown h4 {
  color: #0b2138;
  font-weight: 750;
  line-height: 1.35;
  margin: 1.7em 0 .65em;
  scroll-margin-top: 90px;
}
.xc-markdown h1 { font-size: 1.55rem; }
.xc-markdown h2 {
  font-size: 1.28rem;
  padding-bottom: .42rem;
  border-bottom: 1px solid var(--xc-border);
}
.xc-markdown h3 { font-size: 1.1rem; }
.xc-markdown h4 { font-size: 1rem; }

.xc-markdown p { margin: .82em 0; }

.xc-markdown a {
  color: var(--xc-primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(13, 110, 253, .3);
  transition: color .2s ease, border-color .2s ease;
}
.xc-markdown a:hover { color: #0891b2; border-bottom-color: #0891b2; }

.xc-markdown ul,
.xc-markdown ol { margin: .78em 0; padding-left: 1.4em; }
.xc-markdown li { margin: .32em 0; }
.xc-markdown ul li::marker { color: var(--xc-primary); }
.xc-markdown ol li::marker { color: var(--xc-primary); }

.xc-markdown blockquote {
  margin: 1.05em 0;
  padding: .8rem 1.05rem;
  border-left: 3px solid rgba(13, 110, 253, .6);
  border-radius: 0 10px 10px 0;
  background: rgba(13, 110, 253, .05);
  color: var(--xc-text-dim);
}
.xc-markdown blockquote p { margin: .3em 0; }

.xc-markdown code {
  padding: .14em .42em;
  border-radius: 5px;
  background: #eef4fb;
  border: 1px solid #dde8f3;
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: .86em;
  color: #0b5fa5;
}

.xc-markdown pre {
  position: relative;
  margin: 1.15em 0;
  padding: 1.05rem 1.15rem;
  border-radius: 12px;
  background: #0f2338;
  border: 1px solid rgba(15, 42, 74, .12);
  overflow-x: auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.xc-markdown pre code {
  padding: 0;
  border: none;
  background: transparent;
  color: #e6eef7;
  font-size: .85rem;
  line-height: 1.7;
  display: block;
  white-space: pre;
}

.xc-markdown img {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--xc-border);
  margin: .95em 0;
  cursor: zoom-in;
  transition: transform .3s ease, box-shadow .3s ease;
}
.xc-markdown img:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -16px rgba(15, 42, 74, .4); }

.xc-markdown table {
  width: 100%;
  margin: 1.15em 0;
  border-collapse: collapse;
  font-size: .875rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--xc-border);
}
.xc-markdown thead { background: #f1f6fb; }
.xc-markdown th,
.xc-markdown td {
  padding: .62rem .85rem;
  border: 1px solid var(--xc-border);
  text-align: left;
}
.xc-markdown th { color: var(--xc-text); font-weight: 650; }
.xc-markdown tr:nth-child(even) td { background: #fafcfe; }

.xc-markdown hr {
  margin: 1.7em 0;
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(13,110,253,.35), transparent);
}

.xc-markdown input[type="checkbox"] { margin-right: .4rem; accent-color: var(--xc-primary); }

/* ---------- 代码高亮容器 ---------- */
.xc-code-wrap { position: relative; }
.xc-code-copy {
  position: absolute;
  top: .5rem;
  right: .55rem;
  padding: .22rem .55rem;
  font-size: .7rem;
  border-radius: 7px;
  color: #b6c9dc;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.14);
  cursor: pointer;
  opacity: 0;
  transition: opacity .22s ease, background .22s ease, color .22s ease;
}
.xc-code-wrap:hover .xc-code-copy { opacity: 1; }
.xc-code-copy:hover { background: rgba(13,110,253,.55); color: #fff; }

/* ---------- 楼层回复 ---------- */
.xc-comment {
  position: relative;
  padding: 1rem 1.15rem;
  border-radius: var(--xc-radius);
  border: 1px solid var(--xc-border);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 42, 74, 0.03);
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.xc-comment:hover {
  border-color: rgba(13, 110, 253, 0.25);
  box-shadow: 0 6px 18px -10px rgba(15, 42, 74, 0.16);
}
.xc-comment.is-author {
  border-color: rgba(245, 158, 11, .4);
  background: #fffdf7;
}
.xc-comment.is-target {
  animation: xc-highlight 2.4s ease;
}
@keyframes xc-highlight {
  0%, 100% { box-shadow: 0 0 0 0 rgba(13,110,253,0); }
  25% { box-shadow: 0 0 0 4px rgba(13,110,253,.22); }
}

.xc-floor-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.5rem;
  padding: 0 .45rem;
  border-radius: 7px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--xc-primary);
  background: rgba(13, 110, 253, .08);
  border: 1px solid rgba(13, 110, 253, .2);
}

/* ---------- 点赞 / 收藏按钮 ---------- */
.xc-action-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: 10px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--xc-text-dim);
  background: #fff;
  border: 1px solid var(--xc-border-strong);
  cursor: pointer;
  transition: all .22s ease;
}
.xc-action-btn svg { width: 1.05rem; height: 1.05rem; transition: transform .22s ease; }
.xc-action-btn:hover {
  color: var(--xc-primary);
  border-color: rgba(13, 110, 253, .45);
  background: rgba(13, 110, 253, .05);
}
.xc-action-btn:hover svg { transform: scale(1.12); }
.xc-action-btn:active svg { transform: scale(.9); }

.xc-action-btn.is-active {
  color: var(--xc-primary);
  background: rgba(13, 110, 253, .09);
  border-color: rgba(13, 110, 253, .4);
  box-shadow: 0 4px 14px -8px rgba(13, 110, 253, .5);
}
.xc-action-btn.is-active svg { color: var(--xc-primary); }

.xc-action-btn.liked svg { animation: xc-pop .45s cubic-bezier(.2,.9,.3,1.4); }
@keyframes xc-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.xc-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  color: var(--xc-text-mute);
  background: #fff;
  border: 1px solid var(--xc-border);
  cursor: pointer;
  transition: all .2s ease;
}
.xc-icon-btn svg { width: 1rem; height: 1rem; }
.xc-icon-btn:hover {
  color: var(--xc-primary);
  background: rgba(13, 110, 253, .07);
  border-color: rgba(13, 110, 253, .35);
  transform: translateY(-1px);
}
.xc-icon-btn.danger:hover { color: #e11d48; background: rgba(244, 63, 94, .08); border-color: rgba(244, 63, 94, .4); }

/* ---------- 提示消息 ---------- */
.xc-flash {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .78rem 1rem;
  border-radius: 12px;
  font-size: .875rem;
  border: 1px solid;
  animation: xc-slide-down .4s cubic-bezier(.2,.8,.25,1);
}
@keyframes xc-slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.xc-flash svg { width: 1.15rem; height: 1.15rem; flex: none; }

.flash-success { color:#065f46; background:#e9f9f1; border-color:#b4e3cd; }
.flash-error   { color:#9f1239; background:#fdf0f3; border-color:#f6cbd6; }
.flash-warning { color:#92400e; background:#fdf6e7; border-color:#f2ddb0; }
.flash-info    { color:#075985; background:#eaf6fd; border-color:#bde4f5; }

/* ---------- 分页 ---------- */
.xc-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.3rem;
  height: 2.3rem;
  padding: 0 .6rem;
  border-radius: 9px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--xc-text-dim);
  background: #fff;
  border: 1px solid var(--xc-border-strong);
  transition: all .2s ease;
}
.xc-page-link:hover {
  color: var(--xc-primary);
  border-color: rgba(13, 110, 253, .45);
  background: rgba(13, 110, 253, .05);
  transform: translateY(-1px);
}
.xc-page-link.is-current {
  color: #fff;
  background: linear-gradient(105deg, #0d6efd, #06b6d4);
  border-color: transparent;
  box-shadow: 0 6px 16px -8px rgba(13, 110, 253, .6);
}
.xc-page-link.is-disabled { opacity: .4; pointer-events: none; }
.xc-page-link svg { width: 1rem; height: 1rem; }

/* ---------- 侧边栏 ---------- */
.xc-sidebar {
  position: sticky;
  top: calc(var(--xc-nav-h) + 1.25rem);
  align-self: flex-start;
}

.xc-side-link {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .55rem .75rem;
  border-radius: 9px;
  font-size: .845rem;
  color: var(--xc-text-dim);
  transition: all .2s ease;
}
.xc-side-link svg { width: 1.05rem; height: 1.05rem; flex: none; }
.xc-side-link:hover { color: var(--xc-primary); background: rgba(13, 110, 253, .05); transform: translateX(3px); }
.xc-side-link.active {
  color: var(--xc-primary);
  background: rgba(13, 110, 253, .09);
  box-shadow: inset 0 0 0 1px rgba(13, 110, 253, .18);
  font-weight: 600;
}

/* ---------- 标签云 ---------- */
.xc-tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.xc-tag-cloud .xc-chip { transition: transform .25s cubic-bezier(.2,.8,.25,1), background .25s ease; }
.xc-tag-cloud .xc-chip:hover { transform: translateY(-2px) scale(1.03); }

/* ---------- 用户列表 ---------- */
.xc-user-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  padding: 1.35rem 1rem;
  border-radius: var(--xc-radius);
  border: 1px solid var(--xc-border);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 42, 74, 0.04);
  transition: all .28s ease;
  text-align: center;
}
.xc-user-card:hover {
  transform: translateY(-4px);
  border-color: rgba(13, 110, 253, .3);
  box-shadow: 0 16px 36px -18px rgba(13, 110, 253, .3);
}

/* ---------- 编辑器 ---------- */
.xc-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem;
  padding: .5rem;
  border: 1px solid var(--xc-border-strong);
  border-bottom: none;
  border-radius: var(--xc-radius-sm) var(--xc-radius-sm) 0 0;
  background: #f8fafd;
}
.xc-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 7px;
  color: var(--xc-text-dim);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .18s ease;
}
.xc-tool-btn svg { width: 1rem; height: 1rem; }
.xc-tool-btn:hover { color: var(--xc-primary); background: rgba(13, 110, 253, .09); border-color: rgba(13, 110, 253, .25); }

.xc-editor-body {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--xc-border-strong);
  border-radius: 0 0 var(--xc-radius-sm) var(--xc-radius-sm);
  overflow: hidden;
  background: #fff;
}
.xc-editor-body.split { grid-template-columns: 1fr 1fr; }

.xc-editor-input {
  width: 100%;
  min-height: 420px;
  padding: 1rem 1.15rem;
  color: var(--xc-text);
  background: #fff;
  border: none;
  outline: none;
  resize: vertical;
  font-family: "JetBrains Mono", Consolas, "PingFang SC", monospace;
  font-size: .875rem;
  line-height: 1.8;
  tab-size: 2;
}

.xc-editor-preview {
  min-height: 420px;
  max-height: 720px;
  overflow-y: auto;
  padding: 1rem 1.35rem;
  border-left: 1px solid var(--xc-border);
  background: #fafcfe;
}

/* 编辑器拖拽上传 */
.xc-editor-input.is-dragover { background: rgba(13, 110, 253, .06); }

/* ---------- 图片预览灯箱 ---------- */
.xc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(11, 33, 56, .82);
  backdrop-filter: blur(10px);
  cursor: zoom-out;
  animation: xc-fade .28s ease;
}
.xc-lightbox.is-open { display: flex; }
.xc-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 14px;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.6);
  animation: xc-zoom-in .32s cubic-bezier(.2,.8,.25,1);
}
@keyframes xc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes xc-zoom-in { from { opacity: 0; transform: scale(.93); } to { opacity: 1; transform: scale(1); } }

/* ---------- 后台侧栏 ---------- */
.xc-admin-side {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--xc-border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
}
.xc-admin-link {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .6rem .8rem;
  border-radius: 9px;
  font-size: .845rem;
  font-weight: 500;
  color: var(--xc-text-dim);
  transition: all .2s ease;
  position: relative;
}
.xc-admin-link svg { width: 1.05rem; height: 1.05rem; flex: none; }
.xc-admin-link:hover { color: var(--xc-primary); background: rgba(13, 110, 253, .05); transform: translateX(3px); }
.xc-admin-link.active {
  color: var(--xc-primary);
  background: rgba(13, 110, 253, .09);
  box-shadow: inset 0 0 0 1px rgba(13, 110, 253, .18);
  font-weight: 600;
}
.xc-admin-link.active::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  border-radius: 3px;
  background: linear-gradient(180deg, #0d6efd, #06b6d4);
}

/* ---------- 数据表格 ---------- */
.xc-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .845rem; }
.xc-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: .72rem 1rem;
  text-align: left;
  font-weight: 650;
  font-size: .78rem;
  letter-spacing: .02em;
  color: var(--xc-text-mute);
  background: #f7fafd;
  border-bottom: 1px solid var(--xc-border);
  white-space: nowrap;
}
.xc-table tbody td {
  padding: .78rem 1rem;
  border-bottom: 1px solid rgba(15, 42, 74, .06);
  color: var(--xc-text-dim);
  vertical-align: middle;
}
.xc-table tbody tr { transition: background .2s ease; }
.xc-table tbody tr:hover { background: rgba(13, 110, 253, .035); }
.xc-table tbody tr:last-child td { border-bottom: none; }

/* ---------- 进度条 ---------- */
.xc-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 42, 74, .07);
  overflow: hidden;
}
.xc-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0d6efd, #06b6d4);
  transition: width .8s cubic-bezier(.2,.8,.25,1);
}

/* ---------- 仪表盘柱状图 ---------- */
.xc-bar-chart { display: flex; align-items: flex-end; gap: .55rem; height: 150px; }
.xc-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .5rem; height: 100%; justify-content: flex-end; }
.xc-bar {
  width: 100%;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #60a5fa, #0d6efd 55%, #06b6d4);
  min-height: 4px;
  transition: height .8s cubic-bezier(.2,.8,.25,1), filter .22s ease;
  position: relative;
}
.xc-bar-col:hover .xc-bar { filter: brightness(1.1); }

/* ---------- 空状态 ---------- */
.xc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--xc-text-mute);
}
/* 直接子级的装饰性大图标才放大；按钮内部的图标仍保持按钮内的小尺寸 */
.xc-empty > svg { width: 3rem; height: 3rem; opacity: .35; }
.xc-empty .xc-btn svg { width: 1.05em; height: 1.05em; opacity: 1; }

/* ---------- 装饰光斑 ---------- */
.xc-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: .35;
}

/* ---------- 工具类 ---------- */
.xc-clamp-1 { display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.xc-clamp-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.xc-clamp-3 { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

.xc-no-scrollbar::-webkit-scrollbar { display: none; }
.xc-no-scrollbar { scrollbar-width: none; }

/* 进场动画 */
.xc-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.2,.8,.25,1);
}
.xc-reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .xc-sidebar { position: static; }
}

@media (max-width: 768px) {
  :root { --xc-nav-h: 58px; --xc-radius: 14px; }
  .xc-editor-body.split { grid-template-columns: 1fr; }
  .xc-editor-preview { border-left: none; border-top: 1px solid var(--xc-border); max-height: 400px; }
  .xc-editor-input { min-height: 300px; }
  .xc-markdown { font-size: .9rem; }
  .xc-bar-chart { height: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
