/* ================================================================
   components.css —— 关于我 / 技能 / 项目 / 博客 / 联系 CTA
   ================================================================ */

/* ==================== 个人资料（顶部小 tab + 子页） ==================== */
.about {
  padding: 30px 40px 38px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card-grad);
}

/* 子导航胶囊条：基本资料 / 我的技能 / 我的项目 / 我的文章 / 联系方式 */
.profile-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--chip-bg);
}

.profile-tab {
  flex: 1;
  min-width: 0;
  padding: 9px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  opacity: 0.62;
  background: transparent;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), opacity 0.15s var(--ease);
}

.profile-tab:hover {
  opacity: 1;
  background: var(--surface);
}

.profile-tab.is-active {
  opacity: 1;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 4px 14px rgba(79, 124, 255, 0.28);
}

/* 子页显隐 + 切换动画 */
.profile-subpage {
  display: none;
}

.profile-subpage.is-active {
  display: block;
  animation: profileFade 0.25s var(--ease);
}

/* 基本资料子页保持原「关于我」的左右分栏 */
#profileBasic.is-active {
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

@keyframes profileFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* 「我的X」未登录引导框（占满整行网格） */
.mine-login-tip {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 58px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--chip-bg);
  color: var(--text);
  opacity: 0.85;
  text-align: center;
}

.mine-login-tip svg {
  width: 34px;
  height: 34px;
  opacity: 0.5;
}

.mine-login-tip p {
  margin: 0;
  font-size: 14px;
  opacity: 0.75;
}

/* 他人资料页空内容提示（无锁图标、普通提示态） */
.profile-empty {
  border-style: solid;
  opacity: 0.7;
  padding: 42px 20px;
}

/* 对方未公开邮箱时的禁用按钮 */
.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.about-left {
  display: flex;
  gap: 24px;
}

.avatar {
  flex: none;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(99, 132, 255, 0.55);
  box-shadow: 0 0 0 5px rgba(79, 124, 255, 0.12);
}

.about-info h2 {
  margin-bottom: 6px;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
}

.about-role {
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text-2);
}

.about-bio {
  max-width: 560px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.95;
  color: var(--text-2);
}

.about-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 13px;
  color: var(--text-3);
}

.about-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.about-meta svg {
  width: 15px;
  height: 15px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  flex: none;
  gap: 18px 48px;
  align-content: center;
  padding-left: 48px;
  border-left: 1px solid var(--border);
}

.stat {
  min-width: 110px;
  text-align: center;
}

.stat b {
  display: block;
  margin-bottom: 4px;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
}

.stat span {
  font-size: 13px;
  color: var(--text-3);
}

/* ==================== 技能 ==================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px 34px;
}

.skill {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skill>img {
  flex: none;
  width: 42px;
  height: 42px;
}

.skill-main {
  flex: 1;
  min-width: 0;
}

.skill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text);
}

.skill-row .percent {
  font-size: 12px;
  color: var(--text-3);
}

.bar {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bar-track);
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #3d7bff, #7091ff);
  transition: width 0.8s var(--ease);
}

/* ==================== 卡片网格（项目 / 博客） ==================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

/* 收起状态：只显示前 3 张卡片（配合 lists.js 的"查看全部"）
   注意：.card-add 添加占位卡片不受收起影响，始终显示 */
.card-grid.is-collapsed .work-card:not(.card-add):nth-child(n+4) {
  display: none;
}

.work-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}

.work-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 132, 255, 0.45);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
}

.work-thumb {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.work-body {
  padding: 16px 18px 20px;
}

.work-body h3 {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tags span {
  padding: 3px 9px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.work-body p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-3);
}

/* ---------- 博客卡片 ---------- */
.blog-thumb {
  position: relative;
  height: 150px;
}

.blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 16, 32, 0.9) 0%, rgba(10, 16, 32, 0) 55%);
}

.blog-thumb h3 {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 1;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.blog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}

.blog-foot time {
  font-size: 12px;
  color: var(--text-3);
}

