.reading-header {
    background-color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-btn {
    color: #56b0f0;
    font-size: 16px;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.back-btn:hover {
    background-color: #f0f8ff;
}

.progress-info {
    font-size: 14px;
    color: #666;
}

.chapter-title {
    font-size: 18px;
    color: #333;
    margin: 0 20px;
    text-align: center;
    flex-grow: 1;
}

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

.font-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.reading-controls button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.reading-controls button:hover {
    background-color: #f5f5f5;
    color: #333;
}

#font-size-display {
    min-width: 40px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.theme-selector {
    display: flex;
    gap: 5px;
}

.theme-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.3s;
}

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

.theme-btn.light {
    background-color: #f5f5f5;
}

.theme-btn.sepia {
    background-color: #f4ecd8;
}

.theme-btn.dark {
    background-color: #333;
}

.theme-btn.active {
    border-color: #56b0f0;
}

.reading-menu {
    position: relative;
}

.menu-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    min-width: 120px;
    display: none;
    z-index: 100;
}

.menu-dropdown a {
    display: block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
}

.menu-dropdown a:hover {
    background-color: #f5f5f5;
}

.reading-menu:hover .menu-dropdown {
    display: block;
}

.chapter-content {
    padding: 30px 0;
    line-height: 1.8;
}

.chapter-text {
    font-size: 16px;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

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

body.light-mode {
    background-color: #fff;
    color: #333;
}

body.sepia-mode {
    background-color: #f4ecd8;
    color: #5b4636;
}

body.dark-mode {
    background-color: #222;
    color: #ddd;
}

body.dark-mode .reading-header,
body.dark-mode .chapter-nav {
    background-color: #333;
    color: #ddd;
}

body.dark-mode .chapter-text {
    color: #ddd;
}

body.dark-mode .reading-controls button {
    color: #aaa;
}

body.dark-mode .reading-controls button:hover {
    color: #ddd;
    background-color: #444;
}

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

.chapter-nav a {
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    color: #56b0f0;
    transition: background-color 0.3s;
}

.chapter-nav a:hover {
    background-color: #f0f8ff;
}

.progress-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
}

.recommend-section {
    background-color: #f9f9f9;
    padding: 40px 0;
    border-top: 1px solid #eee;
}


@media (max-width: 768px) {
    .reading-header .container {
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-left {
        order: 1;
        width: 100%;
        justify-content: space-between;
    }

    .chapter-title {
        order: 2;
        margin: 10px 0;
        width: 100%;
    }

    .reading-controls {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .chapter-text {
        font-size: 15px;
    }
}