@charset "utf-8";

:root
{
    --font-color-0: #CF4B4B;
    --font-color-1: #252525;
    --font-color-2: #333;
    --font-color-3: #999;
    --bg-color-1: #F4F5F6;
    --line-1: #EAEAEA;
    --line-2: #E0E0E0;
}
p
{
    word-wrap: break-word;
}

html
{
    scrollbar-gutter: stable;
}
body
{
    font-family: "Montserrat", "SF UI Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    font-size: 16px;
    line-height: 1.75;
    letter-spacing: 0.6px;
    color: var(--font-color-2);
}
a
{
    text-decoration: none;
    color: var(--font-color-3);
    transition: color .2s ease;
}
a:hover
{
    color: var(--font-color-0);
}

.paper-main
{
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 72px 8vw 24px;
}

.header
{
    position: relative;
    padding-bottom: 48px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line-1);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
}

.logo {
    font-size: 2rem;
    font-weight: 600;
    color: var(--font-color-1);
    margin-bottom: 23px;
}

@media (min-width: 768px) {
    .logo {
        flex: 0 0 100%;
    }
}

.nav
{
    margin: 0 0 4px;
    flex: 0 0 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: center;
}
.nav li
{
    padding: 0;
    margin-right: 24px;
}
.nav li:last-of-type
{
    margin-right: 0;
}
.nav li a
{
    display: block;
    padding: 2px 0 4px;
    color: var(--font-color-2);
    font-size: 0.875rem;
    letter-spacing: 0;
    opacity: 0.6;
    transition: opacity .2s ease, color .2s ease;
    position: relative;
}
.nav li a::after
{
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: transparent;
    background-image: none;
    transition: background .2s ease;
}
.nav li a:hover
{
    opacity: 1;
    color: var(--font-color-0);
}

/* Language Switcher */
.lang-switch {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    letter-spacing: 0.3px;
    color: var(--font-color-3);
    text-decoration: none;
    transition: color 0.2s ease;
}
.lang-switch:hover {
    color: var(--font-color-2);
}
.lang-switch span {
    opacity: 0.65;
    font-weight: 400;
    transition: opacity 0.2s ease;
}
.lang-switch .lang-active {
    opacity: 1;
    font-weight: 600;
    color: var(--font-color-1);
}
.lang-switch .lang-sep {
    opacity: 0.3;
    font-weight: 300;
}

.post-header
{
    margin-bottom: 48px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: center;
}
.post-header .logo
{
    font-size: 2rem;
}
.post-header .go-home
{
    display: block;
    padding: 10px 20px 8px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #eee;
    margin: 8px 0;
    transition: background ease-in-out .5s;
}
.post-header .go-home:hover
{
    background: var(--bg-color-1);
    transition: background ease-in-out .5s;
}
.post-header .go-home svg
{
    transform: translateX(0);
    transition: transform ease-in-out .5s;
}
.post-header .go-home:hover svg
{
    transform: translateX(-4px);
    transition: transform ease-in-out .5s;
}

.post-list
{
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: stretch;
}
.post
{
    display: block;
    width: 100%;
    padding-bottom: 48px;
    margin-bottom: 48px;
    border-bottom: 1px dashed var(--line-2);
    text-decoration: none;
    color: inherit;
}
.post:hover .post-title
{
    color: var(--font-color-0);
}
.post-title
{
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 12px;
    color: var(--font-color-1);
    transition: color .2s ease;
}
.post-except
{
    word-break: break-all;
    margin-bottom: 12px;
    color: var(--font-color-2);
}
.post-date
{
    font-size: 0.875rem;
    color: var(--font-color-3);
}

