/* Bilibili 追番页面样式 - 水墨主题 */

/* 标签导航 */
.bangumi-tabs-nav {
    display: flex;
    background: rgba(240, 234, 222, 0.95);
    border-bottom: 2px solid rgba(93, 79, 66, 0.15);
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.bangumi-tab-btn {
    flex: 1;
    padding: 14px 8px;
    background: none;
    border: none;
    color: #5D4F42;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9375rem;
    font-family: 'TsangerYuYangT W03', 'Noto Serif SC', 'SimSun', serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.bangumi-tab-btn .bangumi-tab-icon img {
    width: auto;
    height: 28px;
    display: block;
}

.bangumi-tab-btn .bangumi-tab-icon span {
    font-size: 24px;
}

.bangumi-tab-btn .bangumi-tab-emoji {
    font-size: 26px;
    line-height: 1;
}

.bangumi-tab-btn .bangumi-tab-count {
    background: #c0392b;
    color: #fff;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    margin-left: 2px;
}

.bangumi-tab-btn.active {
    color: #b74137;
    font-weight: 600;
    background: rgba(255, 254, 245, 0.8);
}

.bangumi-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, #c0392b, #e74c3c, #c0392b);
    border-radius: 2px;
}

.bangumi-tab-btn:hover:not(.active) {
    background: rgba(93, 79, 66, 0.08);
    color: #2f2f2f;
}

.bangumi-tab-btn.bangumi-tab-error {
    color: #c0392b;
    opacity: 0.7;
}

/* 标签面板 */
.bangumi-tab-panel {
    display: none;
}

.bangumi-tab-panel.active {
    display: block;
}

/* 响应式 */
@media (max-width: 600px) {
    .bangumi-tab-btn {
        padding: 10px 4px;
        font-size: 0.8125rem;
        flex-direction: column;
        gap: 4px;
    }
    .bangumi-tab-btn .bangumi-tab-icon img {
        width: 22px;
        height: 22px;
    }
}

/* 链接样式 */
.no-line, .no-line:hover {
    text-decoration: none !important;
    color: inherit;
}

.bangumi-link {
    transition: opacity 0.3s ease;
}

.bangumi-link:hover {
    opacity: 0.9;
}

/* 头部标题 */
.page-header1 {
    text-align: center;
    padding: 30px 0 20px;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(167, 115, 195, 0.3);
    position: relative;
}

.page-header1::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #c0392b, #e74c3c, #c0392b);
    border-radius: 2px;
}

.page-header1 h1 {
    margin: 0;
    color: #5a4a3a;
    font-weight: 700;
}

.page-header1 h1 small {
    font-size: 18px;
    color: #c0392b;
    font-weight: 500;
    letter-spacing: 1px;
}

.page-header1 h1 small img {
    display: block;
    margin: 0 auto 8px;
    vertical-align: middle;
}

/* 卡片网格布局 */
.row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    padding: 10px 0 20px;
}

/* 单个卡片 */
.wiiuii-bangumi-item {
    width: 100%;
    box-sizing: border-box;
}

.bangumi-frames {
    display: flex;
    align-items: stretch;
    gap: 16px;
    padding: 16px;
    margin: 0;
    background: rgba(255, 253, 248, 0.92);
    border: 1px solid rgba(180, 150, 120, 0.25);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(90, 74, 58, 0.08);
    transition: all 0.3s ease;
    text-align: left;
    min-height: 180px;
}

.bangumi-frames:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(90, 74, 58, 0.15);
    border-color: rgba(192, 57, 43, 0.4);
}

/* 封面图 - 确保完整显示不被压缩 */
.wiiuii-bangumi-cover {
    flex: 0 0 130px;
    width: 130px;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    background: rgba(240, 235, 220, 0.3);
}

.wiiuii-bangumi-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.wiiuii-bangumi-cover:hover img {
    transform: scale(1.06);
}

/* 信息区 - 占满剩余空间 */
.wiiuii-bangumi-info {
    flex: 1 1 0;
    min-width: 0;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    padding: 0;
    overflow: hidden;
}

.wiiuii-bangumi-title {
    font-size: 16px;
    font-weight: 600;
    color: #3a2f25;
    margin: 0 0 8px;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.wiiuii-bangumi-desc {
    font-size: 12px;
    color: #807163;
    line-height: 1.6;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* 进度条 */
.bangumi-progress {
    width: 100%;
    height: 10px;
    background: rgba(192, 57, 43, 0.12);
    border-radius: 5px;
    overflow: hidden;
    margin: 6px 0 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.bangumi-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #c0392b, #e74c3c);
    border-radius: 5px;
    transition: width 0.6s ease;
    box-shadow: 0 0 6px rgba(231, 76, 60, 0.4);
}

.bangumi-progress-num {
    font-size: 12px;
    color: #6a5a4a;
    margin: 4px 0 0;
    padding: 0;
    line-height: 1.4;
}

.bangumi-progress-num span {
    color: #c0392b;
    font-weight: 600;
}

/* 加载动画 */
.loading_dsasd {
    display: block;
    width: 60px;
    height: 60px;
    margin: 40px auto;
}

/* 页码导航容器 */
#next-bilibiliMovie, #next-bilibiliAnime, #next-bilibiliFavlist {
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    width: 100%;
}

.pagination .page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.95);
    border: 1px solid rgba(192, 57, 43, 0.25);
    color: #5a4a3a;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.pagination .page-btn:hover:not(:disabled):not(.active) {
    background: rgba(192, 57, 43, 0.12);
    border-color: rgba(192, 57, 43, 0.45);
    color: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(192, 57, 43, 0.15);
}

.pagination .page-btn.active {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    border-color: #c0392b;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(192, 57, 43, 0.35);
    cursor: default;
}

.pagination .page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: rgba(240, 235, 220, 0.3);
    border-color: rgba(180, 150, 120, 0.2);
    color: #aaa;
}

.pagination .page-prev,
.pagination .page-next {
    font-size: 18px;
    font-weight: bold;
    min-width: 32px;
}

.pagination .page-ellipsis {
    color: #807163;
    font-size: 13px;
    padding: 0 4px;
    user-select: none;
}

/* 加载中文案 */
.pagination-loading {
    text-align: center;
    color: #807163;
    font-size: 14px;
    padding: 10px;
}

/* 预加载 */
.preload-hidden {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.preload-visible {
    opacity: 1;
}

/* 响应式 */
@media screen and (max-width: 768px) {
    .row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .bangumi-frames {
        flex-direction: row;
        padding: 12px;
        gap: 12px;
        min-height: auto;
    }

    .wiiuii-bangumi-cover {
        flex: 0 0 100px;
        width: 100px;
        height: 133px;
    }

    .wiiuii-bangumi-info {
        min-height: auto;
    }

    .wiiuii-bangumi-title {
        font-size: 15px;
    }

    .wiiuii-bangumi-desc {
        -webkit-line-clamp: 2;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .row {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* 错误提示 */
.error-message {
    text-align: center;
    padding: 20px;
    color: #c0392b;
    font-size: 14px;
}
