:root {
    --primary-color: #7B9E89;
    --primary-light: #A8C5B5;
    --primary-dark: #5A7A66;
    --bg-color: #FDF8F5;
    --bg-card: #FFFFFF;
    --text-main: #4A4A4A;
    --text-light: #7A7A7A;
    --text-muted: #9A9A9A;
    --shadow: 0 2px 12px rgba(123, 158, 137, 0.15);
    --shadow-hover: 0 4px 20px rgba(123, 158, 137, 0.25);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}

.header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    padding: 20px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: white;
}

.hero {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 24px 0;
    overflow: hidden;
}

.hero-cover {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover-placeholder {
    width: 120px;
    height: 160px;
    background: rgba(255,255,255,0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.hero-content {
    padding: 24px;
}

.book-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.book-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.book-meta-item svg {
    width: 16px;
    height: 16px;
    fill: var(--primary-color);
}

.book-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.book-label {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.book-intro {
    color: var(--text-main);
    line-height: 1.8;
    margin-bottom: 20px;
}

.ad-banner {
    background: #f5f5f5;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    margin: 16px 0;
    color: #999;
    font-size: 0.85rem;
    border: 2px dashed #ddd;
}

.ad-banner.top {
    background: linear-gradient(135deg, #f8f8f8, #f0f0f0);
}

.ad-banner.middle {
    background: linear-gradient(135deg, #f5f5f5, #ebebeb);
}

.ad-banner.bottom {
    background: linear-gradient(135deg, #fafafa, #f2f2f2);
}

.section {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 24px 0;
    overflow: hidden;
}

.section-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 2px;
}

.chapter-list {
    padding: 8px 0;
}

.chapter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
    border-bottom: 1px solid #f5f5f5;
}

.chapter-item:hover {
    background: rgba(123, 158, 137, 0.08);
    color: var(--primary-color);
}

.chapter-item:last-child {
    border-bottom: none;
}

.chapter-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chapter-number {
    width: 32px;
    height: 32px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.chapter-name {
    font-weight: 500;
}

.read-btn {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.chapter-item:hover .read-btn {
    background: var(--primary-dark);
}

.footer {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 24px 0;
    padding: 24px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.social-share {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1.2rem;
}

.social-btn.facebook {
    background: #1877F2;
    color: white;
}

.social-btn.twitter {
    background: #1DA1F2;
    color: white;
}

.social-btn:hover {
    transform: scale(1.1);
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.reading-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 16px;
}

.reading-header {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 80px;
    z-index: 90;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-dark);
}

.reading-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.font-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.font-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--primary-light);
    background: var(--bg-card);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--primary-color);
    font-weight: 600;
}

.font-btn:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.font-size-display {
    color: var(--text-light);
    font-size: 0.85rem;
    min-width: 40px;
    text-align: center;
}

.reading-content {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 32px 24px;
    margin-bottom: 20px;
}

.chapter-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary-light);
}

.chapter-text {
    line-height: 1.8;
    color: var(--text-main);
    text-align: justify;
}

.chapter-text p {
    margin-bottom: 1em;
}

.chapter-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
}

.nav-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nav-btn.prev {
    background: var(--bg-card);
    border: 2px solid var(--primary-light);
    color: var(--primary-color);
}

.nav-btn.prev:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.nav-btn.next {
    background: var(--primary-color);
    color: white;
}

.nav-btn.next:hover {
    background: var(--primary-dark);
}

.nav-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.font-size-small .chapter-text {
    font-size: 14px;
}

.font-size-medium .chapter-text {
    font-size: 16px;
}

.font-size-large .chapter-text {
    font-size: 18px;
}

.font-size-xlarge .chapter-text {
    font-size: 20px;
}

@media (max-width: 600px) {
    html {
        font-size: 14px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-cover {
        height: 160px;
    }
    
    .book-cover-placeholder {
        width: 100px;
        height: 130px;
        font-size: 2.5rem;
    }
    
    .hero-content {
        padding: 16px;
    }
    
    .book-title {
        font-size: 1.25rem;
    }
    
    .chapter-item {
        padding: 14px 16px;
    }
    
    .reading-header {
        flex-direction: column;
        gap: 12px;
        top: 70px;
    }
    
    .chapter-nav {
        flex-direction: column;
    }
    
    .footer-links {
        gap: 12px;
    }
}


/* 悬浮下载条 */
.sticky-download-bar {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,0.1);
    padding: 15px;
    z-index: 90;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
}
.download-content {
    max-width: 800px; margin: 0 auto;
    display: flex; justify-content:none; align-items: center;
}
.cta-download-btn {
    background: linear-gradient(135deg, #FF512F 0%, #DD2476 100%);
    color: white; border: none;
    padding: 10px 25px; border-radius: 50px;
    font-weight: bold; cursor: pointer;
    display: flex; align-items: center;
    box-shadow: 0 4px 10px rgba(221, 36, 118, 0.3);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}