.blog-foot .tag {
  padding: 3px 10px;
  font-size: 12px;
  color: var(--blue-light);
  border: 1px solid rgba(79, 124, 255, 0.4);
  border-radius: 6px;
}

/* 博客卡片分类标签 —— 固定在卡片右上角 */
.card-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  padding: 4px 12px;
  font-size: 12px;
  color: #fff;
  background: rgba(10, 14, 26, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(79, 124, 255, 0.4);
  border-radius: 999px;
}

/* ==================== 博客筛选条 ==================== */
.blog-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(10px);
}

.filter-cats,
.filter-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-sort {
  padding-left: 14px;
  border-left: 1px solid var(--border);
}

.filter-chip {
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-chip:hover {
  color: var(--text);
  border-color: var(--blue);
}

.filter-chip.is-active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

/* 作者筛选 chip（点作者名后出现） */
.filter-author-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 8px 0 14px;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, #4f7cff, #7a5cff);
  border-radius: 999px;
}

.filter-author-clear {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s;
}

.filter-author-clear:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* 作者名可点击 */
.blog-author.is-link,
.adetail-author.is-link {
  cursor: pointer;
  transition: color 0.15s;
}

.blog-author.is-link:hover,
.adetail-author.is-link:hover {
  color: var(--blue);
}

/* 卡片底部作者 / 阅读量 */
.blog-author,
.blog-views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.blog-author svg,
.blog-views svg {
  width: 13px;
  height: 13px;
  opacity: 0.7;
}

.adetail-author,
.adetail-views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.adetail-author svg,
.adetail-views svg {
  width: 15px;
  height: 15px;
  opacity: 0.7;
}

@media (max-width: 640px) {
  .blog-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-sort {
    padding-left: 0;
    border-left: none;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }
}

/* ==================== 添加占位卡片 ==================== */
.card-add {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.25s, background 0.25s;
}

.card-add:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

/* 圆形十字按钮 —— 半透明灰白 */
.card-add-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.25s;
}

.card-add-circle svg {
  width: 28px;
  height: 28px;
}

.card-add:hover .card-add-circle {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ==================== 联系 CTA（现为个人资料「联系方式」子页） ==================== */
/* 卡片在子页内水平居中 */
#profileContact .cta-card {
  margin: 0 auto;
}

/* 深色玻璃卡片，与其它板块卡片风格统一 */
.cta-card {
  position: relative;
  width: 100%;
  max-width: 700px;
  padding: 54px 48px 48px;
  overflow: hidden;
  text-align: center;
  border-radius: 20px;
  border: 1px solid var(--border);
  background:
    radial-gradient(130% 110% at 50% -10%, rgba(79, 124, 255, 0.14), rgba(79, 124, 255, 0) 62%),
    var(--card-grad);
}

/* 顶部一道柔和的蓝色光线，点缀而不刺眼 */
.cta-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 140px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(127, 160, 255, 0.8), transparent);
  transform: translateX(-50%);
}

/* 图标徽章 */
.cta-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 22px;
  color: var(--blue-light);
  border-radius: 18px;
  border: 1px solid rgba(79, 124, 255, 0.28);
  background: rgba(79, 124, 255, 0.1);
}

.cta-icon svg {
  width: 28px;
  height: 28px;
}

.cta-title {
  font-size: 21px;
  font-weight: 700;
  color: #fff;
}

.cta-sub {
  margin: 10px 0 30px;
  font-size: 13px;
  color: var(--text-2);
}

.cta-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.cta-buttons .btn {
  justify-content: center;
  padding: 13px 8px;
  font-size: 13px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s, color 0.2s,
    box-shadow 0.2s;
}

/* 单选选中态：蓝紫渐变填充，与右侧导航高亮风格一致 */
.cta-buttons .btn.is-active {
  color: #fff;
  border-color: transparent;
  background: var(--gradient);
  box-shadow: 0 8px 20px rgba(77, 109, 255, 0.35);
}

.cta-buttons .btn.is-active svg {
  color: #fff;
}

