
/* ==================== 主容器 ==================== */
.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 20px 40px;
}

/* ==================== 页面标题 ==================== */
.page-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 16px 22px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}
.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-title::before {
    content: '';
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, var(--purple-600), var(--red-500));
    border-radius: 2px;
    flex-shrink: 0;
}
.page-subtitle {
    font-size: 12.5px;
    color: var(--gray-400);
    margin-left: 4px;
}
.filtered-count {
    margin-left: auto;
    font-size: 12.5px;
    color: var(--gray-500);
    background: var(--gray-50);
    padding: 5px 12px;
    border-radius: 14px;
    border: 1px solid var(--gray-200);
    white-space: nowrap;
}
.filtered-count strong {
    color: var(--purple-600);
    font-size: 14px;
}

/* ==================== 内容区：左侧列表 + 右侧筛选 ==================== */
.content-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.content-left {
    flex: 1;
    min-width: 0;
}
.content-right {
    width: 195px;
    flex-shrink: 0;
    position: sticky;
    top: 75px;
}

/* ==================== 更新列表 ==================== */
.update-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}
.update-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}
.update-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}
.update-card:hover {
    border-color: var(--purple-200);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    background: #fdfaff;
}
.update-card .cover {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--gray-100);
    position: relative;
    flex-shrink: 0;
}
.update-card .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.update-card:hover .cover img {
    transform: scale(1.05);
}
.update-card .cover .badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--red-500);
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.5px;
}
.update-card .cover .update-time-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 9px;
    padding: 3px 7px;
    border-radius: 4px;
    z-index: 2;
    letter-spacing: 0.3px;
    backdrop-filter: blur(2px);
}
.update-card .info {
    padding: 8px 9px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}
.update-card .info .title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}
.update-card .info .chapter-line {
    font-size: 10.5px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.update-card .info .chapter-line .chapter-name {
    color: var(--red-500);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.update-card .info .meta-line {
    font-size: 10px;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 6px;
}
.update-card .info .meta-line .author-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* 空状态 */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    color: var(--gray-400);
    font-size: 14px;
}
.empty-state .empty-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

/* ==================== 右侧筛选面板 ==================== */
.filter-sidebar {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 16px 15px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}
.filter-sidebar .filter-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200);
}
.filter-sidebar .filter-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, var(--purple-600), var(--red-500));
    border-radius: 2px;
    flex-shrink: 0;
}
.filter-date-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.filter-date-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 13px;
    border-radius: 10px;
    border: 2px solid var(--gray-200);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--gray-600);
    white-space: nowrap;
    letter-spacing: 0.2px;
    width: 100%;
}
.filter-date-btn:hover {
    border-color: var(--purple-300);
    color: var(--purple-600);
    background: var(--purple-50);
    transform: translateX(2px);
}
.filter-date-btn.active {
    background: var(--purple-600);
    color: #fff;
    border-color: var(--purple-600);
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(147, 51, 234, 0.28);
}
.filter-date-btn .date-label {
    flex: 1;
    text-align: left;
}
.filter-date-btn .date-count {
    font-size: 10.5px;
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    flex-shrink: 0;
}
.filter-date-btn.active .date-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}
.filter-date-btn.all-btn {
    font-weight: 600;
    margin-bottom: 2px;
    border-color: var(--gray-300);
}
.filter-date-btn.all-btn:hover {
    border-color: var(--purple-400);
    background: var(--purple-50);
    color: var(--purple-600);
}
.filter-date-btn.all-btn.active {
    background: var(--purple-600);
    color: #fff;
    border-color: var(--purple-600);
}

/* ==================== 分页 ==================== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin: 18px 0 20px;
    flex-wrap: wrap;
    user-select: none;
}
.page-btn {
    padding: 8px 15px;
    border-radius: 20px;
    border: 2px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    min-width: 38px;
    text-align: center;
    letter-spacing: 0.2px;
}
.page-btn:hover:not(.active):not(.disabled) {
    border-color: var(--purple-300);
    color: var(--purple-600);
    background: var(--purple-50);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.08);
}
.page-btn.active {
    background: var(--purple-600);
    color: #fff;
    border-color: var(--purple-600);
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(147, 51, 234, 0.3);
    cursor: default;
}
.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
.page-ellipsis {
    padding: 8px 4px;
    font-size: 13px;
    color: var(--gray-400);
    letter-spacing: 1px;
}
.page-info-text {
    font-size: 12.5px;
    color: var(--gray-500);
    margin: 0 10px;
    white-space: nowrap;
}

/* ==================== 底部 ==================== */
.footer {
    background: var(--gray-800);
    color: var(--gray-300);
    padding: 28px 20px 24px;
    text-align: center;
    font-size: 13px;
    line-height: 2;
    margin-top: 30px;
}
.footer a {
    color: var(--purple-400);
    text-decoration: none;
    transition: var(--transition);
}
.footer a:hover {
    color: #fff;
    text-decoration: underline;
}
.footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.footer .footer-divider {
    color: var(--gray-600);
}
.footer .copyright {
    color: var(--gray-500);
    font-size: 11.5px;
}

/* ==================== Toast ==================== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--purple-700);
    color: #fff;
    padding: 11px 26px;
    border-radius: 22px;
    font-weight: 600;
    font-size: 13.5px;
    z-index: 9999;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 1.6s forwards;
    pointer-events: none;
    letter-spacing: 0.3px;
}
@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-28px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-18px);
    }
}

/* ==================== 响应式 ==================== */
@media (max-width: 1200px) {
    .update-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }
    .content-right {
        width: 170px;
    }
    .filter-date-btn {
        padding: 7px 10px;
        font-size: 11.5px;
    }
}
@media (max-width: 1000px) {
    .content-layout {
        flex-direction: column-reverse;
    }
    .content-right {
        width: 100%;
        position: static;
    }
    .filter-sidebar {
        padding: 12px 14px;
    }
    .filter-date-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 5px;
    }
    .filter-date-btn {
        flex: 0 0 auto;
        padding: 6px 12px;
        font-size: 11.5px;
        border-radius: 18px;
        width: auto;
    }
    .filter-date-btn:hover {
        transform: translateY(-1px);
    }
    .filter-date-btn .date-count {
        font-size: 10px;
        padding: 1px 6px;
    }
    .update-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 700px) {
    .update-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .navbar-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .update-card .info {
        padding: 6px 7px 8px;
    }
    .update-card .info .title {
        font-size: 11px;
    }
    .page-btn {
        padding: 6px 11px;
        font-size: 11px;
    }
    .page-header {
        flex-wrap: wrap;
        gap: 6px;
    }
    .filtered-count {
        margin-left: 0;
        font-size: 11px;
    }
}
@media (max-width: 440px) {
    .update-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .update-card .info .title {
        font-size: 10px;
    }
    .update-card .info .chapter-line {
        font-size: 9px;
    }
    .filter-date-btn {
        padding: 5px 9px;
        font-size: 10.5px;
        border-radius: 15px;
    }
}