/* 桌面端分页 */
.paginator-pc
{
    font-size: 0.875rem;
    width: 100%;
    margin: 0 auto 24px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
}
.paginator-pc .page-number,
.paginator-pc .space,
.paginator-pc .extend
{
    display: block;
    padding: 6px 12px;
    border-radius: 4px;
    background: transparent;
    border: none;
    color: var(--font-color-3);
}
.paginator-pc .space
{
    padding: 6px 4px;
}
.paginator-pc a.page-number,
.paginator-pc a.extend
{
    color: var(--font-color-2);
    transition: color .2s ease, background .2s ease;
}
.paginator-pc a.page-number:hover,
.paginator-pc a.extend:hover
{
    color: var(--font-color-0);
    background: rgba(207, 75, 75, 0.05);
}
.paginator-pc .current
{
    color: #fff;
    background: var(--font-color-0);
    font-weight: 600;
}
.paginator-pc .prev
{
    margin-right: 4px;
}
.paginator-pc .next
{
    margin-left: 4px;
}

/* 移动端分页 */
.paginator-mobile
{
    display: none;
    width: 100%;
    margin: 0 auto 24px;
    align-items: center;
    justify-content: space-between;
}
.paginator-mobile-btn
{
    display: block;
    padding: 10px 20px;
    font-size: 0.875rem;
    color: var(--font-color-2);
    border: 1px solid var(--line-1);
    border-radius: 4px;
    text-decoration: none;
    transition: color .2s ease, border-color .2s ease;
}
.paginator-mobile-btn:hover
{
    color: var(--font-color-0);
    border-color: var(--font-color-0);
}
.paginator-mobile-btn.disabled
{
    color: var(--font-color-3);
    opacity: 0.4;
    pointer-events: none;
}
.paginator-mobile-info
{
    font-size: 0.875rem;
    color: var(--font-color-3);
}

@media screen and (max-width: 768px) {
    .paginator-pc { display: none; }
    .paginator-mobile { display: flex; }
}

.footer
{
    padding: 48px 0 24px;
    font-size: 13px;
    color: var(--font-color-3);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.footer-dot
{
    color: var(--line-2);
}
.footer a
{
    color: var(--font-color-3);
    transition: color .2s ease;
}
.footer a:hover
{
    color: var(--font-color-0);
}

.post-main
{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 24px;
}
.post-main-title
{
    display: block;
    flex: 0 0 100%;
    margin-bottom: 12px;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--font-color-1);
    text-decoration: none;
}
.post-main-title:hover
{
    color: var(--font-color-0);
}
.post-meta
{
    font-size: 0.875rem;
    color: var(--font-color-3);
    flex: 0 0 100%;
    margin-bottom: 15px;
}
.post-meta a {
    transition: color .2s ease;
}
.post-meta a:hover {
    color: var(--font-color-0);
}

/* 分类/归档页头部 */
.archive-header {
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line-1);
}
.archive-header-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--font-color-0);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.archive-header-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--font-color-1);
    margin: 0 0 8px;
    line-height: 1.4;
}
.archive-header-count {
    font-size: 0.875rem;
    color: var(--font-color-3);
    margin: 0;
}

/* 文章分类 */
.tags {
    margin-bottom: 32px;
}

.tags a {
    display: inline-block;
    box-sizing: border-box;
    padding: 0 1em;
    height: 28px;
    line-height: 28px;
    border-radius: 28px;
    background-color:#000;
    color: #fff;
    text-decoration: none
}

.tags a+a {
    margin-left: .2em
}

.tags .new {
    --color: #3778FF;
    color: #fff
}

.tags .update {
    --color: #E016C4;
    color: #fff
}

.tags .fix,.tags .bugfix {
    --color: #FF4772;
    color: #fff
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--font-color-1);
}

.hamburger-line {
    transition: transform .3s ease, opacity .3s ease;
    transform-origin: center;
}

.hamburger.active .hamburger-line-1 {
    transform: translateY(6px) rotate(45deg);
}
.hamburger.active .hamburger-line-2 {
    opacity: 0;
}
.hamburger.active .hamburger-line-3 {
    transform: translateY(-6px) rotate(-45deg);
}