.cta-buttons .btn svg {
  width: 17px;
  height: 17px;
  color: var(--text-2);
  transition: color 0.2s;
}

.cta-buttons .btn:hover {
  transform: translateY(-3px);
  color: #fff;
  border-color: rgba(127, 160, 255, 0.45);
  background: rgba(79, 124, 255, 0.12);
}

.cta-buttons .btn:hover svg {
  color: var(--blue-light);
}

.cta-buttons .btn.is-active:hover {
  color: #fff;
  border-color: transparent;
  background: var(--gradient);
}

.cta-buttons .btn.is-active:hover svg {
  color: #fff;
}

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {

  .skills-grid,
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about {
    padding: 30px 32px;
  }

  /* 基本资料子页在平板/手机上纵向堆叠 */
  #profileBasic.is-active {
    flex-direction: column;
    gap: 28px;
  }

  /* 统计数字在平板/手机上变为整行四列 */
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 16px;
    padding-left: 0;
    padding-top: 24px;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .stat {
    min-width: 0;
  }
}

@media (max-width: 720px) {

  .skills-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .about {
    padding: 26px 20px;
  }

  /* 手机上子导航横向滑动，避免挤压 */
  .profile-tabs {
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 22px;
  }

  .profile-tabs::-webkit-scrollbar {
    display: none;
  }

  .profile-tab {
    flex: 1 0 auto;
    padding: 8px 13px;
    font-size: 13px;
  }

  .about-left {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .avatar {
    width: 96px;
    height: 96px;
  }

  .about-info h2 {
    font-size: 23px;
  }

  .about-meta {
    justify-content: center;
    gap: 14px 18px;
  }

  /* 手机上统计保持四列，字号收紧避免拥挤 */
  .stats {
    gap: 16px 10px;
  }

  .stat b {
    font-size: 26px;
  }

  .stat span {
    font-size: 12px;
  }

  .cta-card {
    padding: 40px 22px 34px;
  }

  .cta-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {

  /* 小屏手机统计改为 2×2，数字与标签都有呼吸空间 */
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
  }

  .stat b {
    font-size: 25px;
  }
}

/* 详情页加载 / 未找到 提示（异步取详情时的占位） */
.detail-loading {
  padding: 60px 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-3);
}

/* ================================================================
   详情页 —— 通用返回按钮（项目/博客两种页面保持统一）
   ================================================================ */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
  padding: 9px 18px;
  font-size: 13px;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  transition: color 0.2s, border-color 0.2s, transform 0.2s var(--ease), background 0.2s;
}

.detail-back svg {
  width: 15px;
  height: 15px;
}

.detail-back:hover {
  color: #fff;
  border-color: rgba(127, 160, 255, 0.5);
  transform: translateX(-3px);
}

/* ================================================================
   项目详情 —— 风格 A：横幅头图 + 左正文 / 右侧信息栏
   ================================================================ */
.pdetail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 40px;
  align-items: start;
}

.pdetail-cover {
  width: 100%;
  height: 320px;
  margin-bottom: 28px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.pdetail-head h1 {
  margin: 14px 0 10px;
  font-size: 32px;
  font-weight: 800;
  color: #fff;
}

.pdetail-lead {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-2);
}

.pdetail-block {
  margin-top: 34px;
}

.pdetail-block h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
}

.pdetail-block h2::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 3px;
  background: var(--gradient);
}

.pdetail-block>p {
  font-size: 14.5px;
  line-height: 2;
  color: var(--text-2);
}

.pdetail-features {
  display: grid;
  gap: 13px;
}

.pdetail-features li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

.pdetail-features svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--blue-light);
}

/* 右侧信息栏 */
.pdetail-side {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pdetail-card {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-grad);
}

