/* 动漫详情页样式 */

/* 详情页主容器 */
.dmdetail {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

/* 基本信息区域 */
.dmbase {
    display: flex;
    padding: 20px;
    gap: 20px;
    border-bottom: 1px solid #eee;
}

.dminfo {
    flex: 1;
}

.dm-title h1 {
    font-size: 28px;
    color: #333;
    margin: 0 0 15px 0;
    font-weight: bold;
}

.dm-meta {
    margin-bottom: 20px;
}
.dm-description {
    max-width: 750px;
}

.dm-description p {
    line-height: 26px;
    font-size: 15px;
}
.meta-item {
    display: flex;
    margin-bottom: 8px;
    align-items: center;
}

.meta-item .label {
    font-weight: bold;
    color: #666;
    min-width: 80px;
    font-size: 14px;
}

.meta-item .value {
    color: #333;
    font-size: 14px;
}

.status-ongoing {
    color: #28a745;
    font-weight: bold;
}

.dm-description h3 {
    font-size: 16px;
    color: #333;
    margin: 0 0 10px 0;
    font-weight: bold;
}

.dm-description p {
    line-height: 1.6;
    color: #666;
    font-size: 14px;
    text-align: justify;
}

/* 封面图片区域 */
.dmpic {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.dmpic .dmfm {
    flex: 1;
    max-width: 50%;
}

.dmpic .app-ad {
    flex: 1;
    max-width: 50%;
}
.app-ad {
    width: 220px;
    background: linear-gradient(135deg, #ff6600, #ff9900);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 10px rgba(255, 102, 0, 0.3);
    flex-shrink: 0;
}

.app-ad h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: bold;
}

.app-ad .qr-code {
    background: white;
    border-radius: 8px;
    padding: 10px;
    margin: 15px 0;
    display: inline-block;
}

.app-ad .qr-code img {
    width: 120px;
    height: 120px;
    display: block;
}

.app-ad p {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.4;
}

.app-ad .download-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.app-ad .download-btn:hover {
    background: white;
    color: #ff6600;
}

.dmpic img {
    width: 260px;
    height: 377px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.dmpic img:hover {
    transform: scale(1.05);
}

/* 章节列表 */
.chapterlist {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.chapterlist h2 {
    font-size: 20px;
    color: #333;
    margin: 0 0 15px 0;
    font-weight: bold;
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.chapter-grid li.on {
    background: #03A9F4;
    font-weight: bold;
    font-size: 16px;
}
.chapter-grid li.on a{
    color: #fff;
}
.chapter-grid li {
    background: #f8f9fa;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.chapter-grid li:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.chapter-grid li a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-radius: 5px;
    transition: color 0.3s ease;
}

.chapter-grid li a:hover {
    color: #007bff;
}

/* 相关推荐 */
.reta {
    padding: 20px;
}

.reta h2 {
    font-size: 20px;
    color: #333;
    margin: 0 0 15px 0;
    font-weight: bold;
}

.reta-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
}

.reta-item {
    display: block;
    width: 12.5%; /* 8个一行：100% / 8 = 12.5% */
    padding: 0 10px 20px 10px;
    box-sizing: border-box;
    text-align: center;
}

/* 每行第一个元素左边距为0 */
.reta-item.first-item {
    padding-left: 0;
}

/* 每行最后一个元素右边距为0 */
.reta-item.last-item {
    padding-right: 0;
}

/* 统一间距 */
.reta-item {
    padding: 0 10px 20px 10px;
}

/* 第三行开始隐藏 */
.reta-item:nth-child(n+17) {
    display: none;
}

.reta_img {
    margin-bottom: 8px;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.reta_img:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.reta_img img {
    width: 100%;
height: 255px !important;
    display: block;
    transition: transform 0.3s ease;
}

.reta_img:hover img {
    transform: scale(1.1);
}

.reta_tit {
    font-size: 12px;
}

.reta_tit a {
    color: #333;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.reta_tit a:hover {
    color: #007bff;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .reta-item {
        width: 16.666%; /* 6个一行 */
    }
    
    .reta-item:nth-child(8n+1) {
        padding-left: 10px;
    }
    
    .reta-item:nth-child(8n) {
        padding-right: 10px;
    }
    
    .reta-item:nth-child(6n+1) {
        padding-left: 0;
    }
    
    .reta-item:nth-child(6n) {
        padding-right: 0;
    }
    
    .reta-item:nth-child(n+13) {
        display: none;
    }
}

@media (max-width: 992px) {
    .dmbase {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .dmpic {
        order: -1;
        margin-bottom: 20px;
    }
    
    .reta-item {
        width: 20%; /* 5个一行 */
    }
    
    .reta-item:nth-child(6n+1) {
        padding-left: 10px;
    }
    
    .reta-item:nth-child(6n) {
        padding-right: 10px;
    }
    
    .reta-item:nth-child(5n+1) {
        padding-left: 0;
    }
    
    .reta-item:nth-child(5n) {
        padding-right: 0;
    }
    
    .reta-item:nth-child(n+11) {
        display: none;
    }
}

@media (max-width: 768px) {
    .chapter-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .reta-item {
        width: 25%; /* 4个一行 */
    }
    
    .reta-item:nth-child(5n+1) {
        padding-left: 10px;
    }
    
    .reta-item:nth-child(5n) {
        padding-right: 10px;
    }
    
    .reta-item:nth-child(4n+1) {
        padding-left: 0;
    }
    
    .reta-item:nth-child(4n) {
        padding-right: 0;
    }
    
    .reta-item:nth-child(n+9) {
        display: none;
    }
}

@media (max-width: 576px) {
    .dmdetail {
        margin: 10px;
    }
    
    .dmbase {
        padding: 15px;
    }
    
    .dmpic img {
        width: 200px;
        height: 277px;
    }
    
    .chapter-grid {
        grid-template-columns: 1fr;
    }
    
    .reta-item {
        width: 33.333%; /* 3个一行 */
    }
    
    .reta-item:nth-child(4n+1) {
        padding-left: 10px;
    }
    
    .reta-item:nth-child(4n) {
        padding-right: 10px;
    }
    
    .reta-item:nth-child(3n+1) {
        padding-left: 0;
    }
    
    .reta-item:nth-child(3n) {
        padding-right: 0;
    }
    
    .reta-item:nth-child(n+7) {
        display: none;
    }
}


.pl {
    width: 100%;
    overflow: hidden;
}

.pl li {
    width: 30%;
    margin-bottom: 15px;
    overflow: hidden;
    list-style: none;
    border-bottom: 1px dotted #dcdcdc;
    margin-left: 1%;
    float: left;
}

.info {
    padding: 10px;
}

p.userif {
    width: 100%;
    overflow: hidden;
    height: 30px;
    line-height: 30px;
}

p.userif span {
    font-weight: bold;
}

p.pltext {
    color: #919090;
    font-size: 13px;
}

p.pltime {
    color: #535151;
    font-size: 13px;
}