/* 当前页面菜单高亮 */
.nav li a.nav-active {
    color: var(--font-color-1);
    opacity: 1;
}
.nav li a.nav-active::after {
    background: var(--font-color-1);
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav {
        flex-direction: column;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease, opacity .3s ease;
        opacity: 0;
    }

    .nav.active {
        max-height: 400px;
        opacity: 1;
    }

    .nav li {
        margin-right: 0;
        padding: 0;
    }

    .nav li a {
        display: block;
        padding: 12px 0;
        font-size: 15px;
        border-bottom: 1px solid var(--line-1);
    }

    .nav li:last-of-type a {
        border-bottom: none;
    }

    .lang-switch {
        top: 2px;
        right: 48px;
    }
}

/* TOC 目录 */
.toc-container {
    display: none;
    background: #f8f8f8;
    border-radius: 8px;
    padding: 16px 20px;
}

.toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--font-color-1);
    user-select: none;
}

.toc-toggle-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
    color: var(--font-color-3);
}

.toc-toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.toc-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
    max-height: 600px;
    opacity: 1;
    margin-top: 16px;
}

.toc-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.toc-container ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-container li {
    margin: 0;
    padding: 0;
}

/* 隐藏 Hexo 自动生成的序号，避免与标题自带序号重复 */
.toc-container .toc-number {
    display: none;
}

.toc-container .toc-item {
    position: relative;
    padding: 8px 0 8px 16px;
    border-left: 2px solid var(--line-1);
    transition: all 0.2s ease;
}

.toc-container .toc-item:hover {
    border-left-color: var(--font-color-3);
}

.toc-container .toc-item-active {
    border-left-color: var(--font-color-0) !important;
    background: rgba(207, 75, 75, 0.05);
    border-radius: 0 4px 4px 0;
}

.toc-container a {
    display: block;
    font-size: 14px;
    line-height: 1.6;
    color: var(--font-color-2) !important;
    transition: color 0.2s ease;
    text-decoration: none;
}

.toc-container .toc-item:hover a {
    color: var(--font-color-1) !important;
}

.toc-container .toc-item-active a {
    color: var(--font-color-0) !important;
    font-weight: 600;
}

/* TOC 子级缩进 */
.toc-container .toc-child {
    margin-left: 12px;
}

.toc-container .toc-child .toc-item {
    padding: 6px 0 6px 12px;
}

.toc-container .toc-child a {
    font-size: 13px;
}

/* 文章正文 + TOC 布局容器 */
.post-body-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.toc-sidebar {
    order: -1; /* 移动端：TOC 在正文前面 */
    margin-bottom: 32px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

/* PC 端（宽屏）：TOC 固定在页面右侧空白处 */
@media screen and (min-width: 1400px) {
    .toc-sidebar {
        position: fixed;
        left: calc(50% + 550px - 8vw + 20px);
        top: 80px; /* 初始值，JS 会动态覆盖 */
        width: 200px;
        margin: 0;
        z-index: 100;
        overflow: visible;
    }

    .toc-sidebar .toc-container {
        background: transparent;
        padding: 0;
        border-radius: 0;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        /* Firefox */
        scrollbar-width: thin;
        scrollbar-color: transparent transparent;
    }

    .toc-sidebar .toc-container:hover {
        scrollbar-color: rgba(0,0,0,0.15) transparent;
    }

    /* Webkit (Chrome/Safari/Edge) */
    .toc-sidebar .toc-container::-webkit-scrollbar {
        width: 4px;
    }

    .toc-sidebar .toc-container::-webkit-scrollbar-track {
        background: transparent;
    }

    .toc-sidebar .toc-container::-webkit-scrollbar-thumb {
        background: transparent;
        border-radius: 4px;
    }

    .toc-sidebar .toc-container:hover::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.15);
    }

    .toc-sidebar .toc-container::-webkit-scrollbar-thumb:hover {
        background: rgba(0,0,0,0.3);
    }

    /* PC 端隐藏折叠按钮，始终展开 */
    .toc-sidebar .toc-toggle {
        display: none;
    }

    .toc-sidebar .toc-content {
        max-height: none !important;
        opacity: 1 !important;
        margin-top: 0;
    }

    .toc-sidebar .toc-content.collapsed {
        max-height: none !important;
        opacity: 1 !important;
    }
}

