﻿/* xinxi.css - xinxi.html 独有样式 */

/* 小说信息区域 */
.novel-info {
    background-color: var(--light-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    display: flex;
    gap: 30px;
}

.novel-cover {
    width: 200px;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.novel-details {
    flex: 1;
}

.novel-details h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.novel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    color: #666;
    font-size: 0.95rem;
}

.novel-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.novel-status {
    background-color: #e74c3c;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.novel-description {
    color: #555;
    line-height: 1.8;
    margin-bottom: 20px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn:hover {
    background-color: #2980b9;
    text-decoration: none;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* 最新章节区域 - 响应式两列布局 */
.latest-chapters {
    background-color: var(--light-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

/* 修改章节列表为两列网格布局 */
.chapter-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 默认两列 */
    gap: 0; /* 章节项之间无间隙，通过内部边框分隔 */
}

.chapter-list li {
    border-bottom: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0; /* 添加右边框 */
}

/* 移除每行的第2个章节项的右边框 */
.chapter-list li:nth-child(2n) {
    border-right: none;
}

/* 移除最后两行的底部边框 */
.chapter-list li:nth-last-child(-n+2) {
    border-bottom: none;
}

/* 如果章节数为奇数，确保最后一个章节项不显示底部边框 */
.chapter-list li:last-child:nth-child(odd) {
    border-bottom: none;
}

.chapter-list a {
    display: block;
    padding: 12px 15px; /* 增加内边距 */
    color: var(--light-text);
    transition: all 0.2s;
    height: 100%; /* 使链接填满整个li高度 */
    display: flex;
    align-items: center; /* 垂直居中 */
}

.chapter-list a:hover {
    color: var(--secondary-color);
    text-decoration: none;
    padding-left: 20px; /* 悬停时左侧内边距增加 */
    background-color: #f8f9fa; /* 添加悬停背景色 */
}

.chapter-list .latest {
    color: var(--accent-color);
    font-weight: bold;
    position: relative;
}

/* 为最新章节添加小标记 */
.chapter-list .latest::before {
    content: "NEW";
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: middle;
}

/* xinxi.html 独有响应式设计 */
@media (max-width: 768px) {
    .novel-info {
        flex-direction: column;
        padding: 20px;
    }
    
    .novel-cover {
        width: 150px;
        height: 210px;
        align-self: center;
    }
    
    .novel-details h1 {
        font-size: 1.5rem;
    }
    
    .novel-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .latest-chapters {
        padding: 20px;
    }
    
    .chapter-list {
        grid-template-columns: 1fr; /* 手机端改为1列 */
    }
    
    /* 手机端：移除所有右边框 */
    .chapter-list li {
        border-right: none;
    }
    
    /* 手机端：只保留最后一个章节项的底部边框 */
    .chapter-list li:not(:last-child) {
        border-bottom: 1px solid #f0f0f0;
    }
    
    .chapter-list li:last-child {
        border-bottom: none;
    }
    
    .chapter-list a {
        padding: 10px 12px; /* 手机端减少内边距 */
    }
    
    .chapter-list a:hover {
        padding-left: 15px; /* 手机端悬停效果调整 */
    }
}