/* 移除顶部图的独立背景，使其完全透明，让全站背景透出来 */
#page-header {
  background: transparent !important;
}

/* 如果顶部图区域有遮罩层，将其透明度调低或移除 */
#page-header:before {
  background-color: rgba(0, 0, 0, 0.2) !important;  /* 控制遮罩深浅，0为完全透明，1为纯黑 */
}

/* 为了保持导航栏文字可读性，可以单独给导航栏添加半透明背景（可选） */
#nav {
  background: rgba(0, 0, 0, 0.15) !important;  /* 导航栏背景半透明，提高文字对比度 */
}

/* 移动端菜单适配 */
#page-header.nav-fixed #nav {
  background: rgba(0, 0, 0, 0.3) !important;
}

/* 文章卡片、侧边栏卡片背景半透明 */
.layout_post>#post,
#aside_content .card-widget,
#recent-posts>.recent-post-item {
  background: rgba(255, 255, 255, 0.8) !important;  /* 白色半透明，可调整透明度 */
  backdrop-filter: blur(5px);  /* 可选毛玻璃效果 */
}

/* 完全移除顶部图遮罩层 */
#page-header:before {
  background: transparent !important;
  opacity: 0 !important;
  display: none !important;
}

/* 导航栏背景完全透明 */
#nav {
  background: transparent !important;
  backdrop-filter: none !important;  /* 如果有毛玻璃效果 */
}

/* 滚动后固定导航栏也保持透明 */
#page-header.nav-fixed #nav {
  background: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;  /* 可选：移除阴影 */
}

/* 移除所有毛玻璃效果 */
#nav,
#page-header:before,
#page-header.nav-fixed #nav {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* 让页脚主容器透明，透出底层的全站背景图 */
#footer {
    background: transparent !important;
}

/* 追番卡片样式 */
#bangumi .bangumi-item {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  transition: all 0.3s;
}

#bangumi .bangumi-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/*侧边栏美化*/
/* 侧边栏所有卡片半透明背景 */
#aside-content .card-widget {
  background: rgba(255, 255, 255, 0.8);  /* 白色半透明，透明度0.8 */
  backdrop-filter: blur(5px);            /* 可选：毛玻璃模糊效果 */
  border-radius: 12px;                   /* 圆角 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* 轻微阴影 */
}

/* 深色模式下的半透明背景 */
[data-theme="dark"] #aside-content .card-widget {
  background: rgba(0, 0, 0, 0.6);        /* 黑色半透明 */
}

#aside-content .card-widget {
  padding: 1.2rem 1.2rem;        /* 调整内边距 */
  margin-bottom: 1.2rem;          /* 卡片之间的下边距 */
}

/* 卡片标题样式 */
#aside-content .card-widget .item-heading {
  font-size: 1.1rem;
  border-left: 4px solid #49b1f5; /* 左侧装饰线 */
  padding-left: 10px;
}

#aside-content .card-avatar img {
  width: 100px;           /* 调整头像大小 */
  height: 100px;
  border-radius: 50%;     /* 圆形 */
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* 定义标签颜色循环 */
#aside-content .card-tags .tag-cloud-tags a:nth-child(6n+1) { color: #f44336; }
#aside-content .card-tags .tag-cloud-tags a:nth-child(6n+2) { color: #4caf50; }
#aside-content .card-tags .tag-cloud-tags a:nth-child(6n+3) { color: #2196f3; }
#aside-content .card-tags .tag-cloud-tags a:nth-child(6n+4) { color: #ff9800; }
#aside-content .card-tags .tag-cloud-tags a:nth-child(6n+5) { color: #9c27b0; }
#aside-content .card-tags .tag-cloud-tags a:nth-child(6n) { color: #009688; }

/* 相册主页面毛玻璃效果 */
.gallery-group-main {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 20px;
}

/* 相册分类卡片美化 */
.gallery-group-main .gallery-group {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    border-radius: 18px;
    padding: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gallery-group-main .gallery-group:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.8);
}

/* 分类卡片标题样式 */
.gallery-group-main .gallery-group .gallery-group-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    border-left: 4px solid #49b1f5;
    padding-left: 12px;
    margin: 15px 0 8px 0;
}