/* 非宽屏样式（移动端 + 中等屏幕） */
@media screen and (max-width: 1399px) {
    .toc-sidebar {
        width: 100%;
        box-sizing: border-box;
    }

    .toc-container {
        padding: 14px 16px;
        box-sizing: border-box;
        word-break: break-word;
    }

    .toc-content {
        margin-top: 12px;
    }

    .toc-container .toc-item {
        padding: 6px 0 6px 12px;
    }

    .toc-container a {
        font-size: 13px;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* Projects */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.post-md .project-block {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--bg-color-1);
    padding: 16px 18px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--font-color-2);
    transition: background 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.project-block:hover {
    background: #fff;
    border-color: var(--line-2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    text-decoration: none;
}

.project-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.project-icon img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: block;
}

.project-info {
    flex: 1;
    min-width: 0;
}

.project-block strong {
    color: var(--font-color-1);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    display: inline;
}

.project-tag {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--font-color-3);
    background: rgba(0,0,0,0.04);
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    font-weight: 400;
}

.project-block .description {
    display: block;
    color: var(--font-color-3);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 4px;
}

.project-archived {
    opacity: 0.55;
}

.project-archived:hover {
    opacity: 0.75;
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}

.stack-item {
    background: var(--bg-color-1);
    padding: 12px;
    border-radius: 10px;
    text-align: left;
    color: var(--font-color-2);
    text-decoration: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.stack-item:hover {
    background: #fff;
    border-color: var(--line-2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.stack-item img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 8px;
}

.stack-item strong {
    display: block;
    color: var(--font-color-1);
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.3;
}

.stack-price {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--font-color-0);
    margin: 4px 0;
}

.stack-item .description {
    display: block;
    color: var(--font-color-3);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .stack-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stack-grid {
        grid-template-columns: 1fr;
    }
}

  
/* Archive */
.category-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-item {
    margin-bottom: 6px;
}

.category-link {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    background-color: var(--bg-color-1);
    color: var(--font-color-2);
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.2s, color 0.2s;
}

.category-link:hover {
    background-color: var(--font-color-0);
    color: white;
}

.category-link.active {
    background-color: var(--font-color-0);
    color: white;
}

.custom-archive-year {
    opacity: 0.2;
    margin-left: 20px;
}

.custom-archive-item {
    margin-left: 20px;
    margin-bottom: 10px;
}

.custom-archive-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.custom-archive-title a {
    font-weight: 600;
}

.custom-archive-date {
    display: block;
    color: var(--font-color-3);
    font-size: 13px;
}

.custom-archive-hr {
    border: none;
    height: 1px;
    background: var(--line-1);
    margin: 10px 0;
}

/* Links */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.post-md .link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-color-1);
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--font-color-2);
    transition: background 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.link-card:hover {
    background: #fff;
    border-color: var(--line-2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    text-decoration: none;
}

.link-avatar {
    display: none;
}

.link-info {
    flex: 1;
    min-width: 0;
}

.link-info strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--font-color-1);
    line-height: 1.3;
}

.link-info span {
    display: block;
    font-size: 0.8rem;
    color: var(--font-color-3);
    line-height: 1.4;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .links-grid {
        grid-template-columns: 1fr;
    }
}

