﻿* {
    font-family: PingFang SC, PingFang SC;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    max-width: 480px;
    margin: 0 auto;
}

/* 头部固定区域 */
.catalog-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    /*border-bottom: 1px solid #e5e5e5;*/
    /*padding: 12px 16px;*/
    padding-top: 0px 10px;
    padding-bottom: 0px;
    display: flex;
    flex-direction: column;
    z-index: 999;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;

}

.back-btn {
    width: 16px;
    height: 16px;
    background: url('/assets/img/back-arrow.png') no-repeat center;
    background-size: contain;
    cursor: pointer;
}

.header-title {
    font-weight: 500;
    font-size: 16px;
    color: #333;
    margin:0 auto;
}

.sort-btn {
    color: #FD6205; /* 设计稿橙色 */
    font-size: 14px;
    cursor: pointer;
    position: absolute;
    top: 62px;
    right: 12px;
}

.header-info {
    font-size: 12px;
    color: #999;
    /*margin-top: 4px;*/
    height: 46px;
    line-height:46px;
}

.header-info .state{
    color:#666;
    font-weight: 400;
    font-size:14px;
}

/* 分卷切换 */
.volume-toggle {
    background-color: #F8F8F8;
    /*border-bottom: 1px solid #e5e5e5;*/
    padding: 10px 16px;
    margin-top: 96px; /* 避开头部高度 */
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    position: relative;
   
}

.volume-toggle span {
    font-weight: 400;
    font-size: 14px;
    color: #666;
    position:absolute;
    left:40px;
    top:9px;
    
}

.arrow-icon {
    width: 12px;
    height: 12px;
    background: url('/assets/img/icon/arrow-down.png') center center no-repeat;
    background-size: contain;
    transition: transform 0.3s ease;
    float:left;
    margin-top:0px;
    margin-left:6px;
}

.arrow-icon.rotate {
    transform: rotate(180deg);
}

/* 目录列表容器 */
.catalog-list {
    display: block; /* 初始隐藏 */
    padding: 10px 16px;
    padding-top:0px;
    background-color: #fff;
    transition: max-height 0.3s ease;
    overflow: hidden;
}

.catalog-list.expanded {
    display: none;
}

/* 目录项样式 */
.chapter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    /*border-bottom: 1px solid #f5f5f5;*/
}

.chapter-cover {
    width: 104px;
    height: 63px;
    object-fit: cover;
    margin-right: 18px;
}

.chapter-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.chapter-title {
    font-family: PingFang SC, PingFang SC;
    font-weight: 400;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.chapter-title.curr{
    color:#FD6205;
}

.chapter-date {
    font-size: 12px;
    color: #999;
}

.tag-free {
    /* 核心：用 clip-path 裁剪梯形 */
    clip-path: polygon(30% 0, 70% 0, 100% 100%, 0% 100%);
    /* 设计稿倾斜标签 */
    transform: rotate(45deg);
    background-color: #34B8A4;
    color: #fff;
    font-size: 12px;
    /* 移除旋转，改用 clip-path 实现倾斜 */
    /* 调整内边距让文字居中 */
    padding: 6px 14px;
    margin-right: -24px; /* 适配右侧偏移 */
    margin-top: -18px;
    /* 让标签宽度自适应内容，或固定尺寸 */
    width: 93px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#loading {
    text-align: center;
    color: #999;
    padding: 10px;
    display: none;
}

.data-end {
    display:none;
    text-align: center;
    color: #999;
    font-size: 14px;
    margin-bottom: 20px;
}

/* 响应式适配 */
@media (max-width: 375px) {
    .catalog-header {
        /*padding: 10px 12px;*/
        padding: 0px 10px;
    }

    .header-title {
        font-size: 16px;
    }

    .sort-btn {
        font-size: 13px;
    }

    .chapter-title {
        font-size: 14px;
    }
}