.gallery-group-main .gallery-group .gallery-group-desc {
    color: #666;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* 相册详情页图片瀑布流美化 */
#gallery-page .gallery-container {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 20px;
}

/* 图片卡片美化 */
#gallery-page .gallery-item {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
}

#gallery-page .gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
}

/* 深色模式适配 */
[data-theme="dark"] .gallery-group-main,
[data-theme="dark"] #gallery-page .gallery-container {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .gallery-group-main .gallery-group {
    background: rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .gallery-group-main .gallery-group:hover {
    background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .gallery-group-main .gallery-group .gallery-group-name {
    color: #eee;
}

[data-theme="dark"] .gallery-group-main .gallery-group .gallery-group-desc {
    color: #aaa;
}

.post-tags a {
  display: inline-block;
  padding: 5px 16px;
  margin: 0 8px 8px 0;
  border-radius: 20px;
  color: #fff;
  font-weight: 500;
  background: linear-gradient(145deg, #49b1f5, #ff6b6b);
  background-size: 200% 200%;
  transition: all 0.3s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.post-tags a:hover {
  background-position: 100% 100%;
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

/* 为不同标签设置不同颜色（可选，需配合具体标签名） */
.post-tags a[href*="hexo"] { background: linear-gradient(145deg, #0e83cd, #1abc9c); }
.post-tags a[href*="教程"] { background: linear-gradient(145deg, #e67e22, #f39c12); }
/* 可以继续添加更多 */

/* 首页文章列表标签 */
.recent-post-item .article-meta__tags a {
  display: inline-block;
  padding: 3px 12px;
  margin: 0 4px 4px 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #555;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.recent-post-item .article-meta__tags a:hover {
  background: #49b1f5;
  color: #fff;
}

#aside-content .card-tags .tag-cloud-tags a {
  display: inline-block;
  padding: 4px 12px;
  margin: 0 6px 8px 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 30px;
  border: 1px solid currentColor;
  color: var(--tag-color, #49b1f5);
  transition: all 0.2s;
}

#aside-content .card-tags .tag-cloud-tags a:hover {
  background: currentColor;
  color: #fff !important;
  transform: scale(1.05);
}

/* 标签云页面 */
.tag-cloud-tags a {
  display: inline-block;
  padding: 6px 20px;
  margin: 8px 10px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #333;
  font-size: 1rem !important;
  transition: all 0.3s;
}

.tag-cloud-tags a:hover {
  background: #49b1f5;
  color: #fff !important;
  transform: scale(1.1);
  box-shadow: 0 10px 20px rgba(73, 177, 245, 0.3);
}

.post-content h2 {
  font-size: 2rem;
  font-weight: 600;
  margin: 2rem 0 1.2rem;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 0 30px 30px 0;
  border-left: 6px solid #49b1f5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.post-content h3 {
  font-size: 1.6rem;
  font-weight: 500;
  margin: 1.5rem 0 1rem;
  padding: 8px 0 8px 18px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
  border-left: 4px solid #ff6b6b;
  border-radius: 0 20px 20px 0;
}

/* 深色模式适配 */
[data-theme="dark"] .post-content h2 {
  background: rgba(0, 0, 0, 0.6);
  border-left-color: #ff6b6b;
}
[data-theme="dark"] .post-content h3 {
  background: rgba(0, 0, 0, 0.4);
  border-left-color: #49b1f5;
}

/* 正文段落 */
.post-content p {
  line-height: 1.8;           /* 行高加大，阅读更舒适 */
  margin: 1.2em 0;
  font-size: 1.05rem;
  color: #2c3e50;
}

[data-theme="dark"] .post-content p {
  color: #e0e0e0;
}

/* 引用块 */
.post-content blockquote {
  background: rgba(73, 177, 245, 0.1);
  border-left: 4px solid #49b1f5;
  padding: 15px 20px;
  margin: 1.5rem 0;
  border-radius: 0 12px 12px 0;
  backdrop-filter: blur(4px);
}

/* 列表 */
.post-content ul, .post-content ol {
  padding-left: 2em;
  line-height: 1.8;
}

.post-content li {
  margin: 0.5em 0;
}

/* 加粗强调 */
.post-content strong {
  color: #49b1f5;
  font-weight: 600;
}

/* 链接 */
.post-content a {
  color: #49b1f5;
  text-decoration: none;
  border-bottom: 1px dashed #49b1f5;
  transition: all 0.2s;
}

.post-content a:hover {
  color: #ff6b6b;
  border-bottom-color: #ff6b6b;
}

/* 代码块背景半透明 */
.post-content .highlight {
  background: rgba(40, 44, 52, 0.8) !important;
  backdrop-filter: blur(4px);
  border-radius: 12px;
}

/* 行号颜色调整 */
.post-content .gutter {
  background: rgba(0, 0, 0, 0.2) !important;
}

/* 表格样式 */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.post-content th {
  background: #49b1f5;
  color: #fff;
  padding: 12px;
  font-weight: 600;
}

.post-content td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.post-content tr:last-child td {
  border-bottom: none;
}

/* 文章内图片 */
.post-content img {
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  margin: 1rem auto;
  display: block;
  max-width: 95%;
}

.post-content img:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
}

/* 图片说明文字 */
.post-content .image-caption {
  text-align: center;
  color: #999;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* 目录容器 */
#toc {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 目录项 */
.toc-item {
  margin: 8px 0;
  border-radius: 8px;
  transition: all 0.2s;
}

.toc-item:hover {
  background: rgba(73, 177, 245, 0.1);
}

/* 当前激活的目录 */
.toc-item.active > .toc-link {
  color: #49b1f5;
  font-weight: 600;
  border-left: 3px solid #49b1f5;
  padding-left: 10px;
}

/* ===== 版权信息毛玻璃卡片 ===== */

.post-copyright {
  margin: 2rem 0 1.5rem;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.75);  /* 半透明白色 */
  backdrop-filter: blur(8px);             /* 毛玻璃效果 */
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;                     /* 大圆角 */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  font-size: 0.95rem;
  line-height: 1.8;
}

.post-copyright:hover {
  transform: translateY(-5px);             /* 悬停上浮 */
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.85);
}

/* 每一行的布局 */
.post-copyright > div {
  display: flex;
  margin-bottom: 10px;
  align-items: flex-start;
}

.post-copyright > div:last-child {
  margin-bottom: 0;
}

/* 左侧标签区域 */
.post-copyright-label {
  min-width: 90px;                        /* 固定宽度，对齐 */
  color: #49b1f5;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 标签中的图标 */
.post-copyright-label i {
  font-size: 1rem;
  width: 18px;
  text-align: center;
}

/* 右侧内容区域 */
.post-copyright-info {
  flex: 1;
  color: #2c3e50;
  word-break: break-word;
}

/* 链接样式 */
.post-copyright-info a {
  color: #49b1f5;
  text-decoration: none;
  border-bottom: 1px dashed #49b1f5;
  transition: all 0.2s;
}

.post-copyright-info a:hover {
  color: #ff6b6b;
  border-bottom-color: #ff6b6b;
}

/* ===== 深色模式适配 ===== */
[data-theme="dark"] .post-copyright {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .post-copyright:hover {
  background: rgba(0, 0, 0, 0.7);
}

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

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

[data-theme="dark"] .post-copyright-info a {
  color: #ff6b6b;
  border-bottom-color: #ff6b6b;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
  .post-copyright {
    padding: 1.2rem 1rem;
  }
  
  .post-copyright > div {
    flex-direction: column;
    margin-bottom: 15px;
  }
  
  .post-copyright-label {
    margin-bottom: 5px;
  }
}

/* source/css/font.css */

/* 定义主字体 */
@font-face {
  font-family: 'myfont';                /* 字体名自定义 */
  font-display: swap;                   /* 加载期间先显示后备字体 */
  src: url('/fonts/myfont.ttf') format('truetype');
  /* 如果需要兼容多种格式，可以这样写：
  src: url('/fonts/your-font.woff2') format('woff2'),
       url('/fonts/your-font.ttf') format('truetype');
  */
}

/* 定义代码字体（可选） */
@font-face {
  font-family: 'CodeFont';
  font-display: swap;
  src: url('/fonts/myfont.ttf') format('truetype');
}

body, .layout, #page, .post-content {
  font-family: 'MyFont', 'Microsoft YaHei', 'PingFang SC', sans-serif !important;
}

/* Twikoo 评论区毛玻璃效果 */
.twikoo {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 20px;
}

[data-theme="dark"] .twikoo {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}


/* ===== 终极纯黑代码块 ===== */

/* 代码块整体容器 - 纯黑背景 */
#article-container figure.highlight {
  background: #000000 !important;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
  border: 1px solid #222222 !important;
  margin: 20px 0;
  overflow: hidden;
}

/* 顶部工具栏 - 纯黑 */
#article-container .highlight-tools {
  background: #000000 !important;
  border-bottom: 1px solid #222222 !important;
  color: #ffffff !important;
  padding: 8px 10px !important;
}

/* 行号区域 - 纯黑 */
#article-container .gutter {
  background: #000000 !important;
  border-right: 1px solid #222222 !important;
}

/* 行号文字 - 灰色但背景透出纯黑 */
#article-container .gutter pre {
  background: #000000 !important;
  color: #666666 !important;
  margin: 0 !important;
  padding: 0 8px !important;
  border: none !important;
}

/* 代码区域容器 - 纯黑 */
#article-container .code {
  background: #000000 !important;
}

/* 代码区域 pre 标签 - 纯黑 */
#article-container .code pre {
  background: #000000 !important;
  color: #ffffff !important;
  padding: 16px !important;
  margin: 0 !important;
  border: none !important;
  font-family: 'Courier New', monospace !important;
}