/* stack App list */

  .product-list {
    margin-top: 20px;
  }
  
  .post-md .product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    text-decoration: none;
    color: #333 !important;
    background-color: #f5f5f5;
    border-radius: 8px;
    transition: background-color 0.3s ease;
  }
  
  .product-item:hover {
    background-color: #e0e0e0; /* 悬停时的背景颜色 */
  }
  
  .post-md .product-icon {
    width: 70px;
    height: 70px;
    margin-right: 20px;
    border-radius: 8px;
    border: none !important;
    padding: 0 !important;
    box-sizing: content-box !important;
  }
  
  .product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .product-title {
    display: block;
    font-size: 1.2em;
    margin-bottom: 4px;
    color: #000 !important; /* 强制标题颜色为黑色 */
    margin: 0px !important; /* 强制覆盖全局 margin 设置 */
  }
  
  .product-details .description {
    font-size: 1em;
    color: #555 !important; /* 强制描述文字颜色为灰色 */
    margin: 0px !important; /* 强制覆盖全局 margin 设置 */
  }
  
  .tags {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    justify-content: flex-end; /* 右对齐 */
  }
  
  .tag {
    background-color: #444; /* 标签背景色 */
    color: #fff; /* 标签文字颜色 */
    padding: 2px 6px; /* 缩小标签大小 */
    border-radius: 4px;
    font-size: 0.8em; /* 减小字体大小 */
    margin-left: 8px; /* 标签间距 */
  }
  
  .separator {
    height: 1px;
    background-color: #f5f5f5; /* 灰色分隔符 */
    margin: 15px 0;
  }
  
  /* 适配移动端 */
  @media (max-width: 768px) {
    .tags {
      display: none; /* 在移动端隐藏标签 */
    }
  }

/* About 职业经历列表样式 */
.post-md .career-list {
    list-style: none;
    padding-left: 0;
}

.post-md .career-list li {
    margin-bottom: 2em;
    margin-top: 0;
    display: flex;
    align-items: flex-start;
    flex-direction: row;
    line-height: 1.6;
}

.post-md .career-list li::marker {
    color: transparent;
}

.post-md .career-list .year-range {
    font-size: 14px;
    color: #888888;
    width: 100px;
    flex-shrink: 0;
}

.post-md .career-list strong {
    color: #111111;
    font-size: 18px;
}

.post-md .career-list div {
    font-size: 16px;
    color: #555555;
    line-height: 1.6;
}

.post-md .career-list div strong {
    display: block;
    margin-bottom: 0.5em;
}

.post-md .career-list a {
    color: var(--font-color-0);
    text-decoration: none;
}

.post-md .career-list a:hover {
    color: #A63C3C;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .post-md .career-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .post-md .career-list .year-range {
        width: auto;
        margin-bottom: 0.5em;
    }

    .post-md .career-list div {
        font-size: 16px;
    }
}


/* 社交媒体图标样式 */

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a img,
.social-icons .email-icon img,
.social-icons .wechat-icon img {
  width: 30px;
  height: 30px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.social-icons a:hover img,
.social-icons .email-icon img:hover,
.social-icons .wechat-icon img:hover {
  transform: scale(1.2);
}

#toast {
  visibility: hidden;
  min-width: 250px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 5px;
  padding: 10px;
  position: fixed;
  z-index: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
}

#toast.show {
  visibility: visible;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeout {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  position: relative;
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  width: auto;
  max-width: 300px;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close {
  position: absolute;
  right: 10px;
  top: 10px;
  color: #888;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.modal-content h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.modal-content p {
  font-size: 14px;
  margin-bottom: 20px;
  text-align: center;
}

.modal-content img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

/* Responsive Modal for Mobile */
@media screen and (max-width: 600px) {
  .modal-content {
      width: 90%;
      margin-top: 30%;
  }
}

/* 归档页面 */
.custom-archive-list {
  margin-top: 20px;
}

.custom-archive-year {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 10px;
  margin-top: 40px; /* 每个年份的间距 */
  opacity: 0.2; /* 设置年份的透明度 */
}

.custom-archive {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.custom-archive-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px; /* 每篇文章的间距 */
}

.custom-archive-title a {
  font-size: 18px;
  color: #000;
  text-decoration: none;
  font-weight: bold; /* 设置标题加粗 */
}

.custom-archive-title a:hover {
  text-decoration: underline; /* 鼠标悬停效果 */
}

.custom-archive-date {
  color: #b0b0b0; /* 日期的颜色 */
  font-size: 14px;
  flex-shrink: 0;
}

/* 文章底部 Follow 区域 */
.post-follow {
    flex: 0 0 100%;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--line-1);
}

