.font-bree {
    font-family: "Bree Serif", serif;
}

.hide {
    display: none;
}

/* .active 全局样式已删除 - 由各组件单独定义
   - 导航菜单：nav-menu.css 中的 .nav-menu a.active
   - 标签过滤：.filter-* 按钮的 active 状态
*/

/* 标签过滤按钮激活状态 */
[class^="filter-"].active,
.filter-all.active {
    background-color: #4299e1;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
}

[class^="filter-"].active:hover,
.filter-all.active:hover {
    color: white;
}


.div_header.logo {
    font-size: 20px;
    font-weight: 600;
    color: #4299e1;
}

.div_header.logo:hover {
    color: #4299e1;
}

/* 样式：使按钮固定在页面右下角 */
.scrollToButton {
    display: none;
    position: fixed;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    z-index: 9999;
    font-size: 14px; /* 设置按钮文字大小 */
    margin-bottom: 50px;
}


/* 自定义归属信息样式 */
.custom-footer {
    font-size: 12px; /* 调整字体大小 */
    padding: 1px 0; /* 调整上下内边距，左右内边距保持为0 */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 9998; /* 确保位于页面最上层 */
    white-space: nowrap; /* 始终单行显示 */
    overflow: hidden; /* 超出部分隐藏 */
    text-overflow: ellipsis;
}

/* footer 渐进精简：保证始终单行 */
/* 小屏 (≤768px): 隐藏 IP (P4) */
@media (max-width: 768px) {
    .custom-footer .footer-ip {
        display: none;
    }
}

/* 手机 (≤480px): 隐藏访问量 (P3) */
@media (max-width: 480px) {
    .custom-footer .footer-visitor {
        display: none;
    }
}

/* 极小屏 (≤360px): 隐藏版本号 (P2)，只留版权+备案+GitHub */
@media (max-width: 360px) {
    .custom-footer .footer-ver-icon,
    .custom-footer .footer-version {
        display: none;
    }
    .custom-footer .footer-github-link .iconfont {
        font-size: 11px;
    }
}

.custom-footer a {
    color: inherit;
    text-decoration: none;
}

.footer-github-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: opacity 0.2s;
}

.footer-github-link:hover {
    opacity: 0.8;
}

.footer-github-link .footer-ver-icon {
    opacity: 0.6;
    flex-shrink: 0;
}

.footer-github-link .iconfont {
    font-size: 12px;
}

.footer-github-link .footer-version {
    background: rgba(255, 255, 255, 0.12);
    padding: 0 4px;
    border-radius: 8px;
    font-size: 11px;
    margin-left: 1px;
    line-height: 16px;
}

/* 夜间模式适配 */
.mk-dark-mode .footer-github-link .footer-version {
    background: rgba(0, 0, 0, 0.2);
}

#box {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* 居中对齐卡片 */
}

.card {
    flex: 0 0 calc(33.333% - 1rem); /* 桌面端：一行 3 个 */
    margin: 0.5rem; /* 添加卡片之间的间距 */
}

/* 平板端：一行 2 个 */
@media (max-width: 768px) {
    .card {
        flex: 0 0 calc(50% - 1rem);
    }
}

/* 手机端：一行 1 个 */
@media (max-width: 480px) {
    .card {
        flex: 0 0 calc(100% - 1rem);
    }
}


/*古诗词显示*/
#poem_container {
    text-align: center; /* 居中显示 */
    margin-top: 50px; /* 上边距 */
}

#poem_sentence {
    font-size: 24px; /* 古诗字体大小 */
    margin-bottom: 20px; /* 古诗与信息之间的下边距 */
}

#poem_info {
    font-size: 16px; /* 信息字体大小 */
}