.pdetail-card h3 {
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

/* 卡片标题行：标题 + 右上角创建者胶囊 */
.pdetail-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.pdetail-card-head h3 {
  margin-bottom: 0;
}

/* 创建者胶囊按钮（点击进入 TA 的个人资料） */
.pdetail-creator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 55%;
  padding: 3px 10px 3px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.pdetail-creator:hover {
  border-color: rgba(79, 124, 255, 0.6);
  background: var(--surface);
  transform: translateY(-1px);
}

.pdetail-creator-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.pdetail-creator-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdetail-card dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 13px;
}

.pdetail-card dl div+div {
  border-top: 1px solid var(--border);
}

.pdetail-card dt {
  color: var(--text-3);
}

.pdetail-card dd {
  color: var(--text);
}

.pdetail-status {
  padding: 2px 10px;
  font-size: 12px;
  color: var(--blue-light);
  border: 1px solid rgba(79, 124, 255, 0.4);
  border-radius: 999px;
}

.pdetail-card .tags {
  margin-bottom: 0;
}

.pdetail-btns {
  display: flex;
  gap: 10px;
}

.pdetail-btn {
  flex: 1;
  justify-content: center;
  padding: 10px 14px;
  font-size: 13px;
}

/* ================================================================
   博客详情 —— 风格 B：居中单栏的杂志式文章排版
   ================================================================ */
.adetail {
  max-width: 760px;
  margin: 0 auto;
}

.adetail-head {
  text-align: center;
  margin-bottom: 30px;
}

.adetail-tag {
  display: inline-block;
  padding: 4px 14px;
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--blue-light);
  border: 1px solid rgba(79, 124, 255, 0.4);
  border-radius: 999px;
}

.adetail-head h1 {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.4;
  color: #fff;
}

.adetail-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-3);
}

.adetail-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-3);
}

.adetail-cover {
  width: 100%;
  height: 360px;
  margin-bottom: 40px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.adetail-section {
  margin-bottom: 34px;
}

.adetail-section h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
}

.adetail-section h2 span {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--blue-light);
}

.adetail-section p {
  font-size: 15.5px;
  line-height: 2.05;
  color: var(--text-2);
  text-align: justify;
}

.adetail-foot {
  display: flex;
  justify-content: center;
  margin-top: 46px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

/* ---------- 详情页响应式 ---------- */
@media (max-width: 900px) {
  .pdetail {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .pdetail-side {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .pdetail-side .pdetail-btns {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {

  .pdetail-cover,
  .adetail-cover {
    height: 210px;
  }

  .pdetail-head h1,
  .adetail-head h1 {
    font-size: 25px;
  }

  .pdetail-side {
    grid-template-columns: 1fr;
  }

  .adetail-section p {
    font-size: 15px;
  }

  .detail-back {
    margin-bottom: 22px;
  }
}

@media (max-width: 480px) {

  .pdetail-cover,
  .adetail-cover {
    height: 170px;
  }

  .pdetail-head h1,
  .adetail-head h1 {
    font-size: 22px;
  }

  .adetail-section h2 {
    font-size: 19px;
  }

  .adetail-section p {
    font-size: 14.5px;
    line-height: 1.95;
  }
}

/* ================================================================
   v1.5 社交化功能样式
   通知中心 / 关注按钮 / 用户统计条 / 粉丝关注弹层 /
   收藏按钮 / 我的收藏切换 / 卡片角标 / 标签云 / 搜索分组
   ================================================================ */

/* ==================== 通知中心（导航铃铛） ==================== */
.notif-wrap {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: 1px;
  right: -1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: #ff5470;
  border: 2px solid var(--bg-deep);
  border-radius: 999px;
  pointer-events: none;
  animation: notif-pop 0.25s var(--ease) both;
}

@keyframes notif-pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.notif-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 120;
  width: 368px;
  max-height: 460px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: tab-in 0.18s var(--ease) both;
}

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.notif-panel-head strong {
  font-size: 14px;
}

#notifReadAll {
  padding: 4px 10px;
  font-size: 12px;
  font-family: inherit;
  color: var(--blue-light);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

#notifReadAll:hover {
  color: #fff;
  border-color: var(--blue);
  background: var(--surface);
}

.notif-list {
  overflow-y: auto;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  color: var(--text);
  background: transparent;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: var(--surface);
}

.notif-item.is-unread {
  background: rgba(79, 124, 255, 0.08);
}

.notif-item.is-unread:hover {
  background: rgba(79, 124, 255, 0.13);
}

.notif-avatar {
  position: relative;
  flex: none;
  width: 38px;
  height: 38px;
}

.notif-avatar>img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.notif-type-icon {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--card);
  color: #fff;
}

.notif-type-icon svg {
  width: 9px;
  height: 9px;
}

.notif-type-comment {
  background: #4f7cff;
}

.notif-type-reply {
  background: #22b8cf;
}

.notif-type-like {
  background: #ff5470;
}

.notif-type-follow {
  background: #8b5cf6;
}

.notif-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.notif-text {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-2);
  word-break: break-word;
}

.notif-text strong {
  color: var(--text);
  font-weight: 600;
}

.notif-time {
  font-size: 11px;
  color: var(--text-3);
}

.notif-dot {
  flex: none;
  align-self: center;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px rgba(79, 124, 255, 0.7);
}

.notif-empty {
  padding: 38px 16px;
  font-size: 13px;
  text-align: center;
  color: var(--text-3);
}

.notif-loading {
  padding: 28px 16px;
}

/* ==================== 关注按钮 ==================== */
.about-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  margin-left: 10px;
  padding: 8px 20px;
  font-size: 13px;
}