.post-follow-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 药丸按钮（带文字）: Follow me on X, RSS */
.follow-pill {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 14px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.02);
    transition: background .2s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--font-color-1);
    position: relative;
}
.follow-pill:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--font-color-1);
}
.follow-pill svg {
    flex-shrink: 0;
}
.follow-pill span {
    margin-left: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* 圆形图标按钮: Telegram, GitHub */
.follow-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.02);
    transition: background .2s ease;
    color: var(--font-color-1);
}
.follow-icon:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--font-color-1);
}
.follow-wechat {
    cursor: pointer;
    position: relative;
}

/* WeChat 弹出框 */
.wechat-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    opacity: 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 4px;
    padding: 16px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.04);
    z-index: 50;
    width: 200px;
    text-align: center;
}
.wechat-popup.show {
    display: block;
    opacity: 1;
    transform: translateX(-50%) scale(1);
    animation: rssPopupIn .15s ease-out;
}
.wechat-popup-title {
    font-size: 15px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.9);
    margin-bottom: 12px;
}
.wechat-popup-qr {
    width: 160px;
    height: 160px;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* 相关文章 */
.related-posts {
    flex: 0 0 100%;
    min-width: 0;
    overflow: hidden;
    margin-top: 64px;
    margin-bottom: 48px;
}
.related-posts-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--font-color-1);
    margin-bottom: 24px;
}
.related-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.related-posts-list li {
    margin: 0;
}
.related-posts-list li + li {
    margin-top: 16px;
}
.related-posts-item {
    display: block;
    text-decoration: none;
    min-width: 0;
    overflow: hidden;
}
.related-posts-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--font-color-1);
    margin: 0 0 4px;
    transition: color .2s ease;
    text-align: left;
}
.related-posts-item:hover .related-posts-item-title {
    color: var(--font-color-0);
}
.related-posts-item-desc {
    font-size: 13px;
    color: #666;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
}
.related-posts-item time {
    display: block;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.4);
    margin-top: 8px;
}

/* RSS 弹出框 */
.rss-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    opacity: 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 4px;
    padding: 16px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.04);
    z-index: 50;
    width: 280px;
}
.rss-popup.show {
    display: block;
    opacity: 1;
    transform: translateX(-50%) scale(1);
    animation: rssPopupIn .15s ease-out;
}
@keyframes rssPopupIn {
    from { opacity: 0; transform: translateX(-50%) scale(0.9) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); }
}
.rss-popup-title {
    font-size: 15px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.9);
    margin-bottom: 8px;
}
.rss-popup-desc {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.8);
    line-height: 1.6;
    margin-bottom: 12px;
}
.rss-popup-copy {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background .2s ease;
}
.rss-popup-copy:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Follow & 相关文章移动端适配 */
@media screen and (max-width: 768px) {
    .post-follow {
        margin-top: 32px;
        padding-top: 24px;
    }
    .post-follow-links {
        flex-wrap: wrap;
        gap: 8px;
    }
    .follow-pill {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
    }
    .follow-pill span {
        display: none;
    }
    .follow-icon {
        width: 36px;
        height: 36px;
    }
    .related-posts {
        margin-top: 40px;
        margin-bottom: 32px;
    }
    .related-posts-title {
        font-size: 18px;
        margin-bottom: 16px;
    }
    .related-posts-item-title {
        font-size: 13px;
    }
    .related-posts-item-desc {
        font-size: 12px;
    }
    .related-posts-item time {
        font-size: 11px;
        margin-top: 6px;
    }
    .related-posts-list li + li {
        margin-top: 12px;
    }
}
