/* Novel Reader Specific Styles */
.reader-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 목차 컨테이너 */
.toc-container {
    margin-top: 40px;
}

/* 챕터 목록 */
.chapter-list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.chapter-list li {
    margin: 15px 0;
}

.chapter-list a {
    display: block;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: all 0.2s ease;
}

.chapter-list a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 챕터 설명 */
.chapter-desc {
    display: block;
    font-size: 0.9rem;
    font-weight: normal;
    color: #666;
    margin-top: 5px;
    opacity: 0.8;
}

.chapter-list a:hover .chapter-desc {
    color: rgba(255,255,255,0.9);
}

/*=== 본문 마크다운 스타일 ===*/

/* 제목 스타일 */
h1, h2, h3, h4, h5, h6 {
    margin: 40px 0 20px 0;
    color: var(--text-color);
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 15px;
}

h2 {
    font-size: 1.75rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
    color: #666;
}

/* 인용문 스타일 */
blockquote {
    border-left: 4px solid var(--accent-color);
    padding: 20px 25px;
    margin: 35px 0;
    background: #f8f9fa;
    font-style: italic;
    color: #555;
    border-radius: 0 8px 8px 0;
}

blockquote p {
    margin: 0;
    line-height: 1.7;
}

/* 목록 스타일 */
ul, ol {
    margin: 20px 0;
    padding-left: 30px;
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

li {
    margin: 10px 0;
    line-height: 1.7;
}

li strong, li em {
    color: var(--accent-color);
}

/* 인라인 코드 스타일 */
code {
    background: #f0f0f0;
    padding: 3px 6px;
    border-radius: 4px;
    font-family: 'Courier New', 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
    color: #d63384;
}

/* 코드 블럭 스타일 */
pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 25px 0;
    font-family: 'Courier New', 'Fira Code', 'Consolas', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
}

pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* 강조 표시 */
strong {
    color: var(--accent-color);
    font-weight: 600;
}

cite, em {
    font-style: italic;
}

/* 줄바꿈 처리 */
.manuscript-content {
    font-family: "Noto Serif KR", "Apple Myungjo", "Malgun Gothic", serif;
    font-size: 1.15rem;
    line-height: 1.9;
    letter-spacing: 0.02em;
    word-break: break-word;
    white-space: pre-wrap;
}

/* 본문 단락 여백 */
.manuscript-content p {
    margin: 25px 0;
}

/*=== 반응형 디자인 (모바일) ===*/
@media (max-width: 768px) {
    /* 모바일에서 전체 여백 축소 */
    .reader-container {
        padding: 30px 15px;
        max-width: 100%;
    }
    
    /* 모바일에서 제목 여백 조정 */
    h1, h2, h3, h4, h5, h6 {
        margin: 30px 0 15px 0;
    }
    
    /* 모바일에서 본문 단락 여백 축소 */
    .manuscript-content p {
        margin: 20px 0;
    }
    
    /* 모바일에서 인용문 여백 축소 */
    blockquote {
        margin: 25px 0;
        padding: 15px 20px;
    }
    
    /* 모바일에서 코드 블럭 여백 축소 */
    pre {
        margin: 20px -15px; /* 화면 가득 채우기 */
        border-radius: 0;
        padding: 15px;
    }
    
    /* 모바일에서 목차 항목 여백 조정 */
    .chapter-list a {
        padding: 12px 15px;
    }
    
    /* 모바일에서 네비게이션 버튼 크기 조정 */
    .nav-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* 목차 컨테이너 */
.toc-container {
    margin-top: 40px;
}

/* 챕터 목록 */
.chapter-list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.chapter-list li {
    margin: 15px 0;
}

.chapter-list a {
    display: block;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: all 0.2s ease;
}

.chapter-list a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 챕터 설명 */
.chapter-desc {
    display: block;
    font-size: 0.9rem;
    font-weight: normal;
    color: #666;
    margin-top: 5px;
    opacity: 0.8;
}

.chapter-list a:hover .chapter-desc {
    color: rgba(255,255,255,0.9);
}

.manuscript-content {
    font-family: "Noto Serif KR", "Apple Myungjo", "Malgun Gothic", serif;
    font-size: 1.15rem;
    line-height: 1.9;
    letter-spacing: 0.02em;
    word-break: break-word;
    white-space: pre-wrap;
}

.chapter-header {
    border-bottom: 2px solid var(--accent-color);
    margin-bottom: 40px;
    padding-bottom: 20px;
}

.chapter-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.nav-btn {
    padding: 10px 20px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
}

.nav-btn.disabled {
    background: #ccc;
    pointer-events: none;
}