.about-follow-btn svg {
  width: 14px;
  height: 14px;
}

/* 已关注：弱化描边态，悬停才提示可取消 */
.about-follow-btn.is-following {
  color: var(--text-2);
  background: var(--surface);
  border-color: var(--border);
  box-shadow: none;
}

.about-follow-btn.is-following:hover {
  color: #ff7a93;
  border-color: rgba(255, 84, 112, 0.5);
  background: rgba(255, 84, 112, 0.08);
}

/* ==================== 用户统计条 ==================== */
.user-stats-row {
  display: flex;
  align-items: stretch;
  gap: 4px;
  margin: 6px 0 4px;
  padding: 14px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-grad);
}

.user-stat {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 10px;
}

.user-stat:not(:first-child) {
  box-shadow: -1px 0 0 var(--border);
}

.user-stat strong {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--blue-light), #a99bff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-stat span {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}

.user-stat.is-clickable {
  cursor: pointer;
  transition: background 0.18s;
}

.user-stat.is-clickable:hover {
  background: var(--surface-hover);
}

/* ==================== 粉丝 / 关注 列表面板 ==================== */
.social-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
}

.social-mask {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 18, 0.62);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.22s var(--ease);
}

.social-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(420px, calc(100vw - 32px));
  max-height: min(72vh, 560px);
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translate(-50%, calc(-50% - 12px)) scale(0.97);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.social-modal.is-open .social-mask {
  opacity: 1;
}

.social-modal.is-open .social-dialog {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.social-title {
  padding: 18px 20px 12px;
  font-size: 16px;
  font-weight: 600;
}

.social-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--text-3);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.18s;
}

.social-close:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.social-close svg {
  width: 16px;
  height: 16px;
}

.social-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 6px;
}

