/* 챕터 페이지 전용 스타일 */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF8C00, #FF6B6B);
    z-index: 9999;
    transition: width 0.2s ease;
}

.chapter-container {
    padding: 2rem 0 5rem;
    background: #f8f9fa;
}

.chapter-container .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.chapter-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}

.chapter-sidebar {
    position: relative;
}

.chapter-sidebar .sidebar-sticky {
    position: sticky;
    top: 100px;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.chapter-sidebar h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--color-dark);
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.chapter-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.chapter-nav a {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    transition: var(--transition-fast);
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}

.chapter-nav a:hover,
.chapter-nav a.active {
    background: #f0f0f0;
    color: var(--color-primary);
    border-left-color: var(--color-earth);
    padding-left: 1.2rem;
}

.chapter-actions {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.btn-bookmark {
    width: 100%;
    padding: 0.8rem;
    background: var(--gradient-cosmic);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.btn-bookmark:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.chapter-content {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.chapter-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 3rem 2.5rem;
}

.chapter-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.chapter-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.chapter-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.chapter-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.chapter-body {
    padding: 3rem;
}

.content-section {
    margin-bottom: 4rem;
}

.content-section h2 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: var(--color-dark);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--color-earth);
    position: relative;
}

.content-section h2::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: var(--gradient-earth);
}

.content-section h3 {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    color: var(--color-primary);
    margin: 2rem 0 1.5rem;
}

.content-section h4 {
    font-size: 1.3rem;
    color: #333;
    margin: 1.5rem 0 1rem;
}

.content-section p {
    line-height: 1.9;
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.first-paragraph {
    font-size: 1.15rem;
    line-height: 2;
    color: #222;
}

.opening-quote {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 2.5rem;
    border-radius: 15px;
    margin: 2rem 0;
    border-left: 5px solid var(--color-earth);
}

.opening-quote blockquote {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    line-height: 1.8;
    color: #333;
    margin: 0;
    font-style: italic;
}

.opening-quote cite {
    display: block;
    margin-top: 1rem;
    font-size: 1rem;
    color: #666;
    font-style: normal;
}

.insight-box {
    display: flex;
    gap: 1.5rem;
    background: linear-gradient(135deg, #fff5e6 0%, #ffe6cc 100%);
    padding: 2rem;
    border-radius: 15px;
    margin: 2.5rem 0;
    border: 2px solid #f7b731;
}

.insight-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--gradient-earth);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--color-dark);
}

.insight-content h4 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: #d97706;
    margin-bottom: 1rem;
}

.insight-content p {
    line-height: 1.8;
    color: #555;
}

.numbered-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

.list-item {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
    transition: var(--transition-normal);
}

.list-item:hover {
    background: #f0f2f5;
    transform: translateX(5px);
}

.list-item .number {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--gradient-cosmic);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.item-content h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--color-dark);
    margin-bottom: 0.8rem;
}

.item-content p {
    color: #555;
}

.structure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.structure-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border: 2px solid transparent;
}

.structure-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-earth);
}

.structure-card .card-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.structure-card .card-icon i {
    font-size: 2rem;
    color: white;
}

.structure-card h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--color-dark);
    margin-bottom: 0.8rem;
}

.structure-card p {
    font-size: 0.95rem;
    color: #666;
}

.guide-box {
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    padding: 2.5rem;
    border-radius: 15px;
    margin: 2rem 0;
    border: 2px solid #4ecdc4;
}

.guide-box h3 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: #00695c;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.guide-section {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.guide-section:last-child {
    margin-bottom: 0;
}

.guide-section h4 {
    font-size: 1.2rem;
    color: #00796b;
    margin-bottom: 0.8rem;
}

.guide-section p {
    color: #555;
    line-height: 1.8;
}

.tip-box {
    display: flex;
    gap: 1.5rem;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    border-left: 5px solid #ff9800;
}

.tip-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.tip-content strong {
    display: block;
    font-size: 1.1rem;
    color: #e65100;
    margin-bottom: 0.5rem;
}

.tip-content p {
    color: #555;
    margin: 0;
}

.author-message-box {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 3rem;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

.message-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #ccc;
}

.author-seal {
    width: 100px;
    height: 100px;
    background: var(--gradient-earth);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--color-dark);
    text-align: center;
    line-height: 1.3;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
}

.author-info h3 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.author-info p {
    color: #666;
    font-size: 1rem;
}

.message-content p {
    line-height: 1.9;
    color: #333;
    margin-bottom: 1.5rem;
}

.signature {
    text-align: right;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #ccc;
}

.chapter-navigation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid #e0e0e0;
}

.nav-item {
    padding: 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-prev {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    color: var(--color-dark);
}

.nav-next {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: right;
}

.nav-index {
    background: var(--gradient-earth);
    color: var(--color-dark);
    align-items: center;
    justify-content: center;
    font-weight: 700;
    gap: 0.5rem;
}

.nav-item:hover:not(.empty) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.nav-item.empty {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

.nav-title {
    font-weight: 700;
    font-size: 1.05rem;
}

@media (max-width: 1024px) {
    .chapter-wrapper {
        grid-template-columns: 1fr;
    }
    
    .chapter-sidebar .sidebar-sticky {
        position: static;
    }
}

@media (max-width: 768px) {
    .chapter-header {
        padding: 2rem 1.5rem;
    }
    
    .chapter-title {
        font-size: 2rem;
    }
    
    .chapter-subtitle {
        font-size: 1.1rem;
    }
    
    .chapter-body {
        padding: 2rem 1.5rem;
    }
    
    .content-section h2 {
        font-size: 1.7rem;
    }
    
    .chapter-navigation {
        grid-template-columns: 1fr;
    }
    
    .nav-index {
        order: -1;
    }
    
    .insight-box,
    .tip-box,
    .message-header {
        flex-direction: column;
    }
    
    .structure-grid {
        grid-template-columns: 1fr;
    }
}
