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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.8;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    min-height: 100vh;
    background-color: #fff;
    display: flex;
    flex-direction: column;
}

.header {
    background-color: #2c3e50;
    color: #fff;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.menu-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.title {
    font-size: 18px;
    font-weight: 500;
    flex: 1;
    text-align: center;
    margin: 0;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background-color: #fff;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 200;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    background-color: #2c3e50;
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 18px;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.novel-list, .chapter-list {
    padding: 10px;
}

.novel-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.novel-item:hover {
    background-color: #f8f9fa;
}

.novel-item.active {
    background-color: #e3f2fd;
    color: #1976d2;
}

.chapter-item {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
}

.chapter-item:hover {
    background-color: #f8f9fa;
}

.chapter-item.active {
    background-color: #e3f2fd;
    color: #1976d2;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 150;
    display: none;
}

.overlay.show {
    display: block;
}

.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.welcome-screen {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.welcome-screen h2 {
    margin-bottom: 20px;
    color: #333;
}

.chapter-content {
    font-size: 16px;
    line-height: 1.8;
    padding: 10px 0;
}

.chapter-content h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 20px;
}

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

.chapter-nav {
    padding: 20px 10px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}

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

.chapter-nav span {
    color: #1976d2;
    font-size: 14px;
}

.footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 10px;
    position: sticky;
    bottom: 0;
}

.chapter-info {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.nav-buttons {
    display: flex;
    justify-content: space-around;
}

.nav-btn {
    flex: 1;
    margin: 0 5px;
    padding: 10px;
    background-color: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.nav-btn:hover {
    background-color: #34495e;
}

.nav-btn:active {
    background-color: #1a252f;
}

@media (max-width: 600px) {
    .sidebar {
        width: 280px;
    }
    
    .content {
        padding: 15px;
    }
    
    .chapter-content {
        font-size: 15px;
    }
    
    .chapter-content h2 {
        font-size: 18px;
    }
    
    .nav-btn {
        padding: 12px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .sidebar {
        width: 250px;
    }
    
    .content {
        padding: 10px;
    }
    
    .chapter-content {
        font-size: 14px;
    }
}