/* 代码高亮配色（鲜艳版） */
#article-container .highlight .hljs-keyword,
#article-container .highlight .hljs-tag,
#article-container .highlight .hljs-doctag,
#article-container .highlight .hljs-built_in {
  color: #ff79c6 !important; /* 粉色 */
}

#article-container .highlight .hljs-string,
#article-container .highlight .hljs-attr,
#article-container .highlight .hljs-regexp {
  color: #50fa7b !important; /* 鲜绿 */
}

#article-container .highlight .hljs-comment,
#article-container .highlight .hljs-quote {
  color: #6272a4 !important; /* 蓝灰 */
  font-style: italic;
}

#article-container .highlight .hljs-function .hljs-title,
#article-container .highlight .hljs-class .hljs-title,
#article-container .highlight .hljs-title {
  color: #8be9fd !important; /* 亮青 */
}

#article-container .highlight .hljs-number,
#article-container .highlight .hljs-literal {
  color: #bd93f9 !important; /* 淡紫 */
}

#article-container .highlight .hljs-type,
#article-container .highlight .hljs-typename {
  color: #ffb86c !important; /* 橙 */
}

#article-container .highlight .hljs-params {
  color: #ffffff !important; /* 白 */
}

#article-container .highlight .hljs-variable,
#article-container .highlight .hljs-attribute {
  color: #ff5555 !important; /* 亮红 */
}

#article-container .highlight .hljs-meta {
  color: #8be9fd !important;
}

/* ===== 全覆盖补丁：确保代码块内部所有元素背景纯黑 ===== */
#article-container figure.highlight,
#article-container figure.highlight * {
  background-color: #000000 !important;
}

/* 但上面这行会覆盖所有元素的背景，包括可能想保留透明的地方（比如行号文字背景应该还是黑色，没问题）。
   如果发现某些元素（如注释文字）被意外覆盖了颜色，可以再单独恢复，但背景色黑色是我们要的。
   如果不想用通配符，可以更精确地覆盖已知元素： */
#article-container figure.highlight table,
#article-container figure.highlight tbody,
#article-container figure.highlight tr,
#article-container figure.highlight td,
#article-container figure.highlight th,
#article-container figure.highlight div,
#article-container figure.highlight span,
#article-container figure.highlight pre,
#article-container figure.highlight code {
  background-color: #000000 !important;
}