/* ==========================================================================
   把旧站的三处自定义找回来（预览用）
   1. 卡片半透明（原来 --card-bg 是 rgba(255,255,255,0.9)）
   2. 文章版权卡片（黄底 + 赖字水印）
   3. 页脚（透明 + 黑色蒙版，露出网站背景）
   ========================================================================== */

:root {
  --card-bg: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] {
  --card-bg: #121212;
}

/* ---------- 文章版权 ---------- */
#post .post-copyright {
  position: relative;
  margin: 2rem 0 0.5rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--light-grey);
  border-radius: 12px !important;
  background-color: rgba(255, 255, 0, 0.3);
  transition: box-shadow 0.3s ease-in-out;
  overflow: hidden;
}

#post .post-copyright::before {
  position: absolute;
  right: -26px;
  top: -120px;
  content: '赖';
  font-family: 'Font Awesome 5 Brands';
  font-size: 200px;
  opacity: 0.2;
}

#post .post-copyright:hover {
  box-shadow: 0 0 8px 0 rgba(232, 237, 250, 0.6), 0 2px 4px 0 rgba(232, 237, 250, 0.5);
}

#post .post-copyright__title {
  font-size: 22px;
}

#post .post-copyright__notice {
  font-size: 15px;
}

#post .post-copyright-cc-info {
  color: #f00;
}

[data-theme="dark"] #post .post-copyright {
  background-color: rgb(7 8 10);
  border: 1px solid rgb(19 18 18 / 35%);
  text-shadow: #bfbeb8 1px 0 4px;
}

[data-theme="dark"] .post-copyright-info {
  color: #e0e0e4;
}

/* ---------- 页脚 ---------- */
#footer {
  background: rgba(0, 0, 0, 0) !important;
}

#footer::before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  content: '';
}

#footer-wrap {
  position: relative;
  padding: 2rem 1rem;
  color: var(--light-grey);
  text-align: center;
}

#footer-wrap a {
  color: var(--light-grey);
}

#footer-wrap a:hover {
  text-decoration: underline;
}

#ghbdages {
  margin: 1rem 0 0;
}

#ghbdages .github-badge {
  display: inline-block;
}

/* ---------- 文章头图 ----------
   mask.header 已关闭（否则首页 header 与页面背景之间会有一条亮度分界线），
   单独给文章头图补一层 50% 黑蒙版，保持标题可读，和旧站一致。 */
#page-header.post-bg::before {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  content: '';
}

/* ---------- 友人帐卡片（仿 blog.mska.ink/link/） ----------
   封面图 + 半透明白色信息层 + 圆形头像，名字在头像下方居中；
   悬停时信息层原地淡出、完整露出网站截图，描述以黑字显示在卡片下方居中（无底色）。 */
.container .flink .flink-list {
  display: flow-root;
  overflow: visible;
  padding: 10px 10px 40px;
  text-align: center;
}

.container .flink .flink-list > a.flink-list-card {
  position: relative;
  display: block;
  float: left;
  width: calc(25% - 15px);
  height: 130px;
  margin: 15px 7px;
  border-radius: 10px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.08), 0 3px 8px rgba(0, 0, 0, 0.06);
  color: var(--font-color);
  text-decoration: none;
  transition: top 0.3s ease, box-shadow 0.3s ease;
}

.container .flink .flink-list > a.flink-list-card:hover {
  /* 不能用 transform 抬起卡片：会让绝对定位的 ::after 跟着偏移。用 top 微抬。 */
  top: -3px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.14), 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* 悬停时卡片下方居中的描述（纯黑字，无绿条） */
.container .flink .flink-list > a.flink-list-card::after {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  z-index: 5;
  /* 限制在卡片宽度内，长描述自动换行，避免和相邻卡片的描述连成一片 */
  width: 100%;
  max-width: 100%;
  transform: translateX(-50%);
  color: #FF7242;
  font-size: 16px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  content: attr(data-title);
}

.container .flink .flink-list > a.flink-list-card:hover::after {
  opacity: 1;
}

[data-theme="dark"] .container .flink .flink-list > a.flink-list-card::after {
  color: #FF7242;
}

.container .flink .flink-list > a .wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 130px;
  overflow: hidden;
  border-radius: 10px;
}

.container .flink .flink-list > a .wrapper img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  pointer-events: none;
  transition: transform 0.5s ease-out;
}

.container .flink .flink-list > a:hover .wrapper img {
  transform: scale(1.2);
}

.container .flink .flink-list > a .info {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.8);
  transition: opacity 0.4s ease;
}

/* 悬停时信息层原地淡出，完整露出网站截图；
   不位移，否则头像和名字会飘到卡片上方压住标题。 */
.container .flink .flink-list > a:hover .info {
  opacity: 0;
}

.container .flink .flink-list > a .info img {
  position: relative;
  z-index: 1;
  /* 主题给 #article-container img 加了 margin，会把头像和名字往下挤 */
  margin: 0 !important;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  object-fit: cover;
  pointer-events: none;
}

.container .flink .flink-list > a .info .flink-sitename {
  max-width: 100%;
  margin-top: 8px;
  padding: 0 8px;
  color: #FF7242;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .container .flink .flink-list > a .info {
  background-color: rgba(0, 0, 0, 0.6);
}

@media screen and (max-width: 1024px) {
  .container .flink .flink-list > a.flink-list-card {
    width: calc(33.33333% - 15px);
  }
}

@media screen and (max-width: 600px) {
  .container .flink .flink-list > a.flink-list-card {
    width: calc(50% - 15px);
  }
}

/* 移动端侧边栏：全透明蒙层 + 半透明毛玻璃
   蒙层改成完全透明（只留点击关闭的用途），页面内容不再被压暗；
   面板在上一版基础上再提高 20% 透明度，页面菜单卡设为 50% 透明。 */
#menu-mask {
  background: transparent !important;
}

#sidebar-menus {
  background: rgba(246, 248, 250, 0.35) !important;
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
}

#sidebar-menus .menus_items {
  background: rgba(255, 255, 255, 0.25) !important;
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 0 1px 1px rgba(7, 17, 27, 0.05), 0 8px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] #sidebar-menus {
  background: rgba(18, 18, 18, 0.35) !important;
}

[data-theme="dark"] #sidebar-menus .menus_items {
  background: rgba(35, 35, 35, 0.25) !important;
}
