/* =============================================
   日记小说章节样式 - 完整版本
   小说章节布局和单篇日记的样式
============================================= */

/* 基础样式 */
.diary-novel {
    position: relative;
    padding: 40px 0;
    margin: 0 auto;
    max-width: 800px;
    font-family: "Noto Serif SC", serif;
    color: #333;
    line-height: 1.8;
}

.diary-novel-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* 卷标题 */
.diary-novel-volume {
    margin: 60px 0 30px;
    text-align: center;
    position: relative;
}

.diary-volume-title {
    display: inline-block;
    font-size: 24px;
    font-weight: 700;
    color: #222;
    padding: 0 20px;
    position: relative;
    margin: 0;
}

.diary-volume-title::before,
.diary-volume-title::after {
    content: "◆";
    position: absolute;
    color: #4CAF50;
    font-size: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.diary-volume-title::before {
    left: -10px;
}

.diary-volume-title::after {
    right: -10px;
}

/* 章节条目 */
.diary-novel-chapter {
    margin-bottom: 40px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 30px;
    position: relative;
}

.diary-chapter-content {
    position: relative;
}

/* 章节头部 */
.diary-chapter-header {
    margin-bottom: 20px;
}

.diary-chapter-title {
    font-size: 20px;
    font-weight: 600;
    color: #222;
    margin: 0 0 10px;
    line-height: 1.4;
}

.diary-chapter-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.diary-chapter-title a:hover {
    color: #4CAF50;
}

.chapter-number {
    color: #4CAF50;
    margin-right: 8px;
    font-weight: 500;
}

.diary-chapter-meta {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 8px;
}

.diary-chapter-date {
    white-space: nowrap;
}

.diary-chapter-tags {
    display: flex;
    gap: 8px;
}

/* 章节内容 */
.diary-chapter-excerpt {
    margin-bottom: 20px;
    color: #444;
    line-height: 1.8;
    font-size: 16px;
    text-indent: 2em;
}

.diary-chapter-excerpt p {
    margin-bottom: 1.5em;
}

/* 章节底部 */
.diary-chapter-footer {
    text-align: right;
    margin-top: 20px;
}

.diary-read-more {
    display: inline-block;
    color: #4CAF50;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #4CAF50;
    padding: 5px 15px;
    border-radius: 3px;
}

.diary-read-more:hover {
    color: #fff;
    background-color: #4CAF50;
    text-decoration: none;
}

.diary-login-required {
    color: #666;
    border-color: #666;
    cursor: not-allowed;
}

/* 单章页面 */
.diary-novel-single-container {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

#post-custom- {
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
    margin-bottom: 30px;
}

.novel-volume-title {
    font-size: 18px;
    color: #4CAF50;
    text-align: center;
    margin-bottom: 10px;
}

.chapter-title {
    font-size: 24px;
    text-align: center;
    margin: 0 0 15px;
    color: #222;
    line-height: 1.4;
}

.chapter-number {
    color: #4CAF50;
    margin-right: 10px;
}

.chapter-meta {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.chapter-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.chapter-content p {
    margin-bottom: 1.5em;
    text-indent: 2em;
}

.chapter-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.diary-tags-container {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.diary-tag {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
}

.tag-label {
    color: #666;
    margin-right: 5px;
}

.tag-value {
    padding: 2px 8px;
    border-radius: 3px;
}

.mood-tag .tag-value {
    background-color: #f0f8f0;
    color: #4CAF50;
}

.weather-tag .tag-value {
    background-color: #f0f7f8;
    color: #2F4F4F;
}

.novel-back-link {
    margin-top: 30px;
    text-align: center;
}

.novel-back-link a {
    color: #4CAF50;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
    padding: 5px 15px;
    border: 1px solid #4CAF50;
    border-radius: 3px;
}

.novel-back-link a:hover {
    color: #fff;
    background-color: #4CAF50;
    text-decoration: none;
}

.chapter-edit-link {
    text-align: center;
    margin: 15px 0;
}

.chapter-edit-link a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.chapter-edit-link a:hover {
    color: #4CAF50;
}

/* 归档标题样式 */
.diary-page-header {
    margin-bottom: 40px;
    padding: 0 20px 20px;
    border-bottom: 1px solid #e9ecef;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.diary-archive-heading {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.diary-page-title {
    font-size: 28px;
    margin: 0;
    color: #222;
    line-height: 1.3;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
}

.diary-archive-intro {
    font-size: 16px;
    color: #6c757d;
    line-height: 1.5;
    position: relative;
    bottom: -2px;
    flex: 1;
    min-width: 200px;
}

.diary-archive-notice {
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
    margin: 5px 0 0 0;
}

/* 密码保护 */
.diary-password-form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
}

.diary-password-form {
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.diary-password-form h2 {
    margin-top: 0;
    color: #222;
    text-align: center;
}

.diary-password-form p {
    text-align: center;
    margin-bottom: 20px;
}

.diary-password-error {
    color: #d9534f;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
}

.diary-back-link {
    margin-top: 15px;
    text-align: center;
}

.diary-back-link a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.diary-back-link a:hover {
    color: #4CAF50;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .diary-novel {
        padding: 20px 15px;
    }
    
    .diary-volume-title {
        font-size: 20px;
    }
    
    .diary-chapter-title {
        font-size: 18px;
    }
    
    .diary-chapter-excerpt {
        font-size: 15px;
    }
    
    .diary-novel-single-container {
        padding: 20px 15px;
    }
    
    .chapter-title {
        font-size: 20px;
    }
    
    .chapter-content {
        font-size: 15px;
    }
    
    .diary-chapter-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .diary-archive-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .diary-page-title {
        font-size: 24px;
    }
    
    .diary-archive-intro {
        font-size: 15px;
        bottom: 0;
        margin-top: 5px;
    }
}

/* 加载动画 */
@keyframes diary-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.diary-novel-chapter {
    animation: diary-fade-in 0.3s ease-out forwards;
}

/* 打印样式 */
@media print {
    .diary-novel {
        padding: 0;
        max-width: 100%;
    }
    
    .diary-novel-chapter {
        page-break-inside: avoid;
        border-bottom: none;
        padding-bottom: 10mm;
    }
    
    .diary-read-more,
    .diary-entry-actions,
    .chapter-edit-link {
        display: none;
    }
    
    .diary-volume-title {
        color: #000 !important;
    }
    
    .diary-page-header {
        display: none;
    }
}