/* ========= 修复双边框问题 · 玫瑰红分页组件 ========= */
.pagebar {
    margin-top: 2rem;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    line-height: 1.4;}

.pagebar a {
    text-decoration: none;}

.pagebar .p_pages {
    margin-left: 0;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;}

/* 公用按钮样式（仅设置一次边框） */
.pagebar .p_first, .pagebar .p_first_d,
.pagebar .p_prev, .pagebar .p_prev_d,
.pagebar .p_next, .pagebar .p_next_d,
.pagebar .p_last, .pagebar .p_last_d,
.pagebar .p_no a, .pagebar .p_no_d,
.pagebar .p_fun a, .pagebar .p_fun_d {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.9rem;
    min-width: 2.2rem;
    border-radius: 2rem;
    border: 1px solid #f0e0ea;   /* 只设置一次边框 */
    background: #ffffff;
    color: #4a3842;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    cursor: pointer;
    box-sizing: border-box;}

/* 确保 a 标签内部不再产生额外边框 */
.pagebar .p_fun a, .pagebar .p_no a {
    border: none;          /* 清除 a 标签自身的边框 */
    background: transparent;
    padding: 0;
    color: inherit;}

/* 修正父级容器与 a 标签的嵌套关系，防止双重边框 */
.pagebar .p_fun, .pagebar .p_no {
    display: inline-flex;}

/* 可点击链接的悬停效果（作用于父级容器，统一控制） */
.pagebar .p_no a:hover,
.pagebar .p_fun a:hover {
    background: #f4e6ef;
    border-color: #722751;
    color: #722751;
    transform: translateY(-2px);}

/* 当前页码高亮 */
.pagebar .p_no_d {
    background: #722751;
    border-color: #722751;
    color: #ffffff;
    cursor: default;
    pointer-events: none;}

/* 禁用状态（首页/上页不可用时） */
.pagebar .p_first_d.p_fun_d,
.pagebar .p_prev_d.p_fun_d,
.pagebar .p_next_d,
.pagebar .p_last_d.p_fun_d {
    background: #fef7fc;
    color: #c0b0b8;
    cursor: not-allowed;
    pointer-events: none;
    border-color: #f0e0ea;}

/* 省略号 */
.pagebar .p_dot {
    background: transparent;
    border: none;
    color: #9e838f;
    padding: 0 0.2rem;
    cursor: default;}

/* ========= 跳转区域 ========= */
.pagebar .p_goto {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 0.8rem;}

.pagebar .p_goto_input {
    width: 52px;
    padding: 0.4rem 0.2rem;
    text-align: center;
    border: 1px solid #f0e0ea;
    border-radius: 2rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    background: white;
    transition: 0.2s;
    outline: none;}

.pagebar .p_goto_input:focus {
    border-color: #722751;
    box-shadow: 0 0 0 2px rgba(114,39,81,0.2);}

.pagebar .p_goto a {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    border: 1px solid #f0e0ea;
    background: white;
    color: #722751;
    font-weight: 500;
    transition: 0.2s;}

.pagebar .p_goto a:hover {
    background: #722751;
    color: white;
    border-color: #722751;
    transform: translateY(-2px);}

/* 移动端适配 */
@media (max-width: 640px) {
    .pagebar .p_first, .pagebar .p_first_d,
    .pagebar .p_prev, .pagebar .p_prev_d,
    .pagebar .p_next, .pagebar .p_next_d,
    .pagebar .p_last, .pagebar .p_last_d,
    .pagebar .p_no a, .pagebar .p_no_d {
        padding: 0.3rem 0.7rem;
        min-width: 1.8rem;
        font-size: 0.75rem;}
    .pagebar .p_goto_input {
        width: 46px;
        font-size: 0.75rem;}
    .pagebar .p_goto a {
        padding: 0.3rem 0.8rem;}
}