.social-user {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  color: var(--text);
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.social-user:hover {
  background: var(--surface);
}

.social-user>img {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.social-user-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.social-user-main strong {
  font-size: 14px;
  font-weight: 600;
}

.social-user-main small {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.social-user-arrow {
  flex: none;
  color: var(--text-3);
}

.social-user-arrow svg {
  width: 16px;
  height: 16px;
}

.social-empty {
  padding: 40px 16px;
  font-size: 13px;
  text-align: center;
  color: var(--text-3);
}

/* ==================== 收藏按钮（文章详情 / 项目详情） ==================== */
.adetail-likebar {
  gap: 14px;
}

.post-fav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 26px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.post-fav svg {
  width: 18px;
  height: 18px;
}

.post-fav small {
  font-size: 12px;
  opacity: 0.7;
}

.post-fav:hover {
  color: #f5b451;
  border-color: rgba(245, 180, 81, 0.45);
  transform: translateY(-1px);
}

.post-fav.is-faved {
  color: #f5b451;
  border-color: rgba(245, 180, 81, 0.55);
  background: rgba(245, 180, 81, 0.09);
}

/* 项目详情侧栏收藏按钮（整行） */
.pdetail-fav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 10px 14px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.pdetail-fav svg {
  width: 16px;
  height: 16px;
}

.pdetail-fav:hover {
  color: #f5b451;
  border-color: rgba(245, 180, 81, 0.45);
}

.pdetail-fav.is-faved {
  color: #f5b451;
  border-color: rgba(245, 180, 81, 0.55);
  background: rgba(245, 180, 81, 0.09);
}

.pdetail-fav-count {
  font-variant-numeric: tabular-nums;
}

/* ==================== 我的收藏：文章 / 项目切换 ==================== */
.fav-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 20px;
}

/* ==================== 卡片角标：草稿 / 置顶 / 精华 / 未上架 ==================== */
.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  border-radius: 999px;
  border: 1px solid transparent;
  backdrop-filter: blur(6px);
}

.card-badge+.card-badge {
  top: 42px;
}

.card-badge+.card-badge+.card-badge {
  top: 72px;
}

.badge-draft {
  background: rgba(102, 117, 154, 0.85);
  border-color: rgba(255, 255, 255, 0.18);
}

.badge-top {
  background: linear-gradient(135deg, #ff8a4c, #ff5470);
  box-shadow: 0 4px 12px rgba(255, 84, 112, 0.3);
}

.badge-essence {
  background: linear-gradient(135deg, #f5b451, #f08c2e);
  box-shadow: 0 4px 12px rgba(240, 140, 46, 0.3);
}

/* ==================== 博客卡片：作者头像 / 评论数 ==================== */
.blog-author-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.blog-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.blog-stat svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

/* ==================== 博客筛选条：双行布局 / 标签云 ==================== */
#blogFilter .filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1 1 100%;
  flex-wrap: wrap;
}

#blogFilter .filter-row+.filter-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.filter-divider {
  width: 1px;
  height: 18px;
  margin: 0 2px;
  background: var(--border);
}

.filter-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tags-label {
  font-size: 12px;
  color: var(--text-3);
  margin-right: 2px;
}

.filter-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 11px;
  font-size: 12px;
  font-family: inherit;
  color: var(--text-2);
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tag-chip:hover {
  color: var(--text);
  border-color: var(--blue);
}

.filter-tag-chip.is-active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.filter-tag-chip i {
  font-style: normal;
  font-size: 10px;
  opacity: 0.65;
}

.filter-tag-chip.is-active i {
  opacity: 0.9;
}

/* ==================== 搜索面板：分组 / 用户行 / 箭头 ==================== */
.search-group {
  padding: 4px 0;
}

.search-group+.search-group {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 6px;
}

.search-group-label {
  display: block;
  padding: 5px 10px;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.5px;
}

.search-user-item img {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.search-user-item .search-item-text {
  flex: 1;
}

.search-item-arrow {
  flex: none;
  margin-left: auto;
  display: grid;
  place-items: center;
  color: var(--text-3);
}

.search-item-arrow svg {
  width: 16px;
  height: 16px;
}

.search-loading {
  position: relative;
}

/* ==================== v1.5 响应式 ==================== */
@media (max-width: 720px) {
  .notif-panel {
    width: min(340px, calc(100vw - 28px));
    right: -6px;
  }

  .user-stat {
    min-width: 60px;
    padding: 4px 2px;
  }

  .user-stat strong {
    font-size: 16px;
  }

  .user-stat span {
    font-size: 11px;
  }

  .about-follow-btn {
    margin-left: 0;
  }

  .post-fav {
    padding: 9px 18px;
    font-size: 13px;
  }

  /* 筛选行在手机上左对齐依次排列 */
  #blogFilter .filter-row {
    justify-content: flex-start;
  }
}